<% '*************************************************************************** '* * '* This application is developed and owned by Thomas Idea Co.,Ltd. * '* Map Ta Phut Industrial Estate is granted license from Thomas Idea * '* for its internal use only. Usage on any parts of the program without * '* a permission from Thomas Idea Co.,Ltd. is illegal and prohibited. * '* This application is protected by the International Right Law. * '* - All rights reserved. * '* * '*************************************************************************** %> <% '*************************************************************************** '* * '* This application is developed and owned by Thomas Idea Co.,Ltd. * '* Map Ta Phut Industrial Estate is granted license from Thomas Idea * '* for its internal use only. Usage on any parts of the program without * '* a permission from Thomas Idea Co.,Ltd. is illegal and prohibited. * '* This application is protected by the International Right Law. * '* - All rights reserved. * '* * '*************************************************************************** %> <% Set conn = Server.CreateObject("ADODB.Connection") if conn.state = 0 then conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("db/IEAHDB.mdb") end if %> <% '*************************************************************************** '* * '* This application is developed and owned by Thomas Idea Co.,Ltd. * '* Map Ta Phut Industrial Estate is granted license from Thomas Idea * '* for its internal use only. Usage on any parts of the program without * '* a permission from Thomas Idea Co.,Ltd. is illegal and prohibited. * '* This application is protected by the International Right Law. * '* - All rights reserved. * '* * '*************************************************************************** %> <% dateInsYear = 0 dateSchYear = 0 Years = 543 ' Use for insert date. Function getLongDate(field) getLongDate = "" if field <> "" then dy = mid(field, 1, 2) mn = mid(field, 4, 2) yr = mid(field, 7, 4) Dim fullMonth fullMonth = Array("January","February","March","April","May","June","July","August","September","October","November","December") getLongDate = fullMonth(CInt(mn) - 1) +" "+ CStr(dy) +", "+ CStr(CInt(yr)+Years) end if End Function ' Use for search date. Function getSchLongDate(field) getSchLongDate = "" if field <> "" then dy = mid(field, 1, 2) mn = mid(field, 4, 2) yr = mid(field, 7, 4) Dim fullMonth fullMonth = Array("January","February","March","April","May","June","July","August","September","October","November","December") getSchLongDate = fullMonth(CInt(mn) - 1) +" "+ CStr(dy) +", "+ CStr(CInt(yr)+dateSchYear) end if End Function '######################## Start Get Page ###################### Function getPageList(noPage, currentPage) Dim pageList pageList = "Page " pageList = pageList & "of " & noPage getPageList = pageList End Function '######################## End Get Page ###################### Function setScriptString(str) strTmp = "" strTmp = Replace(str, "\", "\\") strTmp = Replace(strTmp, "'", "\'") strTmp = Replace(strTmp, Chr(34), "\" & Chr(34)) setScriptString = strTmp End Function Function getOptionArray(sqlValue, variableName, functionName, remain) resultStr = "" Set ObjRSArr = Server.CreateObject("ADODB.Recordset") ObjRSArr.Open sqlValue,conn,1,2 rows = 0 If not ObjRSArr.EOF Then Do While not ObjRSArr.EOF resultStr = resultStr & variableName & "[0][" & rows & "] = " & Chr(34) & setScriptString(ObjRSArr(0)) & Chr(34) & ";" & Chr(13) resultStr = resultStr & variableName & "[1][" & rows & "] = " & Chr(34) & setScriptString(ObjRSArr(1)) & Chr(34) & ";" & Chr(13) resultStr = resultStr & variableName & "[2][" & rows & "] = " & Chr(34) & setScriptString(ObjRSArr(2)) & Chr(34) & ";" & Chr(13) rows = rows + 1 ObjRSArr.MoveNext Loop resultStr = "var " & variableName & " = new Array(new Array(" & rows & "), new Array(" & rows & "), new Array(" & rows & "));" & resultStr resultStr = resultStr & "function " & functionName & "(firstObj, secondObj) {" resultStr = resultStr & "refreshDropDown(firstObj, secondObj, " & variableName & ", " & remain & ");" resultStr = resultStr & "}" Else 'resultStr = "" resultStr = "var " & variableName & " = new Array(new Array(" & rows & "), new Array(" & rows & "), new Array(" & rows & "));" & resultStr resultStr = resultStr & "function " & functionName & "(firstObj, secondObj) {" resultStr = resultStr & "refreshDropDown(firstObj, secondObj, " & variableName & ", " & remain & ");" resultStr = resultStr & "}" End If ObjRSArr.Close Set ObjRSArr = Nothing getOptionArray = resultStr End Function ' Use for get field date from database. Function ConvertDate(field) ConvertDate = "" if field <> "" then str = CDate(field) ConvertDate = ConvertString(Day(str)) + "/" + ConvertString(Month(str)) + "/" + CStr(Year(str)) end if End Function ' Use for get field date from database. Function displayDate(field) str = CDate(field) Dim fullMonth fullMonth = Array("January","February","March","April","May","June","July","August","September","October","November","December") displayDate = fullMonth(Month(str) - 1) +" "+ CStr(Day(str)) +", "+ CStr(Year(str)) End Function Function getFileType(fileName) if not(isNull(fileName)) then getFileType = mid(fileName,instr(fileName,".")+1,len(fileName)-instr(fileName,".")) end if End Function Function getRealFileName(fileID, fileName) if fileID = "" or fileName = "" then getRealFileName = "" else getRealFileName = fileID &"."& getFileType(fileName) end if End Function Function subStrList(str) if len(str) > 50 then str = mid(str, 1, 50) + "..." end if subStrList = str End Function Function subStrList3(str,num) if len(str) > num then str = mid(str, 1, num) + "..." end if subStrList3 = str End Function Function subString(str,number) st = str j=1 k=0 str2 = "" For i = 1 To Len(st) temp = Mid(st, i, number) k = InStr(temp, " ") If k <> 0 Then If InStr(temp, vbCrLf) > 0 Then j = InStr(temp, vbCrLf) temp = Left(temp, InStr(temp, vbCrLf)) & "
" str2 = str2 & temp i = i + j - 1 Else str2 = str2 & temp i = i + (number-1) End If k = 0 Else If InStr(temp, vbCrLf) > 0 Then j = InStr(temp, vbCrLf) temp = Left(temp, InStr(temp, vbCrLf)) & "
" str2 = str2 & temp i = i + j - 1 Else temp = temp & "
" str2 = str2 & temp i = i + (number-1) End If End If Next subString = str2 End Function Function toNewLine(str) If not isNULL(str) Then str = Replace(str, vbCrLf, "
") toNewLine = str End If End Function Function toFormString(str) strTmp="" strTmp = Replace(str, "\", "\\") strTmp = Replace(strTmp, "'", "\'") strTmp = Replace(strTmp, Chr(34), "\" & Chr(34)) toFormString = strTmp End Function Function setHTMLString(str) strTmp = "" If str <> "" Then strTmp = Replace(str, "&", "&") strTmp = Replace(strTmp, "'", "'") strTmp = Replace(strTmp, Chr(34), """) strTmp = Replace(strTmp, "<", "<") strTmp = Replace(strTmp, ">", ">") End If setHTMLString = strTmp End Function Function toHTMLString(str) strTmp = "" If str <> "" Then strTmp = Replace(str, "&", "&") strTmp = Replace(strTmp, "'", "'") strTmp = Replace(strTmp, Chr(34), """) strTmp = Replace(strTmp, "<", "<") strTmp = Replace(strTmp, ">", ">") End If toHTMLString = strTmp End Function Function getTextValue(colName, colValue) colValue = Replace(colValue, "'", "''") If colValue <> "" Then getTextValue = " AND " & colName & " LIKE '" & UCase(colValue) & "' " Else getTextValue = "" End If End Function Function replaceNvl(str, newstr) if str = null OR str = "" OR UCase(input) = "NULL" then replaceNvl = newstr else replaceNvl = str end if End Function Function getTextCriteria(colName, colValue) colValue = Replace(colValue, "'", "''") If colValue <> "" Then getTextCriteria = " AND " & colName & " LIKE '%" & colValue & "%' " Else getTextCriteria = "" End If End Function Function getSelectCriteria(colName, colValue) If UCase(colValue) <> "DASH" And UCase(colValue) <> "ALL" Then getSelectCriteria = " AND " & colName & " = " &"'"&colValue &"'"&"" ElseIf UCase(colValue) = "ALL" Then getSelectCriteria = "" End If End Function Function getSelectCriteria2(colName, colValue) If UCase(colValue) <> "DASH" And UCase(colValue) <> "ALL" Then getSelectCriteria2 = " AND " & colName & " = " & colValue &"" ElseIf UCase(colValue) = "ALL" Then getSelectCriteria2 = "" End If End Function Function getDateCriteria1(colName1, colStart) If UCase(colStart) <> "" Then getDateCriteria1 = " AND " & colName1 & " = #" & getSchLongDate(colStart) & "# " Else getDateCriteria1 = "" End If End Function Function getDateCriteria2(colName, colStart, colEnd) If UCase(colStart) <> "" And UCase(colEnd) <> "" Then getDateCriteria2 = " AND " & colName & " >= #" & getSchLongDate(colStart) & "# AND " & colName & " <= #" & getSchLongDate(colEnd) & "# " Else getDateCriteria2 = "" End If End Function Function ConvertString(str) if CInt(str) < 10 then ConvertString = "0" + CStr(str) else ConvertString = CStr(str) end if End Function Function getMonthNameThai(value) Dim monthNameThai monthNameThai = Array("มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฎาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม") getMonthNameThai = monthNameThai(value - 1) End Function Function getMonthNameEng(value) Dim monthNameEng monthNameEng = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") getMonthNameEng = monthNameEng(value - 1) End Function function sendMail(fromMail, fromName, toMail, subject, message) on error resume next Set Mail = Server.CreateObject("aspSmartMail.SmartMail") Mail.Server = clhMailHost Mail.SenderAddress = fromMail Mail.SenderName = fromName Mail.Recipients.Add clhMail Mail.ContentType = "text/html" Mail.Subject = subject Mail.Body = message Mail.SendMail set Mail = nothing End function Function getNameType(value) SQL = "SELECT * FROM PRMTR WHERE PRMTTYP ='INVSTMNT' AND PRMTVL = '"&value&"'" Set ObjRS1 = Server.CreateObject("ADODB.Recordset") ObjRS1.Open SQL,conn, ,2 getNameType = ObjRS1("PRMTDSCR") ObjRS1.Close Set ObjRS1 = Nothing End Function Function getNewsType(value) SQL = "SELECT * FROM PRMTR WHERE PRMTTYP ='RSTR' AND PRMTVL = '"&value&"'" Set ObjRS1 = Server.CreateObject("ADODB.Recordset") ObjRS1.Open SQL,conn, ,2 getNewsType = ObjRS1("PRMTDSCR") ObjRS1.Close Set ObjRS1 = Nothing End Function Function mailMessage(topic, value) message = " " message = message + " " + topic + "" message = message + " :" message = message + " " + value + "" message = message + " " mailMessage = message End Function %> <% '*************************************************************************** '* * '* This application is developed and owned by Thomas Idea Co.,Ltd. * '* Map Ta Phut Industrial Estate is granted license from Thomas Idea * '* for its internal use only. Usage on any parts of the program without * '* a permission from Thomas Idea Co.,Ltd. is illegal and prohibited. * '* This application is protected by the International Right Law. * '* - All rights reserved. * '* * '*************************************************************************** %> <% noOfRecords=10 ' #### Library Message #### searchResult = " No result was found. Please revise your criteria." invalidLogin = "Invalid login or password. Please, try again" ' #### Menu #### frontMsg = ">> " addMsg = ">> Insert" editMsg =">> Update" viewMsg = ">> View" newsMsg = "News Information" faqMsg = "Faq" chgPwdMsg = "Change Password" logoutMsg = "Logout" newsPg = "schnws.asp" faqPg = "schfaq.asp" chgPwdPg = "chgpwd.asp" logoutPg = "lgtadm.asp" msgNoResult= " " msgNoResult= msgNoResult + "  " msgNoResult= msgNoResult + " " msgNoResult= msgNoResult + " " msgNoResult= msgNoResult + "  " msgNoResult= msgNoResult + "" msgNoResult= msgNoResult + " " + searchResult+ "" msgNoResult= msgNoResult + " " %> <% '*************************************************************************** '* * '* This application is developed and owned by Thomas Idea Co.,Ltd. * '* Map Ta Phut Industrial Estate is granted license from Thomas Idea * '* for its internal use only. Usage on any parts of the program without * '* a permission from Thomas Idea Co.,Ltd. is illegal and prohibited. * '* This application is protected by the International Right Law. * '* - All rights reserved. * '* * '*************************************************************************** %> <% elctflPATH = "/images/elctfl/" %> <% 'This below is counter. Set fileObj = CreateObject("Scripting.FileSystemObject") counterFile = Server.MapPath(elctflPATH + "counter.txt") Set fileRead = fileObj.OpenTextFile(counterFile) hits = Clng(fileRead.ReadLine) fileRead.close If session("sssnVisitor") = "" Then session("sssnVisitor") = "visit" hits = hits + 1 Set fileWrite = fileObj.CreateTextFile(counterFile, True) fileWrite.WriteLine(hits) fileWrite.Close End If Set fileObj = Nothing PathImg = "images/elctfl/nws/" %> :: Map Ta Phut Industrial Estate ::
<% SQL = "SELECT * FROM NWS WHERE NWSID IS NOT NULL" SQL = SQL + " AND HGHFLG = True" SQL = SQL + " ORDER BY NWSID DESC" Set ObjRS = Server.CreateObject("ADODB.Recordset") ObjRS.Open SQL,conn, ,2 %> <% fileName = "images/adm/logout_bg.gif " fileName2 = "images/adm/logout_bg.gif " do while not ObjRS.eof ttl=ObjRS("TTL") ttl=subStrList3(ttl,30) if ObjRS("IMG")<> "" then fileName = PathImg & "img" & getRealFileName(ObjRS("NWSID") ,ObjRS("IMG")) else fileName = "images/nws/img_01.jpg " end if id1=ObjRS("NWSID") ObjRS.MoveNext if not ObjRS.eof then ttl2=ObjRS("TTL") ttl2=subStrList3(ttl2,30) if ObjRS("IMG")<> "" then fileName2 = PathImg & "img" & getRealFileName(ObjRS("NWSID") ,ObjRS("IMG")) else fileName2 = "images/nws/img_01.jpg " end if id2=ObjRS("NWSID") end if exit do loop %> <% Set ObjRS = Nothing conn.Close Set conn = Nothing %>


   เกี่ยวกับนิคมอุตสาหกรรมมาบตาพุด



   นิคมอุตสาหกรรมเชิงเศรษฐนิเวศน์



   ประสิทธิภาพเชิงนิเวศน์เศรษฐกิจ
                     
I-EA-T encourages private sector to develop and manage land and property inside the industrial estate.Industrial estates offer prime location for business of all size either in manufacturing, servicing or trading.

 

You are visitor number : <%=hits%>
© 2004 Map Ta Phut Industrial Estate. All Rights Reserved. Designed by Thomasidea.