MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/imyrqtmy/public_html/vssvclinic/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/vssvclinic/book_appointment.php
<?php
session_start();
if (!isset($_SESSION['userid'])) {
    header("Location: login.php");
}

$patients_id = $_SESSION['userid'];

include("Admin/Includes/db.php");;
 @$did = $_GET['docid'];

  $add_date = date('Y-m-d');
 
  $query = "SELECT * FROM `tbl_slot` where  add_date<'$add_date' ";
    $res = mysqli_query($con, $query) or die(mysqli_error($con));
    if (mysqli_num_rows($res) > 0) {
        while ($row = mysqli_fetch_assoc($res)) {
            $slid = $row['id'];
           
            $sql = "update  tbl_slot set seen_flag='0' where id='$slid'";
            $results = mysqli_query($con, $sql) or die(mysqli_error($con));
        }
    }
    else
    {
        // echo 'd';
    }
    

 


$MERCHANT_KEY = "lCwwC6";
$SALT = "ndTeS83I5eJi3rb9du83YPu8eoKFYX65";
// Merchant Key and Salt as provided by Payu.

// $PAYU_BASE_URL = "https://sandboxsecure.payu.in";		// For Sandbox Mode
$PAYU_BASE_URL = "https://secure.payu.in";			// For Production Mode

$action = '';

$posted = array();
if(!empty($_POST)) {
    // print_r($_POST);
    // exit;
  foreach($_POST as $key => $value) {    
    $posted[$key] = $value; 
	
  }
}


 // 86400 = 1 day



if(isset($_POST['time']))
{
    setcookie('form_time',isset($_POST['time'])?$_POST['time']:'' , time() + (86400 * 2), "/");
    //  $_SESSION['form_time']= isset($_POST['time'])?$_POST['time']:'';
}

if(isset($_POST['phone']))
{
    //  $_SESSION['form_phone']= isset($_POST['phone'])?$_POST['phone']:'';
     setcookie('form_phone',isset($_POST['phone'])?$_POST['phone']:'' , time() + (86400 * 2), "/");
}

if(isset($_POST['date']))
{
    //  $_SESSION['form_date']= isset($_POST['date'])?$_POST['date']:'';
    setcookie('form_date',isset($_POST['date'])?$_POST['date']:'' , time() + (86400 * 2), "/");
}

if(isset($_POST['place']))
{
    //  $_SESSION['form_place']= isset($_POST['place'])?$_POST['place']:'';
    setcookie('form_place',isset($_POST['place'])?$_POST['place']:'' , time() + (86400 * 2), "/");
}

if(isset($_POST['day']))
{
    //  $_SESSION['form_day']= isset($_POST['day'])?$_POST['day']:'';
     setcookie('form_day',isset($_POST['day'])?$_POST['day']:'' , time() + (86400 * 2), "/");
}

$formError = 0;

if(empty($posted['txnid'])) {
  // Generate random transaction id
  $txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20);
} else {
  $txnid = $posted['txnid'];
}
$hash = '';
// Hash Sequence
$hashSequence = "key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5|udf6|udf7|udf8|udf9|udf10";
if(empty($posted['hash']) && sizeof($posted) > 0) {
  if(
          empty($posted['key'])
          || empty($posted['txnid'])
          || empty($posted['amount'])
          || empty($posted['firstname'])
          || empty($posted['email'])
          || empty($posted['phone'])
          || empty($posted['productinfo'])
          || empty($posted['surl'])
          || empty($posted['furl'])
		  || empty($posted['service_provider'])
		  || empty($posted['place'])
		  
		  
  ) {
    $formError = 1;
  } else {
    //$posted['productinfo'] = json_encode(json_decode('[{"name":"tutionfee","description":"","value":"500","isRequired":"false"},{"name":"developmentfee","description":"monthly tution fee","value":"1500","isRequired":"false"}]'));
	$hashVarsSeq = explode('|', $hashSequence);
    $hash_string = '';	
	foreach($hashVarsSeq as $hash_var) {
      $hash_string .= isset($posted[$hash_var]) ? $posted[$hash_var] : '';
      $hash_string .= '|';
    }

    $hash_string .= $SALT;


    $hash = strtolower(hash('sha512', $hash_string));
    $action = $PAYU_BASE_URL . '/_payment';
  }
} elseif(!empty($posted['hash'])) {
  $hash = $posted['hash'];
  $action = $PAYU_BASE_URL . '/_payment';
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zxx">

<!-- Mirrored from htmldesigntemplates.com/html/ayurvedic/appointment.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 01 Mar 2022 21:39:50 GMT -->
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />
	<title>Vaid Shyam Sunder Vats Clinic & Ayurvedic Research Centre</title>

	<link rel="shortcut icon" type="image/x-icon" href="images/cropped-favicon-32x32.png" />

	<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />

	<link href="css/style.css" rel="stylesheet" type="text/css" />

	<link href="css/plugin.css" rel="stylesheet" type="text/css" />

	<link rel="stylesheet" href="../../../cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
	<link rel="stylesheet" href="../../../cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" />
	<script async src='../../cdn-cgi/challenge-platform/h/g/scripts/invisible.js'></script>
	<script>
    var hash = '<?php echo $hash ?>';
    function submitPayuForm() {
      if(hash == '') {
        return;
      }
      var payuForm = document.forms.payuForm;
      payuForm.submit();
    }
  </script>
	</head>
	<body onload="submitPayuForm()">

		<div id="preloader">
			<div id="status"></div>
		</div>


		<header class="main_header_area">
			<div class="topbar-wrap bg-dblue">
				<div class="container">
					<div class="top-info d-flex justify-content-between align-items-center">
						<ul class="t-address">
							<li class="pr-2"><i class="far fa-clock"></i> Open Hours: Mon - Sat 9.00 - 18.00</li>
							<li class="pr-2"><i class="fas fa-phone-alt"></i> 974 8845246937</li>
							<li><i class="far fa-envelope"></i> <a href="https://htmldesigntemplates.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fd94939b92bd988d9c89958e9c919cd39e9290">[email&#160;protected]</a></li>
						</ul>
						<ul class="t-social">
							<li>
								<span class="ct-search-link"><a href="#"><i class="fa fa-search"></i></a
									></span>
								</li>
								<li class="pl-2">
									<a href="#"><i class="fab fa-facebook-f"></i></a>
								</li>
								<li class="pl-2">
									<a href="#"><i class="fab fa-linkedin"></i></a>
								</li>
								<li class="pl-2">
									<a href="#"><i class="fab fa-twitter"></i></a>
								</li>
							</ul>
						</div>
					</div>
				</div>

				<?php include 'includes/header.php';?>


				<section class="breadcrumb-wrap">
					<div class="container">
						<h2 class="cl-white mb-0">Appointment</h2>
					</div>
					<div class="overlay"></div>
				</section>


				<section class="appointment bg-sfgrey-3 pb-10">
					<div class="container">
						<div>
							<div class="row align-items-center flex-mxl-column-reverse">
								<div class="col-lg-6 col-md-12">
									<div class="appoint-form mb-xs-0">
										
										    <form class="row g-3" action="<?php echo $action; ?>" method="post" name="payuForm">
                                              <input type="hidden" name="key" value="<?php echo $MERCHANT_KEY ?>" />
                                              <input type="hidden" name="hash" value="<?php echo $hash ?>"/>
                                              <input type="hidden" name="txnid" value="<?php echo $txnid ?>" />
                                              <input type="hidden" name="surl" value="<?php echo 'https://vssvclinic.com/payu/success.php'; ?>">
                                              <input type="hidden" name="surl" value="<?php echo 'https://vssvclinic.com/payu/success.php'; ?>">
                                              
											<div class="col-md-6">
												<!--<input type="text" name="firstname" class="form-control" placeholder="First name" aria-label="Full name" />-->
												<input type="hidden" id="am" name="amount" class="form-control" value="<?php echo isset($_POST['amount'])?$_POST['amount']:0; ?>"/>
												
												<input type="text" name="firstname" id="firstname" value="<?php echo (empty($posted['firstname'])) ? '' : $posted['firstname']; ?>" class="form-control" placeholder="First name" aria-label="Full name" />
											</div>
											<div class="col-md-6">
												<!--<input type="number" name="phone" class="form-control" placeholder="Phone Number" aria-label="Phone Number" />-->
												<input type="text" name="phone" value="<?php echo (empty($posted['phone'])) ? '' : $posted['phone']; ?>" class="form-control" placeholder="Phone Number" aria-label="Phone Number" />
											</div>
											<div class="col-12">
												<input type="email" name="email" id="email" value="<?php echo (empty($posted['email'])) ? '' : $posted['email']; ?>" class="form-control" placeholder="Email Address" aria-label="Email Address" />
                                                
                                                <input type="hidden" name="productinfo" value="<?php echo $patients_id; ?>">
											</div>
											
											<div class="col-12">
												<input type="date" name="date" class="form-control" id="bookingdate" placeholder="Email Address" aria-label="Email Address" />
											</div>

											
											<div class="col-md-12">
												<select id="place" name="place" class="form-control">
												<option value="">-- Select Appointment Place --</option>	

												 <option value="Mangolpuri">Mangolpuri</option> 

                                                <option value="Karala">Karala</option>
							                
												</select>
											</div>
											
											<div class="col-md-12" >
												<select id="day" name="day" class="form-control">
												     <option value="">Select Place First</option>
											

												
							                
												</select>
											</div>
											
											<div class="col-md-12">
												<select id="time" name="time"  class="form-control">
												     <option value="">Select Day First</option>
											

												
							                
												</select>
											</div>

											 

											
											<div class="col-12">
												<textarea name="message" placeholder="Message" cols="30" rows="10"></textarea>

							
											</div>
											
											<input type="hidden" name="surl" value="<?php echo 'https://vssvclinic.com/payu/success.php'; ?>" size="64" />
											<input type="hidden" name="furl" value="<?php echo 'https://vssvclinic.com/payu/failure.php'; ?>" size="64" />
											<input type="hidden" name="service_provider" value="payu_paisa" size="64" />
											
											<!--<tr>-->
           <!--                                   <td>Last Name: </td>-->
           <!--                                   <td><input name="lastname" id="lastname" value="<?php echo (empty($posted['lastname'])) ? '' : $posted['lastname']; ?>" /></td>-->
           <!--                                   <td>Cancel URI: </td>-->
           <!--                                   <td><input name="curl" value="" /></td>-->
           <!--                                 </tr>-->
           <!--                                 <tr>-->
           <!--                                   <td>Address1: </td>-->
           <!--                                   <td><input name="address1" value="<?php echo (empty($posted['address1'])) ? '' : $posted['address1']; ?>" /></td>-->
           <!--                                   <td>Address2: </td>-->
           <!--                                   <td><input name="address2" value="<?php echo (empty($posted['address2'])) ? '' : $posted['address2']; ?>" /></td>-->
           <!--                                 </tr>-->
           <!--                                 <tr>-->
           <!--                                   <td>City: </td>-->
           <!--                                   <td><input name="city" value="<?php echo (empty($posted['city'])) ? '' : $posted['city']; ?>" /></td>-->
           <!--                                   <td>State: </td>-->
           <!--                                   <td><input name="state" value="<?php echo (empty($posted['state'])) ? '' : $posted['state']; ?>" /></td>-->
           <!--                                 </tr>-->
           <!--                                 <tr>-->
           <!--                                   <td>Country: </td>-->
           <!--                                   <td><input name="country" value="<?php echo (empty($posted['country'])) ? '' : $posted['country']; ?>" /></td>-->
           <!--                                   <td>Zipcode: </td>-->
           <!--                                   <td><input name="zipcode" value="<?php echo (empty($posted['zipcode'])) ? '' : $posted['zipcode']; ?>" /></td>-->
           <!--                                 </tr>-->
           <!--                                 <tr>-->
           <!--                                   <td>UDF1: </td>-->
           <!--                                   <td><input name="udf1" value="<?php echo (empty($posted['udf1'])) ? '' : $posted['udf1']; ?>" /></td>-->
           <!--                                   <td>UDF2: </td>-->
           <!--                                   <td><input name="udf2" value="<?php echo (empty($posted['udf2'])) ? '' : $posted['udf2']; ?>" /></td>-->
           <!--                                 </tr>-->
           <!--                                 <tr>-->
           <!--                                   <td>UDF3: </td>-->
           <!--                                   <td><input name="udf3" value="<?php echo (empty($posted['udf3'])) ? '' : $posted['udf3']; ?>" /></td>-->
           <!--                                   <td>UDF4: </td>-->
           <!--                                   <td><input name="udf4" value="<?php echo (empty($posted['udf4'])) ? '' : $posted['udf4']; ?>" /></td>-->
           <!--                                 </tr>-->
           <!--                                 <tr>-->
           <!--                                   <td>UDF5: </td>-->
           <!--                                   <td><input name="udf5" value="<?php echo (empty($posted['udf5'])) ? '' : $posted['udf5']; ?>" /></td>-->
           <!--                                   <td>PG: </td>-->
           <!--                                   <td><input name="pg" value="<?php echo (empty($posted['pg'])) ? '' : $posted['pg']; ?>" /></td>-->
           <!--                                 </tr>-->
                                            
											<div class="col-12 text-center">
											     <?php if(!$hash) { ?>
												<!--<button type="button" class="btn btn-primary buynow">Submit Now</button>-->
												<button type="submit" class="btn btn-primary">Submit Now</button>
												 <?php } ?>
											</div>
										</form>
									</div>
								</div>
								<div class="col-lg-6 col-md-12 ps-lg-5">
									<div class="sc-title-two sc-border-left sc-border-none appoint-info w-100 mb-xs-0">
										<i class="fas fa-phone-volume bg-dblue"></i>
										<h2 class="mt-2">Sign Up for an Appointment with the Doctor</h2>
										<p></p>
										<h3 class="cl-lgreen mt-4 mb-3">+91 6262373771</h3>
									</div>
								</div>
							</div>
						</div>
					</div>
				</section>


				<section class="call-to p-5 bg-green">
					<div class="container">
						<div class="row align-items-center">
							<div class="col-lg-4 col-md-12">
								<div class="call-contact d-flex align-items-center">
									<i class="fas fa-phone-alt display-6 cl-white"></i>
									<div class="pl-3">
										<h4 class="cl-white">Looking For Consultation?</h4>
										<p class="m-0 cl-white">+91 6262373771</p>
									</div>
								</div>
							</div>
							<div class="col-lg-4 col-md-12">
								<p class="call-to-mid cl-white">Contact us for all questions and thinks those. We will proud to you</p>
							</div>
							<div class="col-lg-4 col-md-12 text-center">
								<!--<a href="contact.html" class="btn btn-white">Get Consultation</a>-->
							</div>
						</div>
					</div>
				</section>


				<?php include 'includes/footer.php';?>


				<form action="#" class="ct-searchForm">
					<div class="inner">
						<div class="container">
							<div class="row justify-content-center">
								<div class="col-sm-8">
									<div class="form-group">
										<input id="cf-search-form" type="text" placeholder="Search ..." required class="form-control" />
										<button type="submit" class="ct-search-btn"><i class="fa fa-search"></i></button>
									</div>
									<div class="form-group">
										<a href="#" class="ct-searchForm-close">
											<i class="fas fa-times"></i>
										</a>
									</div>
								</div>
							</div>
						</div>
					</div>
				</form>


				<div id="back-to-top">
					<a href="#"></a>
				</div>


				<script data-cfasync="false" src="../../cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script src="js/jquery-3.5.1.min.js"></script>
				<script src="js/bootstrap.min.js"></script>
				<script src="js/plugin.js"></script>
				<script src="js/main.js"></script>
				<script src="js/custom-swiper.js"></script>
				<script src="js/custom-nav.js"></script>
				<script type="text/javascript">(function(){window['__CF$cv$params']={r:'6e550bae79244c7d',m:'sLX9xNMNKqQAmDs6llvj.dr1Nit7ERi4UgjMsq17nQ4-1646170769-0-ASrkOO5hLnsLs7Hb8Dq8tShxcgUPb86rdwJwB2K+5wzhuhliHL7ZotdDm2mAcsnzRlL8x5+htYBT3ZCERbpqf8HvMoxL+KMhqinrkQqBuVwPDigqAjzMzfzk5qU0t5cN5Rsdpuos48hczmQPKsKepqjcAlPBErgaXhf4FE6xj+Gl',s:[0x4c5f04923c,0x065c9d4d23],u:'/cdn-cgi/challenge-platform/h/g'}})();</script>

				<script src="https://checkout.razorpay.com/v1/checkout.js"></script>
<script>
$(document).on('click', '.buynow', function(e){
    
    // alert('k');
    // var id1 = $(this).attr('id').split('e').pop();
    // alert(id1)
    
    var doc_id = $('#doctor').val();
    
    var place = $('#place').val();

    var day = $('#day').val();
    
    var time = $('#time').val();
    
    var bookingdate = $('#bookingdate').val();
    

    var patients_id = $('#patients_id').val();
    // alert(userid);
    // alert(name);
    var amt = $('#amt').val();
    
    
    
    var options = {
    "key": "rzp_test_H58MfeAoQxaFUT", // Enter the Key ID generated from the Dashboard
    "amount": amt*100, // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise
    "currency": "INR",
    "name": "AAyuvada",
    "description": "Test Transaction",
    "image": "images/vaidshyam.jpg",
    // "order_id": "order_Ef80WJDPBmAeNt", //Pass the `id` obtained in the previous step
    // "account_id": "acc_Ef7ArAsdU5t0XL",
    "handler": function (response){
        // alert(response.razorpay_payment_id);
        // alert(response.razorpay_order_id);
        // alert(response.razorpay_signature)
      // console.log(response);
        $.ajax({
            type:'post',
            url:'payment_process.php',
            // url:'pays.php',
            data:"payment_id="+response.razorpay_payment_id+"&amt="+amt+"&name="+patients_id+"&docid="+doc_id+"&location="+place+"&day="+day+"&time="+time+"&bookingdate="+bookingdate,
            success:function(result){
                alert("Your Appointment has been booked Sucessfully...!");
                // console.log(result);
                window.location.href="my_history.php";
            }
        });
    }
};
  var rzp1 = new Razorpay(options);

    rzp1.open();
   
});
</script>

<script type="text/javascript">
     $(document).ready(function() {
            $('#place').on('change', function() {
                var stateID = $(this).val();
                $.ajax({  
                    type: 'POST',  
                    url: 'docter_fatch.php', 
                    data: {city: stateID },
                    success: function(response) {
                        // alert(response);
                         $('#doctor').html(response);
        // content.html(response);
    }
});
            });
        });
</script>

<script type="text/javascript">
     $(document).ready(function() {
            $('#doctor').on('change', function() {
                var stateIDs = $(this).val();
                $.ajax({  
                    type: 'POST',  
                    url: 'docter_fatch.php', 
                    data: {place: stateIDs },
                    success: function(response) {
                        // alert(response);
                         $('#availblity').html(response);
        // content.html(response);
    }
});
            });
        });
</script>

<script type="text/javascript">
     $(document).ready(function() {
            $('#place').on('change', function() {
                var stateID = $(this).val();
                var a = parseFloat(100);
                var b = parseFloat(500);
                console.log(a);
                if(stateID == 'Mangolpuri')
                {
                    // alert('dd');
                    $('#am').val(a);
                }else if(stateID == 'Karala'){
                    $('#am').val(b);
                }
                $('#am').trigger('change');
                $.ajax({  
                    type: 'POST',  
                    url: 'Ajax/get_day.php', 
                    data: {city: stateID },
                    success: function(response) {
                        // alert(response);
                         $('#day').html(response);
        // content.html(response);
    }
});
            });
        });
</script>

<script type="text/javascript">
     $(document).ready(function() {
            $('#day').on('change', function() {
                var stateID = $(this).val();
                var place = $('#place').val();
                
                // alert(stateID);
                // alert(place);
                $.ajax({  
                    type: 'POST',  
                    url: 'Ajax/get_day.php', 
                    data: {day: stateID ,place: place },
                    success: function(response) {
                        // alert(response);
                         $('#time').html(response);
        // content.html(response);
    }
});
            });
        });
</script>
			</body>

				<!-- Mirrored from htmldesigntemplates.com/html/ayurvedic/appointment.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 01 Mar 2022 21:39:50 GMT -->
				</html>

MMCT - 2023