-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
761 lines (645 loc) · 32.8 KB
/
index.php
1
<?php include "inc/header.php"; ?> <div role="main" class="main"> <!-- START: CAREASOL SLIDER --> <div class="slider-container rev_slider_wrapper" style="height: 670px;"> <div id="revolutionSlider" class="slider rev_slider" data-version="5.4.8" data-plugin-revolution-slider data-plugin-options="{'delay': 9000, 'gridwidth': 1170, 'gridheight': 670, 'disableProgressBar': 'on', 'responsiveLevels': [4096,1200,992,500], 'parallax': { 'type': 'scroll', 'origo': 'enterpoint', 'speed': 1000, 'levels': [2,3,4,5,6,7,8,9,12,50], 'disable_onmobile': 'on' }, 'navigation' : {'arrows': { 'enable': true }, 'bullets': {'enable': true, 'style': 'bullets-style-1', 'h_align': 'center', 'v_align': 'bottom', 'space': 7, 'v_offset': 70, 'h_offset': 0}}}"> <ul> <li data-transition="fade"> <img src="assets/images/slide/5.jpeg" alt="" data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" class="rev-slidebg"> <div class="tp-caption tp-resizeme" data-frames='[{"delay":1000,"speed":2000,"frame":"0","from":"opacity:0;x:100%;y:-100%;","to":"o:1;x:0;y:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-type="image" data-x="right" data-y="top" data-width="['auto']" data-height="['auto']" data-basealign="slide"><img src="img/slides/slide-devices.jpg" alt=""></div> <div class="tp-caption tp-resizeme" data-frames='[{"delay":1500,"speed":2000,"frame":"0","from":"opacity:0;x:-100%;y:-100%;","to":"o:1;x:0;y:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-type="image" data-x="left" data-y="center" data-width="['auto']" data-height="['auto']" data-basealign="slide"><img src="img/slides/slide-laptop.jpg" alt=""></div> <div class="tp-caption tp-resizeme rs-parallaxlevel-7" data-frames='[{"delay":2500,"speed":1500,"frame":"0","from":"opacity:0;x:-50%;y:-50%;","to":"opacity:1;x:0;y:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-type="image" data-x="-500" data-y="-700" data-width="['auto']" data-height="['auto']" data-basealign="slide"><img src="assets/img/slides/slide-parallax-porto-symbol.png" alt=""></div> <div class="tp-caption" data-x="center" data-hoffset="['-150','-150','-150','-240']" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="1000" data-transform_in="x:[-300%];opacity:0;s:500;" data-transform_idle="opacity:0.2;s:500;"><img src="assets/img/slides/slide-title-border.png" alt=""></div> <div class="tp-caption text-color-light font-weight-normal" data-x="center" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="700" data-fontsize="['22','22','22','40']" data-lineheight="['25','25','25','45']" data-transform_in="y:[-50%];opacity:0;s:500;">Discover the Pastoral Charm of Our Bovine Haven</div> <div class="tp-caption d-none d-md-block" data-frames='[{"delay":2400,"speed":500,"frame":"0","from":"opacity:0;x:10%;","to":"opacity:1;x:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-x="center" data-hoffset="['80','80','80','135']" data-y="center" data-voffset="['-33','-33','-33','-55']"><img src="assets/img/slides/slide-blue-line.png" alt=""></div> <div class="tp-caption" data-x="center" data-hoffset="['150','150','150','240']" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="1000" data-transform_in="x:[300%];opacity:0;s:500;" data-transform_idle="opacity:0.2;s:500;"><img src="assets/img/slides/slide-title-border.png" alt=""></div> <div class="tp-caption font-weight-extra-bold text-color-light negative-ls-2" data-frames='[{"delay":1000,"speed":2000,"frame":"0","from":"sX:1.5;opacity:0;fb:20px;","to":"o:1;fb:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-x="center" data-y="center" data-fontsize="['50','50','50','90']" data-lineheight="['55','55','55','95']">Healthy Natural Products</div> <div class="tp-caption font-weight-light" data-frames='[{"from":"opacity:0;","speed":300,"to":"o:1;","delay":100,"split":"chars","splitdelay":0.05,"ease":"Power2.easeInOut"},{"delay":"wait","speed":1000,"to":"y:[100%];","mask":"x:inherit;y:inherit;s:inherit;e:inherit;","ease":"Power2.easeInOut"}]' data-x="center" data-y="center" data-voffset="['70','70','70','90']" data-fontsize="['18','18','18','50']" data-lineheight="['26','26','26','45']" style="color: #fff;">Dairy producers worldwide face similar challenges around animal welfare, <br>farm profitability, food safety and work efficiency. </div> </li> <li class="slide-overlay" data-transition="fade"> <img src="assets/images/slide/4.jpg" alt="" data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" class="rev-slidebg"> <div class="tp-caption" data-x="center" data-hoffset="['-170','-170','-170','-350']" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="1000" data-transform_in="x:[-300%];opacity:0;s:500;" data-transform_idle="opacity:0.2;s:500;"><img src="img/slides/slide-title-border.png" alt=""></div> <div class="tp-caption text-color-light font-weight-normal" data-x="center" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="700" data-fontsize="['16','16','16','40']" data-lineheight="['25','25','25','45']" data-transform_in="y:[-50%];opacity:0;s:500;">WE WORK HARD AND PORTO HAS</div> <div class="tp-caption" data-x="center" data-hoffset="['170','170','170','350']" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="1000" data-transform_in="x:[300%];opacity:0;s:500;" data-transform_idle="opacity:0.2;s:500;"><img src="assets/img/slides/slide-title-border.png" alt=""></div> <div class="tp-caption font-weight-extra-bold text-color-light negative-ls-1" data-frames='[{"delay":1000,"speed":2000,"frame":"0","from":"sX:1.5;opacity:0;fb:20px;","to":"o:1;fb:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-x="center" data-y="center" data-fontsize="['50','50','50','90']" data-lineheight="['55','55','55','95']">100% Natural & Healthy Milk</div> <div class="tp-caption font-weight-light ws-normal text-center" data-frames='[{"from":"opacity:0;","speed":300,"to":"o:1;","delay":2000,"split":"chars","splitdelay":0.05,"ease":"Power2.easeInOut"},{"delay":"wait","speed":1000,"to":"y:[100%];","mask":"x:inherit;y:inherit;s:inherit;e:inherit;","ease":"Power2.easeInOut"}]' data-x="center" data-y="center" data-voffset="['70','70','70','105']" data-width="['530','530','530','1100']" data-fontsize="['18','18','18','40']" data-lineheight="['26','26','26','45']" style="color: #fff;">Dairy producers worldwide face similar challenges around animal<br> welfare, farm profitability, food safety and work efficiency.</div> </li> <li data-transition="fade"> <img src="assets/images/slide/2.jpeg" alt="" data-bgposition="center center" data-bgfit="cover" data-bgrepeat="no-repeat" class="rev-slidebg"> <div class="tp-caption tp-resizeme" data-frames='[{"delay":1000,"speed":2000,"frame":"0","from":"opacity:0;x:100%;y:-100%;","to":"o:1;x:0;y:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-type="image" data-x="right" data-y="top" data-width="['auto']" data-height="['auto']" data-basealign="slide"><img src="img/slides/slide-devices.jpg" alt=""></div> <div class="tp-caption tp-resizeme" data-frames='[{"delay":1500,"speed":2000,"frame":"0","from":"opacity:0;x:-100%;y:-100%;","to":"o:1;x:0;y:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-type="image" data-x="left" data-y="center" data-width="['auto']" data-height="['auto']" data-basealign="slide"><img src="img/slides/slide-laptop.jpg" alt=""></div> <div class="tp-caption tp-resizeme rs-parallaxlevel-7" data-frames='[{"delay":2500,"speed":1500,"frame":"0","from":"opacity:0;x:-50%;y:-50%;","to":"opacity:1;x:0;y:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-type="image" data-x="-500" data-y="-700" data-width="['auto']" data-height="['auto']" data-basealign="slide"><img src="assets/img/slides/slide-parallax-porto-symbol.png" alt=""></div> <div class="tp-caption" data-x="center" data-hoffset="['-150','-150','-150','-240']" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="1000" data-transform_in="x:[-300%];opacity:0;s:500;" data-transform_idle="opacity:0.2;s:500;"><img src="assets/img/slides/slide-title-border.png" alt=""></div> <div class="tp-caption text-color-light font-weight-normal" data-x="center" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="700" data-fontsize="['22','22','22','40']" data-lineheight="['25','25','25','45']" data-transform_in="y:[-50%];opacity:0;s:500;">Discover the Pastoral Charm of Our Bovine Haven</div> <div class="tp-caption d-none d-md-block" data-frames='[{"delay":2400,"speed":500,"frame":"0","from":"opacity:0;x:10%;","to":"opacity:1;x:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-x="center" data-hoffset="['80','80','80','135']" data-y="center" data-voffset="['-33','-33','-33','-55']"><img src="assets/img/slides/slide-blue-line.png" alt=""></div> <div class="tp-caption" data-x="center" data-hoffset="['150','150','150','240']" data-y="center" data-voffset="['-50','-50','-50','-75']" data-start="1000" data-transform_in="x:[300%];opacity:0;s:500;" data-transform_idle="opacity:0.2;s:500;"><img src="assets/img/slides/slide-title-border.png" alt=""></div> <div class="tp-caption font-weight-extra-bold text-color-light negative-ls-2" data-frames='[{"delay":1000,"speed":2000,"frame":"0","from":"sX:1.5;opacity:0;fb:20px;","to":"o:1;fb:0;","ease":"Power3.easeInOut"},{"delay":"wait","speed":300,"frame":"999","to":"opacity:0;fb:0;","ease":"Power3.easeInOut"}]' data-x="center" data-y="center" data-fontsize="['50','50','50','90']" data-lineheight="['55','55','55','95']">Unveiling the Essence of Our Farm</div> <div class="tp-caption font-weight-light" data-frames='[{"from":"opacity:0;","speed":300,"to":"o:1;","delay":100,"split":"chars","splitdelay":0.05,"ease":"Power2.easeInOut"},{"delay":"wait","speed":1000,"to":"y:[100%];","mask":"x:inherit;y:inherit;s:inherit;e:inherit;","ease":"Power2.easeInOut"}]' data-x="center" data-y="center" data-voffset="['70','70','70','90']" data-fontsize="['18','18','18','50']" data-lineheight="['25','25','25','55']" style="color: #fff;">Welcome to our idyllic farm, where the gentle lowing of cattle mingles with the whispering breeze through lush pastures.<br> Immerse yourself in the essence of rural life as you explore the bond between humans, cows, and the land. </div> </li> </ul> </div> </div> <!-- END: CAREASOL SLIDER --> <!-- START: WELCOME PART --> <section> <?php $aboutSql = "SELECT * FROM about WHERE status=1 ORDER BY title ASC"; $aboutQuery = mysqli_query( $db, $aboutSql ); while ($row = mysqli_fetch_assoc($aboutQuery)) { $id = $row['id']; $title = $row['title']; $descrive = $row['descrive']; $year = $row['year']; $total_age = $row['total_age']; $a_image = $row['a_image']; $status = $row['status']; ?> <div class="conatiner py-3"> <div class="row text-center pt-3 d-flex align-items-center"> <div class="col-md-10 mx-md-auto"> <div class="d-flex align-items-center justify-content-center"> <h1 class="year pt-3 px-4">Since <span><?php echo $year; ?></span></h1> <img src="assets/images/icon.png" alt=""> </div> <h1 class="welcome">Welcome to <span><?php echo $title; ?></span></h1> <p class="text-dark font-weight-normal appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="300" style="font-size: 17px;"><?php echo $descrive; ?></p> </div> </div> </div> <?php } ?> </section> <!-- END: WELCOME PART --> <!-- START: SERVICE PART --> <section class="service-part pb-3" id="service"> <div class="container py-3"> <div class="row text-center pt-3"> <div class="col-md-10 mx-md-auto pb-5"> <h1 class="word-rotator slide mb-3 appear-animation service" data-appear-animation="fadeInUpShorter"> <span>What we provide </span> <span class="word-rotator-words"> <b class="is-visible">Pure Meat</b> <b>Fresh Milk</b> <b>Dairy Product</b> <b>The Whole Cow Deal</b> </span> </h1> </div> <div class="col-md-12 py-3"> <div class="row"> <?php $catSql = "SELECT * FROM category WHERE is_parent=1 AND status=1"; $catQuery = mysqli_query( $db, $catSql ); while ($row = mysqli_fetch_assoc($catQuery)) { $cat_id = $row['cat_id']; $cat_name = $row['cat_name']; $cat_desc = $row['cat_desc']; $is_parent = $row['is_parent']; $status = $row['status']; $join_date = $row['join_date']; $cat_image = $row['cat_image']; ?> <div class="col-md-3"> <div class="card-part"> <div class="image-container"> <a href="details.php?do=Manage&did=<?php echo $cat_id; ?>"> <?php if (!empty($cat_image)) { echo '<img src="admin/assets/images/category/' . $cat_image . '" class="rotate-zoom-image">'; } ?></a> </div> <h1 class="cat_head"><a href="details.php?do=Manage&did=<?php echo $cat_id; ?>"><?php echo $cat_name; ?></a></h1> <p class="text-dark font-weight-normal appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="300" style="font-size: 16px; margin: 0;"><a href="details.php?did=<?php echo $cat_id; ?>" style="font-size: 16px; text-decoration: none; color: #000"><?php echo $cat_desc; ?></a></p> </div> </div> <?php } ?> </div> </div> </div> </div> </section> <!-- END: SERVICE PART --> <!-- START: ABOUT PART --> <section class="section section-height-3 bg-color-grey-scale-1 m-0 border-0"> <div class="container"> <div class="row align-items-center justify-content-center"> <div class="col-lg-6 pb-sm-4 pb-lg-0 pr-lg-5 mb-sm-5 mb-lg-0"> <h2 class="welcome mb-2"><strong>Know about our Farm and History</strong></h2> <p class="text-dark font-weight-normal appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="300" style="font-size: 17px;">We have been working in this industry for more than 5 years with trust and honesty. All hands must be on deck if we are to achieve our goal of improving global nutrition.</p> <a href="aboutUs.php" class="btn btn-dark font-weight-semibold btn-px-4 btn-py-2 text-2">LEARN MORE</a> </div> <div class="col-sm-8 col-md-6 col-lg-4 offset-sm-4 offset-md-4 offset-lg-2 mt-sm-5" style="top: 1.7rem;"> <img src="assets/images/work.jpg" class="img-fluid position-absolute d-none d-sm-block appear-animation animated expandIn appear-animation-visible" data-appear-animation="expandIn" style="top: -33%; left: -29%; animation-delay: 100ms;" alt=""> <img src="assets/images/alwi-hafizh-a--s9VRbT1aeg-unsplash.jpg" class="img-fluid position-relative appear-animation mb-2 animated expandIn appear-animation-visible" data-appear-animation="expandIn" data-appear-animation-delay="600" alt="" style="animation-delay: 600ms;"> </div> </div> </div> </section> <!-- END: ABOUT PART --> <!-- START: ANIMATION PART --> <section class="pb-3"> <div class="appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="200"> <div class="home-concept mt-5"> <div class="container"> <div class="row text-center"> <span class="sun"></span> <span class="cloud"></span> <div class="col-lg-4 ml-lg-auto"> <div class="process-image"> <img src="assets/images/guarantee_icon.png" alt="" /> <strong>100% Satisfaction Guarantee</strong> </div> </div> <div class="col-lg-4"> <div class="process-image process-image-on-middle"> <img src="assets/images/shiping_icon1.png" alt="" /> <strong>Free Shipping</strong> </div> </div> <div class="col-lg-4"> <div class="process-image"> <img src="assets/images/discount_icon.png" alt="" /> <strong>Daily Discount</strong> </div> </div> </div> </div> </div> </div> </section> <!-- END: ANIMATION PART --> <!-- START: SHOWCASE PART --> <section class="showcase_part"> <div class="container"> <div class="row text-center text-md-left mt-4"> <?php $markSql = "SELECT * FROM marketing WHERE status=1 ORDER BY title ASC"; $markQuery = mysqli_query( $db, $markSql ); while ($row = mysqli_fetch_assoc($markQuery)) { $m_id = $row['m_id']; $title = $row['title']; $descrive = $row['descrive']; $m_image = $row['m_image']; $status = $row['status']; $join_date = $row['join_date']; ?> <div class="col-md-6 mb-6 mb-md-0 appear-animation animated fadeInLeftShorter appear-animation-visible" data-appear-animation="fadeInLeftShorter" data-appear-animation-delay="200" style="animation-delay: 200ms;"> <div class="row d-flex justify-content-center justify-content-md-start align-items-center"> <div class="col-7"> <?php if (!empty($m_image)) { echo '<img src="admin/assets/images/marketing/' . $m_image . '" style="width: 100%; border-radius: 5px;"; >'; } ?> </div> <div class="col-lg-5"> <h2 class="font-weight-bold text-5 line-height-5 mb-1"><?php echo $title; ?></h2> <p class="text-dark font-weight-normal appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="300" style="font-size: 16px; margin: 0;"><?php echo substr($descrive, 0, 50); ?>...read more</p> </div> </div> </div> <?php } ?> </div> </div> </section> <!-- END: SHOWCASE PART --> <!-- START: FARMER PART --> <section class="py-5"> <div class="conatiner py-3"> <div class="row text-center pt-3 d-flex align-items-center"> <div class="col-md-10 mx-md-auto"> <h1 class="welcome">Meet The <span>Farmers</span></h1> <p class="text-dark font-weight-normal appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="300" style="font-size: 17px;">With long experience in farming and organic food producing, our team of experts<br> proudly offers the best quality products.</p> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-md-12 py-3"> <div class="row"> <?php $farmerSql = "SELECT * FROM farmer WHERE status=1"; $farmerQuery = mysqli_query( $db, $farmerSql ); while ($row = mysqli_fetch_assoc($farmerQuery)) { $farm_id = $row['farm_id']; $farm_name = $row['farm_name']; $farm_phone = $row['farm_phone']; $farm_email = $row['farm_email']; $farm_address = $row['farm_address']; $farm_about = $row['farm_about']; $status = $row['status']; $farm_image = $row['farm_image']; $join_date = $row['join_date']; ?> <div class="col-md-3 text-center"> <div class="card-part"> <div class="image-containers"> <a href="farmers.php?fid=<?php echo $farm_id; ?>"> <?php if (!empty($farm_image)) { echo '<img src="admin/assets/images/farmer/' . $farm_image . '" class="rotate-zoom-images">'; } ?></a> </div> <h1 class="cat_head"><a href="farmers.php?fid=<?php echo $farm_id; ?>"><?php echo $farm_name; ?></a></h1> <p class="text-dark font-weight-normal appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="300" style="font-size: 16px; margin: 0;"><?php echo substr($farm_about, 0, 40); ?>...<a href="farmers.php?fid=<?php echo $farm_id; ?>">read more</a></p> </div> </div> <?php } ?> </div> </div> </div> </div> </section> <!-- END: FARMER PART --> <!-- START: IMAGE SHOWCASE PART --> <section class="image_show py-5"> <div class="conatiner py-3"> <div class="row text-center pt-3 d-flex align-items-center"> <div class="col-md-10 mx-md-auto"> <h1 class="welcomes">Our Gallary</h1> </div> </div> </div> <div class="container"> <div class="row"> <?php $overviewSql = "SELECT * FROM farm_overview WHERE ov_category=1 AND status=1 ORDER BY title ASC"; $overviewQuery = mysqli_query( $db, $overviewSql ); while ($row = mysqli_fetch_assoc($overviewQuery)) { $ov_id = $row['ov_id']; $title = $row['title']; $descrive = $row['descrive']; $ov_category = $row['ov_category']; $ov_image = $row['ov_image']; $status = $row['status']; ?> <div class="col-lg-3 py-3"> <span class="thumb-info thumb-info-no-borders thumb-info-no-borders-rounded thumb-info-lighten thumb-info-bottom-info thumb-info-bottom-info-dark thumb-info-bottom-info-dark-linear thumb-info-centered-icons"> <span class="thumb-info-wrapper"> <?php if (!empty($ov_image)) { echo '<img src="admin/assets/images/overview_img/' . $ov_image . '" style="width: 100%";>'; ?> <span class="thumb-info-title"> <span class="thumb-info-inner line-height-1 galery"><?php echo $title; ?></span> <span class="thumb-info-type galerys"><?php echo substr($descrive, 0, 30); ?>...</span> </span> <?php } ?> </span> </span> </div> <?php } ?> </div> </div> </section> <!-- END: IMAGE SHOWCASE PART --> <!-- START: BLOG PART --> <section class="py-5" id="blog"> <div class="conatiner py-3"> <div class="row text-center pt-3 d-flex align-items-center"> <div class="col-md-10 mx-md-auto"> <h1 class="welcomes">Farm Blog & Insights</h1> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-9"> <div class="row"> <?php $sql = "SELECT * FROM post WHERE status=1 ORDER BY post_id DESC LIMIT 3"; $postData = mysqli_query($db, $sql); while( $row = mysqli_fetch_assoc($postData) ) { $post_id = $row['post_id']; $title = $row['title']; $post_desc = $row['post_desc']; $image = $row['image']; $category_id = $row['category_id']; $author_id = $row['author_id']; $tags = $row['tags']; $status = $row['status']; $post_date = $row['post_date']; ?> <div class="col-md-4 col-lg-4 mb-5 mb-lg-0 appear-animation animated fadeInUpShorter appear-animation-visible" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="200" style="animation-delay: 200ms;"> <div class="card blog_card"> <a href="details.php?dId=<?php echo $post_id; ?>"> <?php if (!empty($image)) { echo '<img src="admin/assets/images/posts/' . $image . '" class="img-fluid img-thumbnail img-thumbnail-no-borders " alt="'. $title .'">'; } ?> </a> <div class="card-body" style="padding: 10px;"> <div class="d-flex align-items-center justify-content-between"> <div class="post-date" style="margin-top: -10px; font-size: 10px; background: antiquewhite; padding: 3px; color: #000;"> <!-- <span class="day">10</span> --> <span class="month"><?php echo $post_date; ?></span> </div> <div style="font-size: 11px;text-align: right;color: #000;text-decoration: none;"><i class="far fa-user"></i><a href="" style="color: #000; text-decoration: none;"> <?php $readUser_Sql = "SELECT * FROM users WHERE user_id='$author_id'"; $readUser_Quary = mysqli_query($db, $readUser_Sql); while( $row = mysqli_fetch_assoc($readUser_Quary) ){ $auth_id = $row['user_id']; $auth_name = $row['user_name']; echo $auth_name; } ?> </a> </div> </div> <h4 class="card-title mb-1 font-weight-bold" style="font-size: 22px;padding: 7px 0px;text-align: left;"><a href="blog_details.php?dId=<?php echo $post_id; ?>" style="color: #000; text-decoration: none;"><?php echo $title; ?></a></h4> <p class="card-text"><?php echo substr($post_desc, 0, 50) ?>... <a href="blog_details.php?dId=<?php echo $post_id; ?>">Read More</a></p> <div class="d-flex align-items-center justify-content-between"> <div style="font-size: 13px;color: #000; text-decoration: none;"><i class="far fa-comments"></i> <a href="#">0</a></div> <div style="font-size: 13px; color: #000;"><i class="far fa-folder"></i> <a href="" style="font-size: 13px; color: #000; text-decoration: none;"> <?php $readCat_Sql = "SELECT * FROM category WHERE cat_id='$category_id'"; $readCat_Quary = mysqli_query($db, $readCat_Sql); while( $row = mysqli_fetch_assoc($readCat_Quary) ){ $cc_id = $row['cat_id']; $cc_name = $row['cat_name']; ?> <a href="details.php?do=Manage&did=<?php echo $cc_id; ?>"><?php echo $cc_name; ?></a> <?php } ?> </a> </div> </div> </div> </div> </div> <?php } ?> </div> </div> <div class="col-lg-3"> <?php include"inc/sidebar.php"; ?> </div> </div> </div> </section> <!-- END: BLOG PART --> <!-- START: CONTACT FORM --> <section class="contact-form py-5" id="contact"> <div class="container"> <div class="row d-flex align-items-center"> <div class="col-lg-6"> <div> <!-- for farm name --> <?php $aboutSql = "SELECT * FROM about WHERE status=1 ORDER BY title ASC"; $aboutQuery = mysqli_query( $db, $aboutSql ); while ($row = mysqli_fetch_assoc($aboutQuery)) { $title = $row['title']; $descrive = $row['descrive']; ?> <h1 class="welcome">Contact Our <span><?php echo $title; ?></span></h1> <p class="text-dark font-weight-normal appear-animation" data-appear-animation="fadeInUpShorter" data-appear-animation-delay="300" style="font-size: 16px; margin: 0;"><?php echo substr($descrive, 0, 250); ?></p> <?php } ?> <!-- for farm name --> </div> <div class="d-flex py-5" style="justify-content: space-evenly; align-items: center; padding: 71px;"> <div class="phone"> <img src="assets/images/phone-icon.png" alt=""> </div> <div> <h4>Or Call Us Now</h4> <?php $userSql = "SELECT * FROM users WHERE role=1 AND status=1 ORDER BY user_name ASC"; $userQuery = mysqli_query( $db, $userSql ); while ($row = mysqli_fetch_assoc($userQuery)) { $user_phone = $row['user_phone']; ?> <h1 style="font-family: 'Cormorant Garamond', serif; "><a href="tel:+<?php echo $user_phone; ?>" style="color: #75B16C; font-weight: 600; font-size: 57px; text-decoration:none;"><?php echo $user_phone; ?></a></h1> <?php } ?> </div> </div> </div> <!-- for form --> <div class="col-lg-6"> <div class="contact_form" style="box-shadow: 1px 10px 15px #ccc; border-top: 4px solid #08c; border-radius: 5px; color: #000; background: #F7F7F7; font-size: 16px; padding: 34px;"> <?php if(isset($_SESSION['msg'])) { $message = $_SESSION['msg']; unset($_SESSION['msg']); ?> <div class="alert alert-info text-center" role="alert"> <?php echo $message; ?> </div> <?php } ?> <form action="" method="POST" enctype="multipart/form-data"> <div class="form-group"> <label for="subject">Subject of the Message</label> <input type="text" name="title" class="form-control" id="subject" aria-describedby="subject" placeholder="subject.." required autocomplete="off"> </div> <div class="form-group"> <label for="message">Message</label> <textarea name="message" class="form-control" id="message.." rows="5" placeholder="message" required autocomplete="off"></textarea> </div> <?php if (empty($_SESSION['user_id'])) { ?> <a href="login.php">Login to reserve your service</a> <?php } else { ?> <input type="hidden" name="status" value="1"> <input type="hidden" name="useremail" value="<?php echo $_SESSION['email']; ?>"> <input type="hidden" name="userphone" value="<?php echo $_SESSION['phone']; ?>"> <input type="submit" name="addUser" class="btn btn-primary btn-lg btn-block"> <?php } ?> </form> <?php if (isset($_POST['addUser'])) { $title = mysqli_real_escape_string($db, $_POST['title']); $message = mysqli_real_escape_string($db, $_POST['message']); $status = mysqli_real_escape_string($db, $_POST['status']); $useremail = mysqli_real_escape_string($db, $_POST['useremail']); $userphone = mysqli_real_escape_string($db, $_POST['userphone']); $sql = "INSERT INTO comments ( user_id, user_number, subject, comments, status, cmt_date ) VALUES('$useremail', '$userphone', '$title', '$message', '$status', now())"; $query = mysqli_query( $db, $sql ); if ($query) { $_SESSION['msg'] = "We Received your message. After of some times letter we will call & email you. Thank you for with us."; header("Location: index.php"); } else { die("Mysql Error." . mysqli_error($db)); } } ?> </div> </div> <!-- for form --> </div> </div> </section> <!-- END: CONTACT FORM --> <!-- whats app linking part --> <div id="myDiv" class="py-5"></div> <!-- whats app linking part --> </div> <?php include "inc/footer.php"; ?>