function GetHotelroomByHotelId($hotelid, $ticketid, $lineid, $webid) { global $dsql; $sql = "select * from #@__hotel_room where hotelid='{$hotelid}' and webid='{$webid}'"; $res = $dsql->getAll($sql); $str = ''; $idx = 0; foreach ($res as $row) { $idx++; $str .= '<tr class="bor_b"> <td height="99" align="center" class="border-r font-ys">套餐' . $idx . ' </td> <td height="99" align="center" class="border-r cor_bg">' . GetTicketByTicketId($ticketid, $webid) . '</td> <td height="99" align="left" class="border-r pad_left">' . getRoomName($row) . '</td> <td height="99" align="center" class="border-r"><span style=" font-weight:bold; margin-bottom:10px">套餐总计价格:' . getTotalCount($row['id'], $ticketid) . '</span><br /><br /><input type="button" name="button" id="button" value="" onclick="showDiv(this, ' . $row['id'] . ', ' . $ticketid . ', ' . $lineid . ')" /></td> </tr>'; } return $str; }
} } $str .= " ]"; echo $str; exit; } if ($dopost == 'getScal') { $dateArr = explode('-', $date); $Y = $dateArr[0]; $M = $dateArr[1]; $D = intval($dateArr[2]); $idArr = explode('|', $data); $hid = $idArr[0]; $tid = $idArr[1]; $hstr = GetHotelroomByHotelId($hid, 0, $Y, $M, $D); $tstr = GetTicketByTicketId($tid, 0, $Y, $M, $D); $arr = array(); $arr['hs'] = $hstr; $arr['ts'] = $tstr; echo json_encode($arr); } function GetHotelroomByHotelId($hotelid, $webid, $Y, $M, $D) { global $dsql; $sql = "select * from #@__hotel_room where hotelid='{$hotelid}' and webid='{$webid}'"; $res = $dsql->getAll($sql); $str = ''; foreach ($res as $row) { if ($row['breakfirst'] == '0') { $breakfirst = '无'; }