Connect($host, $user, $pwd); $db->DBUse($db_name); // GET PROPERTY DETAILS if($p != ''){ $sql = "SELECT * FROM rentalzdata_full_$switch WHERE prop_jobl = '".mysql_escape_string($p)."'"; } else { $sql = "SELECT * FROM rentalzdata_full_$switch WHERE prp_unique = '".mysql_escape_string($id)."'"; } //echo $sql; $result = $db->Query($sql); $row = $db->fetchArray($result); $prop_code = $row["prop_jobl"]; $typeID = $row["prop_prop"]; // START PAGE GENERATION $page = new PageGenerator; $page->template($template_base, $page_usersite_notabs); $page->webBase($web_base); $page->breadCrumbs($include_breadcrumbs); $page->styleSheet($sheet); // GET AGENT DETAILS $abn = substr($ua, 0, 11); //$a_sql = "select * FROM agentz_$switch WHERE ag_abn='$abn' AND ag_license='$aglic'"; $a_sql = "select * FROM agentz_$switch WHERE ag_abn='$abn'"; $a_result = $db->Query($a_sql); $a_row = $db->fetchArray($a_result); $tariff_head = $a_row['rz_gltarif']; if($tariff_head != ''){ $arr_tariff = unserialize($tariff_head); //foreach ($arr_tariff as $k=>$v){ // echo $k . ": " . $v . "
"; //} //if(strlen($tariff_head) > 8){ if(($arr_tariff[0] != '') || ($arr_tariff[1] != '')){ //echo "1"; $xx = 1; foreach($arr_tariff as $desc){ $name = 'tarif_' . $xx; $$name = $arr_tariff[$xx-1]; $xx++; $custom_rates = true; } } else { //echo "2"; for($xx=1; $xx<=12;$xx++){ $name = 'tarif_' . $xx; $$name = 'Rate ' . $xx; } } } else { //echo "3"; for($xx=1; $xx<=12;$xx++){ $name = 'tarif_' . $xx; $$name = 'Rate ' . $xx; } } //Display Header & Body Start $page->showHeader(); $page->showPageStart(); ?>
'; } echo ''; if(($xx == 2)||($xx==4)||($xx==6)||($xx==8)||($xx==10)||($xx==12)){ echo ''; } } } else { for($xx=1; $xx<=12; $xx++){ $tarif_name = 'tarif_' . $xx; if(($xx == 1)||($xx==4)||($xx==7)||($xx==10)){ echo ''; } echo ''; echo ''; if(($xx == 3)||($xx==6)||($xx==9)||($xx==12)){ echo ''; } } } echo '
  TARIFF RATE CHART
'; if($$tarif_name != ''){ echo '' . $$tarif_name . ' ' . $row["prp_rate".$xx] . ''; } echo '
'; echo '' . $$tarif_name . ''; echo ''.$row["prp_rate".$xx] . ' 
'; } ?> showPageFinish(); ?>