<?php

include 'header.php';
//echo "Gireesh";
if (isset($_POST['update_post'])) {
    UpdatePost();
    header("Location: posted-feature.php?action=coupons");
}
$ads_detail = getPostDetails($_REQUEST['id'], 'coupons');
$ads_details = $ads_detail[0];
$ads_images = getPostImagesByID($_REQUEST['id'], 'coupons');
?>
<style>
    .col-lg-7{
        width:60%;
    }
</style>

<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="js/core/app.js" type="text/javascript"></script>


<script src="assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<script src="assets/global/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
 public function show_post_detail()
 {
     $result = "";
     if (isset($_SESSION['user_id'])) {
         $user_id = $_SESSION['user_id'];
     } else {
         $user_id = 0;
     }
     $post_id = $_POST["id"];
     $user_details = getUserNameById($user_id);
     $post_details = getPostDetails($post_id);
     $post_comments = getShowComments($post_id, $user_id);
     $result = "";
     if ($post_details != null) {
         $result .= '<div class="post_wrap" id="' . $post_details[0] . '">';
         $result .= '<div class="post_wrap_author_profile_picture">';
         if ($post_details[6] != null) {
             $result .= '<img src="' . $post_details[6] . '" style="width: 100%;max-height: 30px;" />';
         } else {
             $result .= '<img src="images/profile_pic.jpg" />';
         }
         $result .= '</div>';
         $result .= '<div class="post_details"> ';
         $tz = $_POST['timezone'];
         $tz = new DateTimeZone($tz);
         $date = new DateTime($post_details[3]);
         $date->setTimezone($tz);
         $result .= '<div class="post_author"> ' . $post_details[1] . ' <span class="post_timestamp" id="comment_date"> ' . $this->date_format($date->format('Y-m-d H:i:s'), $tz) . ' ago</span> </div>';
         $result .= '<div class="post_text"> <span style="word-wrap: break-word;">' . $post_details[2] . ' </span></div>';
         $result .= '</div>';
         $result .= '</div> ';
         $result .= ' <div class="comments_wrap" style="width: 100%">';
         $result .= '<span> <span><img src="images/like.png" /></span>';
         $result .= '<span class="post_feedback_like_unlike" id="' . $post_details[0] . '_like_' . $post_details[5] . '"  onclick="post_like(this,' . $user_id . ')">' . getLikeorUnlike($post_details[0], 0, $user_id) . '</span>';
         $result .= ' <span class="post_feedback_count" id="' . $post_details[0] . '_like_count"> ' . $post_details[5] . '</span></span>';
         $result .= '<span><span class="post_feedback_comment" onclick="show_comments(' . $post_details[0] . ',' . $user_id . ')"> <img src="images/comment.png" /> Comment</span>';
         $result .= '<span class="post_feedback_count" id="' . $post_details[0] . '_post_comment_count"> ' . $post_details[4] . '</span></span>';
         $result .= '<div class="comment" id="' . $post_details[0] . '_comment" >';
         $result .= '</div>';
         $result .= ' <div class="comment" id="' . $post_details[0] . '_post_self_comment">';
         if ($user_details[1] != null) {
             $result .= '<div class="comment_author_profile_picture"> <img src="' . $user_details[1] . '" /></div>';
         } else {
             $result .= '<div class="comment_author_profile_picture"> <img src="images/profile_pic.jpg" /></div>';
         }
         $result .= '<div class="comment_text">';
         $result .= '<textarea placeholder="Write a comment..." id="' . $post_details[0] . '_comment_full_text_box" onKeyPress="return new_comment_forpost(this,event,' . $user_id . ')" ></textarea>';
         $result .= '</div></div></div>';
     }
     if ($post_comments != null) {
         foreach ($post_comments as $comment) {
             $result .= '<div class="comment" id="' . $comment[0] . '">';
             $result .= '<div class="comment_author_profile_picture">';
             if ($comment[3] != null) {
                 $result .= '<img src="' . $comment[3] . '"/>';
             } else {
                 $result .= '<img src="images/profile_pic.jpg"/>';
             }
             $result .= '</div>';
             $result .= '<div class="comment_details">';
             $tz = $_POST['timezone'];
             $tz = new DateTimeZone($tz);
             $date = new DateTime($comment[4]);
             $date->setTimezone($tz);
             $result .= '<div class="comment_author" > <span class="post_timestamp" id="comment_date"> ' . $this->date_format($date->format('Y-m-d H:i:s'), $tz) . ' ago</span>';
             $result .= $comment[2];
             $result .= '</div>';
             $result .= '<div class="comment_text"  style= "word-wrap: break-word;">';
             $result .= $comment[1];
             $result .= '</div>';
             $result .= '</div>';
             $result .= '</div>';
         }
     }
     $this->http_response($result, 200);
 }
<?php

include 'header.php';
//echo "Gireesh";
if (isset($_POST['update_post'])) {
    UpdatePost();
    header("Location: posted-feature.php?action=flyers");
}
$ads_detail = getPostDetails($_REQUEST['id'], 'flyers');
$ads_details = $ads_detail[0];
$ads_images = getPostImagesByID($_REQUEST['id'], 'flyers');
?>
 <style>
.col-lg-7{
width:60%;
}
</style>

<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script> 
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="js/core/app.js" type="text/javascript"></script>


<script src="assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<script src="assets/global/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
Example #4
0
<?php

include 'header.php';
if (isset($_POST['update_post'])) {
    UpdatePost();
    header("Location: posted-feature.php?action=jobs");
}
$ads_detail = getPostDetails($_REQUEST['id'], 'jobs');
$ads_details = $ads_detail[0];
$ads_images = getPostImagesByID($_REQUEST['id'], 'jobs');
?>
<style>
    .col-lg-7{
        width:60%;
    }
</style>

<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="js/core/app.js" type="text/javascript"></script>


<script src="assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<script src="assets/global/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<?php

include 'header.php';
//echo "Gireesh";
if (isset($_POST['update_post'])) {
    UpdatePost();
    header("Location: posted-feature.php?action=resumes");
}
$ads_detail = getPostDetails($_REQUEST['id'], 'resumes');
$ads_details = $ads_detail[0];
$ads_images = getPostImagesByID($_REQUEST['id'], 'resumes');
?>
 <style>
.col-lg-7{
width:60%;
}
</style>

<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script> 
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="js/core/app.js" type="text/javascript"></script>


<script src="assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<script src="assets/global/plugins/jquery-ui/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
Example #6
0
<?php

include 'header.php';
//echo "Gireesh";
if (isset($_POST['update_post'])) {
    UpdatePost();
    header("Location: posted-feature.php?action=deals");
}
$ads_detail = getPostDetails($_REQUEST['id'], 'deals');
$ads_details = $ads_detail[0];
//print_R($ads_details);
$ads_images = getPostImagesByID($_REQUEST['id'], 'deals');
?>
<style>
    .col-lg-7{
        width:60%;
    }
</style>

<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="js/core/app.js" type="text/javascript"></script>


<script src="assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<!-- IMPORTANT! Load jquery-ui-1.10.3.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
<?php

require_once '../phpInclude/dbconn.php';
require_once '../phpInclude/AdminClass.php';
$share_id = $_REQUEST['share_id'];
$token = $_REQUEST['token'];
$type = $_REQUEST['type'] ? $_REQUEST['type'] : '';
$notification_id = $_REQUEST['notification_id'] ? $_REQUEST['notification_id'] : '';
$data = array();
if (!empty($token) && !empty($share_id)) {
    $users_id = getUsersId($token);
    if (!empty($users_id)) {
        $post_read = postRead($users_id, $share_id);
        if ($post_read) {
            $post_details = getPostDetails($share_id);
        }
        if (!empty($post_details)) {
            $success = "1";
            $msg = "Following are the details";
            $data = $post_details;
            if ($type) {
                if ($type == 1) {
                    $sql = "UPDATE `likes` SET `is_red`='y' WHERE `id`=:notification_id";
                } elseif ($type == 2) {
                    $sql = "UPDATE `share` SET `is_red`='y' WHERE `id`=:notification_id";
                } elseif ($type == 3) {
                    $sql = "UPDATE `comment` SET `is_red`='y' WHERE `id`=:notification_id";
                } elseif ($type == 4) {
                    $sql = "UPDATE `follow` SET `is_red`='y' WHERE `id`=:notification_id";
                }
                $stmt = $conn->prepare($sql);