<?php $title="Change Hotel Backend B2C , B2B System"; include("header.php"); check_position("OPERATION"); include("fetch_data_profile.php"); $r=profile_hotel($_REQUEST); ?> <div class="header"> <h1 class="page-title">Change Hotel <?php $r["hotel_name1"]." - ".$r["CountryName"] ." - ".$r["CityName"];?></h1> </div> <ul class="breadcrumb"> <li><a href="home.php">Home</a> <span class="divider">/</span></li> <li class="active">Product <span class="divider">/</span></li> <li class="active">Hotel</li> </ul> <div class="container-fluid"> <div class="row-fluid"> <div class="btn-toolbar"> <div class="btn-group"> </div> </div> <div class="well"> <ul class="nav nav-tabs"> <li class="active"><a href="#home" data-toggle="tab">Edit</a></li> </ul> <div id="myTabContent" class="tab-content"> <div class="tab-pane active in" id="home"> <form id="tab"> <label>Service Id</label> <input type="text" id="service_id" value="<?php echo $r["service_id"];?>" readonly> <label>Service Code</label> <label class="required" id="service_code_required"></label> <input type="text" id="service_code" value="<?php echo $r["service_code"];?>" > <label>Hotel Name</label> <label class="required" id="hotel_name1_required"></label> <input type="text" id="hotel_name1" value="<?php echo $r["hotel_name1"];?>" > <label>Address</label> <label class="required" id="address1_required"></label> <input type="text" id="address1" value="<?php echo $r["address1"];?>" > <label>City Code</label> <label class="required" id="CityCode_required"></label> <input type="text" id="CityCode" value="<?php echo $r["CityCode"];?>" > <label>City Code Topax</label> <label class="required" id="CityCodeTopax_required"></label> <input type="text" id="CityCodeTopax" value="<?php echo $r["CityCodeTopax"];?>" > <label>City Name</label> <label class="required" id="CityName_required"></label> <input type="text" id="CityName" value="<?php echo $r["CityName"];?>" > <label>Postal</label> <label class="required" id="postal_required"></label> <input type="text" id="postal" value="<?php echo $r["postal"];?>" > <label>Country Code</label> <label class="required" id="CountryCode_required"></label> <input type="text" id="CountryCode" value="<?php echo $r["CountryCode"];?>" > <label>Country Name</label> <label class="required" id="CountryName_required"></label> <select name="CountryName" id="CountryName"> <?php select_country_levelpriv($_COOKIE["id_user"],$r["CountryName"]);?> </select> <label>Hotel Full Description</label> <label class="required" id="hotel_full_desc_required"></label> <input type="text" id="hotel_full_desc" value="<?php echo $r["hotel_full_desc"];?>" > <label>Hotel Room Description</label> <label class="required" id="hotel_room_desc_required"></label> <input type="text" id="hotel_room_desc" value="<?php echo $r["hotel_room_desc"];?>" > <label>Hotel Map Description</label> <label class="required" id="hotel_map_desc_required"></label> <input type="text" id="hotel_map_desc" value="<?php echo $r["hotel_map_desc"];?>" > <label>Thumbnail Picture</label> <img src="<?php $r["thumbnail_picture"];?>"></img> <input type="file" id="thumbnail_picture"> <label>Hotel Picture</label> <img src="<?php $r["hotel_hotel_picture"];?>"></img> <input type="file" id="hotel_hotel_picture"> <label>Hotel Main Picture</label> <img src="<?php $r["hotel_main_picture"];?>"></img> <input type="file" id="hotel_main_picture"> <label>Hotel Lobby Picture</label> <img src="<?php $r["hotel_lobby_picture"];?>"></img> <input type="file" id="hotel_lobby_picture"> <label>Hotel Building Picture</label> <img src="<?php $r["hotel_building_picture"];?>"></img> <input type="file" id="hotel_building_picture"> <label>Hotel Meet Picture</label> <img src="<?php $r["hotel_meet_picture"];?>"></img> <input type="file" id="hotel_meet_picture"> <label>Hotel Pool Picture</label> <img src="<?php $r["hotel_pool_picture"];?>"></img> <input type="file" id="hotel_pool_picture"> <label>Hotel Room Picture</label> <img src="<?php $r["hotel_room_picture"];?>"></img> <input type="file" id="hotel_room_picture"> <label>Hotel Rating</label> <select name="tbhotel_rating" id="tbhotel_rating"> <?php select_hotel_rating($r["tbhotel_rating"],"");?> </select> <label>Hotel Category</label> <select name="tbhotel_category" id="tbhotel_category"> <?php select_hotel_category($r["tbhotel_category"],"");?> </select> <label>MapLatitude</label> <input type="text" id="MapLatitude" value="<?php echo $r["MapLatitude"];?>" > <label>MapLongitude</label> <input type="text" id="MapLongitude" value="<?php echo $r["MapLongitude"];?>" > <label>Hotel Email</label> <input type="text" id="hotel_email" value="<?php echo $r["hotel_email"];?>" > <table width="100%"> <label>Facilities & Services : <input type="checkbox" id="checkAll">Check All</label> <?php $sql=search_facilities(); $query=mysql_query($sql); $count=0; while($rx=mysql_fetch_array($query)){ $sql_sel="select `$rx[COLUMN_NAME]` from hotels where service_id='".$r["service_id"]."' "; $query_sel=mysql_query($sql_sel); $r_sel=mysql_fetch_array($query_sel);?> <?php if($count%3==0){?> <tr > <?php }?> <td> <input type="checkbox" id="<?php echo "check[".$count++."]";?>" <?php if($r_sel[$rx["COLUMN_NAME"]]==1){ echo "checked";}?>><?php echo $rx["COLUMN_NAME"];?> </td> <?php if($count%3==0){?> </tr> <?php }?> <?php } ?> </table> <input type="hidden" id="count" value="<?php echo $count;?>"> <BR> <a href="#mySave" data-toggle="modal" class="btn btn-primary" id="submit"><i class="icon-save"></i> Save</a> <a href="#mySave" data-toggle="modal" class="btn btn-primary" id="submit_con"><i class="icon-save"></i> Save & Continue Edit</a> <a href="#mySave" data-toggle="modal" class="btn btn-primary" id="con"><i class="icon-save"></i> Not Save & Continue Search</a> </form> </div> </div> </div> <form id='saveMenu' method='POST' action='hotel_config.php' > <input type='hidden' id='service_id' name="service_id" value='<?php echo $_REQUEST["service_id"];?>'> <input type='hidden' id='hotel_name1' name="hotel_name1" value='<?php echo $_REQUEST["hotel_name1"];?>'> <input type='hidden' id='service_code' name="service_code" value='<?php echo $_REQUEST["service_code"];?>'> <input type='hidden' id='CityCodeTopax' name="CityCodeTopax" value='<?php echo $_REQUEST["CityCodeTopax"];?>'> <input type='hidden' id='CountryName' name="CountryName" value='<?php echo $_REQUEST["CountryName"];?>'> </form> <?php include("footer.php");?>
$("#submit").click(function(){ service_code=$("#service_code").val(); hotel_name1=$("#hotel_name1").val(); address1=$("#address1").val(); CityCode=$("#CityCode").val(); CityCodeTopax=$("#CityCodeTopax").val(); CityName=$("#CityName").val(); postal=$("#postal").val(); CountryCode=$("#CountryCode").val(); hotel_full_desc=$("#hotel_full_desc").val(); hotel_room_desc=$("#hotel_room_desc").val(); hotel_map_desc=$("#hotel_map_desc").val(); count=$("#hotel_map_desc").val(); if(service_code==""){ check_service_code=0; $("#service_code_required").html('<span>* This is a required field<span>'); }else{ check_service_code=1; $("#service_code_required").html('<span><span>'); } if(hotel_name1==""){ check_hotel_name1=0; $("#hotel_name1_required").html('<span>* This is a required field<span>'); }else{ check_hotel_name1=1; $("#hotel_name1_required").html('<span><span>'); } if(address1==""){ check_address1=0; $("#address1_required").html('<span>* This is a required field<span>'); }else{ check_address1=1; $("#address1_required").html('<span><span>'); } if(CityCode==""){ check_CityCode=0; $("#CityCode_required").html('<span>* This is a required field<span>'); }else{ check_CityCode=1; $("#CityCode_required").html('<span><span>'); } if(CityCodeTopax==""){ check_CityCodeTopax=0; $("#CityCodeTopax_required").html('<span>* This is a required field<span>'); }else{ check_CityCodeTopax=1; $("#CityCodeTopax_required").html('<span><span>'); } if(CityName==""){ check_CityName=0; $("#CityName_required").html('<span>* This is a required field<span>'); }else{ check_CityName=1; $("#CityName_required").html('<span><span>'); } if(postal==""){ check_postal=0; $("#postal_required").html('<span>* This is a required field<span>'); }else{ check_postal=1; $("#postal_required").html('<span><span>'); } if(CountryCode==""){ check_CountryCode=0; $("#CountryCode_required").html('<span>* This is a required field<span>'); }else{ check_CountryCode=1; $("#CountryCode_required").html('<span><span>'); } if(hotel_full_desc==""){ check_hotel_full_desc=0; $("#hotel_full_desc_required").html('<span>* This is a required field<span>'); }else{ check_hotel_full_desc=1; $("#hotel_full_desc_required").html('<span><span>'); } if(hotel_room_desc==""){ check_hotel_room_desc=0; $("#hotel_room_desc_required").html('<span>* This is a required field<span>'); }else{ check_hotel_room_desc=1; $("#hotel_room_desc_required").html('<span><span>'); } if(hotel_map_desc==""){ check_hotel_map_desc=0; $("#hotel_map_desc_required").html('<span>* This is a required field<span>'); }else{ check_hotel_map_desc=1; $("#hotel_map_desc_required").html('<span><span>'); } if(check_service_code==1 && check_hotel_name1==1 && check_address1==1 && check_CityCode==1 && check_CityCodeTopax==1 && check_CityName==1 && check_postal==1 && check_CountryCode==1 && check_hotel_full_desc==1 && check_hotel_room_desc==1 && check_hotel_map_desc==1 ){ form = $("#tab").serialize(); alert(form); if(confirm("Confirm to update xml")){ $.ajax({ type: "POST", url: "do_query_hotel.php", data: form, success: function(data){ alert(data); if($.trim(response)=='success'){ alert("Update Xml already."); $("#saveMenu").submit(); }else{ alert("Cann't update Xml!"); $("#saveMenu").submit(); } } }); } } });
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง