Viewing file: property_form.php (10.25 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? include ("../include/settings");
if ($ID){ $modify = 1; include ("../include/db_connect"); include ("../include/get_property"); }else{ $new = 1; }
$agents = array(1=> 'Victor', 'Timothy', 'Bea', 'Nick', 'Adela', 'Chris', 'Elizabeth', 'Richard', 'Elaine', 'Mika', 'Oren', 'Judith', 'Michael');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> <title><?print($new ? $client['name']." | New Property Listing" : $client['name']." | Modify Property Listing");?> </title> <script language="JavaScript" type="text/javascript"> <!--hide from older browsers function checkIt(){ var title = document.uploader_form.title.value; if (title) return; else alert("Please give this property a Title before submitting. Thank you.") return false; } //stop hiding--> </script>
</head>
<body> <br> <form action="upload_property.php" method="post" enctype="multipart/form-data" name="uploader_form" id="uploader_form" onsubmit="return checkIt()"> <?print($modify ? "<input type=\"hidden\" name=\"modify\" value=\"yes\">" : "");?> <?print($modify ? "<input type=\"hidden\" name=\"ID\" value=\"$ID\">" : "");?> <center> <span class="title"><?print($client['name']);?>: <?print($new ? "New Property" : "Modify Property");?><span><br><br> </center> <table border="2" bordercolor="#222244" cellpadding="0" cellspacing="0" align="center"><tr><td> <table align="center" border="0"cellpadding="0" cellspacing="0"> <tr> <td align="center" colspan="3"><br><b>Title: </b><input type="text" name="title" size="40"<?print($modify ? " value=\"$title\"" : "");?>></td> </tr> <tr> <td align="center" colspan="3"><b>Listing Agent: </b> <select name="bullet6"> <? for ($i = 1; $i <= count($agents); $i++){ print("\t\t\t<option value=\"$i\""); print($bullet6 == $i ? " selected" : NULL); print(">$agents[$i]</option>\n"); } ?> </select> </td> </tr> <tr> <td><a href="#" onclick= "window.open('help.html','help','width=500,height=400,status=no,resizable=yes,scrollbars=yes')">Image sizes and other settings</a></td> <td colspan="3"> <br><input type="radio" name="active" value="yes"<?print((($modify && ($active == "yes")) || $new) ? " checked" : "");?>>Show This Property OR <input type="radio" name="active" value="no"<?print(($modify && ($active != "yes")) ? " checked" : "");?>>Hide This Property<br> <!--<input type="radio" name="type" value="active"<?print((($modify && ($type == "active")) || $new) ? " checked" : "");?>>Active Listing OR <input type="radio" name="type" value="sold"<?print(($modify && ($type == "sold")) ? " checked" : "");?>>Sold Property</td> </tr>--> <? if ($property['vtour'] == 1){ print("\t\t<tr>\n"); //print("\t\t\t<td align=\"right\"><br>Virtual Tour? <input type=\"checkbox\" name=\"vtour\""); //print(($vtour == "yes") ? " checked>\n" : ">\n"); print("\t\t\t<td></td></td>\n"); print("\t\t\t<td>\n"); print("\t\t\t<br> URL for Property Web Site: <input type=\"text\" name=\"vtourURL\" size=\"45\""); print((strlen($vtourURL) > 1) ? "value=\"$vtourURL\">\n" : ">\n"); print("\t\t\t</td>\n"); print("\t\t</tr>\n"); } ?> <tr> <td colspan="2"><br><hr width="100%" size="1" noshade></td> </tr> <tr> <td><?print((strlen($thumb) > 1) ? "<img src=\"../property_pics/$thumb\" width=\"100\" border=\"0\">" : "");?></td> <td colspan="2"><br> Thumbnail Picture:<br> <input type="file" name="thumb" size="60"></td> </tr> <tr> <td> <?print((strlen($main_pic) > 1) ? "<img src=\"../property_pics/$main_pic\" width=\"100\" border=\"0\">" : "");?> </td> <td colspan="2"><br> Main picture: <br> <input type="file" name="main_pic" size="60"></td> </tr> <? // SECONDARY PICTURES if ($property['pictures'] > 0) { for ($count = 1; $count <= $property['pictures']; $count++) { { print("\t\t<tr>\n"); eval ("\$exists = \$picture$count;"); if ($modify && $exists) { $string = 'print("<td><img src=\"../property_pics/picture$count"."_$ID.jpg\" width=\"100\" border=\"0\"><br>picture # $count</td>\n");'; eval ($string); } else print ("\t\t\t<td></td>\n"); } print("\t\t\t<td colspan=\"2\"><br> Picture #$count: <a href=\"remove.php?ID=$ID&picture=picture$count&table=listings\">Remove this picture</a><br>\n"); print("\t\t\t <input type=\"file\" name=\"picture$count\" size=\"60\"></td>\n"); print("\t\t</tr>\n"); if ($property['captions']) { print("\t\t<tr>\n"); print("\t\t\t<td></td>\n"); $caption = "\$caption$count"; eval("\$caption_content = $caption;"); print("\t\t\t<td> Caption for picture # $count:<br> <textarea cols=\"40\" rows=\"2\" name=\"caption$count\">$caption_content</textarea></td>\n"); print("\t\t</tr>\n"); } } // end of for... } // end of (if $property['pictures']) print("\t\t<tr>\n"); print("\t\t\t<td colspan=\"2\"><br><hr width=\"100%\" size=\"1\" noshade><br> </td>\n"); print("\t\t</tr>\n"); // SYNOPSIS if ($property['intro'] == 1) { print("\t\t<tr>\n"); print("\t\t\t<td align=\"right\">Short synopsis: </td>\n"); print("\t\t\t<td><textarea name=\"intro\" cols=\"50\" rows=\"3\">$intro</textarea></td>\n"); print("\t\t</tr>\n"); } if ($property['description'] == 1) { print("\t\t<tr>\n"); print("\t\t\t<td align=\"right\">Longer description: </td>\n"); print("\t\t\t<td><textarea name=\"description\" cols=\"50\" rows=\"8\">$description</textarea></td>\n"); print("\t\t</tr>\n"); } print("\t\t<tr>\n"); print("\t\t\t<td colspan=\"2\"><br><hr width=\"100%\" noshade size=\"1\"> </td>\n"); print("\t\t</tr>\n"); // BULLETS if ($property['bullets'] > 0) { for ($count = 1; $count <= $property['bullets']; $count++) { print("\t\t<tr>\n"); print("\t\t\t<td align=\"right\">Bullet #$count: </td>\n"); $bullet = "\$bullet$count"; eval("\$bullet_content = $bullet;"); print("\t\t\t<td><input type=\"text\" name=\"bullet$count\" size=\"40\" value=\"$bullet_content\"></td>\n"); print("\t\t</tr>\n"); } } print("\t\t<tr>\n"); print("\t\t\t<td colspan=\"2\"><br><hr width=\"100%\" size=\"1\" noshade> </td>\n"); print("\t\t</tr>\n"); // ASKING if ($property['asking'] == 1) { print("\t\t<tr>\n"); print("\t\t\t<td align=\"right\">Asking price: </td>\n"); print("\t\t\t<td><input type=\"text\" name=\"asking\" size=\"15\" value=\"$asking\">");
//comment out these two lines to drop 'show asking' option print(" <input type=\"checkbox\" name=\"show_asking\" value=\"yes\""); print(($show_asking == "yes") ? " checked> Show Asking Price" : "> Show Asking Price");
print("</td>\n\t\t</tr>\n"); } // SELLING if ($property['selling'] == 1) { print("\t\t<tr>\n"); print("\t\t\t<td align=\"right\">Selling price: </td>\n"); print("\t\t\t<td><input type=\"text\" name=\"selling\" size=\"15\" value=\"$selling\">");
//comment out these two lines to drop 'show selling' option print(" <input type=\"checkbox\" name=\"show_selling\" value=\"yes\""); print(($show_selling == "yes") ? " checked> Show Selling Price" : "> Show Selling Price");
print("</td>\n\t\t</tr>\n"); } // PRICE if ($property['price'] == 1){ print("\t\t<tr>\n"); print("\t\t\t<td align=\"right\"> Price: </td>\n"); print("\t\t\t<td><input type=\"text\" name=\"price\" size=\"15\" value=\"$price\">"); //comment out these two lines to drop 'show price' option print(" <input type=\"checkbox\" name=\"show_price\" value=\"yes\""); print(($show_price == "yes") ? " checked> Show Price" : "> Show Price"); print("</td>\n\t\t</tr>\n"); }
// SOLD DATE if ($property['sold_date'] == 1){ $month_name = array("01"=> "January", "02"=> "February", "03"=> "March", "04"=> "April", "05"=> "May", "06"=> "June", "07"=> "July", "08"=> "August", "09"=> "September", "10"=> "October", "11"=> "November", "12"=> "December"); print("\t\t<tr>\n"); print("\t\t\t<td align=\"right\">Date Sold: </td>\n"); print("\t\t\t<td><select name=\"month\">\n"); while ($nextMonth = each($month_name)){ print("\t\t\t<option value=\"$nextMonth[0]\""); if ($month == $nextMonth[0]) print(" selected"); print(">$nextMonth[1]</option>\n"); } print("\t</select>\n"); print("\t<select name=\"year\">\n"); for ($i = 2000; $i <= 2006; $i++){ print("\t\t<option"); if ($i == $year) print(" selected"); print(">$i</option>\n"); } print("\t\t </select> \n"); //comment out these two lines to drop 'show date' option print(" <input type=\"checkbox\" name=\"show_date\" value=\"yes\""); print(($show_date == "yes") ? " checked> Show Date" : "> Show Date"); print("\t\t\t</td>\n"); print("\t\t</tr>\n"); }
?> <tr> <td colspan="2" align="center"><br><input type="submit" value="Submit"> <input type="Reset"><br> </td> </tr> </table> </td></tr></table> </form> <br> <form action="upload_property.php"> <input type="hidden" name="delete" value="yes"> <input type="hidden" name="ID" value="<?print("$ID");?>"> <center><input type="submit" value="DELETE THIS ENTRY"></center> </form> </body> </html>
|