booking/tretments.php

93 lines
3.2 KiB
PHP
Executable File

<?php
require_once('fixed/config/go_con.php');
access(20);
?>
<!DOCTYPE html>
<html lang="en" dir="rtl">
<?php require_once('fixed/head/go.php'); ?>
<body class="rtl">
<?php require_once('fixed/loader/go.php'); ?>
<!-- page-wrapper Start-->
<div class="page-wrapper" id="pageWrapper">
<?php require_once('fixed/header/go.php'); ?>
<!-- Page Body Start-->
<div class="page-body-wrapper">
<?php require_once('fixed/sidebar/go.php'); ?>
<div class="page-body">
<!-- Container-fluid starts-->
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12">
<h1 class="text-center">
ادارة العملاء
</h1>
<hr class="hrline">
</div>
<h6 class="mt-0 header-title">البحث</h6>
<div class="form-group row">
<div class="col-8 col-sm-6 col-lg-3 p-r-0">
<label for="" class="col-form-label text-right">رقم الجوال</label>
<input id="number" name="tretment_number" class="form-control clickfun1" type="number" value="" required>
</div>
<div class="col-4 col-sm-6 col-lg-1 p-l-0">
<label style="visibility: hidden;" for="" class="col-form-label text-right">..</label>
<div class="form-control" style="background-color: #086367; color:white; text-align:center; cursor: pointer;" id="search_tretment">بحث</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="get_data" class="container-fluid">
</div>
</div>
<?php require_once('fixed/footer/go.php'); ?>
</div>
</div>
<div id="get_data2">
</div>
<?php require_once('fixed/js/go.php'); ?>
<script>
$(function() {
$("#search_tretment").click(function() {
search_tretment();
});
});
$('.clickfun').keypress(function (e) {
var key = e.which;
if(key == 13) {
search_tretment();
}
});
click = 0;
function search_tretment() {
let number = $("#number").val();
if (number.length !== 9) {
swalfun('حدث خطأ', 'رقم الجوال يجب أن يتكون من 9 أرقام وبدون 0 في البداية', 'error');
return false;
}
if (click == 0) {
click++
$.post("work/order/ajax/tretments_ajax.php", {
number
}, function(get_data) {
$("#get_data").html(get_data);
})
} else {
swalfun("يرجى الانتظار", "تم بالفعل الضعط علية", "warning");
}
}
</script>
</body>
</html>