<% if (isNull(request.cookies("ckyUserID"))) or (request.cookies("ckyUserID")="") then response.redirect "index.asp" end if %> <% rowCount = 0 if getUserType(Request.Cookies("ckyUserID"))<>47 then 'response.redirect "home.asp" blnAdmin = false else blnAdmin = true end if if (Request.QueryString("btnSave") = "Save") and (blnAdmin) then countryID = Request.QueryString("countryID") strDescription = fixquote(Request.QueryString("strDescription")) if countryID > 0 then s = "SELECT * From tblCountry WHERE strDescription = '" & strDescription & "' AND countryID <> " & countryID set rst = cn.execute(s) if not rst.eof then Response.Write "" lngID = countryID else s = "Update tblCountry Set strDescription = '" & strDescription & "' WHERE countryID = " & countryID set rst2 = cn.execute(s) end if rst.close else s = "SELECT * From tblCountry WHERE strDescription = '" & strDescription & "'" set rst = cn.execute(s) if not rst.eof then btnAdd = "Add" Response.Write "" else s = "Insert Into tblCountry (strDescription) values ('" & strDescription & "')" set rst2 = cn.execute(s) end if rst.close end if elseif (Request.QueryString("btnDelete") = "Delete") and (blnAdmin) then intNotDeleted=0 arrID = split(Request.QueryString("arrID"),",") for i = 0 to ubound(arrID) s = "Select * From tblPublication WHERE refPhyscountryID = " & arrID(i) set rst = cn.execute(s) if not rst.eof then intNotDeleted = intNotDeleted + 1 else s = "Delete From tblCountry WHERE countryID = " & arrID(i) set rst2 = cn.execute(s) end if next if intNotDeleted > 0 then Response.Write "" end if end if %> <? include "title.php" ?> country Admin
<% lngID = Request.QueryString("lngID") CBW = request.querystring("CBW") x = swapIt(x) Response.Write "" Response.Write "" Response.Write "" if (Request.QueryString("btnAdd") = "Add") or (lngID >0) or (CBW<>"") then if lngID > 0 then s = "SELECT * From tblCountry WHERE countryID = " & lngID set rst = cn.execute(s) if not rst.eof then strDescription = rst("strDescription") newedit = "Edit country" else lngID = 0 newedit = "New country" end if rst.close else lngID = 0 newedit = "New country" end if x = swapIt(x) Response.Write "" else Response.Write "" end if if CBW <> "" then x = swapIt(x) response.write "" x = swapIt(x) response.write "
Country Admin
 
" & newedit & "" if blnAdmin then Response.Write "  
 
" if CBW="All" then s = "SELECT tblContact.ContactID, tblContact.strName AS theContact, tblShow.strName AS theShow, tblPublication.strName AS thePub " & _ "FROM (tblContact INNER JOIN tblPublication ON tblContact.refPublicationID = tblPublication.PublicationID) LEFT JOIN tblShow ON tblContact.refShowID = tblShow.ShowID " & _ "WHERE (((tblPublication.refPhyscountryID)=" & lngID & ")) " & _ "ORDER BY tblContact.strName" else s = "SELECT tblContact.ContactID, tblContact.strName AS theContact, tblShow.strName AS theShow, tblPublication.strName AS thePub " & _ "FROM (tblContact INNER JOIN tblPublication ON tblContact.refPublicationID = tblPublication.PublicationID) LEFT JOIN tblShow ON tblContact.refShowID = tblShow.ShowID " & _ "WHERE (((tblPublication.refPhyscountryID)=" & lngID & ")) AND Left(tblContact.strName, 1)='" & CBW & "' " & _ "ORDER BY tblContact.strName" end if set rst = cn.execute(s) while not rst.eof x = swapIt(x) response.write "" rowCount = rowCount + 1 rst.movenext wend rst.close response.write "" response.write "
ContactPublicationShow
" & rst("theContact") & "" & rst("thePub") & "" & rst("theShow") & "
 
Related Contacts: " & rowCount & "
" else response.write " " end if else LB = request.querystring("LB") if request.querystring("btnSave") = "Save" then response.write "" end if if LB<> "All" then s = "SELECT * From tblCountry WHERE Left(strDescription, 1)='" & LB & "' Order By strDescription" set rst = cn.execute(S) if blnAdmin then while not rst.eof x = swapIt(x) response.write "" & rst("strDescription") & "" rowCount = rowCount + 1 rst.movenext wend else while not rst.eof x = swapIt(x) response.write "" & rst("strDescription") & " " rowCount = rowCount + 1 rst.movenext wend end if rst.close else s = "SELECT * From tblCountry Order By strDescription" set rst = cn.execute(s) if blnAdmin then while not rst.eof x = swapIt(x) Response.write "" & rst("strDescription") & "" rowCount = rowCount + 1 rst.movenext wend else while not rst.eof x = swapIt(x) Response.write "" & rst("strDescription") & " " rowCount = rowCount + 1 rst.movenext wend end if rst.close end if x = 0 x = swapIt(x) x = swapIt(x) Response.Write " " if blnAdmin then Response.Write "List Total: " & rowCount & "  " else Response.Write "List Total: " & rowCount & " " end if end if Response.Write "" %>