Advertisement
| 10.04.2008 at 01:45PM PDT, ID: 23787821 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349: 350: 351: 352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363: 364: 365: 366: 367: 368: 369: 370: 371: 372: 373: 374: 375: 376: 377: 378: 379: 380: 381: 382: 383: 384: 385: 386: 387: 388: 389: 390: 391: 392: 393: 394: 395: 396: 397: 398: 399: 400: 401: 402: 403: 404: 405: 406: 407: 408: 409: 410: 411: 412: 413: 414: 415: 416: 417: 418: 419: 420: 421: 422: |
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/camsmith.asp" -->
<%
if Session("MM_Username") = "" then
Response.Redirect("solicitor_estateagency_cmslogin_timeout.asp")
end if
%>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
If (Not MM_abortEdit) Then
' execute the insert
Dim MM_editCmd
Set MM_editCmd = Server.CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_camsmith_STRING
MM_editCmd.CommandText = "INSERT INTO dbo.addressbook (cTitle, cFirstName, cFirstName2, cSurname, cCompany, cAddress1, cAddress2, cTown, cPostCode, cType, cTelHome, cTelWork, cTelMobile, cTelMobile2, cEmail, cEmail2) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
MM_editCmd.Prepared = true
if Request.Form("cTitle") <> "other" then
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 10, Request.Form("cTitle"))
else' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 10, Request.Form("cTitle_other"))
end if ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, 30, Request.Form("cFirstName")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 201, 1, 30, Request.Form("cFirstName2")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 30, Request.Form("cSurName")) ' adVarWChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 201, 1, 30, Request.Form("cCompany")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 201, 1, 60, Request.Form("cAddress1")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 201, 1, 60, Request.Form("cAddress2")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 201, 1, 60, Request.Form("cTown")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 201, 1, 10, Request.Form("cPostCode")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 201, 1, 20, Request.Form("cType")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 201, 1, 20, Request.Form("cTelHome")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 201, 1, 20, Request.Form("cTelWork")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param14", 201, 1, 20, Request.Form("cTelMobile")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param15", 201, 1, 20, Request.Form("cTelMobile2")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param16", 201, 1, 100, Request.Form("cEmail")) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param17", 201, 1, 100, Request.Form("cEmail2")) ' adLongVarChar
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
' append the query string to the redirect URL
Dim MM_editRedirectUrl
MM_editRedirectUrl = "solicitor_estateagency_addressbook.asp"
If (Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
Response.Redirect(MM_editRedirectUrl)
End If
End If
%>
<%
Dim user__MMColParam
user__MMColParam = "1"
If (Session("MM_Username") <> "") Then
user__MMColParam = Session("MM_Username")
End If
%>
<%
Dim category
Dim category_cmd
Dim category_numRows
Set category_cmd = Server.CreateObject ("ADODB.Command")
category_cmd.ActiveConnection = MM_camsmith_STRING
category_cmd.CommandText = "SELECT * FROM dbo.addressbook_categories ORDER BY cCategory"
category_cmd.Prepared = true
Set category = category_cmd.Execute
category_numRows = 0
%>
<%
Dim user
Dim user_cmd
Dim user_numRows
Set user_cmd = Server.CreateObject ("ADODB.Command")
user_cmd.ActiveConnection = MM_camsmith_STRING
user_cmd.CommandText = "SELECT * FROM dbo.cmslogin WHERE UserLoginID = ?"
user_cmd.Prepared = true
user_cmd.Parameters.Append user_cmd.CreateParameter("param1", 200, 1, 10, user__MMColParam) ' adVarChar
Set user = user_cmd.Execute
user_numRows = 0
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title> Estate-Agent Solicitor Intelligent Property Management</title>
<script type="text/javascript" src="scripts.js"></script>
<script type="text/javascript">
<!--
function ToggleOther()
{
var select = document.getElementById("cTitle");
var selected = select.selectedIndex;
// -1 means no item has been selected
if(selected == -1)
return;
// display the texfield
if(select.options[selected].value == "other")
{
document.getElementById("cTitle_other").style.display = "";
}
// otherwise hide it
else
{
document.getElementById("cTitle_other").style.display = "none";
}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function YY_checkform() { //v3.05
var args = YY_checkform.arguments; var myDot=true; myV=''; var myErr='';var addErr=false;
if (document.all){eval("args[0]=args[0].replace(/.layers/gi, '.all');");}
for (var i=1; i<args.length;i=i+4){
if (args[i+1].charAt(0)=='#'){
var myReq=true; args[i+1]=args[i+1].substring(1);
}else{myReq=false}
var myObj = eval(args[0]+'.'+args[i])
if (myObj.type=='text'){
if (myReq&&myObj.value.length==0){addErr=true}
myV=myObj.value;
if ((myV.length>0)&&(args[i+2]==1)){ //fromto
if (isNaN(parseInt(myV))||myV<args[i+1].substring(0,args[i+1].indexOf('_'))/1||myV > args[i+1].substring(args[i+1].indexOf('_')+1)/1){addErr=true}
}
if ((myV.length>0)&&(args[i+2]==2)){ //e-mail
if (myV.lastIndexOf('.')<myV.lastIndexOf('@')||myV.lastIndexOf('.')==-1||myV.lastIndexOf('@')==-1){addErr=true}
}
if ((myV.length>0)&&(args[i+2]==3)){ // date
var myD=''; myM=''; myY=''; myYY=0; myDot=true;
for(var j=0;j<args[i+1].length;j++){
if(args[i+1].charAt(j)=='D')myD=myD.concat(myObj.value.charAt(j));
if(args[i+1].charAt(j)=='M')myM=myM.concat(myObj.value.charAt(j));
if(args[i+1].charAt(j)=='Y'){myY=myY.concat(myObj.value.charAt(j)); myYY++}
if(args[i+1].charAt(j)=='-'&&myObj.value.charAt(j)!='-')myDot=false;
if(args[i+1].charAt(j)=='.'&&myObj.value.charAt(j)!='.')myDot=false;
if(args[i+1].charAt(j)=='/'&&myObj.value.charAt(j)!='/')myDot=false;
}
if(myD/1<1||myD/1>31||myM/1<1||myM/1>12||myY.length!=myYY)myDot=false;
if(!myDot){addErr=true}
}
if ((myV.length>0)&&(args[i+2]==4)){ // time
var myDot=true;
var myH = myObj.value.substr(0,myObj.value.indexOf(':'))/1;
var myM = myObj.value.substr(myObj.value.indexOf(':')+1,2)/1;
var myP = myObj.value.substr(myObj.value.indexOf(':')+3,2);
if ((args[i+1])=="12:00pm"){if(myH<0||myH>12||myM<0||myM>59||(myP!="pm"&&myP!="am")||myObj.value.length>7)myDot=false; }
if ((args[i+1])=="12:00"){if(myH<0||myH>12||myM<0||myM>59||myObj.value.length>5)myDot=false;}
if ((args[i+1])=="24:00"){if(myH<0||myH>23||myM<0||myM>59||myObj.value.length>5)myDot=false;}
if(!myDot){addErr=true}
}
if ((myV.length>0)&&(args[i+2]==5)){ // check this 2
if (!eval(args[0]+'.'+args[i+1]+'.checked')){addErr=true}
}
}
if (myObj.type=='radio'){
if (args[i+2]==1&&myObj.checked&&eval(args[0]+'.'+args[i+1]+'.value.length')/1==0){addErr=true}
if (args[i+2]==2){
myDot=false;
myV=eval(args[0]+'.'+args[i].substring(0,args[i].lastIndexOf('[')));
for(var j=0;j<myV.length;j++){myDot=myDot||myV[j].checked}
if(!myDot){myErr+='* ' +args[i+3]+'\n'}
}
}
if (myObj.type=='checkbox'){
if(args[i+2]==1&&myObj.checked==false){addErr=true}
if(args[i+2]==2&&myObj.checked&&eval(args[0]+'.'+args[i+1]+'.value.length')/1==0){addErr=true}
}
if (myObj.type=='select-one'||myObj.type=='select-multiple'){
if(args[i+2]==1&&eval(args[0]+'.'+args[i]+'.selectedIndex')/1==0){addErr=true}
}
if (myObj.type=='textarea'){
myV = eval(args[0]+'.'+args[i]+'.value');
if(myV.length<args[i+1]){addErr=true}
}
if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
}
if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
document.MM_returnValue = (myErr=='');
}
//-->
</script>
<link href="solicitors_estateagency_styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="p7pm/p7popmenu.js"></script>
<link href="includes/p7pm/p7pmv0.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</head>
<body onload="P7_initPM(0,1,1,-20,10);MM_preloadImages('../graphics/menu/currentpropertylist_bt_ro.jpg','../graphics/menu/addnewproperty_bt_ro.jpg','../graphics/menu/propertyarchive_bt_ro.jpg')">
<div id ="outerwrapper">
<table width="840" height="75" border="0" cellpadding="0" cellspacing="0" background="../graphics/cms_bg_header.jpg">
<tr>
<td><img src="../graphics/menu2/sea_logo.jpg" alt="Solicitor Estate Agency Property Management" width="200" height="75" hspace="0" vspace="0" /></td>
<td width="640" align="right" valign="bottom"><table width="0" height="70" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="10"></td>
</tr>
<tr align="right">
<td width="80"><img src="../graphics/easi_menu/property_details_inactive.jpg" alt="Property Details" name="Image12" width="62" height="70" id="Image12" /></td>
<td><img src="../graphics/easi_menu/checklists_inactive.jpg" alt="Checklists" width="62" height="70" /></td>
<td><img src="../graphics/easi_menu/viewing_appts_inactive.jpg" alt="Viewing Appointments" width="62" height="70" id="Image21" /></td>
<td><img src="../graphics/easi_menu/noi_inactive.jpg" alt="Notes of Interest" width="62" height="70" id="Image31" /></td>
<td><img src="../graphics/easi_menu/surveys_inactive.jpg" alt="Surveys Instructed" width="62" height="70" id="Image41" /></td>
<td><img src="../graphics/easi_menu/offers_inactive.jpg" alt="Offers Received" width="62" height="70" id="Image51" /></td>
<td><img src="../graphics/easi_menu/merge_docs_inactive.jpg" alt="Merge Documents" width="62" height="70" id="Image61" /></td>
<td><img src="../graphics/easi_menu/upload_inactive.jpg" alt="Upload Photo/PDF" width="62" height="70" id="Image71" /></td>
<td><img src="../graphics/easi_menu/general_notes_inactive.jpg" alt="General Notes" width="62" height="70" id="Image81" /></td>
<td><img src="../graphics/easi_menu/enquiries_inactive.jpg" alt="Enquiries" width="62" height="70" /></td>
</tr>
</table></td>
</tr>
</table>
<div id="maincontent">
<table width="100%" height="0" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="0" colspan="2" valign="top" background="../graphics/menu_cms_bg.gif"></td>
</tr>
<tr>
<td height="30" colspan="2" id="searchfunction_property"><div align="right">
<p>You are logged in as <%=(user.Fields.Item("UserFirstName").Value)%> </a><%=(user.Fields.Item("UserLastName").Value)%></p>
</div></td>
</tr>
<tr>
<td width="185" valign="top" bgcolor="#024B8F"><!--#include file="includes/mainnav_easi.asp" --></td>
<td height="420" valign="top" bgcolor="#FFFFFF">
<div class="highlight">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="413"><h1> <a href="solicitor_estateagency_editproperty.asp"></a><img src="../graphics/menu/addressbook_icon.jpg" alt="Address Book" name="Image1" width="60" height="48" hspace="5" border="0" align="left" id="Image1" />Address Book </h1>
<h2 >Add Contact </h2></td>
<td width="227" align="right"> </td>
</tr>
</table>
</div>
<div class="propertydetails">
<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1" id="form1" onsubmit="YY_checkform('document.form1','cFirstName','#q','0','Please enter the Contact First Name','cSurName','#q','0','Please enter the Contact Surname','cTelHome','#q','0','Please enter the Contact Primary Telephone Number','cTitle','q','1','Please select the Contact Title','cType','q','1','Please select the Contact Category');return document.MM_returnValue">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><p>Title: </p></td>
<td colspan="3">
<label>
<select name="cTitle" id="cTitle" onchange="ToggleOther();">
<option value="NA">Please Select</option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Ms">Ms</option>
<option value="Mr & Mrs">Mr & Mrs</option>
<option value="other">Other</option>
</select>
<input type="text" id="cTitle_other" name="cTitle_other" size="15" maxlength="11" style="display: none;" />* </label> </td>
</tr>
<tr>
<td width="33%"><p>First Name: </p></td>
<td width="24%">
<input name="cFirstName" type="text" id="cFirstName" size="15" maxlength="30" />
*</td>
<td width="20%"><p>Spouse First Name: </p>
</td>
<td width="23%"><input name="cFirstName2" type="text" id="cFirstName2" size="15" maxlength="30" /></td>
</tr>
<tr>
<td height="22"><p>Surname:</p></td>
<td colspan="3">
<input name="cSurName" type="text" id="cSurName" size="30" maxlength="30" />
* </td>
</tr>
<tr>
<td height="22"><p>Contact Company: </p></td>
<td colspan="3">
<input name="cCompany" type="text" id="cCompany" size="30" maxlength="30" /> </td>
</tr>
<tr>
<td height="22"><p>House No./ Name: </p></td>
<td colspan="3">
<input name="cAddress1" type="text" id="cAddress1" size="30" maxlength="60" /> </td>
</tr>
<tr>
<td><p>Street Name: </p></td>
<td colspan="3">
<input name="cAddress2" type="text" id="cAddress2" size="30" maxlength="60" /> </td>
</tr>
<tr>
<td><p>Town:</p></td>
<td colspan="3">
<input name="cTown" type="text" id="cTown" size="30" maxlength="60" /> </td>
</tr>
<tr>
<td><p>Postcode:</p></td>
<td colspan="3">
<input name="cPostCode" type="text" id="cPostCode" size="10" maxlength="10" /> </td>
</tr>
<tr>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td><p>Contact Category: </p></td>
<td colspan="3">
<label>
<select name="cType" id="cType">
<option value="NA">Please Select...</option>
<%
While (NOT category.EOF)
%>
<option value="<%=(category.Fields.Item("cCategory").Value)%>"><%=(category.Fields.Item("cCategory").Value)%></option>
<%
category.MoveNext()
Wend
If (category.CursorType > 0) Then
category.MoveFirst
Else
category.Requery
End If
%>
</select>
</label>
*</td>
</tr>
<tr>
<td> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td><p>Telephone No. (Primary) </p></td>
<td colspan="3">
<input name="cTelHome" type="text" id="cTelHome" size="20" maxlength="20" />
*</td>
</tr>
<tr>
<td><p>Telephone No. (Work) </p></td>
<td colspan="3">
<input name="cTelWork" type="text" id="cTelWork" size="20" maxlength="20" /> </td>
</tr>
<tr>
<td><p>Telephone No. (Primary Mobile) </p></td>
<td colspan="3">
<input name="cTelMobile" type="text" id="cTelMobile" size="20" maxlength="20" /> </td>
</tr>
<tr>
<td><p>Telephone No. (Additional Mobile) </p></td>
<td colspan="3"><input name="cTelMobile2" type="text" id="cTelMobile2" size="20" maxlength="20" /> </td>
</tr>
<tr>
<td><p>E-mail Address:</p></td>
<td colspan="3">
<input name="cEmail" type="text" id="cEmail" size="30" maxlength="100" /> </td>
</tr>
<tr>
<td><p>E-mail Address: (Secondary) </p></td>
<td colspan="3"><input name="cEmail2" type="text" id="cEmail2" size="30" maxlength="100" /> </td>
</tr>
<tr>
<td> </td>
<td colspan="3">
<div align="left">
<input name="Add Property" type="submit" class="button" onclick="YY_checkform('document.form1');return document.MM_returnValue" value="Submit" />
</div></td></tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p>
<p>
</p>
</div>
<br /></td>
</tr>
</table>
</div>
</div>
<!--#include file="includes/footer.asp" -->
</body>
</html>
<%
category.Close()
Set category = Nothing
%>
<%
user.Close()
Set user = Nothing
%>
|
Advertisement