Monday, January 13, 2014

PHP code To make Gallery

<?php
# SETTINGS
$max_width = 100;
$max_height = 100;

function getPictureType($ext) {
if ( preg_match('/jpg|jpeg/i', $ext) ) {
return 'jpg';
} else if ( preg_match('/png/i', $ext) ) {
return 'png';
} else if ( preg_match('/gif/i', $ext) ) {
return 'gif';
} else {
return '';
}
}

function getPictures() {
global $max_width, $max_height;
if ( $handle = opendir(".") ) {
$lightbox = rand();
echo '<ul id="pictures">';
while ( ($file = readdir($handle)) !== false ) {
if ( !is_dir($file) ) {
$split = explode('.', $file);
$ext = $split[count($split) - 1];
if ( ($type = getPictureType($ext)) == '' ) {
continue;
}
if ( ! is_dir('thumbs') ) {
mkdir('thumbs');
}
if ( ! file_exists('thumbs/'.$file) ) {
if ( $type == 'jpg' ) {
$src = imagecreatefromjpeg($file);
} else if ( $type == 'png' ) {
$src = imagecreatefrompng($file);
} else if ( $type == 'gif' ) {
$src = imagecreatefromgif($file);
}
if ( ($oldW = imagesx($src)) < ($oldH = imagesy($src)) ) {
$newW = $oldW * ($max_width / $oldH);
$newH = $max_height;
} else {
$newW = $max_width;
$newH = $oldH * ($max_height / $oldW);
}
$new = imagecreatetruecolor($newW, $newH);
imagecopyresampled($new, $src, 0, 0, 0, 0, $newW, $newH, $oldW, $oldH);
if ( $type == 'jpg' ) {
imagejpeg($new, 'thumbs/'.$file);
} else if ( $type == 'png' ) {
imagepng($new, 'thumbs/'.$file);
} else if ( $type == 'gif' ) {
imagegif($new, 'thumbs/'.$file);
}
imagedestroy($new);
imagedestroy($src);
}
echo '<li><a href="'.$file.'" rel="lightbox['.$lightbox.']">';
echo '<img src="thumbs/'.$file.'" alt="" />';
echo '</a></li>';
}
}
echo '</ul>';
}
}
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UFT-8" />
<title>Pictures</title>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<style type="text/css">
#pictures li {
float:left;
height:<?php echo ($max_height + 10); ?>px;
list-style:none outside;
width:<?php echo ($max_width + 10); ?>px;
text-align:center;
}
img {
border:0;
outline:none;
}
</style>
</head>
<body>

<?php getPictures(); ?>


<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
</body>
</html>

Php Code For Payment Process

<?php session_start() ?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>tameraplazainn</title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<?php
$errmsg_arr = array();

$errflag = false;
if(empty($_SESSION['6_letters_code'] ) ||
 strcmp($_SESSION['6_letters_code'], $_POST['6_letters_code']) != 0)
{
//Note: the captcha code is compared case insensitively.
//if you want case sensitive match, update the check above to
// strcmp()
$errmsg_arr[] = 'invalid code';
$errflag = true;
}
if($errflag) {
$_SESSION['ERRMSG_ARR'] = $errmsg_arr;

session_write_close();
header("location: personnalinfo.php");
exit();
}
?>
<?php
if (!isset($_POST['submit'])) {




$errmsg_arr = array();

$errflag = false;

$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("argie_tamera", $con);

function createRandomPassword() {



    $chars = "abcdefghijkmnopqrstuvwxyz023456789";

    srand((double)microtime()*1000000);

    $i = 0;

    $pass = '' ;



    while ($i <= 7) {

        $num = rand() % 33;

        $tmp = substr($chars, $num, 1);

        $pass = $pass . $tmp;

        $i++;

    }



    return $pass;



}
$confirmation = createRandomPassword();
$arival = $_POST['start'];
$departure = $_POST['end'];
$adults = $_POST['adult'];
$child = $_POST['child'];
$nroom = $_POST['n_room'];
$roomid = $_POST['rm_id'];
$result = $_POST['result'];
$name = $_POST['name'];
$last = $_POST['last'];
$address = $_POST['address'];
$city = $_POST['city'];
$zip = $_POST['zip'];
$country = $_POST['country'];
$password = $_POST['password'];
$email = $_POST['email'];
$cnumber = $_POST['cnumber'];
$stat= 'Active';
$result1 = mysql_query("SELECT * FROM room where room_id='$roomid'");
while($row = mysql_fetch_array($result1))
  {
  $rate=$row['rate'];
  $type=$row['type'];
 
  }
  $payable= $rate*$result*$nroom;



//send the email
$to = $email;
$subject="Reservation notification From Tamera Plaza Inn";
$from = 'tameraplazainn@gmail.com';
$body = "First Name: $name\n".
"Last Name: $last\n".
"Email: $email \n".
"City: $city \n".
"Zip Code: $zip \n".
"Country: $country \n".
"Contact Number: $cnumber \n".
"Password: $password \n".
"Check In: $arival\n ".
"Check Out: $departure\n ".
"Number of Adults: $adults\n ".
"Number of child: $child\n ".
"Total nights of stay: $result\n ".
"Room Type: $type\n ".
"Number of rooms: $nroom\n ".
"Payable amount: $payable\n ".
"Confirmation Number: $confirmation\n ";

$headers = "From: $from \r\n";
$headers .= "Reply-To: $$from \r\n";

mail($to, $subject, $body,$headers);

$sql="INSERT INTO reservation (arrival, departure, adults, child, result, room_id, no_room, firstname, lastname, city, zip, province, country, email, contact, password, payable, confirmation)
VALUES
('$arival','$departure','$adults','$child','$result','$roomid','$nroom','$name','$last','$city','$zip','$address','$country','$email','$cnumber','$password','$payable','$confirmation')";
mysql_query("INSERT INTO roominventory (arrival, departure, qty_reserve, room_id, confirmation, status) VALUES ('$arival','$departure','$nroom','$roomid','$confirmation','$stat')");
if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }

}
mysql_close($con)



?>
</head>

<body>
<div class="mainwrapper">
  <div class="leftother">
    <div class="l"></div>
<div class="r">




<div class="right3">
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr"  method="post">
        <!-- the cmd parameter is set to _xclick for a Buy Now button -->
       
<div class="reservation" style="margin-left: 176px; width: 400px;">
 <div align="center" style="padding-top: 7px; font-size:24px;"><strong>RESERVATION  DETAILS</strong></div>
<div style="margin-top: 14px;">
<label style="margin-left: 73px;">Check In Date : <?php echo $arival; ?></label><br />
<label style="margin-left: 58px;">Check Out Date : <?php echo $departure; ?></label><br />
<label style="margin-left: 130px;">Adults : <?php echo $adults; ?></label><br />
<label style="margin-left: 137px;">Child : <?php echo $child; ?></label><br />
<label style="margin-left: 42px;">Number of Rooms : <?php echo $nroom; ?></label><br />
<label style="margin-left: 110px;">Room ID : <?php echo $roomid; ?></label><br />
<label style="margin-left: 52px;">Number of nights : <?php echo $result; ?></label><br />
<label style="margin-left: 101px;">Firstname : <?php echo $name; ?></label><br />
<label style="margin-left: 102px;">Lastname : <?php echo $last; ?></label><br />
<label style="margin-left: 114px;">Address : <?php echo $address; ?></label><br />
<label style="margin-left: 146px;">City : <?php echo $city; ?></label><br />
<label style="margin-left: 108px;">ZIP Code : <?php echo $zip; ?></label><br />
<label style="margin-left: 117px;">Country : <?php echo $country; ?></label><br />
<label style="margin-left: 133px;">Email : <?php echo $email; ?></label><br />
<label style="margin-left: 56px;">Contact Number : <?php echo $cnumber; ?></label><br />      <BR />
  </div>

<input type="hidden" name="cmd" value="_xclick" />
        <input type="hidden" name="business" value="jpabs78@gmail.com" />
        <input type="hidden" name="item_name" value="<?php echo $type; ?>" />
        <input type="hidden" name="item_number" value="<?php echo $nroom; ?>" />
        <input type="hidden" name="amount" value="<?php echo $payable; ?>" />
        <input type="hidden" name="no_shipping" value="1" />
        <input type="hidden" name="no_note" value="1" />
        <input type="hidden" name="currency_code" value="PHP" />
        <input type="hidden" name="lc" value="GB" />
        <input type="hidden" name="bn" value="PP-BuyNowBF" />
        <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="margin-left: 157px;" />
        <img alt="fdff" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
        <!-- Payment confirmed -->
        <input type="hidden" name="return" value="https://www.chmscians.com/paypal/showconfirm.php" />
        <!-- Payment cancelled -->
        <input type="hidden" name="cancel_return" value="http://www.chmscians.com/paypal/cancel.php" />
        <input type="hidden" name="rm" value="2" />
        <input type="hidden" name="notify_url" value="http://www.chmscians.com/paypal/ipn.php" />
        <input type="hidden" name="custom" value="any other custom field you want to pass" />
      </form>
</div>
</div>









</div>
  </div>
 
 
 
 
 
 
  <div class="rightother">
 
 
 
 
  </div>
 
 
 
 
 
 
</div>




</body>
</html>

Php And Html Code For Admin Home Page

<?php
require_once('auth.php');
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script src="js/jquery-1.2.1.pack.js" type="text/javascript"></script>
<script src="js/jquery-easing.1.2.pack.js" type="text/javascript"></script>
<script src="js/jquery-easing-compatibility.1.2.pack.js" type="text/javascript"></script>
<script src="js/coda-slider.1.1.1.pack.js" type="text/javascript"></script>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
jQuery(window).bind("load", function() {
jQuery("div#slider1").codaSlider()
// jQuery("div#slider2").codaSlider()
// etc, etc. Beware of cross-linking difficulties if using multiple sliders on one page.
});
</script>

<style type="text/css">
<!--
a img {border: none; }
-->
</style>
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
  <script src="src/facebox.js" type="text/javascript"></script>
  <script type="text/javascript">
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loadingImage : 'src/loading.gif',
        closeImage   : 'src/closelabel.png'
      })
    })
  </script>
<style type="text/css">
<!--
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #006600;
}
a:active {
text-decoration: none;
color: #006600;
}
-->
</style>


</head>

<body>
<div class="mainwrapper">
  <div class="leftother">
    <div class="l">
<div style="margin-top: 225px; margin-right: 10px;">
<?php
if ($_SESSION['SESS_FIRST_NAME']=="admin"){

  echo '<a href="#2" class="cross-link">View Booker Comments</a><br />';
  echo '<a href="#1" class="cross-link">Monitor Reservation</a><br />';
  echo '<a href="#3" class="cross-link">Generate Reports</a><br />';
  echo '<a href="#5" class="cross-link">Room Inventory</a><br />';
  echo '<a href="#4" class="cross-link">Rooms</a><br />';
  echo '<a href="admin_index.php">logout</a><br />';

 }
 ?>
 <?php
if ($_SESSION['SESS_FIRST_NAME']=="frontdesk"){

  echo '<a href="#2" class="cross-link">View Booker Comments</a><br />';
  echo '<a href="#1" class="cross-link">Monitor Reservation</a><br />';
  echo '<a href="#3" class="cross-link">Generate Reports</a><br />';
  echo '<a href="admin_index.php">logout</a><br />';
 }
 ?>
</div>


</div>
<div class="r">




<div class="right3">
 
    <div class="slider-wrap">
      <div id="slider1" class="csw">
        <div class="panelContainer">
          <div class="panel" title="Panel 1">
            <div class="wrapper">
 <div class="view">
 <table id="mytable" cellspacing="0">
  <tr>
    <td width="191" id="label">Name</td>
    <td width="73" id="label">Arrival</td>
    <td width="85" id="label">Departure</td>
    <td width="96" id="label">Room Type </td>
    <td width="105" id="label">No. of Nights</td>
    <td width="90" id="label">Action</td>
  </tr>
              <?php
  $con = mysql_connect("localhost", "root", "");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

mysql_select_db("argie_tamera", $con);

$result2 = mysql_query("SELECT * FROM reservation where status != 'out'");


while($row = mysql_fetch_array($result2))
 {
echo '<tr>';
    echo '<td class="contacts">'.$row['firstname'].' ' .$row['lastname'].'</td>';
    echo '<td class="contacts">'.$row['arrival'].'</td>';
echo '<td class="contacts">'.$row['departure'].'</td>';
echo '<td class="contacts">';
$r=$row['room_id'];
$result1 = mysql_query("SELECT * FROM room WHERE room_id = '$r'");
while($row1 = mysql_fetch_array($result1))
{
echo $row1['type'];
}
echo '</td>';
echo '<td class="contacts">'.$row['result'].'</td>';
echo '<td class="contacts">'.'<a href=out.php?id=' . $row["reservation_id"] . '>' . 'Check Out' . '</a>'.'</td>';
  echo '</tr>';

 }

 ?>
 </table>
 </div>
            </div>
          </div>








          <div class="panel" title="Panel 2">
            <div class="wrapper">
<table id="mytable" cellspacing="0">
  <tr>
    <td width="207" id="label">Name</td>
    <td width="322" id="label">Email Address</td>
    <td width="126" id="label">Action</td>
  </tr>
              <?php
  $con = mysql_connect("localhost", "root", "");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

mysql_select_db("argie_tamera", $con);

$result3 = mysql_query("SELECT * FROM comment");


while($row3 = mysql_fetch_array($result3))
 {
echo '<tr>';
    echo '<td class="contacts">'.$row3['name'].'</td>';
    echo '<td class="contacts">'.$row3['email'].'</td>';
echo '<td class="contacts">'.'<a rel="facebox" href=viewcomment.php?id=' . $row3["comment_id"] . '>' . 'Read Message' . '</a>'.'</td>';
  echo '</tr>';

 }

 ?>
 </table>
            </div>
          </div>




















          <div class="panel" title="Panel 3">
            <div class="wrapper">
              <div class="view">
 <table id="mytable" cellspacing="0">
  <tr>
    <td width="191" id="label">Name</td>
    <td width="73" id="label">Arrival</td>
    <td width="85" id="label">Departure</td>
    <td width="96" id="label">Room Type </td>
    <td width="105" id="label">No. of Nights</td>
    <td width="90" id="label">Action</td>
  </tr>
              <?php
  $con = mysql_connect("localhost", "root", "");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

mysql_select_db("argie_tamera", $con);

$result2 = mysql_query("SELECT * FROM reservation where status != 'out'");


while($row = mysql_fetch_array($result2))
 {
echo '<tr>';
    echo '<td class="contacts">'.$row['firstname'].' ' .$row['lastname'].'</td>';
    echo '<td class="contacts">'.$row['arrival'].'</td>';
echo '<td class="contacts">'.$row['departure'].'</td>';
echo '<td class="contacts">';
$r=$row['room_id'];
$result1 = mysql_query("SELECT * FROM room WHERE room_id = '$r'");
while($row1 = mysql_fetch_array($result1))
{
echo $row1['type'];
}
echo '</td>';
echo '<td class="contacts">'.$row['result'].'</td>';
echo '<td class="contacts">'.'<a href=viewreservation.php?id=' . $row["reservation_id"] . '>' . 'Preview' . '</a>'.'</td>';
  echo '</tr>';

 }

 ?>
 </table>
 </div>
            </div>
          </div>





          <div class="panel" title="Panel 4">
            <div class="wrapper">
              <div class="view">
 <table id="mytable" cellspacing="0">
 <tr>
<td width="93" id="label">Type</td>
<td width="44" id="label">Rate</td>
<td width="298" id="label">Descripton</td>
<td width="72" id="label">Image</td>
<td width="51" id="label">Quantity</td>
<td width="80" id="label">Action</td>
 </tr>
 <?php
  $con = mysql_connect("localhost", "root", "");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

mysql_select_db("argie_tamera", $con);

$result3 = mysql_query("SELECT * FROM room");


while($row3 = mysql_fetch_array($result3))
 {
echo '<tr>';
echo '<td>'.$row3['type'].'</td>';
echo '<td>'.$row3['rate'].'</td>';
echo '<td>'.$row3['description'].'</td>';
echo '<td>';
echo'<a rel="facebox" href=editpic.php?id=' . $row3["room_id"] . '>' . '<img width=72 height=52 alt="Unable to View" src=' . $row3["image"] . '>' . '</a>';

echo '</td>';
echo '<td>'.$row3['qty'].'</td>';
echo '<td>';
echo'<a rel="facebox" href=editroom.php?id=' . $row3["room_id"] . '>' . 'Edit' . '</a>';
echo ' | ';
echo'<a rel="facebox" href=deleteroom.php?id=' . $row3["room_id"] . '>' . 'Delete' . '</a>';
echo '</td>';
echo '</tr>';

 }

 ?>


 </table><br />
 <a rel="facebox" href="addroom.php">Add Room

 </a></div>
            </div>
          </div>





 <div class="panel" title="Panel 5">
            <div class="wrapper">

<div class="view">
 <table id="mytable" cellspacing="0">
 <tr>
<td width="93" id="label">Arrival</td>
<td width="44" id="label">Departure</td>
<td width="100" id="label">Quantity Reserve</td>
<td width="149" id="label">Room Type</td>
<td width="180" id="label">Confirmation Number</td>
                                        <td width="80" id="label">Status</td>
 </tr>
 <?php
  $con = mysql_connect("localhost", "root", "");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

mysql_select_db("argie_tamera", $con);

$result3 = mysql_query("SELECT * FROM roominventory where status != 'out'");


while($row3 = mysql_fetch_array($result3))
 {
echo '<tr>';
echo '<td>'.$row3['arrival'].'</td>';
echo '<td>'.$row3['departure'].'</td>';
echo '<td>'.$row3['qty_reserve'].'</td>';

echo '<td>';
                                                               $ro=$row3['room_id'];
                                                             $result4 = mysql_query("SELECT * FROM room where room_id='$ro'");


while($row4 = mysql_fetch_array($result4))
 {
echo $row4['type'];
                                                                  }


echo '</td>';
                                                                        echo '<td>'.$row3['confirmation'].'</td>';
                                                                        echo '<td>'.$row3['status'].'</td>';
echo '</tr>';





 }




$result5 = mysql_query("SELECT sum(qty_reserve) FROM roominventory where status != 'out' and room_id='6'");
                       while($row5 = mysql_fetch_array($result5))
                          {
echo 'Toal reserve Room of Superior Room: ';
echo $row5['sum(qty_reserve)'];
echo '<br>';
                                                           }
$result6 = mysql_query("SELECT sum(qty_reserve) FROM roominventory where status != 'out' and room_id='7'");
                       while($row6 = mysql_fetch_array($result6))
                          {
echo 'Toal reserve Room of Deluxe Room: ';
echo $row6['sum(qty_reserve)'];
echo '<br>';
                                                           }
$result7 = mysql_query("SELECT sum(qty_reserve) FROM roominventory where status != 'out' and room_id='8'");
                       while($row7 = mysql_fetch_array($result7))
                          {
echo 'Toal reserve Room of Standard Single Room: ';
echo $row7['sum(qty_reserve)'];
echo '<br>';
                                                           }
$result8 = mysql_query("SELECT sum(qty_reserve) FROM roominventory where status != 'out' and room_id='9'");
                       while($row8 = mysql_fetch_array($result8))
                          {
echo 'Toal reserve Room of Standard Single Room: ';
echo $row8['sum(qty_reserve)'];
echo '<br>';
                                                           }



 ?>


 </table><br />


 </div>
            </div>
          </div>


 




        </div>
        <!-- .panelContainer -->
      </div>
      <!-- #slider1 -->
    </div>
  </div>









</div>
  </div>
 
 
 
 
 
 
  <div class="rightother"></div>
 
 
 
 
 
 
</div>

</body>
</html>

PHP code To cancelle any Booking IN Hotel


<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.view{
overflow: auto;
float:right;
width: 680px; height: 390px;
margin:0 auto;
padding: 50px 0px;
}
-->
</style>
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="jquery.js" type="text/javascript"></script>
  <script src="src/facebox.js" type="text/javascript"></script>
  <script type="text/javascript">
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loadingImage : 'src/loading.gif',
        closeImage   : 'src/closelabel.png'
      })
    })
  </script>
</head>

<body>
<div class="view">
<p>Cancellation Terms and Charges
</p>
  <ol>
  <li>CBD Properties (within capital cities)
    <ol>
      <li>For  Customers who cancel up to 14 days prior to day of arrival check-in  time, there will be a $25 fee with any residual balance paid be held as  a credit towards future bookings with Mantra Group. A $25 cancel fee  will be deducted before any monies are held in credit.</li>
      <li>For  Customers who cancel from 14 days to 48 Hours prior to day of arrival  check-in time, there will be a $50 fee with any residual balance paid  be held as a credit towards future bookings with Mantra Group. A $50  cancel fee will be deducted before any monies are held in credit.</li>
      <li>Monies  held in Credit can only be held for a maximum period of twelve months  from the day the booking is cancelled. To redeem moneys held in credit,  customers must call the central reservations on 1800 080 878 prior to  the expiry of the 12 months to rebook another stay. Moneys not redeemed  at the expiry of the 12 months will be forfeited in their entirety to  Mantra Group.</li>
      <li>4. Cancellations within 48 hours of day of arrival check-in time will result in a 100% cancellation fee.</li>
    </ol>
  </li>
  <li>Leisure Properties (outside of Capital Cities)
    <ol>
      <li>For  Customers who cancel up to 14 days prior to day of arrival check-in  time, there will be a $25 fee with any residual balance paid be held as  a credit towards future bookings with Mantra Group. A $25 cancel fee  will be deducted before any monies are held in credit.</li>
      <li>For  Customers who cancel from 14 days to 48 Hours prior to day of arrival  check-in time, there will be a $50 fee with any residual balance paid  be held as a credit towards future bookings with Mantra Group. A $50  cancel fee will be deducted before any monies are held in credit.</li>
      <li>Monies  held in credit can only be held for a maximum period of twelve months  from the day the booking is cancelled. To redeem moneys held in credit,  customers must call the central reservations on 1800 080 878 prior to  the expiry of the 12 months to rebook another stay. Moneys not redeemed  at the expiry of the 12 months will be forfeited in their entirety to  Mantra Group.</li>
      <li>Cancellations within 48 hours of day of arrival check-in time will result in a 100% cancellation fee.</li>
    </ol>
  </li>
  <li>Peppers Retreats
    <ol>
      <li>Cancellations  made up to 14 days prior to arrival will incur a loss of deposit paid  per room or the total booking value if that is less than $200.</li>
      <li>For  Customers who cancel up to 14 days to 8 days prior to day of arrival  check-in time may request that any residual balance paid be held as a  credit towards future bookings with Mantra Group. A 50% cancel fee will  be deducted before any monies are held in credit.</li>
      <li>Monies held  in Credit can only be held for a maximum period of twelve months from  the day the booking is cancelled. To redeem moneys held in credit,  customers must call the central reservations on 1800 080 878 prior to  the expiry of the 12 months to rebook another stay. Moneys not redeemed  at the expiry of the 12 months will be forfeited in their entirety to  Mantra Group.</li>
      <li>Cancellations 7 days or less prior to arrival date, are subject to a 100% cancellation fee on the entire package.</li>
    </ol>
  </li>
  <li>Refund Policy
    <ol>
      <li>No shows and cancellations after check in - will be subject to a 100% cancellation fee.</li>
      <li>If  after arrival clients are dissatisfied with any aspect of their  accommodation &amp; decide to terminate their stay, the amount to be  refunded, if any is at the discretion of the property management.</li>
      <li>For  ALL properties, once full payment has been made, there will be no  refund. Any residual balance paid (after the applicable fees are  deducted) may be held in credit towards future bookings with Mantra  Group. This credit can only be held for a maximum period of twelve  months from the day the booking is cancelled. To redeem moneys held in  credit, customers must call central reservations on 1800080878 prior to  the expiry of the 12 months to rebook another stay. Moneys not redeemed  at the expiry of the 12 months will be forfeited in their entirety to  Mantra Group.</li>
      <li>Bookings held over in Credit will be completely  at the discretion of the property management. Administration fees may  be applied.</li>
    </ol>
  </li>
</ol>
</div>
</body>
</html>

Saturday, January 11, 2014

HTML code to Design front Page of any hotel

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>KHYBERS GUEST House</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="layout.css" rel="stylesheet" type="text/css" />
<script src="maxheight.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/s3Slider.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('#slider').s3Slider({
            timeOut: 3000
        });
    });
</script>

<script language="javascript" type="text/javascript">
function clearText(field)
{
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}
</script>
</head>
<body id="page1" onload="new ElementMaxHeight();">
<div id="main">
  <!-- header -->
  <div id="header">
    <div class="row-1">
      <div class="wrapper">
        <div class="logo">
          <h1><a href="#">KHYBERS GUEST HOUSE</a></h1>
          <em>KGH</em> <strong>True Luxury</strong> </div>
        <div class="phones">+923318983644<br />
          +923555179854 </div>
      </div>
    </div>
    <div class="row-2">
      <div class="indent">
        <!-- header-box begin -->
        <div class="header-box">
          <div class="inner">
            <ul class="nav">
              <li><a href="index.html" class="current">Home page</a></li>
              <li><a href="services.html">Services</a></li>
              <li><a href="gallery.html">Gallery</a></li>
              <li><a href="restaurant.html">Restaurant</a></li>
           
              <li><a href="booking.html">Booking</a></li>
            </ul>
          </div>
        </div>
        <!-- header-box end -->
      </div>
    </div>
  </div>
  <!-- content -->
  <div id="content">
    <div class="wrapper">
      <div class="aside maxheight">
        <!-- box begin -->
        <div class="box maxheight">
          <div class="inner">
            <h3>Reservation:</h3>
            <form action="#" id="reservation-form">
              <fieldset>
              <div class="field">
                <label>Check In:</label>
                <select class="select1">
                  <option>30</option>
                   <option>29</option>
                    <option>28</option>
                     <option>27</option>
                      <option>26</option>
                       <option>25</option>
                        <option>24</option>
                         <option>23</option>
                          <option>22</option>
                           <option>21</option>
                            <option>20</option>
                             <option>19</option>
                              <option>18</option>
                                <option>17</option>
                               <option>16</option>
                                <option>15</option>
                                 <option>14</option>
                                   <option>13</option>
                                    <option>12</option>
                                  <option>11</option>
                                   <option>10</option>
                                    <option>09</option>
                                     <option>08</option>
                                      <option>07</option>
                                       <option>06</option>
                                        <option>05</option>
                                          <option>04</option>
                                         <option>03</option>
                                          <option>02</option>
                                           <option>01</option>

                </select>
                <select class="select2">
                  <option>January 2013</option>
                  <option>feb 2013</option>
                  <option>mar 2013</option>
                  <option>Apr 2013</option>
                  <option>may 2009</option>
                  <option>june 2013</option>
                  <option>july 2013</option>
                  <option>aug 2013</option>
                  <option>sep 2013</option>
                  <option>oct 2013</option>
                  <option>nov 2013</option>
                  <option>Dec 2013</option>



                </select>
              </div>
              <div class="field"></br>
                <label>Check Out:</label>
                <select class="select1"></br>
                  <option>01</option>
                </select>
                <select class="select2"></br>
                  <option>May 2009</option></br>
                </select>
              </div></br></br>
              <div class="field"> Persons:</br>
                <input type="text" value="1"/></br>
               <label>Rooms</label>
                <input type="text" value="1"/>
              </div></br></br>
              <div class="button"><span><span><a href="#">Check Availability</a></span></span></div>
              </fieldset>
            </form>
          </div>
        </div>
        <!-- box end -->
      </div>
      <div class="content">
        <div class="indent">
          <h2>Khybers Guest House welcome you!</h2>
          <img class="img-indent png" alt="" src="images/1page-img1.png" />
          <p class="alt-top">Come alone or bring your family with you, stay here for a night or for weeks, stay here while on business trip or at some kind of conference - either way ourGues house is the best possible variant.</p>
          Feel free to contact us anytime in case you have any questions or concerns.
          <div class="clear"></div>
          <div class="line-hor"></div>
          <div class="wrapper line-ver">
            <div class="col-1">
              <h3>Special Offers</h3>
              <ul>
                <li>FREE wide-screen TV</li>
                <li>50% Discount for Restaraunt service</li>
                <li>30% Discount for 3 days+ orders</li>
                <li>FREE drinks and beverages in rooms</li>
                <li>Exclusive souvenirs</li>
              </ul>
              <div class="button"><span><span><a href="#">Order Now!</a></span></span></div>
            </div>
            <div class="col-2">
              <h3>Location</h3>
              <p>We are located in Jutial Gilgit-Baltistan, Pakistan.</p>
              <dl class="contacts-list">
                <dt>Jutial Gilgit</dt>
                <dd>+923318983644</dd>
                <dd>Email: khybersjan@gmail.com</dd>
              </dl>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- footer -->
  <div id="footer">
    <ul class="nav">
      <li><a href="#">Home</a>|</li>
      <li><a href="#">Services</a>|</li>
      <li><a href="#">Gallery</a>|</li>
      <li><a href="#">Restaurant</a>|</li>
   
      <li><a href="#">Booking</a></li>
    </ul>
    <div class="wrapper">
      <div class="fleft">Copyright &copy; 2013 Inayat Ali jan</a>. All Rights Reserved</div>
      <div class="fright">Designed by Inayat Ali Jan</div>
    </div>
  </div>
</div>
</body>
</html>

PHP Code for Inserting Data

<html>
<head>
<style type="text/css">

    ul {
    list-style: none;
    margin: 0;
    }
    li {
    float: left;
    }
    a {
    background: #404853;
    background: linear-gradient(#687587, #404853);
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: block;
    font-size: 18px;
    font-weight: bold;
    padding: 0 23px;
    line-height: 44px;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    }
   
    a:link {
    text-decoration:none;
    color:#000000;
    }

    a:active {
    text-decoration:none;
    color:#FFF;
    background:21B9FF;
    }

    a:visited {
    text-decoration:none;
    color:#000000;
    }

    a {
    text-decoration:none;
    color:#000000;
    }

    a:hover, a.current {  
    color:#FFF;            
    background-color:#21B9FF;
    }
</style>
</head>

<body bgcolor = "#33CCFF">
<P><center>
    <ul>
    <li><a href = "home.html"> HOME </a></li>
    <li><a class= "current" href = "data.html"> INSERT DATA </a></li>
    <li><a href = "upData.html"> UPGRADE DATA </a></li>
    <li><a href = "previous_comp.php"> LIST OF PREVIOUS COMPANY </a></li>
    <li><a href = "company_end.php"> LIST OF COMPANY END IN 3 MONTHS </a></li>
    </ul>
</center></P>

<br /><br /><br />
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());

$name = $_POST["name"];
$company = $_POST["company"];
$address = $_POST["address"];
$owner = $_POST["owner"];
$pNum = $_POST["pnum"];
$start = $_POST["start"];
$end = $_POST["end"];
$contract = $_POST["contract"];
$rent = $_POST["rent"];
$cat = $_POST["category"];
$status = $_POST["status"];

if($_SERVER['REQUEST_METHOD']=="POST")
{
mysql_query("INSERT INTO detail (premise_name,company_name,address,owner_name,phone_num,date_start,date_end,contract,rent,category,status)
VALUES('$name','$company','$address','$owner','$pNum','$start','$end','$contract','$rent', '$cat','$status')")
or die(mysql_error());

echo '<p><H2>Data has been insert to MySQL</H2> ';
echo '</p>';

echo '<p><H3>THE INFORMATION OF PREMISE</H3></p>';
echo '<br />';

echo '<ul>';
echo '<b>THE PREMISE NAME :  </b>' . $name;
echo '<p>';
echo '<br />';

echo '<b>THE NAME OF COMPANY :  </b>' . $company;
echo '<p>';
echo '<br />';

echo '<b>ADDRESS OF COMPANY :  </b>' . $address;
echo '<p>';
echo '<br />';

echo '<b>OWNER NAME OF COMPANY :  </b>' . $owner;
echo '<p>';
echo '<br />';

echo '<b>CONTACT NUMBER OF COMPANY :  </b>' . $pNum;
echo '<p>';
echo '<br />';

echo '<b>THE DATE START OF CONTRACT :  </b>' . $start;
echo '<p>';
echo '<br />';

echo '<b>THE DATE END OF CONTRACT :  </b>' . $end;
echo '<p>';
echo '<br />';

echo '<b>YEAR OF CONTRACT :  </b>' . $contract;
echo '<p>';
echo '<br />';

echo '<b>RENT PER MONTH : RM</b>' . $rent;
echo '<p>';
echo '<br />';

echo '<b>CATEGORY OF COMPANY :  </b>' . $cat;
echo '<p>';
echo '<br />';

echo '<b>STATUS OF COMPANY :  </b>' . $status;
echo '</ul>';
}
else
echo "PLEASE FULFILL THE FORM";
?>
</body>
</html>

PHP code To upgrade any data with css in it

<?php
$company = $_POST["company"];
if(isset($_POST['submit']))
{
$result = mysql_query("SELECT * FROM detail WHERE company_name=$company");

    while($row = mysql_fetch_array($result))
{
echo $row['premise_name']."<br />";
echo $row['company_name']."<br />";
echo $row['address']."<br />";
echo $row['owner_name']."<br />";
echo $row['phone_num']."<br />";
echo $row['date_start']."<br />";
echo $row['date_end']."<br />";
echo $row['contract']."<br />";
echo $row['rent']."<br />";
echo $row['category']."<br />";
echo $row['status']."<br /.";
} // TODO: better error handling
}
mysql_close();
?>
<html>
<head>
<style type="text/css">

    ul {
    list-style: none;
    margin: 0;
    }
    li {
    float: left;
    }
    a {
    background: #404853;
    background: linear-gradient(#687587, #404853);
    border-left: 1px solid rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: block;
    font-size: 18px;
    font-weight: bold;
    padding: 0 23px;
    line-height: 44px;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    }
   
    a:link {
    text-decoration:none;
    color:#000000;
    }

    a:active {
    text-decoration:none;
    color:#FFF;
    background:21B9FF;
    }

    a:visited {
    text-decoration:none;
    color:#000000;
    }

    a {
    text-decoration:none;
    color:#000000;
    }

    a:hover, a.current {  
    color:#FFF;            
    background-color:#21B9FF;
    }
</style>
</head>

<body bgcolor = "#33CCFF">

<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());

$startNew = $_POST["startNew"];
$endNew = $_POST["endNew"];
$contractNew = $_POST["contractNew"];

if($_SERVER['REQUEST_METHOD']=="POST")
{
if($company
mysql_query("INSERT INTO premis (startNew,endNew,contractNew)
VALUES('$startNew','$endNew','$contractNew')")
or die(mysql_error());

echo '<p><H2>Data has been update to MySQL</H2>';
echo '</p>';

echo '<p><H3>THE INFORMATION OF PREMISE</H3></p>';
echo '<br />';

echo '<ul>';
echo '<b>NEW START DATE OF CONTRACT :  </b>' . $startNew;
echo '<p>';
echo '<br />';

echo '<b>NEW END DATE OF CONTRACT :  </b>' . $endNew;
echo '<p>';
echo '<br />';

echo '<b>RENEWAL OF CONTRACT(YEAR) :  </b>' . $contractNew;
echo '</ul>';
}
else
echo "PLEASE FULFILL THE FORM";
?>
</body>
</html>