PHP和Mysql中的租车项目
此项目是PHP和Mysql中的租车项目。项目模块包括用户数、管理员、客人三大类。用户成功登录后可以执行如下操作:租车预订、查看租车记录、更新他/她的个人资料、更新他/她的密码、寄语、查看推荐、退出。讲解了如何运行项目:1.下载文件并将其解压缩到本地系统副本carrental上。2.将carrental文件夹放在根目录中。本人只展示了小部分的代码,如想详细的了解请下载附件。
应用介绍
此项目是PHP和Mysql中的租车项目。项目模块包括用户数、管理员、客人三大类。用户成功登录后可以执行如下操作:租车预订、查看租车记录、更新他/她的个人资料、更新他/她的密码、寄语、查看推荐、退出。管理员功能:管理员可以创建车辆品牌、管理车辆品牌(编辑,删除)、管理预订(管理员可以确认和取消预订)、管理联系我们查询、管理员可以注册用户的详细信息....等等。本人只展示了小部分的代码,如想详细的了解请下载附件。
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['login'])==0)
{
header('location:index.php');
}
else{
?><!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="keywords" content="">
<meta name="description" content="">
<title>CarForYou - Responsive Car Dealer HTML5 Template</title>
<!--Bootstrap -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css">
<!--Custome Style -->
<link rel="stylesheet" href="assets/css/style.css" type="text/css">
<!--OWL Carousel slider-->
<link rel="stylesheet" href="assets/css/owl.carousel.css" type="text/css">
<link rel="stylesheet" href="assets/css/owl.transitions.css" type="text/css">
<!--slick-slider -->
<link href="assets/css/slick.css" rel="stylesheet">
<!--bootstrap-slider -->
<link href="assets/css/bootstrap-slider.min.css" rel="stylesheet">
<!--FontAwesome Font Style -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<!-- SWITCHER -->
<link rel="stylesheet" id="switcher-css" type="text/css" href="assets/switcher/css/switcher.css" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/red.css" title="red" media="all" data-default-color="true" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/orange.css" title="orange" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/blue.css" title="blue" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/pink.css" title="pink" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/green.css" title="green" media="all" />
<link rel="alternate stylesheet" type="text/css" href="assets/switcher/css/purple.css" title="purple" media="all" />
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/favicon-icon/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/favicon-icon/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/favicon-icon/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/images/favicon-icon/apple-touch-icon-57-precomposed.png">
<link rel="shortcut icon" href="assets/images/favicon-icon/favicon.png">
<!-- Google-Font-->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Start Switcher -->
<?php include('includes/colorswitcher.php');?>
<!-- /Switcher -->
<!--Header-->
<?php include('includes/header.php');?>
<!--Page Header-->
<!-- /Header -->
<!--Page Header-->
<section class="page-header profile_page">
<div class="container">
<div class="page-header_wrap">
<div class="page-heading">
<h1>My Booking</h1>
</div>
<ul class="coustom-breadcrumb">
<li><a href="#">Home</a></li>
<li>My Booking</li>
</ul>
</div>
</div>
<!-- Dark Overlay-->
<div class="dark-overlay"></div>
</section>
<!-- /Page Header-->
<?php
$useremail=$_SESSION['login'];
$sql = "SELECT * from tblusers where EmailId=:useremail";
$query = $dbh -> prepare($sql);
$query -> bindParam(':useremail',$useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<section class="user_profile inner_pages">
<div class="container">
<div class="user_profile_info gray-bg padding_4x4_40">
<div class="upload_user_logo"> <img src="assets/images/dealer-logo.jpg" alt="image">
</div>
<div class="dealer_info">
<h5><?php echo htmlentities($result->FullName);?></h5>
<p><?php echo htmlentities($result->Address);?><br>
<?php echo htmlentities($result->City);?> <?php echo htmlentities($result->Country); }}?></p>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-3">
<?php include('includes/sidebar.php');?>
<div class="col-md-6 col-sm-8">
<div class="profile_wrap">
<h5 class="uppercase underline">My Booikngs </h5>
<div class="my_vehicles_list">
<ul class="vehicle_listing">
<?php
$useremail=$_SESSION['login'];
$sql = "SELECT tblvehicles.Vimage1 as Vimage1,tblvehicles.VehiclesTitle,tblvehicles.id as vid,tblbrands.BrandName,tblbooking.FromDate,tblbooking.ToDate,tblbooking.message,tblbooking.Status from tblbooking join tblvehicles on tblbooking.VehicleId=tblvehicles.id join tblbrands on tblbrands.id=tblvehicles.VehiclesBrand where tblbooking.userEmail=:useremail";
$query = $dbh -> prepare($sql);
$query-> bindParam(':useremail', $useremail, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<li>
<div class="vehicle_img"> <a href="vehical-details.php?vhid=<?php echo htmlentities($result->vid);?>""><img src="admin/img/vehicleimages/<?php echo htmlentities($result->Vimage1);?>" alt="image"></a> </div>
<div class="vehicle_title">
<h6><a href="vehical-details.php?vhid=<?php echo htmlentities($result->vid);?>""> <?php echo htmlentities($result->BrandName);?> , <?php echo htmlentities($result->VehiclesTitle);?></a></h6>
<p><b>From Date:</b> <?php echo htmlentities($result->FromDate);?><br /> <b>To Date:</b> <?php echo htmlentities($result->ToDate);?></p>
</div>
<?php if($result->Status==1)
{ ?>
<div class="vehicle_status"> <a href="#" class="btn outline btn-xs active-btn">Confirmed</a>
<div class="clearfix"></div>
</div>
<?php } else if($result->Status==2) { ?>
<div class="vehicle_status"> <a href="#" class="btn outline btn-xs">Cancelled</a>
<div class="clearfix"></div>
</div>
<?php } else { ?>
<div class="vehicle_status"> <a href="#" class="btn outline btn-xs">Not Confirm yet</a>
<div class="clearfix"></div>
</div>
<?php } ?>
<div style="float: left"><p><b>Message:</b> <?php echo htmlentities($result->message);?> </p></div>
</li>
<?php }} ?>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<!--/my-vehicles-->
<?php include('includes/footer.php');?>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/interface.js"></script>
<!--Switcher-->
<script src="assets/switcher/js/switcher.js"></script>
<!--bootstrap-slider-JS-->
<script src="assets/js/bootstrap-slider.min.js"></script>
<!--Slider-JS-->
<script src="assets/js/slick.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>
</body>
</html>
<?php } ?>
©版权声明:本文内容由互联网用户自发贡献,版权归原创作者所有,本站不拥有所有权,也不承担相关法律责任。如果您发现本站中有涉嫌抄袭的内容,欢迎发送邮件至: [email protected] 进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。
转载请注明出处: apollocode » PHP和Mysql中的租车项目
文件列表(部分)
名称 | 大小 | 修改日期 |
---|---|---|
carrentalproject | 0.00 KB | 2018-09-50 |
carrental | 0.00 KB | 2018-09-54 |
admin | 0.00 KB | 2018-09-52 |
change-password.php | 5.64 KB | 2017-06-58 |
changeimage1.php | 4.87 KB | 2017-06-30 |
changeimage2.php | 4.89 KB | 2017-06-30 |
changeimage3.php | 4.89 KB | 2017-06-42 |
changeimage4.php | 4.89 KB | 2017-06-10 |
changeimage5.php | 4.89 KB | 2017-06-18 |
create-brand.php | 4.21 KB | 2017-06-00 |
css | 0.00 KB | 2018-09-52 |
awesome-bootstrap-checkbox.css | 6.58 KB | 2016-03-20 |
bootstrap-select.css | 6.49 KB | 2016-03-20 |
bootstrap-social.css | 33.04 KB | 2016-03-20 |
bootstrap.min.css | 122.06 KB | 2016-03-20 |
css | 0.00 KB | 2018-09-52 |
vars.css | 0.17 KB | 2016-03-20 |
dataTables.bootstrap.min.css | 4.15 KB | 2016-03-20 |
datatables.min.css | 123.58 KB | 2016-03-20 |
fileinput.min.css | 3.29 KB | 2016-03-20 |
font-awesome.min.css | 26.08 KB | 2016-03-20 |
jquery.dataTables.min.css | 13.30 KB | 2016-03-20 |
less | 0.00 KB | 2018-09-52 |
components.less | 8.12 KB | 2016-03-20 |
vars.less | 1.03 KB | 2016-03-20 |
style.css | 12.74 KB | 2016-03-20 |
style.less | 4.68 KB | 2016-03-20 |
dashboard.php | 8.45 KB | 2017-06-52 |
edit-brand.php | 4.55 KB | 2017-06-36 |
edit-vehicle.php | 16.57 KB | 2018-09-32 |
fonts | 0.00 KB | 2018-09-52 |
fontawesome-webfont.eot | 67.26 KB | 2016-03-20 |
发表评论 取消回复