|
|
|
@ -250,37 +250,49 @@ class Api extends CI_Controller {
|
|
|
|
|
if (isset($_GET["param"])){
|
|
|
|
|
$param = str_replace("'","''",$_GET["param"]);
|
|
|
|
|
$list = $this->api_model->getDaytripPriceList($param);
|
|
|
|
|
if (count($list)==1){
|
|
|
|
|
echo "1";
|
|
|
|
|
}else{
|
|
|
|
|
//echo "2";
|
|
|
|
|
$str_th="";
|
|
|
|
|
$str_td="";
|
|
|
|
|
foreach ($list as $row) {
|
|
|
|
|
$PKP_AdultPrice = $row->PKP_AdultPrice;
|
|
|
|
|
$PKP_AdultSpecialPrice = $row->PKP_AdultSpecialPrice;
|
|
|
|
|
if ($PKP_AdultPrice!=$PKP_AdultSpecialPrice && $PKP_AdultSpecialPrice>0){
|
|
|
|
|
$PKP_AdultPrice=$PKP_AdultSpecialPrice;
|
|
|
|
|
}
|
|
|
|
|
$PKP_AdultPrice = $this->currency->convert_moneny_by_char($PKP_AdultPrice,"USD");
|
|
|
|
|
$PKP_PersonStart = $row->PKP_PersonStart;
|
|
|
|
|
$PKP_PersonStop = $row->PKP_PersonStop;
|
|
|
|
|
//'根据数据生成显示内容
|
|
|
|
|
if ($PKP_PersonStart == $PKP_PersonStop){
|
|
|
|
|
$str_th .= "<th> ".$PKP_PersonStart." Person</th>";
|
|
|
|
|
}
|
|
|
|
|
else if ($PKP_PersonStop=="1000") {
|
|
|
|
|
$str_th .= "<th> >".$PKP_PersonStart." Person</th>";
|
|
|
|
|
if (!empty($list)){
|
|
|
|
|
if (count($list)==1){
|
|
|
|
|
//echo "1";
|
|
|
|
|
foreach ($list as $row) {
|
|
|
|
|
$PKP_AdultPrice = $row->PKP_AdultPrice;
|
|
|
|
|
$PKP_AdultSpecialPrice = $row->PKP_AdultSpecialPrice;
|
|
|
|
|
if ($PKP_AdultPrice!=$PKP_AdultSpecialPrice && $PKP_AdultSpecialPrice>0){
|
|
|
|
|
$PKP_AdultPrice=$PKP_AdultSpecialPrice;
|
|
|
|
|
}
|
|
|
|
|
$PKP_AdultPrice = $this->currency->convert_moneny_by_char($PKP_AdultPrice,"USD");
|
|
|
|
|
echo '<table border="0" align="center" cellpadding="10" cellspacing="1" class="pricetable"><tr><th>>1 Person</th></tr><tr><td><strong class="orange"> $'.$PKP_AdultPrice.'</strong></td></tr></table>';
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$str_th .= "<th> ".$PKP_PersonStart." - ".$PKP_PersonStop." Person</th>";
|
|
|
|
|
}else{
|
|
|
|
|
//echo "2";
|
|
|
|
|
$str_th="";
|
|
|
|
|
$str_td="";
|
|
|
|
|
foreach ($list as $row) {
|
|
|
|
|
$PKP_AdultPrice = $row->PKP_AdultPrice;
|
|
|
|
|
$PKP_AdultSpecialPrice = $row->PKP_AdultSpecialPrice;
|
|
|
|
|
if ($PKP_AdultPrice!=$PKP_AdultSpecialPrice && $PKP_AdultSpecialPrice>0){
|
|
|
|
|
$PKP_AdultPrice=$PKP_AdultSpecialPrice;
|
|
|
|
|
}
|
|
|
|
|
$PKP_AdultPrice = $this->currency->convert_moneny_by_char($PKP_AdultPrice,"USD");
|
|
|
|
|
$PKP_PersonStart = $row->PKP_PersonStart;
|
|
|
|
|
$PKP_PersonStop = $row->PKP_PersonStop;
|
|
|
|
|
//'根据数据生成显示内容
|
|
|
|
|
if ($PKP_PersonStart == $PKP_PersonStop){
|
|
|
|
|
$str_th .= "<th> ".$PKP_PersonStart." Person</th>";
|
|
|
|
|
}
|
|
|
|
|
else if ($PKP_PersonStop=="1000") {
|
|
|
|
|
$str_th .= "<th> >".$PKP_PersonStart." Person</th>";
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$str_th .= "<th> ".$PKP_PersonStart." - ".$PKP_PersonStop." Person</th>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$str_td .="<td><strong class='orange'> $ ".$PKP_AdultPrice."</strong></td>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$str_td .="<td><strong class='orange'> $ ".$PKP_AdultPrice."</strong></td>";
|
|
|
|
|
echo '<table border="0" align="center" cellpadding="10" cellspacing="1" class="pricetable"><tr>'.$str_th.'</tr><tr>'.$str_td.'</tr></table>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo '<table border="0" align="center" cellpadding="10" cellspacing="1" class="pricetable"><tr>'.$str_th.'</tr><tr>'.$str_td.'</tr></table>';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
echo "";
|
|
|
|
|
}
|
|
|
|
|