Something went wrong. Try again.
CarGo is an aggregator service that connects people who drive the way, with those who are interested in having a shared trip; thereby actin…
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527<?phprequire_once "model/db.php";if (!isset($_SESSION['user_id']) || !isset($_REQUEST['id'])) { if (!headers_sent()) { header('location:login.php'); } else { echo '<script>location.href="login.php"</script>'; }}?><!DOCTYPE html><html class="no-js" lang="zxx">
<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--=== Favicon ===--> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>CarGo - Pooling Services</title>
<!--=== Bootstrap CSS ===--> <link href="assets/css/bootstrap.min.css" rel="stylesheet"> <!--=== Slicknav CSS ===--> <link href="assets/css/plugins/slicknav.min.css" rel="stylesheet"> <!--=== Magnific Popup CSS ===--> <link href="assets/css/plugins/magnific-popup.css" rel="stylesheet"> <!--=== Owl Carousel CSS ===--> <link href="assets/css/plugins/owl.carousel.min.css" rel="stylesheet"> <!--=== Gijgo CSS ===--> <link href="assets/css/plugins/gijgo.css" rel="stylesheet"> <!--=== FontAwesome CSS ===--> <link href="assets/css/font-awesome.css" rel="stylesheet"> <!--=== Theme Reset CSS ===--> <link href="assets/css/reset.css" rel="stylesheet"> <!--=== Main Style CSS ===--> <link href="style.css" rel="stylesheet"> <!--=== Responsive CSS ===--> <link href="assets/css/responsive.css" rel="stylesheet">
<style>
.table-post{ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; }
.table-post li { background-color: transparent; border: 1px solid; color: gray; font-size: 17px; font-weight: 450; letter-spacing: 1.3px; margin-bottom: 15px; padding: 15px; position: relative; }
.table-post a { color: gray; }
.table-post li:last-child { margin-bottom: 20px; }
.table-post li:first-child { margin-top: 40px; }
.table-post li i { background-color: transparent; color: gray; float: right; font-size: 18px; height: 30px; line-height: 30px; padding-left: 2px; position: absolute; right: 15px; text-align: center; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); -webkit-transition: all 0.4s ease 0s; transition: all 0.4s ease 0s; width: 30px; }
.table-post li:hover i { color: #000; }
.table-post a:hover { color: #000; } .login-form form { text-align: center; } </style> </head>
<body class="loader-active">
<!--== Preloader Area Start ==--> <div class="preloader"> <div class="preloader-spinner"> <div class="loader-content"> <img src="assets/img/preloader.gif" alt="JSOFT"> </div> </div> </div> <!--== Preloader Area End ==-->
<!--__________________________________________________________________________________________________________________________________-->
<!--== Header Area Start ==--> <header id="header-area" class="fixed-top"> <!--== Header Top Start ==--> <div id="header-top" class="d-none d-xl-block"> <div class="container"> <div class="row"> <!--== Single HeaderTop Start ==--> <div class="col-lg-3 text-left"> <i class="fa fa-map-marker"></i> Changanacherry, Kottayam </div> <!--== Single HeaderTop End ==-->
<!--== Single HeaderTop Start ==--> <div class="col-lg-3 text-center"> <i class="fa fa-mobile"></i> +91 94000 57152 </div> <!--== Single HeaderTop End ==-->
<!--== Single HeaderTop Start ==--> <div class="col-lg-3 text-center"> <i class="fa fa-clock-o"></i> 24*7 </div> <!--== Single HeaderTop End ==-->
<!--== Social Icons Start ==--> <div class="col-lg-3 text-right"> <div class="header-social-icons"> <a href="#"><i class="fa fa-facebook"></i></a> <a href="#"><i class="fa fa-instagram"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-pinterest"></i></a> <a href="#"><i class="fa fa-linkedin"></i></a> </div> </div> <!--== Social Icons End ==--> </div> </div> </div> <!--== Header Top End ==-->
<!--__________________________________________________________________________________________________________________________________-->
<?php include_once 'menu.php'; ?>
<!--__________________________________________________________________________________________________________________________________-->
<!--== Page Title Area Start ==--> <section id="page-title-area" class="section-padding overlay"> <div class="container"> <div class="row"> <!-- Page Title Start --> <div class="col-lg-12"> <div class="section-title text-center"> <h2>Ride with CarGo</h2> <span class="title-line"><i class="fa fa-car"></i></span> <p>Fill-up and experience the pleasure of Shared Trips</p> </div> </div> <!-- Page Title End --> </div> </div> </section> <!--== Page Title Area End ==-->
<?php $qry = "SELECT * FROM ride WHERE ride_id =" . $_REQUEST['id']; $result = mysqli_query($con, $qry); $res0 = mysqli_fetch_array($result);
$qry = "SELECT * FROM trip INNER JOIN vehicle ON trip.vehicle_id = vehicle.vehicle_id INNER JOIN registration ON trip.user_id = registration.user_id WHERE trip.datee = '" . $res0['datee'] . "' AND trip.source = '" . $res0['source'] . "' AND trip.destination = '" . $res0['destination'] . "' ORDER BY trip.timee asc"; // echo $qry; $result = mysqli_query($con, $qry); $count = mysqli_num_rows($result); ?>
<!--== Login Page Content Start ==--> <section id="lgoin-page-wrap" class="section-padding"> <div class="container"> <div class="row"> <div class="col-lg-5 col-md-8 m-auto"> <div class="xlogin-page-content"> <div class="login-form"> <h3>View Trips</h3>
<div class="col-md-12">
<div class="single-footer-widget"> <div class="widget-body"> <?php if ($count > 0) { $i = 0; ?> <ul class="table-post"> <?php while ($res = mysqli_fetch_array($result)) { $i++;// $qry1 = "SELECT * FROM passenger WHERE trip_id=" . $res['trip_id'];// // echo $qry1; $qry1 = "SELECT * FROM passenger INNER JOIN ride ON passenger.ride_id = ride.ride_id INNER JOIN registration ON registration.user_id = ride.user_id WHERE passenger.trip_id = " . $res['trip_id']." AND registration.user_id = ".$_SESSION['user_id']; $result1 = mysqli_query($con, $qry1); $count1 = mysqli_num_rows($result1); $res1 = mysqli_fetch_array($result1); ?>
<li> <a href="#" onclick="javascript:showModal(<?= $i ?>);"> <?php echo date('M d, Y h:i A', strtotime($res['datee'] . ' ' . $res['timee'])); ?> <i class="fa fa-long-arrow-right"></i> </a> </li>
<div id="myModal<?= $i ?>" class="xsmodal" style="display:none;"> <form id="frmRequest" name="frmRequest" method="post"> <!-- Modal content --> <div class="xsmodal-content"> <span class="xsclose" onclick="javascript:hideModal(<?= $i ?>);">×</span> <br>
<div class="driver_details" style="display: inline-block; text-align: center"> <img style="margin-left: 30px" src="assets/img/img_avatar_1.png" width="150px" height="150px"> </div>
<h4 style="margin: 20px 0px 5px 0px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;"> <?php echo $res['first_name'] . ' ' . $res['last_name']; ?></h4> <h6 style="color: gray;"><?php echo $res['mobile']; ?><h6> <h6 style="color: gray;"><?php echo $res['email']; ?></h6>
<div class="route"> <div class="from"> <p>Source: <?php echo $res['source']; ?></p> </div> <div class="from"> <p>Destination: <?php echo $res['destination']; ?></p> </div> <div class="from"> <p>Vehicle: <?php echo $res['vehicle_name']; ?></p> </div> <div class="time"> <h6 style="color: gray;">Time: <?php echo date('M d, Y h:i A', strtotime($res['datee'] . ' ' . $res['timee'])); ?></h6> </div> <div class="abc"> <input type="hidden" name="hdn_trip_id" id="hdn_trip_id" value="<?php echo $res['trip_id']; ?>" > <input type="hidden" name="hdn_ride_id" id="hdn_ride_id" value="<?php echo $_REQUEST['id']; ?>" > <?php if($count1 == 0) { ?> <button type="submit" id="btn_request" name="btn_request">Send Request</button> <?php } else{ if ($res1['status'] == 0) { ?> <div class="alert alert-info" role="alert"> Approval Pending </div> <?php } else if ($res1['status'] == 1) { ?> <div class="alert alert-success" role="alert"> Request Accepted </div> <?php } else if ($res1['status'] == 2) { ?> <div class="alert alert-danger" role="alert"> Request Rejected </div> <?php } } ?> </div> </div> </div>
</form> </div>
<?php } ?>
</ul> <?php } else { ?> <div class="alert alert-warning" role="alert"> No trips available <?php //echo date('M d, Y', strtotime($res['datee'])); from $res['source'] to $res['destination'] ?> </div> <?php } ?> </div> </div>
</div>
</div> </div> </div> </div> </div> </section> <!--== Login Page Content End ==-->
<!--________________________________________________________________________________________________________________________________-->
<!--== Footer Area Start ==--> <section id="footer-area"> <!-- Footer Widget Start --> <div class="footer-widget-area"> <div class="container"> <div class="row"> <!-- Single Footer Widget Start --> <div class="col-lg-4 col-md-6"> <div class="single-footer-widget"> <h2>About Us</h2> <div class="widget-body"> <img src="assets/img/logo.png" alt="JSOFT"> <p>CarGo aims to provide users with a quick, simple, secure and cashless way to travel. Join hands with us and help us achieve a future of shared mobility.</p>
<div class="newsletter-area"> <form action="main.html"> <input type="email" placeholder="Subscribe Our Newsletter"> <button type="submit" class="newsletter-btn"><i class="fa fa-send"></i></button> </form> </div>
</div> </div> </div> <!-- Single Footer Widget End -->
<!-- Single Footer Widget Start --> <div class="col-lg-4 col-md-6"> <div class="single-footer-widget"> <h2>Recent Posts</h2> <div class="widget-body"> <ul class="recent-post"> <li> <a href="#"> Hello Changanacherry! <i class="fa fa-long-arrow-right"></i> </a> </li> <li> <a href="#"> What's new with CarGo <i class="fa fa-long-arrow-right"></i> </a> </li> <li> <a href="#"> Thank you Kottayam! <i class="fa fa-long-arrow-right"></i> </a> </li> <li> <a href="#"> How to earn through CarGo <i class="fa fa-long-arrow-right"></i> </a> </li> </ul> </div> </div> </div> <!-- Single Footer Widget End -->
<!-- Single Footer Widget Start --> <div class="col-lg-4 col-md-6"> <div class="single-footer-widget"> <h2>get touch</h2> <div class="widget-body"> <p>Feel free to contact and join your hands with us to help us achieve a future of shared mobility.</p>
<ul class="get-touch"> <li><i class="fa fa-map-marker"></i> Changanacherry, Kottayam</li> <li><i class="fa fa-mobile"></i> +91 94000 57152</li> <li><i class="fa fa-envelope"></i> info@cargo.com</li> </ul> <a href="https://goo.gl/maps/b5mt45MCaPB2" class="map-show" target="_blank">Show Location</a> </div> </div> </div> <!-- Single Footer Widget End --> </div> </div> </div> <!-- Footer Widget End -->
<!-- Footer Bottom Start --> <div class="footer-bottom-area"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <p><!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --> Copyright © <script> document.write(new Date().getFullYear()); </script> All rights reserved | Designed by <a href="main.html" target="_blank">CarGo</a> <!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. --></p> </div> </div> </div> </div> <!-- Footer Bottom End --> </section> <!--== Footer Area End ==-->
<!--== Scroll Top Area Start ==--> <div class="scroll-top"> <img src="assets/img/scroll-top.png" alt="JSOFT"> </div> <!--== Scroll Top Area End ==-->
<!--=======================Javascript============================--> <!--=== Jquery Min Js ===--> <script src="assets/js/jquery-3.2.1.min.js"></script> <!--=== Jquery Migrate Min Js ===--> <script src="assets/js/jquery-migrate.min.js"></script> <!--=== Popper Min Js ===--> <script src="assets/js/popper.min.js"></script> <!--=== Bootstrap Min Js ===--> <script src="assets/js/bootstrap.min.js"></script> <!--=== Gijgo Min Js ===--> <script src="assets/js/plugins/gijgo.js"></script> <!--=== Vegas Min Js ===--> <script src="assets/js/plugins/vegas.min.js"></script> <!--=== Isotope Min Js ===--> <script src="assets/js/plugins/isotope.min.js"></script> <!--=== Owl Caousel Min Js ===--> <script src="assets/js/plugins/owl.carousel.min.js"></script> <!--=== Waypoint Min Js ===--> <script src="assets/js/plugins/waypoints.min.js"></script> <!--=== CounTotop Min Js ===--> <script src="assets/js/plugins/counterup.min.js"></script> <!--=== YtPlayer Min Js ===--> <script src="assets/js/plugins/mb.YTPlayer.js"></script> <!--=== Magnific Popup Min Js ===--> <script src="assets/js/plugins/magnific-popup.min.js"></script> <!--=== Slicknav Min Js ===--> <script src="assets/js/plugins/slicknav.min.js"></script>
<!--=== Mian Js ===--> <script src="assets/js/main.js"></script> <script> function showModal(i) { $("#myModal" + i).show(); } function hideModal(i) { $("#myModal" + i).hide(); } </script> </body> </html> <!--________________________________________________________________________________________________________________________________--> <!--________________________________________________________________________________________________________________________________-->
<?php if (isset($_REQUEST['btn_request'])) { $trip_id = $_REQUEST['hdn_trip_id']; $ride_id = $_REQUEST['hdn_ride_id']; $qry = "INSERT INTO passenger (trip_id, ride_id, status) VALUES ($trip_id, $ride_id, 0)"; mysqli_query($con, $qry); $ins = mysqli_insert_id($con); if ($ins > 0) { echo "<script>alert('Request Sent Successfully')</script>"; echo "<meta http-equiv=refresh content=\"0; URL=".$_SERVER['REQUEST_URI']."\">"; } else { echo "<script>alert('Something went wrong. Please try again later')</script>"; } } ?>