Jump to content

pixeltrace

Members
  • Posts

    577
  • Joined

  • Last visited

    Never

Everything posted by pixeltrace

  1. hi, The increase on the zoom will be 85% of the dist value let say i have dist = 1000 zoom value will be zoom = 8500 how do i do this? thanks!
  2. hi, i need help. i currently have a code that assigns a value for $zoom depending on the value of $dist1 but its very long and i was thinking of just converting it to math that will add increments on the value of zoom with respect to the value of $dist1 my problem is, i dont know how to do it. below is my current code if ($dist1>=0) { if ($dist1<=600) { $zoom=4000; } } if ($dist1>=600) { if ($dist1<=1000) { $zoom=8500; } } if ($dist1>=1000) { if ($dist1<=1600) { $zoom=10000; } } if ($dist1>=1600) { if ($dist1<=2000) { $zoom=15000; } } if ($dist1>=2000) { if ($dist1<=3500) { $zoom=20000; } } if ($dist1>=3500) { if ($dist1<=4550) { $zoom=25000; } } if ($dist1>=4550) { if ($dist1<=5500) { $zoom=30000; } } if ($dist1>=5500) { if ($dist1<=6600) { $zoom=35000; } } if ($dist1>=6600) { if ($dist1<=7600) { $zoom=40000; } } if ($dist1>=7600) { if ($dist1<=8600) { $zoom=45000; } } if ($dist1>=8600) { if ($dist1<=9600) { $zoom=50000; } } if ($dist1>=9600) { if ($dist1<=10600) { $zoom=55000; } } if ($dist1>=10600) { if ($dist1<=11600) { $zoom=60000; } } if ($dist1>=11600) { if ($dist1<=12600) { $zoom=65000; } } if ($dist1>=12600) { if ($dist1<=13600) { $zoom=70000; } } if ($dist1>=13600) { if ($dist1<=14600) { $zoom=75000; } } if ($dist1>=14600) { if ($dist1<=15600) { $zoom=80000; } } if ($dist1>=15600) { if ($dist1<=16600) { $zoom=85000; } } if ($dist1>=16600) { $zoom=100000; } hope you could help me with this. thanks!
  3. hi, still not working. http://mango.resonance.com.sg/myoochi/findit/test.php i am still getting the same error. below is my current code <? include 'db_connect.php' $view = (isset($_GET['view'])) ? $_GET['view'] : "main"; if ($view == "main"){ echo " <a href='test.php?id=328&view=sub'>Furniture, Fittings and Decor</a><br> <a href='test.php?id=354&view=sub'>Interior Design</a><br> <a href='test.php?id=355&view=sub'>Cleaning and Repairs</a><br> <a href='test.php?id=367&view=sub'>Home Accessories and Appliances</a><br> <a href='test.php?id=381&view=sub'>Home Alterations and Additions</a><br> <a href='test.php?id=388&view=sub'>Architects, Engineering and Construction</a><br> <a href='test.php?id=391&view=sub'>Home Entertainment</a><br> <a href='test.php?id=395&view=sub'>Real Estate Agents</a><br> <a href='test.php?id=397&view=sub'>Property Services</a><br> <a href='test.php?id=401&view=sub'>Garden and Landscaping</a><br> "; } if ($view =="sub"){ $id = $_GET['id']; $uSql = "SELECT * FROM jos_classifieds_categories WHERE parent = '$id' AND published=1"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ $name = $uRow["name"]; echo "<a href='test.php'>$name</a>" . "<br>"; } } } ?> hope you could help me with this. thanks!
  4. hi, i need help, i cant figure out how to fix the error. kindly check this page http://mango.resonance.com.sg/myoochi/findit/test.php and this is the code for that page <? include 'db_connect.php' $view = isset($_GET['view']) ? $_GET['view'] : $view="main"; if ($view == "main"){ echo " <a href='test.php?id=328&view=sub'>Furniture, Fittings and Decor</a><br> <a href='test.php?id=354&view=sub'>Interior Design</a><br> <a href='test.php?id=355&view=sub'>Cleaning and Repairs</a><br> <a href='test.php?id=367&view=sub'>Home Accessories and Appliances</a><br> <a href='test.php?id=381&view=sub'>Home Alterations and Additions</a><br> <a href='test.php?id=388&view=sub'>Architects, Engineering and Construction</a><br> <a href='test.php?id=391&view=sub'>Home Entertainment</a><br> <a href='test.php?id=395&view=sub'>Real Estate Agents</a><br> <a href='test.php?id=397&view=sub'>Property Services</a><br> <a href='test.php?id=401&view=sub'>Garden and Landscaping</a><br> "; } if ($view =="sub"){ $id = $_GET['id']; $uSql = "SELECT * FROM jos_classifieds_categories WHERE parent = '$id' AND published=1"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ $name = $uRow["name"]; echo "<a href='test.php'>$name</a>" . "<br>"; } } } ?> hope you could help me with this. thanks!
  5. sorry, i thought i already inserted this inside the code tag below is my code for the entire page <?php $view = isset($_GET['view']) ? $_GET['view'] : $view="init"; $postcode=$_GET['postal']; $addre=isset($_GET['address']) ? $_GET['address'] :$address=""; $password="v3teletech123"; $username="Trial"; $browser='others'; $sizeW=500; //specifiying the map width $sizeH=319; //specifiying the map height $code="9PBCOM"; $x1 = isset($_GET['x1']) ? $_GET['x1'] : $x1=""; $y1 = isset($_GET['y1']) ? $_GET['y1'] : $y1=""; $amenitiesLat = isset($_GET['amenitiesLat']) ? $_GET['amenitiesLat'] : $amenitiesLat=""; $amenitiesLon = isset($_GET['amenitiesLon']) ? $_GET['amenitiesLon'] : $amenitiesLon=""; $keywords=isset($_GET['keywords']) ? $_GET['keywords'] :$keywords=""; $dist = isset($_GET['dist']) ? $_GET['dist'] :$dist="2000"; $POIview = isset($_GET['POIview']) ? $_GET['POIview'] :$POIview="amn"; if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype = ''; <table width="323" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="406" align="center"><table width="529" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="top"><table border="1" bordercolor="#000066" width="$sizeW"> <tr> <td colspan="2" align="center" valign="center" width="500" height="319"><img src="<?=$URL?>" /></td> </tr> <tr> <td colspan="2" valign="center"><center class="style3 style5 style6"> <strong> <?=$blockNo?> <?=$addres?> , S <?=$postal?> </strong> </center></td> </tr> <tr> <td colspan="2" align="center" valign="center" bgcolor="#003466"><span class="style1 style4 style1">Map Navigation </span> </td> </tr> <tr> <?php if ($view == "init" || $view == "up" || $view == "down" || $view == "left" || $view == "right" || $view == "in" || $view == "out") { ?> <td width="152" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=init&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=in&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=out&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" />[/url] </td> <td width="159" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=up&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=down&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=left&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=right&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" />[/url] </td> <?php } else if ($view == "amnview" || $view == "amnup" || $view == "amndown" || $view == "amnleft" || $view == "amnright" || $view == "amnin" || $view == "amnout") { ?> <td width="152" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnview&y1=&x1=&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnin&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnout&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" />[/url] </td> <td width="159" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnup&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=amndown&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnleft&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" />[/url] <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnright&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" />[/url] </td> <?php } ?> </tr> <tr> <td colspan="2" valign="center" bgcolor="#003466"></td> </tr> </table> </td> </tr> <tr> <td align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="108" align="left"><table width="108" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:none; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#0d7a73" id="LINK1"> <tr> <td width="106" align="center" class="style1"><a href="javascript:;" onclick="changeStyle1(); javascript:riseup('box11')" id="tab11"><font style="color:#ffffff; font-size:12px" id="LINK1a">Top Property</font>[/url] </td> </tr> </table></td> <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="10"> </td> </tr> </table></td> <td width="159" align="left"><table width="159" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK2"> <tr> <td width="157" align="center"><a href="javascript:;" onclick="changeStyle2(); javascript:riseup('box12')" id="tab12"><span class="style1" id="LINK2a">Consumer Specific R</span>[/url]</td> </tr> </table></td> <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="10"> </td> </tr> </table></td> <td width="119" align="left"><table width="119" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK3"> <tr> <td width="117" align="center"><a href="javascript:;" onclick="changeStyle3(); javascript:riseup('box13')" id="tab13"><span class="style1" id="LINK3a">Point of Interest </span>[/url]</td> </tr> </table></td> <td width="4"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="5"> </td> </tr> </table></td> <td width="114"><table width="114" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK4"> <tr> <td width="112" align="center"><a href="javascript:;" onclick="changeStyle4(); javascript:riseup('box14')" id="tab14"><span class="style1" id="LINK4a">Street Directory </span>[/url]</td> </tr> </table></td> <td><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="5"> </td> </tr> </table></td> </tr> <tr> <td colspan="8"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid"> <tr> <td height="169" align="center" valign="top" bgcolor="#D1EAE7"><div id="box1" style="visibility:visible; background-color:#D1EAE7; position:absolute; left: 435px; top: 513px; width: 370px;"> <table width="353" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td height="25" align="center"><form action="" method="get"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2">KM</span> <input type="submit" name="Submit" value="Submit" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /> <input type="hidden" name="POIview" value="amn" /> </form></td> </tr> <tr> <td> </td> </tr> </table> </div> <div id="box2" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 383px; top: 506px; width: 402px;"> <table width="417" border="0" cellspacing="0" cellpadding="0"> <form action="" method="get"> <tr> <td width="168" valign="top"><input name="poitype[]" type="checkbox" value="9CCARE,9FLSCH,9JC,9KG,9PRI,9SEC,9SCARE,9TI" /> <span class="style2">Education for Children</span> <input name="poitype[]" type="checkbox" value="8FBAC,8OSBAC,8RBAC,8ACUMB,9ATM,8FBANK,8OBANK,8RBANK,8DBUMB" /> <span class="style2">Financial Services</span> <input name="poitype[]" type="checkbox" value="9RCLUB" /> <span class="style2">Recreation</span></td> <td width="187" valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" /> <span class="style2">Bus Depot/ Bus Park</span> <input name="poitype[]2" type="checkbox" value="MRT" /> <span class="style2">MRT Station</span> <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" /> <span class="style2">Places of Worship</span></td> </tr> <tr> <td colspan="2" valign="top" height="6"><img src="images/blank.png" height="6" width="1"></td> </tr> <tr> <td colspan="2" valign="top"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2"> KM</span> </td> </tr> <tr> <td colspan="2" valign="top"> </td> </tr> <tr> <td colspan="2" valign="top"><input type="submit" name="Submit2" value="Submit" /> <input type="hidden" name="POIview" value="csr" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /></td> </tr> </form> </table> </div> <div id="box3" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 367px; top: 489px; width: 443px;"> <table width="417" border="0" cellspacing="0" cellpadding="0"> <form action="" method="get"> <tr> <td valign="top"><input name="poitype[]" type="checkbox" value="9SCTRE" /> <span class="style2">Shopping Centre</span> <input name="poitype[]" type="checkbox" value="9SMKT" /> <span class="style2">Supermarket</span> <input name="poitype[]" type="checkbox" value="8CC" /> <span class="style2">Community Centre/ Clubs</span> <input name="poitype[]" type="checkbox" value="9SWC" /> <span class="style2">Swimming Complex</span> <input name="poitype[]" type="checkbox" value="9HOSP" /> <span class="style2">Hospitals & Medical Centre</span></td> <td valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" /> <span class="style2">Bus Depot/ Bus Park</span> <input name="poitype[]" type="checkbox" value="9HEC" /> <span class="style2">High Commission/Embassy/Consulate</span> <input name="poitype[]" type="checkbox" value="MRT" /> <span class="style2">MRT Station</span> <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" /> <span class="style2">Places of Worship</span></td> </tr> <tr> <td colspan="2" valign="top" height="6"><img src="images/blank.png" width="1" height="6"></td> </tr> <tr> <td colspan="2" valign="top"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2"> KM</span> </td> </tr> <tr> <td colspan="2"><input type="submit" name="Submit3" value="Submit" /> <input type="hidden" name="POIview" value="csr" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /> </td> </tr> </form> </table> </div> <div id="box4" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 386px; top: 514px; width: 482px;"> <table width="476" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="410"> </td> </tr> <tr> <td align="center"><form action="" method="get"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2">KM</span> <input type="text" name="keywords"> <span class="style2">Keywords</span> <input type="submit" name="Submit" value="Submit" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /> <input type="hidden" name="POIview" value="amnall" /> </form></td> </tr> <tr> <td> </td> </tr> </table> </div> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><table> <tr> <td width="529" align="center"> </td> </tr> <tr> <td align="center" class="style2">Current Distance Radius = <? echo "$dist"; ?> Meters <? print_r($amenitiesLat) ?> <? print_r($amenitiesLon) ?> <? print_r($poitype) ?></td> </tr> <tr> <td align="center" bgcolor="#003466"> </td> </tr> <tr> <td> <!-- for the display of results --> <?php //for the search by distance if ($POIview =="amn") { include 'db_connect.php'; $input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$code,'x1'=>$long,'y1'=>$lat,'dist'=>$dist); $result= $client->getAmenitiesList($input); if ($result != null) { $res = $result->getvicinityReturns; $num = count($res); } else if ($result == null) { $num = 0; } $no = 1; if ($num > 1) { foreach ($res as $details) { $distance=$details->Distance; $tradeName=$details->Trade_name; $blkNo=$details->blk_no; $roadName=$details->Road_name; $postalCode=$details->Postal_code; $latitude=$details->Latitude; $longitude=$details->Longitude; $uSql = "SELECT * FROM jos_myoochi_properties WHERE postalcode = '$postalCode' ORDER by property_name ASC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ $propertyName = $uRow["property_name"]; $address = $uRow["street_name"]; $noBedroom = $uRow["num_bedrooms"]; $noBathroom = $uRow["num_bathrooms"]; $price = $uRow["price_whole"]; $sizesqft = $uRow["property_size"]; $noCarpark = $uRow["num_carparks"]; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td><img src='test.jpg' width='50' height='50'></td> <td class='style2' align='left'> $propertyName $address $noBedroom $noBathroom $price $sizesqft $noCarpark </td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'> <img src='images/showmap.gif' alt='show on map'>[/url] </td></tr></table>"; } } } } else if ($num == 1) { $distance=$res->Distance; $tradeName=$res->Trade_name; $blkNo=$res->blk_no; $roadName=$res->Road_name; $postalCode=$res->Postal_code; $latitude=$res->Latitude; $longitude=$res->Longitude; $uSql = "SELECT * FROM jos_myoochi_properties WHERE postalcode = '$postalCode' ORDER by property_name ASC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ $propertyName = $uRow["property_name"]; $address = $uRow["street_name"]; $noBedroom = $uRow["num_bedrooms"]; $noBathroom = $uRow["num_bathrooms"]; $price = $uRow["price_whole"]; $sizesqft = $uRow["property_size"]; $noCarpark = $uRow["num_carparks"]; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td><img src='test.jpg' width='50' height='50'></td> <td class='style2' align='left'> $propertyName $address $noBedroom $noBathroom $price $sizesqft $noCarpark </td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'>[/url] </td></tr></table>"; } } } else if ($num == 0) { echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>"; } } //for the search csr and poi else if ($POIview=="csr") { $input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$poitype,'x1'=>$long,'y1'=>$lat,'dist'=>$dist); $result= $client->getAmenitiesList($input); if ($result != null) { $res = $result->getvicinityReturns; $num = count($res); } else if ($result == null) { $num = 0; } $no = 1; if ($num > 1) { foreach ($res as $details) { $distance=$details->Distance; $latitude=$details->Latitude; $longitude=$details->Longitude; $postalcode=$details->Postal_code; $blockNo=$details->blk_no; $road=$details->Road_name; $place=$details->Trade_name; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td class='style2' align='left'> $place $blockNo $road, Singapore $postalcode </td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'>[/url] </td></tr></table>"; } } if ($num == 1) { $distance=$res->Distance; $latitude=$res->Latitude; $longitude=$res->Longitude; $postalcode=$res->Postal_code; $blockNo=$res->blk_no; $road=$res->Road_name; $place=$res->Trade_name; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td class='style2' align='left'> $place $blockNo $road, Singapore $postalcode </td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'>[/url] </td></tr></table>"; } if ($num == 0) { echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>"; } } //for the search amenities all else if ($POIview=="amnall") { $AmenitiesSearch=array('username'=>$username,'password'=>$password,'input'=>$keywords,'x1'=>$long,'y1'=>$lat,'dist'=>$dist); $result= $client->getAmenitiesSearchList($AmenitiesSearch); if ($result != null) { $res = $result->getvicinityAllReturns; $num=count($res); } else if ($result == null) { $num = 0; } $no = 1; if ($num > 1) { foreach ($res as $details) { $distance=$details->Distance; $latitude=$details->Latitude; $longitude=$details->Longitude; $postal=$details->Postal_code; $blockNo=$details->blk_no; $road=$details->Road_name; $place=$details->Trade_name; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td class='style2' align='left'> $place $blockNo $road, Singapore $postal </td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'>[/url] </td></tr></table>"; } } if ($num == 1) { $distance=$res->Distance; $latitude=$res->Latitude; $longitude=$res->Longitude; $postal=$res->Postal_code; $blockNo=$res-&gt
  6. <?php $view = isset($_GET['view']) ? $_GET['view'] : $view="init"; $postcode=$_GET['postal']; $addre=isset($_GET['address']) ? $_GET['address'] :$address=""; $password="v3teletech123"; $username="Trial"; $browser='others'; $sizeW=500; //specifiying the map width $sizeH=319; //specifiying the map height $code="9PBCOM"; $x1 = isset($_GET['x1']) ? $_GET['x1'] : $x1=""; $y1 = isset($_GET['y1']) ? $_GET['y1'] : $y1=""; $amenitiesLat = isset($_GET['amenitiesLat']) ? $_GET['amenitiesLat'] : $amenitiesLat=""; $amenitiesLon = isset($_GET['amenitiesLon']) ? $_GET['amenitiesLon'] : $amenitiesLon=""; $keywords=isset($_GET['keywords']) ? $_GET['keywords'] :$keywords=""; $dist = isset($_GET['dist']) ? $_GET['dist'] :$dist="2000"; $POIview = isset($_GET['POIview']) ? $_GET['POIview'] :$POIview="amn"; if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype = ''; <table width="323" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="406" align="center"><table width="529" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="top"><table border="1" bordercolor="#000066" width="$sizeW"> <tr> <td colspan="2" align="center" valign="center" width="500" height="319"><img src="<?=$URL?>" /></td> </tr> <tr> <td colspan="2" valign="center"><center class="style3 style5 style6"> <strong> <?=$blockNo?> <?=$addres?> , S <?=$postal?> </strong> </center></td> </tr> <tr> <td colspan="2" align="center" valign="center" bgcolor="#003466"><span class="style1 style4 style1">Map Navigation </span> </td> </tr> <tr> <?php if ($view == "init" || $view == "up" || $view == "down" || $view == "left" || $view == "right" || $view == "in" || $view == "out") { ?> <td width="152" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=init&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=in&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=out&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" /></a> </td> <td width="159" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=up&lat=<?=$lat?>&long=<?=$long?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=down&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=left&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=right&long=<?=$long?>&lat=<?=$lat?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" /></a> </td> <?php } else if ($view == "amnview" || $view == "amnup" || $view == "amndown" || $view == "amnleft" || $view == "amnright" || $view == "amnin" || $view == "amnout") { ?> <td width="152" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnview&y1=&x1=&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>" ><img src="images/reset.gif" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnin&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/plus.gif" width="28" height="28" border="0" alt="Zoom In" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnout&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/minus.gif" alt="Zoom Out" width="28" height="28" border="0" /></a> </td> <td width="159" align="center" valign="center" bgcolor="#003466"> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnup&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/up.gif" alt="Move Up" width="28" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amndown&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/down.gif" alt="Move Down" width="28" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnleft&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/left.gif" alt="Move Left" width="28" height="28" border="0" /></a> <a href="propertyfindit.php?postal=<?=$postcode?>&view=amnright&y1=<?=$lat?>&x1=<?=$long?>&amenitiesLat=<?=$amenitiesLat?>&amenitiesLon=<?=$amenitiesLon?>&scale=<?=$scale?>&address=<?=$addre?>&browser=<?=$browser?>&sizeW=<?=$sizeW?>&sizeH=<?=$sizeH?>" ><img src="images/right.gif" alt="Move Right" width="28" height="28" border="0" /></a> </td> <?php } ?> </tr> <tr> <td colspan="2" valign="center" bgcolor="#003466"></td> </tr> </table> </td> </tr> <tr> <td align="center" valign="top"> </td> </tr> <tr> <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="108" align="left"><table width="108" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:none; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#0d7a73" id="LINK1"> <tr> <td width="106" align="center" class="style1"><a href="javascript:;" onclick="changeStyle1(); javascript:riseup('box11')" id="tab11"><font style="color:#ffffff; font-size:12px" id="LINK1a">Top Property</font></a> </td> </tr> </table></td> <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="10"> </td> </tr> </table></td> <td width="159" align="left"><table width="159" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK2"> <tr> <td width="157" align="center"><a href="javascript:;" onclick="changeStyle2(); javascript:riseup('box12')" id="tab12"><span class="style1" id="LINK2a">Consumer Specific R</span></a></td> </tr> </table></td> <td width="4" align="left"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="10"> </td> </tr> </table></td> <td width="119" align="left"><table width="119" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK3"> <tr> <td width="117" align="center"><a href="javascript:;" onclick="changeStyle3(); javascript:riseup('box13')" id="tab13"><span class="style1" id="LINK3a">Point of Interest </span></a></td> </tr> </table></td> <td width="4"><table width="4" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="5"> </td> </tr> </table></td> <td width="114"><table width="114" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top:1px; border-top-color:#999999; border-top-style:solid; height:30px; background-color:#003366" id="LINK4"> <tr> <td width="112" align="center"><a href="javascript:;" onclick="changeStyle4(); javascript:riseup('box14')" id="tab14"><span class="style1" id="LINK4a">Street Directory </span></a></td> </tr> </table></td> <td><table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px; border-bottom-color:#999999; border-bottom-style:solid; height:30px"> <tr> <td width="5"> </td> </tr> </table></td> </tr> <tr> <td colspan="8"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-bottom:1px; border-left:1px; border-right:1px; border-left-color:#999999; border-bottom-color:#999999; border-right-color:#999999; border-bottom-style:solid; border-left-style:solid; border-right-style:solid"> <tr> <td height="169" align="center" valign="top" bgcolor="#D1EAE7"><div id="box1" style="visibility:visible; background-color:#D1EAE7; position:absolute; left: 435px; top: 513px; width: 370px;"> <table width="353" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td height="25" align="center"><form action="" method="get"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2">KM</span> <input type="submit" name="Submit" value="Submit" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /> <input type="hidden" name="POIview" value="amn" /> </form></td> </tr> <tr> <td> </td> </tr> </table> </div> <div id="box2" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 383px; top: 506px; width: 402px;"> <table width="417" border="0" cellspacing="0" cellpadding="0"> <form action="" method="get"> <tr> <td width="168" valign="top"><input name="poitype[]" type="checkbox" value="9CCARE,9FLSCH,9JC,9KG,9PRI,9SEC,9SCARE,9TI" /> <span class="style2">Education for Children</span><br /> <input name="poitype[]" type="checkbox" value="8FBAC,8OSBAC,8RBAC,8ACUMB,9ATM,8FBANK,8OBANK,8RBANK,8DBUMB" /> <span class="style2">Financial Services</span><br /> <input name="poitype[]" type="checkbox" value="9RCLUB" /> <span class="style2">Recreation</span></td> <td width="187" valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" /> <span class="style2">Bus Depot/ Bus Park</span><br /> <input name="poitype[]2" type="checkbox" value="MRT" /> <span class="style2">MRT Station</span><br /> <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" /> <span class="style2">Places of Worship</span></td> </tr> <tr> <td colspan="2" valign="top" height="6"><img src="images/blank.png" height="6" width="1"></td> </tr> <tr> <td colspan="2" valign="top"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2"> KM</span> </td> </tr> <tr> <td colspan="2" valign="top"> </td> </tr> <tr> <td colspan="2" valign="top"><input type="submit" name="Submit2" value="Submit" /> <input type="hidden" name="POIview" value="csr" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /></td> </tr> </form> </table> </div> <div id="box3" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 367px; top: 489px; width: 443px;"> <table width="417" border="0" cellspacing="0" cellpadding="0"> <form action="" method="get"> <tr> <td valign="top"><input name="poitype[]" type="checkbox" value="9SCTRE" /> <span class="style2">Shopping Centre</span><br /> <input name="poitype[]" type="checkbox" value="9SMKT" /> <span class="style2">Supermarket</span><br /> <input name="poitype[]" type="checkbox" value="8CC" /> <span class="style2">Community Centre/ Clubs</span><br /> <input name="poitype[]" type="checkbox" value="9SWC" /> <span class="style2">Swimming Complex</span><br /> <input name="poitype[]" type="checkbox" value="9HOSP" /> <span class="style2">Hospitals & Medical Centre</span></td> <td valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" /> <span class="style2">Bus Depot/ Bus Park</span><br /> <input name="poitype[]" type="checkbox" value="9HEC" /> <span class="style2">High Commission/Embassy/Consulate</span><br /> <input name="poitype[]" type="checkbox" value="MRT" /> <span class="style2">MRT Station</span><br /> <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" /> <span class="style2">Places of Worship</span></td> </tr> <tr> <td colspan="2" valign="top" height="6"><img src="images/blank.png" width="1" height="6"></td> </tr> <tr> <td colspan="2" valign="top"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2"> KM</span> </td> </tr> <tr> <td colspan="2"><input type="submit" name="Submit3" value="Submit" /> <input type="hidden" name="POIview" value="csr" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /> </td> </tr> </form> </table> </div> <div id="box4" style="visibility:hidden; background-color:#D1EAE7; position:absolute; left: 386px; top: 514px; width: 482px;"> <table width="476" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="410"> </td> </tr> <tr> <td align="center"><form action="" method="get"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2">KM</span> <input type="text" name="keywords"> <span class="style2">Keywords</span> <input type="submit" name="Submit" value="Submit" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /> <input type="hidden" name="POIview" value="amnall" /> </form></td> </tr> <tr> <td> </td> </tr> </table> </div> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><table> <tr> <td width="529" align="center"> </td> </tr> <tr> <td align="center" class="style2">Current Distance Radius = <? echo "$dist"; ?> Meters<br> <? print_r($amenitiesLat) ?><br> <? print_r($amenitiesLon) ?><br> <? print_r($poitype) ?></td> </tr> <tr> <td align="center" bgcolor="#003466"> </td> </tr> <tr> <td> <!-- for the display of results --> <?php //for the search by distance if ($POIview =="amn") { include 'db_connect.php'; $input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$code,'x1'=>$long,'y1'=>$lat,'dist'=>$dist); $result= $client->getAmenitiesList($input); if ($result != null) { $res = $result->getvicinityReturns; $num = count($res); } else if ($result == null) { $num = 0; } $no = 1; if ($num > 1) { foreach ($res as $details) { $distance=$details->Distance; $tradeName=$details->Trade_name; $blkNo=$details->blk_no; $roadName=$details->Road_name; $postalCode=$details->Postal_code; $latitude=$details->Latitude; $longitude=$details->Longitude; $uSql = "SELECT * FROM jos_myoochi_properties WHERE postalcode = '$postalCode' ORDER by property_name ASC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ $propertyName = $uRow["property_name"]; $address = $uRow["street_name"]; $noBedroom = $uRow["num_bedrooms"]; $noBathroom = $uRow["num_bathrooms"]; $price = $uRow["price_whole"]; $sizesqft = $uRow["property_size"]; $noCarpark = $uRow["num_carparks"]; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td><img src='test.jpg' width='50' height='50'></td> <td class='style2' align='left'> <b>$propertyName</b> $address $noBedroom $noBathroom $price $sizesqft $noCarpark <br></td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'> <img src='images/showmap.gif' alt='show on map'></a> </td></tr></table>"; } } } } else if ($num == 1) { $distance=$res->Distance; $tradeName=$res->Trade_name; $blkNo=$res->blk_no; $roadName=$res->Road_name; $postalCode=$res->Postal_code; $latitude=$res->Latitude; $longitude=$res->Longitude; $uSql = "SELECT * FROM jos_myoochi_properties WHERE postalcode = '$postalCode' ORDER by property_name ASC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ $propertyName = $uRow["property_name"]; $address = $uRow["street_name"]; $noBedroom = $uRow["num_bedrooms"]; $noBathroom = $uRow["num_bathrooms"]; $price = $uRow["price_whole"]; $sizesqft = $uRow["property_size"]; $noCarpark = $uRow["num_carparks"]; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td><img src='test.jpg' width='50' height='50'></td> <td class='style2' align='left'> <b>$propertyName</b> $address $noBedroom $noBathroom $price $sizesqft $noCarpark <br></td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'></a> </td></tr></table>"; } } } else if ($num == 0) { echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>"; } } //for the search csr and poi else if ($POIview=="csr") { $input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$poitype,'x1'=>$long,'y1'=>$lat,'dist'=>$dist); $result= $client->getAmenitiesList($input); if ($result != null) { $res = $result->getvicinityReturns; $num = count($res); } else if ($result == null) { $num = 0; } $no = 1; if ($num > 1) { foreach ($res as $details) { $distance=$details->Distance; $latitude=$details->Latitude; $longitude=$details->Longitude; $postalcode=$details->Postal_code; $blockNo=$details->blk_no; $road=$details->Road_name; $place=$details->Trade_name; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td class='style2' align='left'> <b>$place</b><br>$blockNo $road, Singapore $postalcode <br></td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'></a> </td></tr></table>"; } } if ($num == 1) { $distance=$res->Distance; $latitude=$res->Latitude; $longitude=$res->Longitude; $postalcode=$res->Postal_code; $blockNo=$res->blk_no; $road=$res->Road_name; $place=$res->Trade_name; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td class='style2' align='left'> <b>$place</b><br>$blockNo $road, Singapore $postalcode <br></td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale&POIview=csr&poitype=$poitype&dist=$dist'><img src='images/showmap.gif' alt='show on map'></a> </td></tr></table>"; } if ($num == 0) { echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>"; } } //for the search amenities all else if ($POIview=="amnall") { $AmenitiesSearch=array('username'=>$username,'password'=>$password,'input'=>$keywords,'x1'=>$long,'y1'=>$lat,'dist'=>$dist); $result= $client->getAmenitiesSearchList($AmenitiesSearch); if ($result != null) { $res = $result->getvicinityAllReturns; $num=count($res); } else if ($result == null) { $num = 0; } $no = 1; if ($num > 1) { foreach ($res as $details) { $distance=$details->Distance; $latitude=$details->Latitude; $longitude=$details->Longitude; $postal=$details->Postal_code; $blockNo=$details->blk_no; $road=$details->Road_name; $place=$details->Trade_name; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td class='style2' align='left'> <b>$place</b><br>$blockNo $road, Singapore $postal <br></td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'></a> </td></tr></table>"; } } if ($num == 1) { $distance=$res->Distance; $latitude=$res->Latitude; $longitude=$res->Longitude; $postal=$res->Postal_code; $blockNo=$res->blk_no; $road=$res->Road_name; $place=$res->Trade_name; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td class='style2' align='left'> <b>$place</b><br>$blockNo $road, Singapore $postal <br></td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'><img src='images/showmap.gif' alt='show on map'></a> </td></tr></table>"; } if ($num == 0) { echo "<div align='center' class='style2' style='background-color:#D1EAE7'>you have zero results for this option</div>"; } } //end } } catch (SoapFault $exception) { echo $exception; } ?> </table></td> </tr> </table> MOD EDIT - Code tags !!!
  7. any help on this please? http://mango.resonance.com.sg/myoochi/findit/propertyfindit.php?postal=730798&address= this is the site. try to click CSR tab check MRT select 2km distance and Submit on this result click show on map button you will get an error on the top,,, telling something about the implode. hope you could help me fix this thanks!
  8. hi, i need help, i got a variables that has an array value and i initially need this when the page loads. the array variable is $poitype. now i have a button that will submit the poitype value the normal way. how should i modify this code? if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype =''; to submit values in array and in normal value. this is my the page for reference http://mango.resonance.com.sg/myoochi/findit/propertyfindit.php?postal=730798&address= if you load the page, there is no error, but when you click on consumer specific R tab and check MRT distance 2km and submit you will notice that there's an error on the implode syntax. and this is the code for my page <? if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); else $poitype =''; ?> <table width="417" border="0" cellspacing="0" cellpadding="0"> <form action="" method="get"> <tr> <td width="168" valign="top"><input name="poitype[]" type="checkbox" value="9CCARE,9FLSCH,9JC,9KG,9PRI,9SEC,9SCARE,9TI" /> <span class="style2">Education for Children</span><br /> <input name="poitype[]" type="checkbox" value="8FBAC,8OSBAC,8RBAC,8ACUMB,9ATM,8FBANK,8OBANK,8RBANK,8DBUMB" /> <span class="style2">Financial Services</span><br /> <input name="poitype[]" type="checkbox" value="9RCLUB" /> <span class="style2">Recreation</span></td> <td width="187" valign="top"><input name="poitype[]" type="checkbox" value="19BDPT" /> <span class="style2">Bus Depot/ Bus Park</span><br /> <input name="poitype[]2" type="checkbox" value="MRT" /> <span class="style2">MRT Station</span><br /> <input name="poitype[]" type="checkbox" value="9CHNTE,9INDTE,9MOS,9SHTEM" /> <span class="style2">Places of Worship</span></td> </tr> <tr> <td colspan="2" valign="top" height="6"><img src="images/blank.png" height="6" width="1"></td> </tr> <tr> <td colspan="2" valign="top"> <span class="style5 style2">Distance from Property</span> <select name="dist" class="style5"> <option value="1000">1</option> <option value="2000">2</option> <option value="3000">3</option> <option value="4000">4</option> <option value="5000">5</option> <option value="6000">6</option> <option value="7000">7</option> <option value="8000">8</option> <option value="9000">9</option> <option value="10000">10</option> </select> <span class="style2"> KM</span> </td> </tr> <tr> <td colspan="2" valign="top"> </td> </tr> <tr> <td colspan="2" valign="top"><input type="submit" name="Submit2" value="Submit" /> <input type="hidden" name="POIview" value="csr" /> <input type="hidden" name="address" value="<? echo $_GET['address']; ?>" /> <input type="hidden" name="postal" value="<? echo $_GET['postal']; ?>" /></td> </tr> </form> </table> <? include 'db_connect.php'; $input=array('username'=>$username,'password'=>$password,'amenitiesCode'=>$code,'x1'=>$long,'y1'=>$lat,'dist'=>$dist); $result= $client->getAmenitiesList($input); if ($result != null) { $res = $result->getvicinityReturns; $num = count($res); } else if ($result == null) { $num = 0; } $no = 1; if ($num > 1) { foreach ($res as $details) { $distance=$details->Distance; $tradeName=$details->Trade_name; $blkNo=$details->blk_no; $roadName=$details->Road_name; $postalCode=$details->Postal_code; $latitude=$details->Latitude; $longitude=$details->Longitude; $uSql = "SELECT * FROM jos_myoochi_properties WHERE postalcode = '$postalCode' ORDER by property_name ASC"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ $propertyName = $uRow["property_name"]; $address = $uRow["street_name"]; $noBedroom = $uRow["num_bedrooms"]; $noBathroom = $uRow["num_bathrooms"]; $price = $uRow["price_whole"]; $sizesqft = $uRow["property_size"]; $noCarpark = $uRow["num_carparks"]; //echo $no++; echo "<table width='529' border='0' cellspacing='0' cellpadding='0' style='border-bottom:2px; border-bottom-color:#FFFFFF; border-bottom-style:solid; background-color:#D1EAE7; padding:4px'> <tr> <td><img src='test.jpg' width='50' height='50'></td> <td class='style2' align='left'> <b>$propertyName</b> $address $noBedroom $noBathroom $price $sizesqft $noCarpark <br></td> <td valign='top' align='right'> <a href='propertyfindit.php?address=$addre&postal=$postal&x1=$long&y1=$lat&amenitiesLat=$latitude&amenitiesLon=$longitude&view=amnview&browser=others&scale=$scale'> <img src='images/showmap.gif' alt='show on map'></a> </td></tr></table>"; } } } ?> hope you could help me with this. thanks!
  9. hi, i need help, i have a form that i inside an iframe and the result must be submitted into the top page in the form will i use "get" or "post" and in the action, what will i place? thanks!
  10. hi, i replaced it as instructed $poitype = implode(",", $_GET['poitype']); to if(isset($_GET['poitype']) and count($_GET['poitype']) > 0) $poitype = implode(",", $_GET['poitype']); know i am getting errors on this line Notice: Undefined variable: poitype in /var/www/html/myoochi/findit/propertyfindit.php on line 435 the code on this line is this <? echo "$poitype"; ?> whatelse should be done here? thanks!
  11. how do i do it? sorry im still not very familiar with implode and explode thanks!
  12. guys, i need help. how can i fix this error? Warning: implode() [function.implode]: Bad arguments. in /var/www/html/myoochi/findit/propertyfindit.php on line 16 this is the page http://mango.resonance.com.sg/myoochi/findit/propertyfindit.php?address=kampong%20ampat&postal= how can i fix the code for my implode? currently if i didnt select anything in the checkbox, especially if i get went to the page i will get this error, but once i get to the "Consumer Specific R" tab and select anything there, the error will be gone. below is my codes for this page <? $poitype = implode(",", $_GET['poitype']); ?> <table width="417" border="0" cellspacing="0" cellpadding="0"> <form action="" method="get"> <tr> <td width="168" valign="top"> <input name="poitype[]" type="checkbox" value="9CCARE,9FLSCH,9JC,9KG,9PRI,9SEC,9SCARE,9TI"> <span class="style2">Education for Children</span><br> <input name="poitype[]" type="checkbox" value="8FBAC,8OSBAC,8RBAC,8ACUMB,9ATM,8FBANK,8OBANK,8RBANK,8DBUMB"> <span class="style2">Financial Services</span><br> <input name="poitype[]" type="checkbox" value="9RCLUB"> <span class="style2">Recreation</span><br> </td> <td width="187"> <input name="poitype[]" type="checkbox" value="19BDPT"> <span class="style2">Bus Deport/ Bus Park</span><br> <input name="poitype[]" type="checkbox" value="MRT"> <span class="style2">MRT Station</span><br> <input name="poitype[]" type="checkbox" value="9MOS,9SHTEM,9CHNTE,9INDTE,"> <span class="style2">Places of Worship</span><br> </td> </tr> <tr> <td colspan="2" valign="top"><input type="submit" name="Submit2" value="Submit"></td> </tr> </form> </table> <? echo "$poitype"; ?> hope you could help me with this. thanks!
  13. hi, other options other than cron? actually, i only need to run a php page and can actually execute the work to be done by just going to the browser and type the URL but i need to run it every 24 hrs. any php scrpts or options that i can use to do this? thanks!
  14. hi, i need to run a php file (email.php) on a given time my problem is, i dont know how to do this because i havent done this before. what are my options here? hope you could help me with this. thanks!
  15. Hi, i need help, i am not sure if my codes for mysql query and uRow is correct. i can successfully load my data but then i am still getting some error on my page. check this: http://mango.resonance.com.sg/myoochi/v3upload/V3UploaderClient.php this is my loading page and this is my display page http://203.125.7.42/mapguide/ViewPOIData.php this is my code for the loadingpage <?php include 'db_connect.php'; $uSql = "SELECT * FROM jos_findit"; $uResult = mysql_query($uSql, $connection); if(!$uResult){ echo 'no data found'; }else{ while($uRow = mysql_fetch_array($uResult)){ /*$TradeName = 'abc'; $TradeBranch = '-'; $TradeCode = 'test789'; $PostalCode = '123456'; $CRUD = 'C'; */ $client = new SoapClient("http://203.125.7.42/mapguide/phpviewersample/V3UploaderWebService.wsdl",array("trace"=>1)); try { $input=array('BuildingName'=>$uRow[TradeName],'TradeBranch'=>$uRow[TradeBranch],'TradeCode'=>$uRow[TradeCode],'PostalCode'=>$uRow[PostalCode],'CRUD'=>$uRow[CRUD]); $result= $client->getUpdateResult($input); $res = $result->getUpdateStatusReturns; echo $res->updateStatus ."<BR><BR>"; echo "Request Header : "; print htmlspecialchars($client->__getLastRequest()) . "\n<br><br>"; echo "Response Header : "; print htmlspecialchars($client->__getLastResponse()) . "\n"; } catch (SoapFault $exception) { echo $exception; } } } ?> hope you could help me with this. thanks!
  16. hi, please check this http://www.phpfreaks.com/forums/index.php/board,1.0.html currently i am using ajax in my right menu in mozilla i dont see any errors, but in IE, whenever i rollover the buttons ex. about us, our schools, etc, a space on the bottom of the menu suddenly appears and i dont know where is it coming. one of my friend told me that i can use hide/unhide on this one better than ajax. (style.visibility) but i dont know how to make it work. hope you could help me with this. if you need to check the code of my page this is the code for abttest.htm <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>KAPLAN SINGAPORE: Website Design Concept</title> <style type="text/css"> <!-- body { background-color: #330066; } --> </style> <script language="JavaScript" type="text/JavaScript"> function Load() { document.getElementById("my_site_content").innerHTML = "<img src='images/menu/about.jpg'>"; } </script> <script type="text/javascript" src="ajax_navigation.js"></script> </head> <body onload= Load()"> <table width="950" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="950"><table width="950" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td width="485" rowspan="12" valign="top"><img src="images/logo.gif" width="485" height="80" /><img src="images/main-abt.jpg" width="485" height="270" /></td> <td width="155" valign="top"><img src="images/menu/spacer.gif" width="1" height="31" /></td> <td width="310" rowspan="12" valign="top"><span id="my_site_content"></span></td> </tr> <tr> <td valign="top"><a href="javascript:void(0)" onmouseover="open_url('aboutus.html','my_site_content')"><img src="images/menu/aboutus.gif" name="Aboutus" width="155" height="27" border="0" id="Aboutus" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:void(0)" onmouseover="open_url('school.html','my_site_content')"><img src="images/menu/school.gif" name="school" width="155" height="29" border="0" id="school" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:void(0)" onmouseover="open_url('programme.html','my_site_content')"><img src="images/menu/programme.gif" name="programme" width="155" height="28" border="0" id="programme" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/partner.gif" width="155" height="28" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/academic.gif" width="155" height="32" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/career.gif" width="155" height="27" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/news.gif" width="155" height="31" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/resource.gif" width="155" height="29" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:void(0)" onmouseover="open_url('community.html','my_site_content')"><img src="images/menu/community.gif" name="community" width="155" height="33" border="0" id="community" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/contact.gif" width="155" height="27" border="0" /></a></td> </tr> <tr> <td width="155" valign="top"> </td> </tr> <tr> <td colspan="3" valign="top"><img src="images/search.jpg" width="950" height="304" /></td> </tr> <tr> <td colspan="3" valign="top"><img src="images/footer.jpg" width="950" height="36" vspace="10" /></td> </tr> </table></td> </tr> </table> </body> </html> and this is the code of my ajax_navigation.js /* Ultimater's edited version of: http://jibbering.com/2002/4/httprequest.html to serve IE7 with XMLHttpRequest instead of ActiveX */ var xmlhttp=false; if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } /*@cc_on @*/ /*@if (@_jscript_version >= 5) // JScript gives us Conditional compilation, we can cope with old IE versions. // and security blocked creation of the objects. if (!xmlhttp){ try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } } @end @*/ if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } /* Ultimater's edited version of: http://javascript.internet.com/ajax/ajax-navigation.html */ var please_wait = ""; function open_url(url, targetId) { if(!xmlhttp)return false; var e=document.getElementById(targetId);if(!e)return false; if(please_wait)e.innerHTML = please_wait; xmlhttp.open("GET", url, true); xmlhttp.onreadystatechange = function() { response(url, e); } try{ xmlhttp.send(null); }catch(l){ while(e.firstChild)e.removeChild(e.firstChild);//e.innerHTML="" the standard way e.appendChild(document.createTextNode("request failed")); } } function response(url, e) { if(xmlhttp.readyState != 4)return; var tmp= (xmlhttp.status == 200 || xmlhttp.status == 0) ? xmlhttp.responseText : "Ooops!! A broken link! Please contact the webmaster of this website ASAP and give him the following error code: " + xmlhttp.status+" "+xmlhttp.statusText; var d=document.createElement("div"); d.innerHTML=tmp; setTimeout(function(){ while(e.firstChild)e.removeChild(e.firstChild);//e.innerHTML="" the standard way e.appendChild(d); },10) } hope you could help me with this. thanks!
  17. hi, is there no other way? because this is what i do after loading. thanks!
  18. on the md5(password) if i change it to password it can be imported successfully however the password is not converted to md5 what is the correct code for this? thanks!
  19. hi, i am not very good on javascript yet, and i usually just use free javascript online. currenty i have a javascript code <HTML> <HEAD> <script type="text/javascript"> function ShowItem() { var Index = document.getElementById("Country").selectedIndex; var country = document.getElementById("Country").options[index].value; switch(country) { case "SG": document.getElementById("MC").innerHTML = "SGD 3,249"; break; case "ML": document.getElementById("MC").innerHTML = "RM 7,389"; break; case "PH": document.getElementById("MC").innerHTML = "PHP 102,499"; break; case "TL": document.getElementById("MC").innerHTML = "BHT 69,459"; break; case "IN": document.getElementById("MC").innerHTML = "USD 2,109"; break; } } function Load() { document.getElementById("Country").selectedIndex=0; document.getElementById("MC").innerHTML = "SGD 3,249"; } </script> </HEAD> <BODY onload="Load()"> <select id="Country" onchange="ShowItem()" width="150"> <option selected value="SG">Singapore</option> <option value="ML">Malaysia</option> <option value="PH">Philippines</option> <option value="TL">Thailand</option> <option value="IN">Indonesia</option> </select> <span id="MC"></span> </BODY> </HTML> and this is meant for menu list wherein if you select one item on the menu list it will change the value in the <span> section. i will be needing this code and use it for image button instead of the menu list wherein if on mouseover, the item on the <span> will change. on the <span> section i am planning to use image instead of text. hope you could help me modify the codes. thanks!
  20. sorry about that. i just got no place to go. and i find this forum as the most reliable forum ever. i was able to fix the mouseout already. but my problem now, i need to leave the rollover image of the buttons whenever i rollover to the big image on the right. let say, i rollver to about us the image on the right change, when i rollover to that right image i want to retain the rollover image of about us. is this possible? currently this is my code <!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>KAPLAN SINGAPORE: Website Design Concept</title> <style type="text/css"> <!-- body { background-color: #330066; } --> </style> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } 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 MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <script language="JavaScript" type="text/JavaScript"> function Load() { document.getElementById("menu").selectedIndex=0; document.getElementById("abt").innerHTML = "<img src='images/menu/about.jpg' name='abt' width='296' height='350' id='abt'>"; document.getElementById("aboutus").innerHTML = "<img src='images/menu/aboutus-over.gif' name='aboutus' id='aboutus'>"; } </script> </head> <body onload="MM_preloadImages('images/menu/aboutus-over.gif','images/menu/about.jpg','images/menu/shool-over.gif','images/menu/school.jpg','images/menu/programme-over.gif','images/menu/programme.jpg','images/menu/community-over.gif','images/menu/community.jpg'), Load()"> <table width="951" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="951"><table width="951" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td width="485" valign="top"><img src="images/logo.gif" width="485" height="80" /></td> <td width="466" rowspan="2" valign="top"><table width="466" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="170"><img src="images/menu/spacer.gif" width="1" height="28" /></td> <td width="296" rowspan="12" valign="top"><img src="images/menu/about.jpg" name="abt" width="296" height="350" id="abt"></td> </tr> <tr> <td valign="top"><a href="javascript:;" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('abt','','images/menu/about.jpg',1);MM_swapImage('aboutus','','images/menu/aboutus-over.gif',1)"><img src="images/menu/aboutus.gif" name="aboutus" width="170" height="30" border="0" id="aboutus" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('abt','','images/menu/school.jpg',1);MM_swapImage('school','','images/menu/shool-over.gif',1)"><img src="images/menu/school.gif" name="school" width="170" height="29" border="0" id="school" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('abt','','images/menu/programme.jpg',1);MM_swapImage('programme','','images/menu/programme-over.gif',1)"><img src="images/menu/programme.gif" name="programme" width="170" height="30" border="0" id="programme" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/partner.gif" width="170" height="30" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/academic.gif" width="170" height="28" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/career.gif" width="170" height="29" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/news.gif" width="170" height="30" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/resource.gif" width="170" height="29" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('abt','','images/menu/community.jpg',1);MM_swapImage('community','','images/menu/community-over.gif',1)"><img src="images/menu/community.gif" name="community" width="170" height="29" border="0" id="community" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/contact.gif" width="170" height="28" border="0" /></a></td> </tr> <tr> <td> </td> </tr> </table></td> </tr> <tr> <td width="485" valign="top"><img src="images/main-abt.jpg" width="485" height="270" /></td> </tr> <tr> <td colspan="2" valign="top"><img src="images/search.jpg" width="950" height="304" /></td> </tr> <tr> <td colspan="2" valign="top"><img src="images/footer.jpg" width="950" height="36" vspace="10" /></td> </tr> </table></td> </tr> </table> </body> </html> thanks!
  21. hi, i need help. please check my site http://mango.resonance.com.sg/memoryworld/test/abttest.htm what i wanted to happen on the menu on the right panel is, whenever i roll over on the menu and rollout it will still go back to its original image, same with the images on the right side. then, when i move my mouse onto the images on the right, the rollover image of the button will remain in its rollover image. is this possible on html scripts or i need any javascript on this? this is my current code <!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>KAPLAN SINGAPORE: Website Design Concept</title> <style type="text/css"> <!-- body { background-color: #330066; } --> </style> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } 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 MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> </head> <body onload="MM_preloadImages('images/menu/aboutus-over.gif','images/menu/about.jpg','images/menu/shool-over.gif','images/menu/school.jpg','images/menu/programme-over.gif','images/menu/programme.jpg','images/menu/community-over.gif','images/menu/community.jpg')"> <table width="951" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#FFFFFF"> <tr> <td width="951"><table width="951" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td width="485" valign="top"><img src="images/logo.gif" width="485" height="80" /></td> <td width="466" rowspan="2" valign="top"><table width="466" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="170"><img src="images/menu/spacer.gif" width="1" height="28" /></td> <td width="296" rowspan="12" valign="top"><img src="images/menu/about.jpg" name="abt" width="296" height="350" id="abt"></td> </tr> <tr> <td valign="top"><a href="javascript:;" onmouseover="MM_swapImage('abt','','images/menu/about.jpg',1);MM_swapImage('aboutus','','images/menu/aboutus-over.gif',1)"><img src="images/menu/aboutus.gif" name="aboutus" width="170" height="30" border="0" id="aboutus" /></a></td> </tr> <tr> <td valign="top"><a href="#" onmouseover="MM_swapImage('school','','images/menu/shool-over.gif',1);MM_swapImage('abt','','images/menu/school.jpg',1)"><img src="images/menu/school.gif" name="school" width="170" height="29" border="0" id="school" /></a></td> </tr> <tr> <td valign="top"><a href="#" onmouseover="MM_swapImage('programme','','images/menu/programme-over.gif',1);MM_swapImage('abt','','images/menu/programme.jpg',1)"><img src="images/menu/programme.gif" name="programme" width="170" height="30" border="0" id="programme" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/partner.gif" width="170" height="30" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/academic.gif" width="170" height="28" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/career.gif" width="170" height="29" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/news.gif" width="170" height="30" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/resource.gif" width="170" height="29" border="0" /></a></td> </tr> <tr> <td valign="top"><a href="#" onmouseover="MM_swapImage('community','','images/menu/community-over.gif',1);MM_swapImage('abt','','images/menu/community.jpg',1)"><img src="images/menu/community.gif" name="community" width="170" height="29" border="0" id="community" /></a></td> </tr> <tr> <td valign="top"><a href="javascript:;"><img src="images/menu/contact.gif" width="170" height="28" border="0" /></a></td> </tr> <tr> <td> </td> </tr> </table></td> </tr> <tr> <td width="485" valign="top"><img src="images/main-abt.jpg" width="485" height="270" /></td> </tr> <tr> <td colspan="2" valign="top"><img src="images/search.jpg" width="950" height="304" /></td> </tr> <tr> <td colspan="2" valign="top"><img src="images/footer.jpg" width="950" height="36" vspace="10" /></td> </tr> </table></td> </tr> </table> </body> </html> hope you could help me with this. thanks!
  22. actually i replaced everything with GET already including the method in my form but its still not working.
  23. i already printed the error on that one from my previous post. on my first page here is the result jhpage Object ( [sql] => SELECT * FROM applicant WHERE country = 'Singapore' [result] => [outstanding_rows] => [get_var] => page [rows_on_page] => 20 [max_rows] => 0 ) if i click the second page here is the code jhpage Object ( [sql] => SELECT * FROM applicant WHERE [result] => [outstanding_rows] => [get_var] => page [rows_on_page] => 20 [max_rows] => 0 ) i notice that the country='Singpaore' is gone when i click on the second page i think it has something to do with the POST and GET function but i dont know how to fix it. hope you could help me with this thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.