echo Save_and_Quit; ?> " name="save_group"><i class="icon-ok-sign"></i> <?php echo Save_and_Quit; ?> </button> <a class="danger btn btn-default" href="?app=contact&view=group" title="<?php echo Cancel; ?> "><i class="icon-remove-sign"></i> <?php echo Cancel; ?> </a> </div> <?php printAlert(); ?> </div> </div> <div class="panel box"> <header> <h5>Umum</h5> </header> <div> <table> <tr> <td class="row-title"><span title="<?php echo Group_Name; ?> "><?php
print '</div>'; if (!empty($_GET['StartDate']) and !empty($_GET['EndDate'])) { $d1 = DateTime::createFromFormat('m/d/Y', $_GET['StartDate']); $d2 = DateTime::createFromFormat('m/d/Y', $_GET['EndDate']); if (!$d1 || !$d2) { printAlert("danger", "Not Valid Date!", ""); exit; } if (strtotime($_GET['StartDate']) > strtotime($_GET['EndDate'])) { printAlert("danger", "Check In Date shouldn't be more than Check Out Date", ""); exit; } $today = date("m/d/Y"); $limit = date("m/d/Y", strtotime("+30 day", strtotime($today))); if (strtotime($_GET['EndDate']) > strtotime($limit)) { printAlert("danger", "Not Ready to be Booked!", ""); exit; } } $Hsql = ""; $Tsql = ""; $startDate = ""; $endDate = ""; $startDate = $_GET['StartDate']; $endDate = $_GET['EndDate']; if (!empty($_POST['StartDate'])) { $startDate = $_POST['StartDate']; $endDate = $_POST['EndDate']; } $hotelArray = array(); if (!empty($_POST['Query'])) {
$oldRoomType = $_POST['oldRoomType']; $oldRoomQuant = $_POST['oldRoomQuant']; $oldStartDate = $_POST['oldStartDate']; $oldEndDate = $_POST['oldEndDate']; $oldDays = abs(strtotime($oldStartDate) - strtotime($oldEndDate)) / (60 * 60 * 24) + 1; $days = abs(strtotime($startDate) - strtotime($endDate)) / (60 * 60 * 24) + 1; $bookingID = sha1($startDate . $endDate); $quantity = $_POST['RoomQuant']; $total = (int) $roomPrice * (int) $quantity * (int) $days; $oldTotal = (int) $roomPrice * (int) $oldRoomQuant * (int) $oldDays; $conn = fakeDeleteBooking($userEmail, $hotelName, $hotelAddr, $oldRoomType, $oldRoomQuant, $oldStartDate, $oldEndDate); $result = fakeInsertBooking($userEmail, $hotelName, $hotelAddr, $roomType, $startDate, $endDate, $quantity, $total, $conn); if ($result) { printAlert("success", "Booking Confirmed!!!", "../user_profile/index.php"); } else { printAlert("danger", "Booking Failed!!!", "../../../index.php"); } ?> <div class="container"> <table class='table'> <tr> <td>hotel name</td> <td><?php echo $hotelName; ?> </td> </tr> <tr> <td>room type</td> <td><?php
<!-- date picker --> <link href="../../public/css/bootstrap-datetimepicker.min.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <!-- Main jumbotron for a primary marketing message or call to action --> <?php include "../common/process_DB.php"; if (!isset($_SESSION["email"]) or $_SESSION["email"] !== 'admin@hotelbooking') { printAlert("danger", "Permission Denied!!!", "../../index.php"); exit; } $admin = $_SESSION['email']; // print ' <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="index.php">Hotel Booking Admin</a>
include "process_DB.php"; if (!empty($_POST['SignInEmail']) || isset($_SESSION["User"])) { if (!isset($_SESSION["User"])) { $result = selectCustomer(); } else { $result = $_SESSION["User"]; } if ($result) { if (!isset($_SESSION["User"])) { $_SESSION["User"] = $result; } printNavbar($result); printAlert("success", "Sign In Successfully!", "index.php"); } else { printNavBar(false); printAlert("danger", "Invalid email or password!", "index.php"); } } else { printNavbar(false); } print '</div>'; ?> <div class="container theme-showcase" role="main"> <div class="jumbotron"> <hr> <div class="container"> <form action="index.php" class="form-signin" role="form" method="post">
$("#pesan_repassword").html("<span class='form_ok'>Passed</span>"); } else { $("#pesan_repassword").html("<span class='form_error'>Re-password not valid</span>"); } setTimeout(function(){ $(".form_ok").fadeOut(1000, function() { }); }, 3000); }); }); </script> <?php echo printAlert(); ?> <form method="post" action=""> <div class="panel box"> <header> <h5> <a><span>1</span> Database</a> <a class='active'><span>2</span> Administration</a> <a><span>3</span> Finihsing</a> </h5> </header> <div> <table class="data2"> <tr> <td class="row-title">Website Title</td> <td>
echo Add_new_module; ?> </a> <button type="submit" class="delete btn btn-danger btn-sm btn-grad" title="<?php echo Delete; ?> " value="<?php echo Delete; ?> " name="delete"><i class="icon-trash"></i> <?php echo Delete; ?> </button> <input type="hidden" value="true" name="delete_confirm" style="display:none" /> <?php printAlert('NOTICE_REF'); ?> </div--> </div> </div> <table class="data"> <thead> <tr> <th style="width:50% !important;"><?php echo Plugin_Name; ?> </th> <th style="width:20% !important;" class="no" align="center">Status</th> <th style="width:25% !important;"><?php echo AddOns_Author; ?>
******************************* PLAYER ******************************* --> <?php if (isset($_SESSION[PLAY])) { $play = $_SESSION[PLAY]; if (is_file($play)) { $songs = array(new Song($play)); } else { if (is_dir($play)) { $dir = new SongDir($play); $songs = $dir->getAllSongs(); } else { if (!file_exists($play)) { printAlert("Impossible de trouver " . $play); $songs = array(); } else { throw new Exception("Impossible de lire {$play}"); } } } if (empty($songs)) { // no songs to play } else { //sort($songs); $song = $songs[0]; //reset($songs); ?> <audio controls id="player" autoplay> <source src="<?php
<!-- Main jumbotron for a primary marketing message or call to action --> <?php include "../common/process_DB.php"; if (!isset($_SESSION["User"])) { printAlert("danger", "You haven't sign in yet!", "index.php"); exit; } $result = $_SESSION["User"]; printNavbar($result); print '</div>'; if (isset($_POST['Delete'])) { $suc = deleteBooking($_SESSION["Email"], $_POST['HotelName'], $_POST['HotelAddr'], $_POST['RoomType'], $_POST['RoomQuant'], $_POST['StartDate'], $_POST['EndDate']); if ($suc) { printAlert("success", "Deleted", "index.php"); } else { printAlert("failure", "Failed", "index.php"); } } $userEmail = $_SESSION["Email"]; $userName = $_SESSION["User"]; ?> <div class="container theme-showcase" role="main"> <div class="jumbotron"> <div class="container"><div class="panel-group" role="tablist"> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="collapseListGroupHeading1"> <label> <a class="collapsed" data-toggle="collapse" href="#collapseListGroup1" aria-expanded="false" aria-controls="collapseListGroup1"> Booking History >> </a> </label>
$result = $_SESSION["User"]; } if ($result) { if (!isset($_SESSION["User"])) { $_SESSION["User"] = $result; $_SESSION["Email"] = $_POST['SignInEmail']; } printNavbar($result); printAlert("success", "Sign In Successfully!", "index.php"); } else { printNavBar($result); printAlert("danger", "Invalid email or password!"); } } else { printNavbar($result); printAlert("danger", "You haven't sign in yet!", ""); exit; } print '</div>'; //if(isset($_SESSION["Email"])){ $userEmail = $_SESSION["Email"]; $hotelName = $_GET['HotelName']; $hotelAddr = $_GET['HotelAddr']; //can be change, before confirmation $roomType = $_GET['RoomType']; $roomQuant = $_GET['RoomQuant']; $roomPrice = getPrice($hotelName, $hotelAddr, $roomType); $startDate = $_GET['StartDate']; $endDate = $_GET['EndDate']; //left is room quantity //}
<button type="submit" class="delete btn btn-metis-2 " title="<?php echo Save_and_Quit; ?> " name="add_category"><i class="icon-ok-sign"></i> <?php echo Save_and_Quit; ?> </button> <a class="danger btn btn-default" href="?app=article&view=category" title="<?php echo Cancel; ?> "><i class="icon-remove-sign"></i> <?php echo Cancel; ?> </a> <?php printAlert('NOTICE_ERROR'); ?> </div> </div> </div> <div class="panel box"> <header> <h5><?php echo Article_category; ?> </h5> </header> <div> <table> <tr> <td class="row-title"><span class="tips" title="<?php
function editBooking($userEmail, $hotelName, $hotelAddr, $roomType, $startDate, $endDate, $quantity, $total) { $bookingID = sha1($startDate . $endDate); putenv('ORACLE_HOME=/oraclient'); // connect $conn = oci_connect('a0091794', 'crse1410', 'sid3'); $date = $startDate; $sth = oci_parse($conn, "alter session set NLS_DATE_FORMAT='MM/DD/YYYY'"); $suc = oci_execute($sth, OCI_DEFAULT); while (strtotime($date) <= strtotime($endDate)) { //echo $date; $insert_str = "insert into Booking values ('{$userEmail}', '{$bookingID}','{$hotelName}', '{$hotelAddr}','{$roomType}','{$date}', {$quantity},{$total})"; // insert $select_ry = "select quantity from roomtype where hotel_name='{$hotelName}' and hotel_address='{$hotelAddr}' and room_type='{$roomType}' and room_date=to_date('{$date}','MM/DD/YYYY')"; $sth2 = oci_parse($conn, $select_ry); $suc2 = oci_execute($sth2, OCI_DEFAULT); if ($row = oci_fetch_array($sth2)) { $q = $row[QUANTITY]; if ((int) $q < (int) $quantity) { printAlert("danger", "Room Not Enough!", ""); oci_close($conn); return false; } $update_ry = "update roomtype set quantity={$q}-{$quantity} where hotel_name='{$hotelName}' and hotel_address='{$hotelAddr}' and room_type='{$roomType}' and room_date=to_date('{$date}','MM/DD/YYYY')"; $sth3 = oci_parse($conn, $update_ry); $suc3 = oci_execute($sth3, OCI_DEFAULT); if (!$suc3) { printAlert("danger", "Room Type Update Error", ""); oci_close($conn); return $suc3; } } $sth = oci_parse($conn, $insert_str); $suc = oci_execute($sth, OCI_DEFAULT); if (!$suc) { printAlert("warning", "Booking already exits!Go to Modify!", "../user_profile/index.php"); oci_close($conn); return $suc; } $date = date("m/d/Y", strtotime("+1 day", strtotime($date))); } // commit oci_commit($conn); // disconnect oci_close($conn); return true; }
echo New_Category; ?> </a> <button type="submit" class="delete btn btn-danger btn-sm btn-grad" title="<?php echo Delete; ?> " value="<?php echo Delete; ?> " name="delete_category"><i class="icon-trash"></i> <?php echo Delete; ?> </button> </div> <?php printAlert('NOTICE'); ?> </div> </div> <table class="data"> <thead> <tr> <th style="width:1% !important;" class="no" colspan="0" id="ck"> <input type="checkbox" id="checkall" target='check_category[]'></th> <th style="width:70% !important;"><?php echo Category_Name; ?> </th> <th style="width:15% !important;text-align:center" class='hidden-xs'><?php echo Access_Level; ?>
function addModuleStep2() { ?> <form method="post"> <div id="app_header"> <div class="warp_app_header"> <div class="app_title"><?php echo New_Module; ?> </div> <div class="app_link"> <a class="btn btn-default" href="?app=module&act=add" title="<?php echo Back; ?> "><i class="icon-arrow-left"></i> <?php echo Prev; ?> </a> <button type="submit" class="btn btn-success" title="<?php echo Delete; ?> " value="Next" name="apply_add"><i class="icon-ok"></i> <?php echo Save; ?> </button> <button type="submit" class="btn btn-metis-2" title="<?php echo Delete; ?> " value="Next" name="save_add"><i class="icon-ok-sign"></i> <?php echo Save_and_Quit; ?> </button> </button> <a class="danger btn btn-default" href="?app=module" title="<?php echo Cancel; ?> "><i class="icon-remove-sign"></i> <?php echo Cancel; ?> </a> </div> <?php printAlert(); ?> </div> </div> <?php require 'field_module.php'; ?> </form> <?php }