<% option explicit 'response.buffer = true response.buffer = false %> <% ' Function List ' fnFormatInput(sText) ' fnFormatOutput(sText) ' fnFormatSQL(sText) ' fnGetContent(nContentID) ' fnGetRandomString(nLength) ' Write page information to tbVisitors 'sVisitorsURL = fnFormatSQL(left(request.servervariables("URL"),100)) 'sVisitorsURLQuerystring = fnFormatSQL(left(request.servervariables("QUERY_STRING"),100)) 'sVisitorsIPAddress = request.servervariables("REMOTE_ADDR") 'sVisitorsReferer = request.servervariables("HTTP_REFERER") 'nVisitorsQuerystring = Instr(sVisitorsReferer,"?") 'if nVisitorsQuerystring <> 0 then ' sVisitorsRefererQuerystring = mid(sVisitorsReferer,nVisitorsQuerystring,100) ' sVisitorsReferer = left(sVisitorsReferer, nVisitorsQuerystring - 1) 'end if 'sVisitorsRefererQuerystring = fnFormatSQL(left(sVisitorsRefererQuerystring,100)) 'sVisitorsReferer = fnFormatSQL(left(sVisitorsReferer,100)) 'dDate = Now() 'set cnVisitors = server.createobject("ADODB.connection") 'cnVisitors.open Application("Database") 'sSQL = "INSERT INTO tbVisitors (sIPAddress, sURL, sURLQuerystring, sReferer, sRefererQuerystring, sClientID, dDate) VALUES ('" & sVisitorsIPAddress & "', '" & sVisitorsURL & "', '" & sVisitorsURLQuerystring & "', '" & sVisitorsReferer & "', '" & sVisitorsRefererQuerystring & "', '" & Session("sClientID") & "', '" & dDate & "')" 'cnVisitors.execute sSQL 'cnVisitors.close 'set cnVisitors = nothing function fnGetRandomString(nLength) ' Generates a random string of capital letters. ' Length of string depends on parameter supplied fnGetRandomString = "" if isnumeric(nLength) then Randomize for i = 1 to nLength fnGetRandomString = fnGetRandomString & chr((rnd(1)*25) + 65) next end if end function function fnGetContent(nContentID) ' Look up contentID and write out content If not IsNumeric(nContentID) or isNull(nContentID) then response.write "Error: Content Number: " & nContentID & " is invalid." else set rsContent = server.createobject("ADODB.recordset") sSQL = "select sContent from tbContent WHERE nContentID = " & nContentID rsContent.open sSQL,Application("Database"),0,1 if rsContent.eof then response.write "Error: Content Number: " & nContentID & " is missing." else response.write rsContent("sContent") end if rsContent.close set rsContent = nothing end if end function Function fnFormatSQL(sText) ' The fnFormatSQL function makes any string SQL safe, by replacing single quotes with double quotes if IsNull(sText) then fnFormatSQL = "" else fnFormatSQL = Replace(sText, "'", "'") end if End Function Function fnFormatInput(sText) ' The fnFormatInput function replaces double quotes with HTML quote - " sText = sText & "" if IsNull(sText) then fnFormatInput = "" else fnFormatInput = Replace(sText, chr(34), """) end if End Function Function fnFormatOutput(sText) ' Combines the following two: ' The Replace CR LF (Carriage Return, Line Feed) function replaces CRLF with  
' If its null or blank make it  
sText = sText & "" if sText = "" then fnFormatOutput = " " else fnFormatOutput = Replace(sText, vbCRLF , " 
") end if End Function Function fnFormatCatalog(sText) ' Modified version of the Format Output to replace bullets, but not vbCRLF sText = sText & "" if sText = "" then fnFormatCatalog = " " else fnFormatCatalog = Replace(sText, "" , "") end if End Function %> HCM Hitachi Cable Manchester Manufacturers of Copper Premise Wire, Fiber Optic, Electronics Round Cable and Electrical Ribbon Cable <%if instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") <> 0 then%> <%else%> <%end if%>
 
  
 
 
      
 
 
 
 
freecatalogs.gif (6806 bytes)
 
 

All data is for reference only and is subject to change.


Home | About HCM | Products | Training & Certificate | News & Updates | Careers | Find a Cable Specialist | Literature | Search
Contact Us | Site Map