You are on page 1of 26

1.

Lampiran
Source Code website
File Form3.php
<?php
include 'connect.php';
$koneksi = new database();
$koneksi->koneksi();

?>
<?php
session_start();
$_SESSION['id_plan']='2';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Pulau Macan</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- CSS
================================================== -->
<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<link rel="stylesheet" href="css/prettyPhoto.css" />
<link rel="stylesheet" href="css/flexslider.css" />
<link rel="stylesheet" href="css/custom-styles.css">

<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link rel="stylesheet" href="css/style-ie.css"/>
<![endif]-->

<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="apple-touch-icon" href="img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-114x114.png">

<!-- JS
================================================== -->
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.prettyPhoto.js"></script>
<script src="js/jquery.flexslider.js"></script>
<script src="js/jquery.custom.js"></script>

</head>
<? session_start();?>
<?=$_SESSION['id_resort'] ?>
<body class="home">
<!-- Color Bars (above header)-->
<div class="color-bar-1"></div>
<div class="color-bar-2 color-bg"></div>

<div class="container">

<div class="row header"><!-- Begin Header -->

<!-- Logo
================================================== -->
<div class="span5 logo">
<a href="home.php"><img src="img/logo2.png" alt="" /></a>
</div>

<!-- Main Navigation


================================================== -->
<div class="span7 navigation">
<div class="navbar hidden-phone">

<ul class="nav">
<li class="dropdown">
<a href="home.php">About </a>
</li>
<li><a href="resort.php">Resort</a></li>
<li class="dropdown">
<a href="gallery.php">Gallery </a>
</li>
<li class="dropdown">
<a href="plan.php">Plan Your Trip </a>
</li>
<li><a href="contact.php">Contact</a></li>
</ul>

</div>

<!-- Mobile Nav


================================================== -->
<form action="#" id="mobile-nav" class="visible-phone">
<div class="mobile-nav-select">
<select onchange="window.open(this.options[this.selectedIndex].value,'_top')">
<option value="">Navigate...</option>
<option value="home.php">Home</option>
<option value="resort.php">Resort</option>
<option value="gallery.php">Gallery</option>
<option value="plan.php">MasterPlan</option>
<option value="contact.php">Contact</option>

</select>
</div>
</form>
</div>

</div><!-- End Header -->

<div class="row form-examples">


<div class="span4">
<h3 class="title-bg">Confirmation Form : </h3>
<form action="success.php" method="post" role="form" name="user-info" id="user-info">
<div class="input-prepend">
<span class="add-on"><i class="iconuser"></i></span><input name="Nama" class="span2" size="16" id="prependedInput" type="text"
placeholder="Full Name">
</div>

<div class="input-prepend">
<span class="add-on"><i class="iconenvelope"></i></span><input name="email" class="span3" id="prependedInput" type="email"
placeholder="E-Mail">
</div>
<div class="input-prepend">
<span class="add-on"><i class="icontag"></i></span><input name="phone" class="span2" id="prependedInput" type="tel"
placeholder="Phone Number">
</div>
<div class="input-prepend">
<span class="add-on"><i class="iconhome"></i></span><input name="city" class="span2" id="prependedInput" type="text"
placeholder="City">
</div>
<div class="input-prepend">
<span class="add-on"><i class="iconglobe"></i></span><input name="country" class="span2" id="prependedInput" type="text"
placeholder="Country">
</div>
<div class="input-prepend">
<span class="add-on">Check-in</span><input
name="checkin" class="span2" id="prependedInput" type="date" placeholder="Check-in">
</div>
<div class="input-prepend">
<span class="add-on">Adults</span><input name="adult"
class="span1" id="prependedInput" type="number" placeholder="0">
</div>
<div class="input-prepend">
<span class="add-on">Child 3-10 year</span><input
name="child" class="span1" id="prependedInput" type="number" placeholder="0">
</div>
</div>

<div class="span8 sidebar page-sidebar">


<p class="well"><strong>The payment of your package
includes :</strong>
<br>- Round trip speedboat
transfer

<br>- Buffet meals (breakfast,


lunch and dinner)

<br>- Beverages (coffee, tea


and ginger tea from 8 am - 8 pm, milk and juice from 8 am - 12 noon)

<br>- Welcome snack &


afternoon snack (usually served at 5 pm)

<br>- Use of all island


equipment (snorkeling gear, kayak, pool table, etc)

<br>- Daily snorkeling trip

<br>- Conservation and charity


contributions

<br>- Tax and service</p>


</div>
<div class="span8 sidebar page-sidebar">
<p class="well"><strong>Cancellation Policy</strong><br>If
you cancel more than 2 weeks before departure, 100% of your total package is refundable.<br>If you
cancel within 2 weeks of your departure, 50% of your total package is non-refundable.<br> If
cancellation occurs within 1 week before departure, 75% of your package is non-refundable. <br> If
you cancel 1 day before departure or you dont show up on the day of departure,the whole amount of
your package is <br>non-refundable. <br> The amounts above are transferable to another guest
traveling at the same time, however. <br>Note: Refund will be deducted with cancellation fee for Rp
50.000 and administration fee from the bank if the recipient bank is other than BCA.</p>
</div>

<div class="span8">
<div class="well-small">

<button type="save" name="save" class="btn btninverse">Confirm</button>


<a href="home.php" role="button" class="btn btninverse">Cancel</a>
</div>
</div>
</form>

</div>
</div> <!-- End Container -->

<!-- Footer Area


================================================== -->

<div class="footer-container"><!-- Begin Footer -->


<div class="container">
<div class="row footer-row">
<div class="span7 footer-col">
<h5>About Us</h5>
<img src="img/footer.png" alt="Piccolo" /><br /><br />
<address>
<strong>Reservation & Info</strong><br />
+62 812 9753 1395 / +62 878 8234 1314 / 0813 1101 0571 (bahasa only) <br/>|
info@zevillages.com | info@zevillages.com<br />
office hours are from 10 am to 5 pm, Jakarta time (GMT + 7 hours), Monday through
Friday.<br />
</address>
<ul class="social-icons">

<li><a href="#" class="social-icon facebook"></a></li>


<li><a href="#" class="social-icon twitter"></a></li>
<li><a href="#" class="social-icon dribble"></a></li>
<li><a href="#" class="social-icon rss"></a></li>
<li><a href="#" class="social-icon forrst"></a></li>
</ul>
</div>
<div class="span3 footer-col">
<h5>Flickr Photos</h5>
<ul class="img-feed">
<li><a href="#"><img src="img/flickr/act1.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act2.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act3.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act4.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act5.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act6.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act7.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act8.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act9.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act10.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act11.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act12.jpg" alt="Image Feed"></a></li>
</ul>
</div>
</div>

<div class="row"><!-- Begin Sub Footer -->


<div class="span12 footer-col footer-sub">
<div class="row no-margin">

<div class="span6"><span class="left">Copyright 2012. All rights


reserved.</span></div>
</div>
</div>
</div>
</div><!-- End Sub Footer -->
</div><!-- End Footer -->

<!-- Scroll to Top -->


<div id="toTop" class="hidden-phone hidden-tablet">Back to Top</div>
<?php

if (isset($_POST['submit'])) {

if ($_POST['id_user'] != '') {
$_id_user = $_POST['id_user'];
} else {
$_id_user = 0;
}
$_idResort = $_POST['id_resort2'];
$_Nama = $_POST['Nama'];
$_email = $_POST['email'];
$_tlp = $_POST['phone'];
$_password = $_POST['city'];
$_country = $_POST['country'];
$_checkin = $_POST['checkin'];

$_adult = $_POST['adult'];
$_child = $_POST['child'];

$_sql = mysql_query("SELECT * FROM user WHERE id_user = ".$_id_user);

if (mysql_num_rows($_sql) > 0) {

echo "<script>$('.modal-err').modal();</script>
<script>$('.modal-err').modal('show');</script>";

}
else {

echo "<script type ='text/javascript'>$(document).on('click', '.ins-u-btn', function ()


{ document.location.href='model.php?action=insert&Nama=".$_Nama."&id_resort2=".
$_idResort."&id_user=".$_idUser."&email=".$_email."&phone= ".$_phone."&city=".$_city." &country
=".$_country."&checkin = ".$_checkin." &adult=".$_adult ."&child=".$_child ."'; });</script>";

echo "<script>$('.modal-del-user').modal();</script>
<script>$('.modal-del-user').modal('show');</script>";

}
}
?>
</body>
</html>

File bayar.php
<?php
include 'connect.php';
$koneksi = new database();
$koneksi->koneksi();

?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Pulau Macan</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- CSS
================================================== -->
<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<link rel="stylesheet" href="css/prettyPhoto.css" />
<link rel="stylesheet" href="css/flexslider.css" />
<link rel="stylesheet" href="css/custom-styles.css">

<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<link rel="stylesheet" href="css/style-ie.css"/>
<![endif]-->

<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="apple-touch-icon" href="img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-114x114.png">

<!-- JS

================================================== -->
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery.prettyPhoto.js"></script>
<script src="js/jquery.flexslider.js"></script>
<script src="js/jquery.custom.js"></script>
</head>
<? session_start();?>
<?=$_SESSION['id_resort'] ?>
<body class="home">
<!-- Color Bars (above header)-->
<div class="color-bar-1"></div>
<div class="color-bar-2 color-bg"></div>

<div class="container">
<div class="row header"><!-- Begin Header -->

<!-- Logo
================================================== -->
<div class="span5 logo">
<a href="home.php"><img src="img/logo2.png" alt="" /></a>
</div>

<!-- Main Navigation


================================================== -->
<div class="span7 navigation">
<div class="navbar hidden-phone">

<ul class="nav">

<li class="dropdown">
<a href="home.php">About </a>
</li>
<li><a href="resort.php">Resort</a></li>
<li class="dropdown">
<a href="gallery.php">Gallery </a>
</li>
<li class="dropdown">
<a href="plan.php">Plan Your Trip </a>
</li>
<li><a href="contact.php">Contact</a></li>
</ul>

</div>

<!-- Mobile Nav


================================================== -->
<form action="#" id="mobile-nav" class="visible-phone">
<div class="mobile-nav-select">
<select onchange="window.open(this.options[this.selectedIndex].value,'_top')">
<option value="">Navigate...</option>
<option value="home.php">Home</option>
<option value="resort.php">Resort</option>
<option value="gallery.php">Gallery</option>
<option value="plan.php">MasterPlan</option>
<option value="contact.php">Contact</option>

</select>

</div>
</form>

</div>

</div><!-- End Header -->

<div class="row form-examples">


<div class="span12">
<h3 class="title-bg">Payment Method: </h3>
<form action="finish.php" method="post" role="form" name="user-info" id="user-info">
<div class="input-prepend">
<span class="add-on">Nama Pemesan</span><input name="nama_pemesan"
class="span2" size="20" id="prependedInput" type="text" placeholder="Nama Pemesan"></input>
</div>
<div class="input-prepend">
<span class="add-on" name="bank">Nama Bank</span>
<select name="bank">
<option >MANDIRI</option>
<option >BCA</option>
<option >BRI</option>
<option >BNI</option>
<option >CIMB NIAGA</option>
</select>
</div>
<br>
<div class="input-prepend">
<span class="add-on">Total Bayar</span><input name="total_bayar" class="span2"
size="16" id="prependedInput" type="text" placeholder="Total Bayar"></input>
</div>

<div class="span8 sidebar page-sidebar">


<p class="well"><strong>You can transfer to our rekening number : </strong>
<br><img src = "img/Bank/mandiri.png"></img>
<br>12387183788712378127 a/n
resortpulaumacan
<br><img src = "img/Bank/bca.png"></img>
<br>12387986927 a/n resortpulaumacan
</p>
<p class="well"><strong>Cancellation Policy</strong><br>If you cancel more than 2 weeks
before departure, 100% of your total package is refundable.<br>If you cancel within 2 weeks of your
departure, 50% of your total package is non-refundable.<br> If cancellation occurs within 1 week
before departure, 75% of your package is non-refundable. <br> If you cancel 1 day before departure
or you dont show up on the day of departure,the whole amount of your package is <br>nonrefundable. <br> The amounts above are transferable to another guest traveling at the same time,
however. <br>Note: Refund will be deducted with cancellation fee for Rp 50.000 and administration
fee from the bank if the recipient bank is other than BCA.</p>
</div>
</div>

<div class="span12">
<div class="well-small">
<button type="submit" name="print" class="btn btn-inverse print-btn">Confirm</button>
<a href="home.php" role="button" class="btn btn-inverse">Cancel</a>
</div>
</div>
</form>
</div>
</div> <!-- End Container -->
<div><!-- Footer Area
================================================== -->
<div class="footer-container"><!-- Begin Footer -->
<div class="container">
<div class="row footer-row">

<div class="span7 footer-col">


<h5>About Us</h5>
<img src="img/footer.png" alt="Piccolo" /><br /><br />
<address>
<strong>Reservation & Info</strong><br />
+62 812 9753 1395 / +62 878 8234 1314 / 0813 1101 0571 (bahasa only) <br/>|
info@zevillages.com | info@zevillages.com<br />
office hours are from 10 am to 5 pm, Jakarta time (GMT + 7 hours), Monday through
Friday.<br />
</address>
<ul class="social-icons">
<li><a href="#" class="social-icon facebook"></a></li>
<li><a href="#" class="social-icon twitter"></a></li>
<li><a href="#" class="social-icon dribble"></a></li>
<li><a href="#" class="social-icon rss"></a></li>
<li><a href="#" class="social-icon forrst"></a></li>
</ul>
</div>

<div class="span3 footer-col">


<h5>Flickr Photos</h5>
<ul class="img-feed">
<li><a href="#"><img src="img/flickr/act1.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act2.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act3.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act4.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act5.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act6.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act7.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act8.jpg" alt="Image Feed"></a></li>

<li><a href="#"><img src="img/flickr/act9.jpg" alt="Image Feed"></a></li>


<li><a href="#"><img src="img/flickr/act10.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act11.jpg" alt="Image Feed"></a></li>
<li><a href="#"><img src="img/flickr/act12.jpg" alt="Image Feed"></a></li>
</ul>
</div>

<div class="row"><!-- Begin Sub Footer -->


<div class="span12 footer-col footer-sub">
<div class="row no-margin">
<div class="span6"><span class="left">Copyright 2012. All rights
reserved.</span></div>
</div>
</div>
</div>
</div>
</div>
</div><!-- End Sub Footer -->
</div><!-- End Footer -->
<!-- Scroll to Top -->
<div id="toTop" class="hidden-phone hidden-tablet">Back to Top</div>
<?php

if (isset($_POST['submit'])) {

if ($_POST['id_user'] != '') {
$_id_bayar = $_POST['id_user'];
} else {
$_id_bayar = 1;
}

$_nama_pemesan = $_POST['nama_pemesan'];
$_bank = $_POST['bank'];
$_total_bayar = $_POST['total_bayar'];

$_sql = mysql_query("SELECT * FROM pembayaran JOIN user WHERE id_user = ".$_id_bayar);

if (mysql_num_rows($_sql) > 0) {

echo "<script>$('.modal-err').modal();</script>
<script>$('.modal-err').modal('show');</script>";

}
else {

echo "<script type ='text/javascript'>$(document).on('click', '.ins-u-btn', function ()


{ document.location.href='model.php?action=insert&Nama=".$_Nama."&id_resort2=".
$_idResort."&id_user=".$_idUser."&email=".$_email."&phone= ".$_phone."&city=".$_city." &country
=".$_country."&checkin = ".$_checkin."&checkout=".$_checkout." &adult=".$_adult ."&child=".
$_child ."'; });</script>";

echo "<script>$('.modal-del-user').modal();</script>
<script>$('.modal-del-user').modal('show');</script>";

}
}
?>

</body>
</html>

File index.php(Folder admin)


<?php

/*
*--------------------------------------------------------------* APPLICATION ENVIRONMENT
*--------------------------------------------------------------*
* You can load different configurations depending on your
* current environment. Setting the environment also influences
* things like logging and error reporting.
*
* This can be set to anything, but default usage is:
*
*

development

testing

production

*
* NOTE: If you change these, also change the error_reporting() code below
*
*/
define('ENVIRONMENT', 'development');
/*
*--------------------------------------------------------------* ERROR REPORTING
*--------------------------------------------------------------*
* Different environments will require different levels of error reporting.
* By default development will show errors but testing and live will hide them.
*/

if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
error_reporting(E_ALL);
break;

case 'testing':
case 'production':
error_reporting(0);
break;

default:
exit('The application environment is not set correctly.');
}
}

/*
*--------------------------------------------------------------* SYSTEM FOLDER NAME
*--------------------------------------------------------------*
* This variable must contain the name of your "system" folder.
* Include the path if the folder is not in the same directory
* as this file.
*
*/
$system_path = 'system';

/*
*--------------------------------------------------------------* APPLICATION FOLDER NAME
*--------------------------------------------------------------*
* If you want this front controller to use a different "application"
* folder then the default one you can set its name here. The folder
* can also be renamed or relocated anywhere on your server. If
* you do, use a full server path. For more info please see the user guide:
* http://codeigniter.com/user_guide/general/managing_apps.html
*
* NO TRAILING SLASH!
*
*/
$application_folder = 'application';

/*
* -------------------------------------------------------------------* DEFAULT CONTROLLER
* -------------------------------------------------------------------*
* Normally you will set your default controller in the routes.php file.
* You can, however, force a custom routing by hard-coding a
* specific controller class/function here. For most applications, you
* WILL NOT set your routing here, but it's an option for those
* special instances where you might want to override the standard
* routing in a specific front controller that shares a common CI installation.
*

* IMPORTANT: If you set the routing here, NO OTHER controller will be


* callable. In essence, this preference limits your application to ONE
* specific controller. Leave the function name blank if you need
* to call functions dynamically via the URI.
*
* Un-comment the $routing array below to use this feature
*
*/
// The directory name, relative to the "controllers" folder. Leave blank
// if your controller is not in a sub-folder within the "controllers" folder
// $routing['directory'] = '';

// The controller class file name. Example: Mycontroller


// $routing['controller'] = '';

// The controller function you wish to be called.


// $routing['function']

= '';

/*
* ------------------------------------------------------------------* CUSTOM CONFIG VALUES
* ------------------------------------------------------------------*
* The $assign_to_config array below will be passed dynamically to the
* config class when initialized. This allows you to set custom config
* items or override any default config values found in the config.php file.
* This can be handy as it permits you to share one application between
* multiple front controller files, with each file containing different

* config values.
*
* Un-comment the $assign_to_config array below to use this feature
*
*/
// $assign_to_config['name_of_config_item'] = 'value of config item';

// -------------------------------------------------------------------// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
// --------------------------------------------------------------------

/*
* --------------------------------------------------------------* Resolve the system path for increased reliability
* --------------------------------------------------------------*/

// Set the current directory correctly for CLI requests


if (defined('STDIN'))
{
chdir(dirname(__FILE__));
}

if (realpath($system_path) !== FALSE)


{
$system_path = realpath($system_path).'/';
}

// ensure there's a trailing slash


$system_path = rtrim($system_path, '/').'/';

// Is the system path correct?


if ( ! is_dir($system_path))
{
exit("Your system folder path does not appear to be set correctly. Please open the
following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME));
}

/*
* ------------------------------------------------------------------* Now that we know the path, set the main path constants
* ------------------------------------------------------------------*/
// The name of THIS file
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));

// The PHP file extension


// this global constant is deprecated.
define('EXT', '.php');

// Path to the system folder


define('BASEPATH', str_replace("\\", "/", $system_path));

// Path to the front controller (this file)


define('FCPATH', str_replace(SELF, '', __FILE__));

// Name of the "system folder"

define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));

// The path to the "application" folder


if (is_dir($application_folder))
{
define('APPPATH', $application_folder.'/');
}
else
{
if ( ! is_dir(BASEPATH.$application_folder.'/'))
{
exit("Your application folder path does not appear to be set correctly. Please
open the following file and correct this: ".SELF);
}

define('APPPATH', BASEPATH.$application_folder.'/');
}

/*
* -------------------------------------------------------------------* LOAD THE BOOTSTRAP FILE
* -------------------------------------------------------------------*
* And away we go...
*
*/
require_once BASEPATH.'core/CodeIgniter.php';

/* End of file index.php */

/* Location: ./index.php

You might also like