Viewing file: index_fa.php (28.29 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include "admin/conn.php";
// site fetch settings
$settings = mysqli_query($con,"SELECT * FROM settings");
$setting = mysqli_fetch_array($settings);
//fetch testimonial setting
$testi = mysqli_query($con,"SELECT * FROM testimonials");
// aboutus fetch settings
$resultt = mysqli_query($con,"SELECT * FROM about");
$roww = mysqli_fetch_array($resultt);
// Blog fetch settings
$blog = mysqli_query($con,"SELECT * FROM blog");
$blogg = mysqli_fetch_array($blog);
// service fetch settings
$services_result = mysqli_query($con, "SELECT * FROM service");
// achievement fetch setting
$achi_result = mysqli_query($con, "SELECT * FROM achivement");
$achi_row = mysqli_fetch_array ($achi_result);
// Department fetch settings
$depart = mysqli_query($con,"SELECT * FROM department");
$query = "SELECT * FROM department";
$result = mysqli_query($con, $query);
$departments = array();
if ($result) {
while ($row = mysqli_fetch_assoc($result)) {
$department = array(
'id' => $row['id'],
'd_name_fa' => $row['d_name_fa']
);
$departments[] = $department;
}
mysqli_free_result($result);
}
$query1 = "SELECT * FROM schedule";
$result1 = mysqli_query($con, $query1);
$doctor1 = array();
if ($result1) {
while ($row1 = mysqli_fetch_assoc($result1)) {
$doctor = array(
'id' => $row1['id'],
'd_name' => $row1['d_name'],
'date_start_fa' => $row1['date_start_fa'],
'date_end_fa' => $row1['date_end_fa'],
'status' => $row1['status'] // Add the 'status' field
);
$doctor1[] = $doctor;
}
mysqli_free_result($result1);
}
mysqli_close($con);
?>
<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="Site keywords here">
<meta name="description" content="#">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title> <?php echo $setting['site_name_fa']; ?></title>
<link rel="icon" href="assets/img/favicon.png">
<link
href="https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;0,900;1,500;1,700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/cube-portfolio.min.css">
<link rel="stylesheet" href="assets/css/owl.carousel.min.css">
<link rel="stylesheet" href="assets/css/slicknav.min.css">
<link rel="stylesheet" href="assets/css/maginific-popup.min.css">
<link rel="stylesheet" href="assets/css/animate.min.css">
<link rel="stylesheet" href="assets/css/nice-select.css">
<link rel="stylesheet" href="assets/css/datepicker.css">
<link rel="stylesheet" href="assets/css/fontawesome.min.css">
<link rel="stylesheet" href="assets/css/icofont.css">
<link rel="stylesheet" href="assets/css/default.css">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/responsive.css">
<link rel="stylesheet" href="assets/css/custom-css.css">
<style>
.single-slider {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.hero-title {
font-size: 24px;
}
.hero-heading {
font-size: 36px;
}
/* Media query for mobile screens */
@media (max-width: 768px) {
.single-slider {
background-size: contain;
}
.hero-area {
width: 100%;
height: 300px;
}
.single-slider{
width: 100%;
height: 300px;
}
.hero-title {
font-size: 14px;
}
.hero-heading {
font-size: 18px;
}
}
</style>
</head>
<body>
<?php include('header_fa.php') ?>
<section class="hero-area mt-0">
<div class="hero-slider owl-carousel owl-theme">
<div class="single-slider" style="background-image:url('admin/images/slider/<?php echo $setting['s1']; ?>')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-8 col-12" style="text-align: right;">
<div class="hero-content">
<span class="hero-title">شفاخانه معالجوی کاتب </span>
<h1 class="hero-heading">کاتب, کانون تخصص و درمان</h1>
<div class="hero-button">
<a href="appoinment_fa" class="theme-btn">وقت ملاقات</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="single-slider" style="background-image:url('admin/images/slider/<?php echo $setting['s2']; ?>')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-8 col-12" style="text-align: right;">
<div class="hero-content">
<span class="hero-title">شفاخانه معالجوی کاتب</span>
<h1 class="hero-heading">کاتب, کانون تخصص و درمان</h1>
<div class="hero-button"style="text-align: right;">
<a href="appoinment_fa.html" class="theme-btn">وقت ملاقات</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="features-area">
<div class="container">
<div class="row">
<div class="col-12 wow zoomIn" data-wow-delay="0.1s">
<div class="feature-s-title">
<h3>!چرا شفاخانه معالجوی کاتب بهترین است</h3>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-3 col-md-6 col-12 wow fadeInLeft" data-wow-delay="0.3s">
<div class="single-features" style="width: 100%; height: 90%;">
<div class="feature-icon">
<i class="far fa-user-headset"></i>
</div>
<div class="feature-content">
<h5>پشتیبانی 24/7</h5>
<p>شفاخانه معالجوی کاتب همیشه برای پشتیبانی از مریضان باز است.</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-12 wow fadeInUp" data-wow-delay="0.5s">
<div class="single-features" style="width: 100%; height: 90%;">
<div class="feature-icon">
<i class="far fa-user-md"></i>
</div>
<div class="feature-content">
<h5>داکتران متخصص و با تجربه</h5>
<p>داکتران متخصص و با تجربه خدمات معالجوی برتری را ارائه میدهند.</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-12 wow fadeInUp" data-wow-delay="0.5s">
<div class="single-features" style="width: 100%; height: 90%;">
<div class="feature-icon">
<i class="far fa-stethoscope"></i>
</div>
<div class="feature-content">
<h5>گرفتن نوبت داکتر</h5>
<p>با استفاده از سرویس تعیین وقت ما، به راحتی وقت ملاقات خود را برنامهریزی کنید.</p>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-12 wow fadeInRight" data-wow-delay="0.3s">
<div class="single-features" style="width: 100%; height: 90%;">
<div class="feature-icon">
<i class="far fa-ambulance"></i>
</div>
<div class="feature-content">
<h5>کمک اضطراری</h5>
<p>کمک فوری: هماکنون برای کمک تماس بگیرید</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- About Us sectios -->
<section class="about-area"dir="rtl" >
<div class="container">
<div class="row">
<div class="col-lg-6 col-12 wow fadeInLeft" data-wow-delay="0.1s">
<div class="about-image-content">
<div class="about-img">
<img src="admin/images/about/<?php echo $roww['img']; ?>" alt="about image">
</div>
</div>
</div>
<div class="col-lg-6 col-12 wow fadeInRight" data-wow-delay="0.2s">
<div class="about-content">
<div class="about-c-title" dir="rtl">
<span>درباره ما</span>
<h3><?php echo $roww['title_fa']; ?></h3>
</div>
<p style="text-align: justify;">
<?php echo $roww['descrip_fa']; ?>
</p>
<div class="about-content-list">
<div class="row">
<div class="col-lg-9 col-md-9 col-12">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Achievement area -->
<!-- Service Area -->
<section class="service-area">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 col-12">
<div class="section-title">
<span>خدمات ما</span>
<h3>آنچه ما ارائه میدهیم</h3>
<p>خدمات معالجوی جامع برای همه</p>
</div>
</div>
</div>
<?php
$count = 0;
while($service_row=mysqli_fetch_array($services_result)){
if ($count % 4 == 0) {
echo '<div class="row">';
}
?>
<div class="col-3">
<a href="service-details_fa?id=<?php echo $service_row['id']; ?>">
<div class="department-single">
<img style="width: 40%; border-radius: 40%;" src="admin/images/service/<?php echo $service_row["ser_icon"]; ?>" alt="">
<h6><?php echo $service_row["ser_title_fa"]; ?></h6>
</div>
</a>
</div>
<?php
if ($count % 4 == 3) {
echo '</div>';
}
$count++;
}
if ($count % 4 != 0) {
echo '</div>';
}
?>
</div>
</div>
</div>
</div>
</section>
<!-- Department Section-->
<section class="department-area">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 col-12">
<div class="section-title">
<span>دیپارتمت ها</span>
<h3> دیپارتمت های شفاخانه کاتب</h3>
<p>کاتب, کانون تخصص و درمان</p>
</div>
</div>
</div>
<div class="department-details-main">
<?php
$count = 0;
while($depa=mysqli_fetch_array($depart)){
if ($count % 4 == 0) {
echo '<div class="row">';
}
?>
<div class="col-3">
<a href="department-single_fa?id=<?php echo $depa['id']; ?>">
<div class="department-single">
<img style="width: 40%; border-radius: 40%;" src="admin/images/department/<?php echo $depa["img"]; ?>" alt="">
<h6><?php echo $depa['d_name_fa'] ?></h6>
</div>
</a>
</div>
<?php
if ($count % 4 == 3) {
echo '</div>'; // Close the row after every 4 departments
}
$count++;
}
// If the number of departments is not a multiple of 4, close the last row
if ($count % 4 != 0) {
echo '</div>';
}
?>
</div>
</section>
<!-- Blog section -->
<?php
include('admin/conn.php');
$blogsPerPage = 3;
if (isset($_GET['page'])) {
$currentPage = $_GET['page'];
} else {
$currentPage = 1;
}
$offset = ($currentPage - 1) * $blogsPerPage;
$blogQuery = "SELECT * FROM blog ORDER BY id DESC LIMIT $blogsPerPage OFFSET $offset";
$blogResult = mysqli_query($con, $blogQuery);
?>
<section class="blog-area blog-archive-area">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 col-12">
<div class="section-title">
<span>آموزش ها</span>
<h3>آموزش ها</h3>
<p>به معلومات خود بیافزایید </p>
</div>
</div>
</div>
<div class="row">
<?php while ($roww = mysqli_fetch_array($blogResult)) { ?>
<div class="col-lg-4 col-md-6 col-12 wow fadeInLeft" data-wow-delay="0.2s">
<div class="single-blog">
<div class="s-blog-head">
<div class="blog-image">
<img class="blog-image" src="admin/images/blog/<?php echo $roww['img']; ?>" alt="">
<style>
.blog-image img {
width: 500px;
height: 550px;
object-fit: cover;
border-radius: 15px;
}
</style>
</div>
<div class="top-meta">
<span><?php echo $roww['date']; ?></span>
</div>
</div>
<div class="single-blog-content" dir="rtl">
<div class="single-blog-title">
<h3><a href="training-details_fa?id=<?php echo $roww['id']; ?>"><?php echo $roww['title_fa']; ?> </a></h3>
<p>
<?php
$ddesc = $roww['descrip_fa'];
echo $dec = mb_substr($ddesc, 0, 35, 'UTF-8');
?>
</p>
</div>
<div class="blog-author">
<div class="b-author-left"></div>
<div class="b-author-content"></div>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
<?php
// Query to retrieve the total number of blogs
$totalBlogsQuery = "SELECT COUNT(*) AS total FROM blog";
$totalBlogsResult = mysqli_query($con, $totalBlogsQuery);
$totalBlogs = mysqli_fetch_assoc($totalBlogsResult)['total'];
// Calculate the total number of pages
$totalPages = ceil($totalBlogs / $blogsPerPage);
?>
<div class="row">
<div class="col-12">
<div class="pagination-main">
<ul class="pagination">
<?php if ($currentPage > 1) { ?>
<li class="prev"><a href="index?page=<?php echo ($currentPage - 1); ?>"><i class="far fa-long-arrow-left"></i></a></li>
<?php } ?>
<?php for ($i = 1; $i <= $totalPages; $i++) { ?>
<li <?php if ($currentPage == $i) echo 'class="active"'; ?>><a href="index?page=<?php echo $i; ?>"><?php echo $i; ?></a></li>
<?php } ?>
<?php if ($currentPage < $totalPages) { ?>
<li class="next"><a href="index?page=<?php echo ($currentPage + 1); ?>"><i class="far fa-long-arrow-right"></i></a></li>
<?php } ?>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- Achievement area -->
<section class="funfact-area" style="background-image: url('assets/img/achiv.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 col-12">
<div class="section-title funfact-s-title">
<span>دست آورد</span>
<h3>دست آورد های شفاخانه معالجوی کاتب</h3>
<p></p>
</div>
</div>
</div>
<div class="row">
<div class="row row-cols-1 row-cols-md-4 g-4 m-2" style="padding-bottom: 20px;">
<?php
include('admin/conn.php');
$result = mysqli_query($con,"SELECT * FROM acheivement_details ORDER BY ach_id DESC LIMIT 4");
while( $row = mysqli_fetch_array($result)){
?>
<div class="col">
<div class="card">
<img src="admin/images/acheivement/<?php echo $row['achi_img']; ?>" class="card-img-top" alt="...">
<div class="card-body" style="height: 400px;" dir="rtl">
<h5 class="card-title"><?php echo $row['achi_title_fa'] ?></h5>
<p class="card-text"><?php echo $row['achi_descrip_fa'] ?></p>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</section>
<!-- Testimonials section -->
<section class="testimonial-area" style="background-image: url('assets/img/3.png');">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 col-12">
<div class="section-title testimonial-s-title">
<span>نظرات برتر</span>
<h3>آنچه مردم میگویند?</h3>
<p>اولیت ما, رضایت شماست</p>
</div>
</div>
</div>
<div class="row">
<div class="col-12 wow fadeInUp" data-wow-delay="0.2s">
<div class="testimonial-slider owl-carousel owl-theme">
<?php
while($testii=mysqli_fetch_array($testi)){
?>
<div class="single-testimonial">
<div class="testimonial-content">
<div class="testimonial-t-content">
<ul class="t-ratting">
<li><i class="fas fa-star"></i></li>
<li><i class="fas fa-star"></i></li>
<li><i class="fas fa-star"></i></li>
<li><i class="fas fa-star"></i></li>
<li><i class="fas fa-star"></i></li>
</ul>
<div class="t-right-icon">
<i class="far fa-quote-right"></i>
</div>
</div>
<p><?php echo $testii['descrip_fa'] ?></p>
<div class="testimonial-b-content">
<div class="client-image">
<img src="admin/images/testimonial/<?php echo $testii['img']; ?>" alt="">
</div>
<div class="client-title">
<h5><?php echo $testii["title_fa"]; ?></h5>
<span><?php echo $testii['designation_fa'] ?></span>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Appointment Section -->
<section class="appoinment-area" style="background-image:url('assets/img/4.png')">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 col-md-10 offset-md-1 col-12 wow fadeInUp" data-wow-delay="0.2s">
<form action="appo" method="POST" dir="rtl">
<div class="appoinment-inner">
<div class="appoinment-title">
<h3>گرفتن وقت ملاقات</h3>
<p>با استفاده از سرویس رزرو آسان ما میتوانید وقت ملاقات خود را زمانبندی کنید</p>
</div>
<div class="row">
<div class="col-lg-6 col-12">
<div class="form-group">
<input type="text" id="name" name="name" placeholder="نام" required="required">
</div>
</div>
<div class="col-lg-6 col-12">
<div class="form-group">
<input type="email" id="email" name="email" placeholder="ایمیل" required="required">
</div>
</div>
<div class="col-lg-6 col-12">
<div class="form-group">
<input type="text" id="phone" name="phone" placeholder="تلفن" required="required">
</div>
</div>
<div class="col-lg-6 col-12">
<div class="form-group">
<select name="department">
<option value="" selected disabled>انتخاب بخش</option>
<?php
foreach ($departments as $department) {
$departmentId = $department['id'];
$departmentName = $department['d_name_fa'];
echo '<option value="' . $departmentName . '">' . $departmentName . '</option>';
}
?>
</select>
</div>
</div>
<div class="col-lg-6 col-12">
<div class="form-group">
<select name="doctor_name" id="doctor_name">
<option value="" selected disabled>انتخاب داکتر</option>
<?php
foreach ($doctor1 as $doctor) {
if ($doctor['status'] !== 'not-available') {
echo '<option value="' . $doctor['d_name'] . '">' . $doctor['d_name'] . '</option>';
}
}
?>
</select>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function() {
$('#doctor_name').on('change', function() {
var doctorName = $(this).val();
var from_date = '';
var to_date = '';
<?php foreach ($doctor1 as $doctor) { ?>
if ('<?php echo $doctor['d_name']; ?>' === doctorName) {
from_date = '<?php echo $doctor['date_start_fa']; ?>';
to_date = '<?php echo $doctor['date_end_fa']; ?>';
}
<?php } ?>
var current_date = new Date(from_date);
var end_date = new Date(to_date);
var dropdownHtml = '<select name="date">';
while (current_date <= end_date) {
var formatted_date = current_date.toLocaleDateString('en-GB', { day: 'numeric', month: 'numeric', year: 'numeric' });
dropdownHtml += '<option value="' + formatted_date + '">' + formatted_date + '</option>';
current_date.setDate(current_date.getDate() + 1);
}
dropdownHtml += '</select>';
$('#availableDates').html(dropdownHtml);
});
});
</script>
<div class="col-lg-6 col-12">
<div class="form-group">
<label for="date">انتخاب تاریخ</label>
<div id="availableDates">
</div>
</div>
</div>
<div class="col-lg-6 col-12">
<div class="form-group">
<input type="time" id="time" name="time" placeholder="زمان ترجیحی" id="datepicker">
</div>
</div>
<div class="col-12">
<div class="form-group">
<textarea name="appo_message" id="appo_message" placeholder="پیام خود را در اینجا بنویسید..."></textarea>
</div>
</div>
<div class="col-12">
<div class="contact-btn">
<input type="submit" name="submit" value="ثبت">
</div>
</div>
<input type="hidden" name="appo_fa" value="fa">
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<!-- Partner Section-->
<div class="partner-area">
<div class="container">
<div class="row">
<div class="section-title">
<span>همکاران</span>
<h3>همکاران ما</h3>
</div>
<div class="col-12">
<div class="partner-slider owl-carousel owl-theme">
<div class="single-partner">
<a href="#"><img style="height: 100px;" src="assets/img/partner/2.jpg" alt="#"></a>
</div>
<div class="single-partner">
<a href="#"><img style="height: 100px;" src="assets/img/partner/3.jpg" alt="#"></a>
</div>
<div class="single-partner">
<a href="#"><img style="height: 100px;" src="assets/img/partner/4.jpg" alt="#"></a>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Footer Section -->
<?php include("footer_fa.php") ?>
<script data-cfasync="false" src="../cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>
<script src="assets/js/jquery-3.6.0.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/bootstrap-datepicker.js"></script>
<script src="assets/js/modernizer.min.js"></script>
<script src="assets/js/magnific-popup.min.js"></script>
<script src="assets/js/waypoints.min.js"></script>
<script src="assets/js/jquery.counterup.min.js"></script>
<script src="assets/js/owl.carousel.min.js"></script>
<script src="assets/js/cube-portfolio.min.js"></script>
<script src="assets/js/nice-select.min.js"></script>
<script src="assets/js/wow.min.js"></script>
<script src="assets/js/jquery.slicknav.min.js"></script>
<script src="assets/js/steller.min.js"></script>
<script src="assets/js/easing.min.js"></script>
<script src="assets/js/jquery.scrollUp.min.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>
|