
PK 
<?php
ob_start();
//error_reporting(E_ALL ^ E_NOTICE);
@session_start();
ini_set('allow_url_include',1);
date_default_timezone_set("Asia/Kolkata");
set_time_limit(600);
ini_set('max_execution_time',600);
include '../admin/includes/settings/constant.php';
//include '../includes/settings/db.php';
require_once '../admin/includes/settings/PDODB.php';
include '../admin/includes/modules/functions.php';
$function = new FUNCTIONS();
if(empty($_SESSION['userId'])){
header("Location: ../index.php");
exit();
}
//print_r($_SESSION['house_no']); exit();
// Connect to MySQL using the below function
$pdodb = PDODB::getInstance();
$notification2 = $function->getNotification($id=$_GET['id'],$status=NULL,$isactive=1,$orderBy='ASC');
//print_r($notification2[0]['name']); //exit;
// Check if ticket exists
if (!empty($_GET['id'])) {
//echo "string"; exit;
$pdodb = PDODB::getInstance();
/*$sql = "UPDATE `notifications` SET status='read' WHERE id='".$_GET['id']."'";
$result = $pdodb->query($sql);*/
$checkquery = "SELECT * FROM `notification_status` WHERE u_id='".$_SESSION['userId']."' AND not_id='".$_GET['id']."'";
$result = $pdodb->query($checkquery);
//echo count($result); exit;
if(count($result)<1){
//echo "vinay"; exit;
$sql2 = "INSERT INTO `notification_status` SET u_id='".$_SESSION['userId']."', not_id='".$_GET['id']."'";
$result2 = $pdodb->query($sql2);
}
PDODB::closeInstance();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>RWA Sectore 40 Noida</title>
<!-- Bootstrap core CSS -->
<link href="../vendor/bootstrap/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="../css/noida40.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="../css/bootstrap-dropdownhover.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
</head>
<body class="body-bg">
<?php include_once '../layout/header.php'; ?>
<header class="user-admin-hdr">
<div class="user-title">
<h1>Notification</h1>
</div>
</header>
<!-- Page Content -->
<div class="container-fluid padding-0">
<!--container-->
<div class="container mt-4">
<div class="row">
<div class="col-lg-12 mb-4">
<div class="row m-0">
<div class="col-lg-3">
<div class="info-box bg-pink">
<a href="dashboard.php">
<div class="content"><i class="fa fa-arrow-left" aria-hidden="true"></i>
Go Back<br>Dashboard
</div>
</a>
</div>
</div>
</div>
</div>
<!--content-->
<div class="col-lg-12">
<h2><?=html_entity_decode($notification2[0]['name']);?></h2>
<p><?=html_entity_decode($notification2[0]['message']);?></p>
</div>
</div>
</div>
<!--end container-->
</div>
<!-- end Page Content -->
<!-- Footer -->
<?php include_once'../layout/footer.php';?>
<!-- End Footer -->
<!-- Bootstrap core JavaScript -->
<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="../js/bootstrap-4-hover-navbar.js"></script>
</body>
</html>


PK 99