<%@LANGUAGE="VBSCRIPT"%> <% 'perform event handling dim loginError loginError = false if Request.QueryString("logout") <> "" then Session.Contents("loggedIn") = "" End if if Request.Form("login") <> "" then 'login attempted. Dim objRSCheckLogin, objCmdCheckLogin Set objRSCheckLogin = Server.CreateObject("ADODB.Recordset") Set objCmdCheckLogin = Server.CreateObject("ADODB.Command") objCmdCheckLogin.ActiveConnection = MM_business_list_STRING objCmdCheckLogin.CommandText = "SELECT business_id, user_name, password FROM business_list WHERE user_name = '" & Trim(Request.Form("username")) & "'" objCmdCheckLogin.CommandType = adCmdText objRSCheckLogin.open objCmdCheckLogin 'if the recordset is not empty, we have found the correct business if objRSCheckLogin.EOF then loginError = true else 'check password is correct if Trim(Request.Form("password")) = Trim(objRSCheckLogin("password").Value) then Session.Contents("loggedIn") = Trim(objRSCheckLogin("business_id").Value) else loginError = true end if end if 'close database connection objRSCheckLogin.Close Set objRSCheckLogin = Nothing set objCmdCheckLogin = Nothing 'check passwords match if Trim(Request.Form("password1")) <> Trim(Request.Form("password2")) then passwordError = true formError = true end if end if 'dimension variables dim formError, blankFieldError, emailError, passwordError, updateSuccess formError = false blankFieldError = false emailError = false passwordError = false updateSuccess = false if (Request.Form("updateDetails") <> "") and (Session.Contents("loggedIn") <> "") then 'attempt to update business details 'Ensure all mandatory fields have values. 'Checks are: ensuring email address looks valid 'Removing "http://" from website addresses 'Start with blank fields if (Trim(Request.Form("busname")) = "") or (Trim(Request.Form("address1")) = "") or (Trim(Request.Form("address2")) = "") or (Trim(Request.Form("address3")) = "") or (Trim(Request.Form("address4")) = "") then blankFieldError = true formError = true end if if (Trim(Request.Form("postcode5")) = "") or (Trim(Request.Form("timesopen")) = "") or (Trim(Request.Form("daysopen")) = "") or (Trim(Request.Form("telephone")) = "") or (Trim(Request.Form("contact")) = "") then blankFieldError = true formError = true end if if (Trim(Request.Form("email")) = "") or (Trim(Request.Form("position")) = "") or (Trim(Request.Form("yearstrading")) = "") or (Trim(Request.Form("furtherinfo")) = "") then blankFieldError = true formError = true end if 'check e.mail address is valid dim emailAddress emailAddress = Trim(Request.Form("email")) 'e.mailAddress must contain an @ symbol and at least one period after it dim atLocation atLocation = InStr(emailAddress, "@") if atLocation <> 0 then 'get the string after the @ symbol dim afterAt afterAt = Right(emailAddress, (Len(emailAddress) - atLocation)) dim periodLocation periodLocation = InStr(afterAt, ".") if periodLocation = 0 then formError = true emailError = true end if else formError = true emailError = true end if if formError = false then 'The information is fine, so save to database 'ensure all URLs are saved without http:// dim strURL strURL = Trim(Request.Form("url")) if ((InStr(strURL, "http://") <> 0) OR (InStr(strURL, "HTTP://") <> 0)) then strURL = Right(strURL, (Len(strURL) - 7)) end if dim strSQL strSQL = "UPDATE business_list SET " strSQL = strSQL + "business_name = " & "'" & Trim(Request.Form("busname"))& "', " strSQL = strSQL + "address1 = " & "'" & Trim(Request.Form("address1"))& "', " strSQL = strSQL + "address2 = " & "'" & Trim(Request.Form("address2"))& "', " strSQL = strSQL + "address3 = " & "'" & Trim(Request.Form("address3"))& "', " strSQL = strSQL + "address4 = " & "'" & Trim(Request.Form("address4"))& "', " strSQL = strSQL + "postcode = " & "'" & Trim(Request.Form("postcode5"))& "', " strSQL = strSQL + "web_address = " & "'" & strURL & "', " strSQL = strSQL + "trade_hour = " & "'" & Trim(Request.Form("timesopen"))& "', " strSQL = strSQL + "trade_days = " & "'" & Trim(Request.Form("daysopen"))& "', " strSQL = strSQL + "telephone = " & "'" & Trim(Request.Form("telephone"))& "', " strSQL = strSQL + "fax = " & "'" & Trim(Request.Form("faxno"))& "', " strSQL = strSQL + "corr_name = " & "'" & Trim(Request.Form("contact"))& "', " strSQL = strSQL + "email_address = " & "'" & Trim(Request.Form("email"))& "', " strSQL = strSQL + "corr_pos = " & "'" & Trim(Request.Form("position"))& "', " strSQL = strSQL + "trade_years = " & "'" & Trim(Request.Form("yearstrading"))& "', " strSQL = strSQL + "notes = " & "'" & Trim(Request.Form("furtherinfo"))& "' " strSQL = strSQL + "WHERE business_id = " & Session.Contents("loggedIn") 'open database connection Dim objCom Set objCom = Server.CreateObject("ADODB.Command") objCom.ActiveConnection = MM_business_list_STRING objCom.CommandText = strSQL objCom.CommandType = adCmdText objCom.Execute 'Response.Write strSQL 'save data 'close database connection Set objCom = Nothing updateSuccess = true end if end if if (Request.Form("updatePassword") <> "") and (Session.Contents("loggedIn") <> "") then if Trim(Request.Form("password1")) = Trim(Request.Form("password2")) then 'update passwords dim objRSCheckPassword, objComCheckPassword, objComChangePassword, sqlString set objRSCheckPassword = Server.CreateObject("ADODB.Recordset") set objComCheckPassword = Server.CreateObject("ADODB.Command") sqlString = "SELECT password FROM business_list WHERE business_id = " & Session.Contents("loggedIn") objComCheckPassword.ActiveConnection = MM_business_list_STRING objComCheckPassword.CommandText = sqlString objComCheckPassword.CommandType = adCmdText objRSCheckPassword.Open objComCheckPassword if Trim(Request.Form("password")) <> Trim(objRSCheckPassword("password")) then objRSCheckPassword.Close formError = true passwordError = true else objRSCheckPassword.Close set objComChangePassword = Server.CreateObject("ADODB.Command") objComChangePassword.ActiveConnection = MM_business_list_STRING sqlString = "UPDATE business_list SET password = '" & Trim(Request.Form("password1")) sqlString = sqlString & "' WHERE business_id = " & Session.Contents("loggedIn") objComChangePassword.CommandText = sqlString objComChangePassword.CommandType = adCmdText objComChangePassword.Execute set objComChangePassword = nothing updateSuccess = true end if 'objRSCheckPassword.Close set objRSCheckPassword = nothing set objComCheckPassword = nothing else formError = true passwordError = true end if end if %> DIDSBURY - A to Z listings
<% if Session.Contents("loggedIn") = "" then 'render login screen %>
<% if loginError then %> <% end if %>
Log in

The User name and password you gave do not match.

Log in to change or update your business entry and/or password information.

Forgotten your password?  
User Name
Password
 
 
Need and account setting up?

Why do you need an account?
It's optional but by registering for a free account you get a free link from your basic listing to your own web page.

Using  your free web page
Using your account settings you can edit your business information and or contact details as often as you wish. That means you can easily add information about special offers, new ranges and news about you business.

The benefits
Proud2belocal Didsbury can be found on all the major search engines including Google, MSN, and Yahoo. Our listings pages regularly hold the top spot for any searches that are business specific to Didsbury. Eg search Didsbury Therapists or Didsbury Estate Agents. By adding your business you will instantly benefit from our established search engine rankings saving you money and time.

But my details are already on this site
We have added details of local businesses to our listings and will continue to do so as often as we can. We only add basic information so if you want to have a 'More info...' link under your listing and an individual page of your own then you need to register an account.

Click here to register

<% else 'render normal fuction screen Dim objRSBusiness, objCmdBusiness Set objRSBusiness = Server.CreateObject("ADODB.Recordset") Set objCmdBusiness = Server.CreateObject("ADODB.Command") objCmdBusiness.ActiveConnection = MM_business_list_STRING objCmdBusiness.CommandText = "SELECT * FROM business_list WHERE business_id = " & Session.Contents("loggedIn") objCmdBusiness.CommandType = adCmdText objRSBusiness.open objCmdBusiness 'if the recordset is not empty, we have found the correct business if objRSBusiness.EOF then Response.Write "A session error has occured!" else 'render editable business details in a form %>
<% 'end of edit form end if 'close database connection objRSBusiness.Close Set objRSBusiness = Nothing set objCmdBusiness = Nothing end if %>
   

 

<% if updateSuccess then Response.Write "Business Details updated" else Response.Write "Business Details" end if %> Log out
 

Use the forms below to update the data we have on your business.

<% if formError then 'render error message Response.Write("

There were errors in the information you supplied.

") end if Response.Write("
    ") if blankFieldError then Response.Write("
  • All fields except Fax No. and Website URL are required.
  • ") end if if emailError then Response.Write("
  • The E-mail address you have supplied doesn't seem to be valid.
  • ") end if if passwordError then Response.Write("
  • There was a problem with the passwords you gave. The old password may have been ") Response.Write("incorrect or the new passwords may not have been identical.
  • ") end if Response.Write("
") %>
 
 
Name of business
">
 
Building name/number
">
 
Street
">
 
Town
">
 
Region
">
 
Postcode
">
 
 
Do you have a website? - If yes, your URL address
">
 
 
Trading Hours
">
 
Trading Days
">
 
 
Telephone No.
">
 
Fax No.
">
 
Name for correspondence
">
 
E-mail address
">
 
Position in business
">
 
 
No. of years trading
">
 
Please use the space below to tell us about your business. For example: what special services do you provide? What unusual lines do you carry? If you run a restaurant or take away, what are your specialities? What can you offer that the multi-nationals cannot offer?
   
 


 
Old Password
 
New Password
 
Confirm New Password