<% If InStr(Request.ServerVariables("server_name"),"nasgp.org.uk") > 0 then ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=nasgp;USER=meltedmedia;PASSWORD=pineapple;OPTION=3;" SiteURL = "http://www.nasgp.org.uk/" SetLocale(1033) End If If InStr(Request.ServerVariables("server_name"),"nasgp.co.uk") > 0 then ConnectionString="DRIVER=org.gjt.mm.mysql.Driver;URL={jdbc:mysql://194.216.113.252:3306/alienskin};uid=alienskin;pwd=pineapple;" SiteURL = "http://www.nasgp.co.uk/" End If set con = Server.CreateObject("ADODB.Connection") con.open(ConnectionString) '################################################## 'Check to see whether this is a search engine robot If InStr(Request.ServerVariables("server_name"),"nasgp.org.uk") > 0 then varUserAgentString = Request.ServerVariables("HTTP_USER_AGENT") End If If InStr(Request.ServerVariables("server_name"),"nasgp.co.uk") > 0 then varUserAgentString = Request.ServerVariables("USER-AGENT") End If varIPAddress = Request.ServerVariables("REMOTE_ADDR") varTimestamp = Year(Date()) & "-" & Month(Date()) & "-" & Day(Date()) varAgent = isSearchBot(varUserAgentString) if (varAgent <> False) then 'If it is a bot, let it into the password-protected folder 'Check tracking table for a visit by this bot today and record it (if needed) Set RS_Tracking = Server.CreateObject("ADODB.Recordset") Sql = "Select tracking_id from NASGP_tracking where user_type = 'Robot' and user_agent_string = '"&varUserAgentString&"' and ip_address = '"&varIPAddress&"' and timestamp = '"&varTimestamp&"'" RS_Tracking.cursorlocation = 3 RS_Tracking.open Sql, con, 3, 3 If RS_Tracking.EOF then Sql = "Insert into NASGP_tracking (user_type,agent,user_agent_string,ip_address,timestamp) " Sql = Sql & "VALUES('Robot','"&varAgent&"','"&varUserAgentString&"','"&varIPAddress&"','"&varTimestamp&"')" 'Response.Write(Sql & "
") con.Execute(Sql) End If Else 'If it isn't, treat as normal Form_Member = Request.Cookies("Member") If Form_Member = "" then Form_Member = 0 If Form_Member <> 0 then Set RS_Member = Server.CreateObject("ADODB.Recordset") Sql = "Select * from NASGP_members where membernr = "&Form_Member RS_Member.cursorlocation = 3 RS_Member.open Sql, con, 3, 3 If Not RS_Member.EOF then Form_Active = trim(RS_Member("Active")) If Form_Active = 0 then Form_Inactivated = 1 Session("MembersID2") = Form_Member End If If Not isNull(RS_Member("ExpiryDate")) then Form_ExpiryDay = Day(RS_Member("ExpiryDate")) Form_ExpiryMonth = Month(RS_Member("ExpiryDate")) Form_ExpiryYear = Year(RS_Member("ExpiryDate")) TodaysDate = Month(Date()) & "/" & Day(Date()) & "/" & Year(Date()) If DateDiff("d",Form_ExpiryMonth & "/" & Form_ExpiryDay & "/" & Form_ExpiryYear,TodaysDate) > 0 then Form_Expired = 1 Session("MembersID2") = Form_Member Else Form_Expired = 0 End If Form_Expiry = Form_ExpiryDay & " " & Monthname(Form_ExpiryMonth) & " " & Form_ExpiryYear Else Form_Expiry = "[No match found]" End If End If End If con.close Set con = Nothing if Form_Inactivated = 1 then Response.Redirect SiteURL & "members/deactivated.asp" End if 'FirstRun = Request.Cookies("FirstRun") 'If FirstRun = "" then 'Response.Cookies("FirstRun") = "0" if Form_Expired = 1 then Response.Redirect SiteURL & "members/expired.asp" End if 'End If Validated = Request.Cookies("ValidUser") if Validated <> "OK" then 'Construct the URL for the current page. dim s s = "http://" s = s & Request.ServerVariables("server_name") s = s & Request.ServerVariables("URL") if Request.QueryString.Count > 0 THEN s = s & "?" & Request.QueryString end if 'Redirect unauthorized users to the logon page. Response.Redirect "/login/login.asp?from=" &Server.URLEncode(s) End if End if %> <% function isSearchBot(varUserAgentString) Result = False Dim BotArray(16) BotArray(0)="Alexa" BotArray(1)="Ask.com/Teoma" BotArray(2)="Baidu Spider" BotArray(3)="cURL on Mac OS X / Darwin PPC" BotArray(4)="GameSpy HTTP (GameSpy)" BotArray(5)="Gigabot (Gigablast)" BotArray(6)="Googlebot (Google)" BotArray(7)="Grub (LookSmart)" BotArray(8)="msnbot (Microsoft's MSN Search)" BotArray(9)="Scooter (AltaVista)" BotArray(10)="Wget" BotArray(11)="Yahoo! Slurp (Yahoo! Search)" BotArray(12)="Yahoo-MMCrawler (Yahoo! Search)" BotArray(13)="Mediabot (Google AdSense)" BotArray(14)="Overture" BotArray(15)="ConveraCrawler (Public Sites Crawler)" BotArray(16)="ConveraCrawler (Restricted Sites Crawler)" Dim UserAgentArray(16) UserAgentArray(0)="ia_archiver" 'ia_archiver UserAgentArray(1)="Ask Jeeves/Teoma" 'Mozilla/2.0 (compatible; Ask Jeeves/Teoma) UserAgentArray(2)="Baiduspider" 'Baiduspider ( http://www.baidu.com/search/spider.htm) UserAgentArray(3)="curl" 'curl/7.13.1 (powerpc-apple-darwin8.0) libcurl/7.13.1 OpenSSL/0.9.7b zlib/1.2.2 UserAgentArray(4)="GameSpyHTTP" 'GameSpyHTTP/1.0 UserAgentArray(5)="Gigabot" 'Gigabot/2.0 UserAgentArray(6)="Googlebot" 'Googlebot/2.1 (+http://www.google.com/bot.html) UserAgentArray(7)="grub-client" 'Mozilla/4.0 (compatible; grub-client-1.4.3; Crawl your own stuff with http://grub.org) Mozilla/4.0 (compatible; grub-client-2.3) UserAgentArray(8)="msnbot" 'msnbot/1.0 (+http://search.msn.com/msnbot.htm) UserAgentArray(9)="Scooter" 'Scooter-3.2.EX UserAgentArray(10)="Wget" 'Wget/1.9 UserAgentArray(11)="Yahoo! Slurp" 'Mozilla/5.0 (compatible; Yahoo! Slurp;http://help.yahoo.com/help/us/ysearch/slurp) UserAgentArray(12)="Yahoo-MMCrawler" 'Yahoo-MMCrawler/3.x (mms dash mmcrawler dash support at yahoo dash inc dot com) UserAgentArray(13)="Mediapartners-Google" 'Mediapartners-Google/2.1 (+http://www.googlebot.com/bot.html) UserAgentArray(14)="FAST-WebCrawler" 'FAST-WebCrawler/3.8 (crawler at trd dot overture dot com; http://www.alltheweb.com/help/webmaster/crawler) UserAgentArray(15)="ConveraCrawler" 'ConveraCrawler/0.9d (+http://www.authoritativeweb.com/crawl) UserAgentArray(16)="ISSpider" 'crawler (ISSpider-3.0; www.authoritativeweb.com/crawl) For i = 0 to UBound(UserAgentArray) pos = instr(1,varUserAgentString,UserAgentArray(i),1) if pos > 0 then Result = BotArray(i) end if next isSearchBot = Result end function %> NASGP
 
NASGP

The NASGP is the only independent lobbying and information service for Sessional GPs (locums, salaried and retainer GPs)
 

Home
Up
Advisory Panel
About This Site
Aims & Objectives


FAQs
Discussion Forum
Council
Members Admin
Contact

 

 

The National Association of Sessional GPs represents all Sessional GPs working in the UK. The Association has formed as an umbrella organisation that declares an enthusiastic and wide-ranging agenda for the estimated 23,000 Sessional GPs at a local and national level.

Advisory Panel
About This Site
Aims & Objectives

The National Association of Sessional GPs is registered in England No. 3861212
Registered address Six Cawley Road, Chichester, West Sussex, PO19 1UZ

 

 


What's with all these GoogleAds?!

 

© NASGP 2009