G:
/
PleskVhosts
/
seeonsoft.com
/
hp.thefalconunited.com
/
up file
home
<?php session_start(); $empids = $_SESSION['empids']; include('config.php'); $cid = $_POST['cid']; $country = $_POST['country']; $governate = $_POST['governate']; $category = $_POST['category']; $hotels = $_POST['hotels']; $cindate = $_POST['cindate']; $coutdate = $_POST['coutdate']; date_default_timezone_set('Asia/Muscat'); $de = date('Y-m-d H:i:s'); $entry = date('Y-m-d'); $month = date('m'); $year = date('Y'); $result = $js->query('SELECT * FROM `hotelreservations` ORDER BY `id`'); $result->execute(); $cc = $result->rowCount(); if($cc == '0') { $entryid = 'FET|112023|122001'; } else { while($row = $result->fetch(PDO::FETCH_ASSOC)) { $nw = $row['entryid']; $sub = substr($nw,11); $sno = $sub + 1; $entryid = 'FET|'.$month.$year."|".$sno; } } $roomtype = $_POST['roomtype']; $meals = $_POST['meals']; $rooms = $_POST['rooms']; $ebs = $_POST['ebs']; $rrate = $_POST['rrate']; $rebrate = $_POST['rebrate']; $remarks = $_POST['remarks']; $addservices = $_POST['addservices']; $res_status = 'Pending'; $sql = $js->prepare('INSERT INTO `hotelreservations` (`custid`, `entryid`, `country`, `governate`, `category`, `hotel`, `cindate`, `coutdate`, `roomtype`, `meals`, `norooms`, `noebs`, `roomrate`, `ebrate`, `remarks`, `addservices`, `res_status`, `enteredby`, `enteredat` ) VALUES (:cid, :entryid, :country, :governate, :category, :hotels, :cindate, :coutdate, :roomtype, :meals, :rooms, :ebs, :rrate, :rebrate, :remarks, :addservices, :res_status, :empids, :de)'); $statuss = $sql->execute(array(':cid' => $cid, ':entryid' => $entryid, ':country' => $country, ':governate' => $governate, ':category' => $category, ':hotels' => $hotels, ':cindate' => $cindate, ':coutdate' => $coutdate, ':roomtype' => $roomtype, ':meals' => $meals, ':rooms' => $rooms, ':ebs' => $ebs, ':rrate' => $rrate, ':rebrate' => $rebrate, ':remarks' => $remarks, ':addservices' => $addservices, ':res_status' => $res_status, ':empids' => $empids, ':de' => $de)); ?> <script type="text/javascript"> alert("Have Successfully Added the Hotel"); window.location = "add_hotelsforcustomers.php?cid=<?php echo $cid?>"; </script>