/* * 处理 **/ //头部 include "martin.header.php"; //parameter 参数 $action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action']; $action = empty($action) ? 'list' : $action; $action = trim(strtolower($action)); $id = !empty($_POST['id']) ? $_POST['id'] : @$_GET['id']; $id = intval($id); $start = isset($_GET['start']) ? intval($_GET['start']) : 0; //确认删除 $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; //parameter 参数 martin_adminMenu(8, "订房后台 > 竞价管理"); $auction_handler =& xoops_getmodulehandler('auction', MARTIN_DIRNAME, true); $hotelservice_handler =& xoops_getmodulehandler('hotelservice', MARTIN_DIRNAME, true); //$HotelServiceObj = $hotelservice_handler->create(); $auctionObj = $id > 0 ? $auction_handler->get($id) : $auction_handler->create(); switch ($action) { case "add": include MARTIN_ROOT_PATH . 'include/form.auction.php'; martin_collapsableBar('createtable', 'createtableicon', "添加竞价", '添加竞价'); CreateButton(); //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>'添加城市'))); $form =& new form_auction($auctionObj, $auction_handler->getRoomList($id), $hotelservice_handler->GetHotelList()); $form->display(); martin_close_collapsable('createtable', 'createtableicon'); break; case "save":
$Ranks = GetRanks($xoopsModuleConfig); //酒店 $hotel_handler =& xoops_getmodulehandler('hotel', MARTIN_DIRNAME, true); //城市 $hotelcity_handler =& xoops_getmodulehandler('hotelcity', MARTIN_DIRNAME, true); //是否存在 if ($id > 0 && !$hotel_handler->CheckExist($id)) { redirect_header(XOOPS_URL, 3, '非法访问'); } $HotelCityObj = $hotelcity_handler->create(); //酒店 $HotelObj = $id > 0 ? $hotel_handler->get($id) : $hotel_handler->create(); $TmpFilePath = '../images/hotel/tmp/'; $FilePath = '../images/hotel/'; $FileType = array('.jpg', '.bmp', '.png', '.gif', '.jpeg'); martin_adminMenu(2, "订房后台 > 酒店管理"); switch ($action) { case "add": include MARTIN_ROOT_PATH . 'include/form.hotel.php'; martin_collapsableBar('createtable', 'createtableicon', "添加酒店", '添加酒店'); //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>'添加城市'))); $form =& new form_hotel($HotelObj, $HotelCityObj); $form->display(); martin_close_collapsable('createtable', 'createtableicon'); break; case "save": $alias_url = str_replace(' ', '-', addslashes($_POST['hotel_alias'])); $alias_url = $hotel_handler->CheckAliasExist($alias_url, $id) ? $alias_url . '-' . rand(10000, 100000) : $alias_url; $hotel_city_id = implode(',', $_POST['hotel_city_id']); $HotelObj->setVar('hotel_id', $id); $HotelObj->setVar('hotel_city', isset($_POST['hotel_city']) ? intval($_POST['hotel_city']) : 0);
/* * 处理 **/ //头部 include "martin.header.php"; //parameter 参数 $action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action']; $action = empty($action) ? 'list' : $action; $action = trim(strtolower($action)); $id = !empty($_POST['id']) ? $_POST['id'] : @$_GET['id']; $id = intval($id); $start = isset($_GET['start']) ? intval($_GET['start']) : 0; //确认删除 $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; //parameter 参数 martin_adminMenu(4, "订房后台 > 酒店促销"); $promotion_handler =& xoops_getmodulehandler('hotelpromotion', MARTIN_DIRNAME, true); $hotelservice_handler =& xoops_getmodulehandler('hotelservice', MARTIN_DIRNAME, true); //$HotelServiceObj = $hotelservice_handler->create(); $PromotionObj = $id > 0 ? $promotion_handler->get($id) : $promotion_handler->create(); switch ($action) { case "add": include MARTIN_ROOT_PATH . 'include/form.hotel.promotion.php'; martin_collapsableBar('createtable', 'createtableicon', "添加促销", '添加促销'); CreateButton(); //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>'添加城市'))); $form =& new form_hotel_promotion($PromotionObj, $hotelservice_handler->GetHotelList()); $form->display(); martin_close_collapsable('createtable', 'createtableicon'); break; case "save":
$start = isset($_GET['start']) ? intval($_GET['start']) : 0; //确认删除 $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; //parameter 参数 $order_handler =& xoops_getmodulehandler('order', MARTIN_DIRNAME, true); //hotel city $hotelcity_handler =& xoops_getmodulehandler('hotelcity', MARTIN_DIRNAME, true); $HotelCityObj = $hotelcity_handler->create(); //hotel $hotel_handler =& xoops_getmodulehandler('hotel', MARTIN_DIRNAME, true); if ($id) { $OrderObj = $order_handler->get($id); } else { $OrderObj = $order_handler->create(); } martin_adminMenu(1, "订房后台 > 订单"); switch ($action) { case "edit": include MARTIN_ROOT_PATH . 'include/form.order.php'; martin_collapsableBar('createtable', 'createtableicon', "酒店订单修改", '酒店订单修改'); CreateButton(); if (!$OrderObj->order_id()) { redirect_header(XOOPS_URL, 2, '非法访问.'); } $form =& new form_order($OrderObj); $form->display(); martin_close_collapsable('createtable', 'createtableicon'); break; /*case "info": break;*/
//头部 include "martin.header.php"; //parameter 参数 $action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action']; $action = empty($action) ? 'list' : $action; $action = trim(strtolower($action)); $id = !empty($_POST['id']) ? $_POST['id'] : @$_GET['id']; $id = intval($id); $typeid = !empty($_POST['typeid']) ? intval($_POST['typeid']) : intval(@$_GET['typeid']); $hotel_id = isset($_GET['hotel_id']) ? intval($_GET['hotel_id']) : 0; $service_id = isset($_GET['service_id']) ? intval($_GET['service_id']) : 0; $start = isset($_GET['start']) ? intval($_GET['start']) : 0; //确认删除 $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; //parameter 参数 martin_adminMenu(3, "订房后台 > 酒店服务"); $hotelservice_handler =& xoops_getmodulehandler('hotelservice', MARTIN_DIRNAME, true); $hotelservicetype_handler =& xoops_getmodulehandler('hotelservicetype', MARTIN_DIRNAME, true); $HotelServiceObj = $id > 0 ? $hotelservice_handler->get($id) : $hotelservice_handler->create(); $HotelServiceTypeObj = $typeid > 0 ? $hotelservicetype_handler->get($typeid) : $hotelservicetype_handler->create(); switch ($action) { case "add": include MARTIN_ROOT_PATH . 'include/form.hotel.service.php'; martin_collapsableBar('createtable', 'createtableicon', "添加服务", '添加服务'); CreateButton(); $TypeList = $hotelservicetype_handler->GetList(); $form =& new form_hotel_service($HotelServiceObj, &$TypeList); $form->display(); martin_close_collapsable('createtable', 'createtableicon'); break; case "typeadd":
<?php include "header.php"; /* * 处理 **/ //头部 include "martin.header.php"; martin_adminMenu(0, "订房后台 > 后台首页"); global $xoopsModule; echo "<style type=\"text/css\">\n\tlabel,text {\n\t\tdisplay: block;\n\t\tfloat: left;\n\t\tmargin-bottom: 2px;\n\t}\n\tlabel {\n\t\ttext-align: right;\n\t\twidth: 150px;\n\t\tpadding-right: 20px;\n\t}\n\tbr {\n\t\tclear: left;\n\t}\n\t</style>\n"; echo "<fieldset><legend style='font-weight: bold; color: #900;'>{$xoopsModule->name()} 统计信息</legend>"; echo "<div style='padding: 8px;'>"; echo "</div>"; echo "</fieldset><br><br>"; $pay_path = MARTIN_ROOT_PATH . 'pay/'; $img_path = MARTIN_ROOT_PATH . 'images/hotel/'; echo "<fieldset><legend style='font-weight: bold; color: #900;'>{$xoopsModule->name()} 配置</legend>"; echo "<div style='padding: 8px;'>"; echo "<label>" . "<strong>PHP Version:</strong>" . ":</label><text>" . phpversion() . "</text><br />"; $gd_status = function_exists("gd_info") ? '<font color=green>支持</font>' : '<font color=red><b>不支持</b></font>'; echo "<label>" . "<strong>PHP GD:</strong>" . ":</label><text>" . $gd_status . "</text><br />"; echo "<label>" . "<strong>MySQL Version:</strong>" . ":</label><text>" . mysql_get_server_info() . "</text><br />"; echo "<label>" . "<strong>XOOPS Version:</strong>" . ":</label><text>" . XOOPS_VERSION . "</text><br />"; echo "<label>" . "<strong>Module Version:</strong>" . ":</label><text>" . $xoopsModule->getInfo('version') . "</text><br /><br><br>"; $path_status = is_writable($pay_path) && is_dir($pay_path) ? '<font color=green>可用</font>' : '<font color=red><b>目录不可用</b></font>'; echo "<label>" . "<strong>在线支付文件夹:</strong>" . ":</label><text>" . $pay_path . " ({$path_status})</text><br />"; $img_status = is_writable($img_path) && is_dir($img_path) ? '<font color=green>可用</font>' : '<font color=red><b>目录不可用</b></font>'; echo "<label>" . "<strong>图片上传文件夹:</strong>" . ":</label><text>" . $img_path . " ({$img_status})</text><br />"; echo "</div>"; echo "</fieldset>";
<?php include "header.php"; /* * 处理 **/ //头部 include "martin.header.php"; martin_adminMenu(9, "订房后台 > 关于作者"); echo '<iframe src="http://www.blags.org" height="1600px;" width="100%" frameborder="0"></iframe>'; //底部 include "martin.footer.php";
include "martin.header.php"; //parameter 参数 $action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action']; $action = empty($action) ? 'list' : $action; $action = trim(strtolower($action)); $id = !empty($_POST['id']) ? $_POST['id'] : @$_GET['id']; $id = intval($id); $room_id = isset($_GET['room_id']) ? intval($_GET['room_id']) : 0; $room_date = isset($_GET['room_date']) ? trim($_GET['room_date']) : 0; $hotel_id = isset($_GET['hotel_id']) ? intval($_GET['hotel_id']) : 0; $typeid = isset($_GET['typeid']) ? intval($_GET['typeid']) : 0; $start = isset($_GET['start']) ? intval($_GET['start']) : 0; //确认删除 $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; //parameter 参数 martin_adminMenu(6, "订房后台 > 客房管理"); $room_handler =& xoops_getmodulehandler('room', MARTIN_DIRNAME, true); $hotelservice_handler =& xoops_getmodulehandler('hotelservice', MARTIN_DIRNAME, true); //$HotelServiceObj = $hotelservice_handler->create(); $RoomObj = $id > 0 ? $room_handler->get($id) : $room_handler->create(); switch ($action) { case "add": include MARTIN_ROOT_PATH . 'include/form.room.php'; martin_collapsableBar('createtable', 'createtableicon', "添加客房", '添加客房'); CreateButton(); $TypeList = $room_handler->getRoomTypeList(); $hotelList = $hotelservice_handler->getHotelList($hotel_id); $form =& new form_room($RoomObj, &$hotelList, &$TypeList); $form->display(); martin_close_collapsable('createtable', 'createtableicon'); break;
<?php include "header.php"; /* * 处理 **/ //头部 include "martin.header.php"; martin_adminMenu(0, "订房后台 > 支付方式配置"); global $xoopsModuleConfig; $line_pays = getModuleArray('line_pays', 'line_pays', true); $online_pays = getModuleArray('online_pays', 'online_pays', true); $action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action']; $action = empty($action) ? 'list' : $action; $key = isset($_POST['key']) ? $_POST['key'] : @$_GET['key']; $config_path = MARTIN_ROOT_PATH . "pay/{$key}/config/"; $ini_file = $config_path . "ini.php"; $config_file = $config_path . "config.php"; switch ($action) { case "list": martin_collapsableBar('createtable', 'createtableicon', "支付方式", ''); if (is_array($online_pays)) { echo "<table width='100%' cellspacing=1 cellpadding=2 border=0 class = outer>"; echo "<tr>"; echo "<td class='bg3' align='left'><b>支付key</b></td>"; echo "<td class='bg3' align='left'><b>支付名称</b></td>"; echo "<td width='60' class='bg3' align='center'><b>操作</b></td>"; echo "</tr>"; foreach ($online_pays as $key => $value) { $modify = "<a href='?action=modify&key=" . $key . "'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/icon/edit.gif'/></a>"; echo "<tr><td class='even' align='left'>" . $key . "</td>";
* 处理 **/ //头部 include "martin.header.php"; //parameter 参数 $action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action']; $action = empty($action) ? 'list' : $action; $action = trim(strtolower($action)); $id = !empty($_POST['id']) ? $_POST['id'] : @$_GET['id']; $id = intval($id); $start = isset($_GET['start']) ? intval($_GET['start']) : 0; $city_parentid = isset($_GET['city_parentid']) ? intval($_GET['city_parentid']) : 0; //确认删除 $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; //parameter 参数 martin_adminMenu(5, "订房后台 > 城市管理"); $hotelcity_handler =& xoops_getmodulehandler('hotelcity', MARTIN_DIRNAME, true); if ($id) { $HotelCityObj = $hotelcity_handler->get($id); } else { $HotelCityObj = $hotelcity_handler->create(); } //var_dump($HotelCityObj); //var_dump($hotelcity_handler); //var_dump($hotelcity_handler->city_name()); switch ($action) { case "add": include MARTIN_ROOT_PATH . 'include/form.hotel.city.php'; martin_collapsableBar('createtable', 'createtableicon', "添加酒店城市", '添加酒店城市'); //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>'添加城市'))); $form =& new form_hotel_city($HotelCityObj);
/* * 处理 **/ //头部 include "martin.header.php"; //parameter 参数 $action = isset($_POST['action']) ? $_POST['action'] : @$_GET['action']; $action = empty($action) ? 'list' : $action; $action = trim(strtolower($action)); $id = !empty($_POST['id']) ? $_POST['id'] : @$_GET['id']; $id = intval($id); $start = isset($_GET['start']) ? intval($_GET['start']) : 0; //确认删除 $confirm = isset($_POST['confirm']) ? $_POST['confirm'] : 0; //parameter 参数 martin_adminMenu(7, "订房后台 > 团购管理"); $group_handler =& xoops_getmodulehandler('group', MARTIN_DIRNAME, true); $hotelservice_handler =& xoops_getmodulehandler('hotelservice', MARTIN_DIRNAME, true); //$HotelServiceObj = $hotelservice_handler->create(); $GroupObj = $id > 0 ? $group_handler->get($id) : $group_handler->create(); switch ($action) { case "add": include MARTIN_ROOT_PATH . 'include/form.group.php'; martin_collapsableBar('createtable', 'createtableicon', "添加团购", '添加团购'); CreateButton(); //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>'添加城市'))); $form =& new form_group($GroupObj, $group_handler->getRoomList($id), $hotelservice_handler->GetHotelList()); $form->display(); martin_close_collapsable('createtable', 'createtableicon'); break; case "save":