![]() |
|||||||
|
<%
function getSelection( in_usrid, in_usr , in_id , in_entity )
strBk = ""
imgFile = ""
for i = 1 to len(in_entity)
if mid(in_entity, i, 1) = " " then
imgFile = imgFile & "_"
else
if ( asc(mid(in_entity, i)) >= 48 AND asc(mid(in_entity, i)) <= 57 ) OR _
( asc(mid(in_entity, i)) >= 65 AND asc(mid(in_entity, i)) <= 90 ) OR _
( asc(mid(in_entity, i)) >= 97 AND asc(mid(in_entity, i)) <= 122 ) then
imgFile = imgFile & mid(in_entity, i, 1)
end if
end if
next
imgFile = imgFile & ".gif"
set myFileObject = server.createObject("Scripting.FileSystemObject")
if not ( in_usrid = in_usr ) then
strBk = "bordercolor='#990000'"
if myFileObject.FileExists(server.mapPath("_images/" & imgFile )) then
strRet = strRet & " " & in_entity & "" else strRet = strRet & in_entity end if else if in_usrid = in_usr then strBk = "bordercolor='green'" end if if myFileObject.FileExists(server.mapPath("_images/" & imgFile )) then strRet = strRet & " " & in_entity & "" else strRet = strRet & in_entity end if end if getSelection = " | " & strRet & " | " end function Dim Con, sConnString Set Con = Server.CreateObject("ADODB.Connection") 'sConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\englishteeth\db\db.mdb") & ";PWD=teeth" sConnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=englishteeth;UID=irobinson;PWD=N00dles;OPTION=35" 'sConnString = "DSN=teeth" Con.Open(sConnString) 'select all the characters userKey = TRIM( Request.Cookies( "k" ) ) if userKey <> "" then user_divider = INSTR( userkey, "p") user_userID = LEFT( userKey, user_divider - 1 ) Set user_rs = Server.CreateObject("ADODB.Recordset") user_SQL = "SELECT u.name AS name , u.username AS username, g.withid AS withid , i.entity AS identity " user_SQL = user_SQL & "FROM (users AS u INNER JOIN h_guests AS g ON u.userid = g.userid) LEFT JOIN h_identity AS i ON g.identity = i.id " user_SQL = user_SQL & "WHERE g.userid = " & user_userID user_rs.Open user_SQL, Con If Not (user_rs.BOF AND user_rs.EOF) Then If not isnull(user_rs("identity")) Then user_userName = user_rs("identity") else user_userName = "" end if end if End If if user_userName <> "" then %>
| home | messages | about you | contact us | whats new |