Mini Shell

Direktori : /var/www/vhosts/ccp.ac.th/backup_full/httpdocs/smtp/
Upload File :
Current File : /var/www/vhosts/ccp.ac.th/backup_full/httpdocs/smtp/news_details.php

<!doctype html>
<html lang="en">
 <head>
  <?php    
      include 'db/database.php';
  ?>
    <!-- Required meta tags -->
    <meta charset="UTF-8">
    <meta name="description" content="<?php echo $row['news_topic']; ?>">
    <meta name="keywords" content="โรงเรียนเทศบาลวัดชัยชุมพล, <?php echo $row['news_topic']; ?>">
    <meta name="author" content="SMTP <?php echo $row['news_topic']; ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
    <!-- Goole Font -->
    <link href="https://fonts.googleapis.com/css?family=Rubik:400,500,700" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" rel="stylesheet"> 
    <link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700,900" rel="stylesheet">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/assets/bootstrap.min.css">
    <!-- Font awsome CSS -->
    <link rel="stylesheet" href="css/assets/font-awesome.min.css">    
    <link rel="stylesheet" href="css/assets/flaticon.css">
    <link rel="stylesheet" href="css/assets/magnific-popup.css">    
    <!-- owl carousel -->
    <link rel="stylesheet" href="css/assets/owl.carousel.css">
    <link rel="stylesheet" href="css/assets/owl.theme.css">     
    <link rel="stylesheet" href="css/assets/animate.css"> 
    <!-- Slick Carousel -->
    <link rel="stylesheet" href="css/assets/slick.css">  
    <link rel="stylesheet" href="css/assets/preloader.css"/>    

    <!-- Revolution Slider -->
    <link rel="stylesheet" href="css/assets/revolution/layers.css">
    <link rel="stylesheet" href="css/assets/revolution/navigation.css">
    <link rel="stylesheet" href="css/assets/revolution/settings.css">    
    <!-- Mean Menu-->
    <link rel="stylesheet" href="css/assets/meanmenu.css">
    <!-- main style-->
    <link rel="stylesheet" href="css/style.css">    
    <link rel="stylesheet" href="css/responsive.css">
    <link rel="stylesheet" href="css/demo.css">
     
   <?php 
 include 'admin/function_date.php';
  $news_id = $_GET['news_id'];
  $sql = "SELECT * FROM news INNER JOIN  newstype ON news.newstype_id = newstype.newstype_id WHERE news_id = '$news_id' ";
  $result = mysqli_query($link, $sql);
  $row = mysqli_fetch_assoc($result);
  
  //*** นับจำนวนผู้อ่านบทความ ***//
  $sql_counter = "UPDATE news SET counter = counter+1 WHERE news_id = '$news_id'"; 
  $result_counter = mysqli_query($link, $sql_counter);
  //*** นับจำนวนผู้อ่านบทความ ***//
  
 ?> 
 <div id="fb-root"></div>
 <script async defer crossorigin="anonymous" src="https://connect.facebook.net/th_TH/sdk.js#xfbml=1&version=v3.2"></script>   
 <title><?php echo $row['news_topic']; ?></title>  
 <meta name="description" content="<?php echo $row['topic_detail']; ?>">
  <meta property="og:url"           content="https://www.ccp.ac.th/news_details.php?news_id=<?php echo $row['news_id']; ?>" />
  <meta property="og:type"          content="website" />
  <meta property="og:title"         content="<?php echo $row['news_topic']; ?>" />
  <meta property="og:description"   content="<?php echo $row['topic_detail']; ?>" />
  <meta property="og:image"         content="https://www.ccp.ac.th/admin/images/<?php echo $row['news_images']; ?>" />  
</head>   
<body>
<header class="header_inner blog_page">

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

</header> <!-- End Header -->

 <?php
        $date1 = $row['new_date'];
        $show_date1 = displaydate($date1);
        ?>
<section class="event_details_wrapper blog_wrapper">
    <div class="container">  
        <div class="row">        
            <div class="col-12 col-sm-12 col-md-8 col-lg-8">
                <div class="event_intro">
                    <img src="admin/images/<?php echo $row['news_images']; ?>" alt="" class="img-fluid">
                    <div class="post_content">
                        <div class="post_by d-flex justify-content-between">
                            <span  class="date_event"><?php echo $show_date1; ?> </span>
                            <span><?php echo $row['news_topic']; ?></span>
                        </div>
                        <div class="blog_post_content">
                            <?php echo $row['news_detail']; ?>
                        </div>
                    </div>
                    
                    <div class="fb-comments" data-href="https://www.ccp.ac.th/news_details.php?news_id=<?php echo $row['news_id']; ?>" 
                                                   data-numposts="5" data-order-by="reverse_time" >
                  </div> 
                </div>  
          
            </div>            

             <div class="col-12 col-sm-12 col-md-4 col-lg-4 blog_wrapper_right ">
                <div class="blog-right-items">
                    <?php                               
                                $newstype_id = $row['newstype_id'];
                                $sql_type = "SELECT * FROM news INNER JOIN  newstype ON news.newstype_id = newstype.newstype_id WHERE news.newstype_id = $newstype_id ORDER BY news_id DESC LIMIT 4";
                                $result_type = mysqli_query($link, $sql_type);
                                ?>    

                    <div class="recent_post_wrapper popular_courses_post widget_single">
                        <div class="items-title">
                            <h3 class="title"><?php echo  $row['newstype_detail']; ?></h3>
                        </div>
                           <?php
                               while ($row_type = mysqli_fetch_array($result_type)) {
                                     ?>
                                  <?php
                                   $date2 = $row_type['new_date'];
                                   $show_date2 = displaydate($date2);
                                     ?>
                        <div class="single-post">
                            <div class="recent_img">
                                 <a href="news_details.php?news_id=<?php echo $row_type['news_id']; ?>" title=""><img src="admin/images/<?php echo $row_type['news_images']; ?>" alt="" class="img-fluid"></a>
                            </div>
                            <div class="post_title">
                                <a href="news_details.php?news_id=<?php echo $row_type['news_id']; ?>" title=""><?php echo  $row_type['news_topic']; ?></a>
                                <div class="post-date">
                                    <span><?php echo  $show_date2; ?></span>
                                </div>
                            </div>
                        </div>

                   <?php  }  ?>   

                    </div>


                </div>
            </div>


        </div>
    </div> 
</section><!-- End Event Details Wrapper -->



<!-- Footer -->  
<?php    include 'footer.php'; ?>


 
</body>

</html>

Zerion Mini Shell 1.0