<% Option Explicit Response.Expires=0 Call Main Function IIF(bBool, Alternate, Original) If bBool Then IIF = Alternate Else IIF = Original End If End Function Sub Main() 'On Error Resume Next '---- CursorTypeEnum Values ---- Const adOpenForwardOnly = 0 '---- LockTypeEnum Values ---- Const adLockReadOnly = 1 '---- CursorLocationEnum Values ---- Const adUseServer = 2 '---- CommandTypeEnum Values ---- Const adCmdText = &H0001 Dim conn, showblank,shownull,thisfield,CommentField Dim rs, howmanyfields,i,average, numberofratings,score Dim strSQL,Company Dim Name Dim strQuery Dim Title Dim strOpen strOpen = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" strOpen = strOpen & Server.Mappath ("\_Database\OnLine.mdb") strOpen = strOpen & ";User ID=Admin;Password=" rem strQuery=Request.querystring("tolid") rem Name=Mid(strQuery,1,6) Name = Request.querystring("tolid") strSQL = "SELECT [FirstName], [LastName], [City], [Height], [Eyes], [Hair], [Model], [Dance], [Sing], [Present], [VoiceOver], [Stunt], [Promo], [Company], [Act],[MemPage], [AgentURL], [Experience] FROM [CurrentTalent] WHERE ((TOLID) =""" & cstr(Name) & """);" %> Talent Profile <% Set conn = Server.CreateObject("ADODB.CONNECTION") set rs = Server.CreateObject("ADODB.RECORDSET") rs.CursorLocation = adUseServer conn.open strOpen rs.open strSQL, conn, adopenforwardonly, adlockreadonly, adCmdText %> ") response.write ("") response.write ("") If Not IsNull(rs("MemPage")) then response.write ("") End If If Not ISNull(rs("Experience")) then response.write ("") end if '****************check if user is a casting director******************** If Session("User") = "cast" or Session("User") = "agent" then rs.close response.write ("
<% if not rs.bof and not rs.eof then response.write ("

") response.write rs("FirstName") & " " & rs("LastName") response.write ("
") response.write ("

") if rs("Act")=-1 then response.write ("Actor  ") if rs("Model")=-1 then response.write ("Model   ") if rs("Dance")=-1 then response.write ("Dancer   ") if rs("Sing")=-1 then response.write ("Singer   ") if rs("VoiceOver")=-1 then response.write ("Voice Overs   ") if rs("Present")=-1 then response.write ("Presenter   ") if rs("Promo")=-1 then response.write ("Promotional Work   ") if rs("Stunt")=-1 then response.write ("Stunts   ") response.write ("") response.write ("

") response.write ("Height
") response.write ("
") response.write ("") response.write rs("Height") If Not IsNull(rs("Height")) Or rs("Height")=0 then response.write ("cm") Else response.write (" ") End If response.write ("
") response.write ("Eyes
") response.write ("
") response.write ("") response.write rs("Eyes") response.write ("
") response.write ("Hair
") response.write ("
") response.write ("") response.write rs("Hair") response.write ("
") response.write ("City:  ") response.write ("") response.write ("") response.write rs("City") response.write ("
Agent:  ") response.write ("") response.write ("") & rs("Company") & ("
More Details:   Click here for a full resume
Synopsis:
") & vbCrLf response.write ("") & rs("Experience") End If response.write ("
Casting Industry Ratings:
") & vbCrLf strSQL= "select * from TalentRatings where ((TOLID) =""" & cstr(Name) & """);" rs.open strSQL, conn, adopenforwardonly, adlockreadonly, adCmdText If rs.eof then rs.close conn.close set rs=nothing set conn=nothing response.end end if 'Grab all the records howmanyfields = rs.fields.count -1 DO UNTIL rs.eof for i = 0 to howmanyfields if not i=0 then thisfield= rs(i) if isnull(thisfield) or trim(thisfield)="" then thisfield =shownull end if If len(cstr(trim(thisfield)))<2 then response.write ("") & thisfield & " " score = cint(score) + cint(thisfield) If cint(thisfield) > 0 then numberofratings = cint(numberofratings)+1 end if End If next rs.movenext LOOP If not cint(numberofratings)<1 then average = score/(cint(numberofratings)) response.write "    " & left(average,4) & "
" end If End If If Session("User") = "cast" then rs.close response.write ("
" & Session("Company") & " Rating:
") & vbCrLf CommentField = Session("Company") & " Comments" Company = Session("Company") strSQL = "SELECT [" & Company & "], [" & CommentField & "] FROM TalentRatings where ((TOLID) =""" & cstr(Name) & """);" rs.open strSQL, conn, adopenforwardonly, adlockreadonly, adCmdText response.write "
" response.write "" response.write ("

" & Session("Company") & " Comments:
") & vbCrLf response.write "" response.write "
    " response.write "" End If %>

<% rs.close conn.close set rs = nothing set conn = nothing End Sub %>