
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 '../includes/settings/constant.php';
require_once '../includes/settings/PDODB.php';
include '../includes/modules/functions.php';
$function = new FUNCTIONS();
$ticketdata = $function->getTickets($id=NULL,$uid=NULL,$status='open',$orderBy='DESC');
//print_r($ticketdata[0]); exit;
$date1 = $ticketdata[0]['created'];
$date2 = date("Y-m-d H:i:s");
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
$hour = abs($timestamp2 - $timestamp1)/(60*60);
//echo "Difference between two dates is " . $hour = abs($timestamp2 - $timestamp1)/(60*60) . " hour(s)";
//print_r($hour);
foreach ($ticketdata as $key => $value) {
$date1 = $value['created'];
$date2 = date("Y-m-d H:i:s");
$timestamp1 = strtotime($date1);
$timestamp2 = strtotime($date2);
$hour = abs($timestamp2 - $timestamp1)/(60*60);
if ($hour>24) {
//print_r("ticket id ".$value['id']); exit;
//echo "<pre>";
$user = $function->getUsers($id=$value['uid'],$email=NULL,$password=NULL,$isactive=1);
$user_details = $function->getUserDetails($id=$value['uid'],$isactive=1);
//print_r($user_details); exit;
$username = $user[0]['owner_name'];
$house_no = $user_details[0]['house_no'];
$date = $value['created'];
$title = $value['title'];
$msg = $value['msg'];
$to_email2 = 'indusinfotek.vinay@gmail.com, 007vinaybhardwaj@gmail.com, sandeep1seth@gmail.com';
$subject2 = 'This problem not solved';
$from_email = "rwasector40noida@gmail.com";
$from_fullname = "RWA Sector40";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf-8\r\n";
// Additional headers
// This might look redundant but some services REALLY favor it being there.
$headers .= "To: <$to_email2>\r\n";
$headers .= "From: $from_fullname <$from_email>\r\n";
$message2 = "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\r\n
<head>\r\n
<title>RWA Sector 40</title>\r\n
</head>\r\n
<body>\r\n
<p></p>\r\n
<table cellpadding='0' cellspacing='0' style='width:600px; margin:0px auto; color:#7b7b7c; vertical-align:middle; font-family:Arial, Helvetica, sans-serif; font-size:16px;'>
<tr>
<td> </td>
</tr>
<tr>
<td style='color:#333;'><strong>Hi, Admin</strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td style='color: #00CC66; font-weight:600; font-style: italic; font-size:14px; float:left; margin-left:7px;'>You have received an inquiry from your website. Please review the contact information below.</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0' style='width:600px; margin:0px auto; color:#7b7b7c; vertical-align:top; font-family:Arial, Helvetica, sans-serif; font-size:14px; line-height:22px;'>
<tr>
<td> </td>
</tr>
<tr>
<td style='color:#333;' colspan='3'><strong>User Details</strong></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td width='200px;'>Name</td>
<td width='20px;'>:</td>
<td width='380px;'>".$username."</td>
</tr>
<tr>
<td width='200px;'>House number</td>
<td width='20px;'>:</td>
<td width='380px;'>".$house_no."</td>
</tr>
<tr>
<td width='200px;'>Complain Subject.</td>
<td width='20px;'>:</td>
<td width='380px;'>".$title."</td>
</tr>
<tr>
<td width='200px;'>Message</td>
<td width='20px;'>:</td>
<td width='380px;'><p>".$msg."</p></td>
</tr>
<tr>
<td width='200px;'>Complain Date</td>
<td width='20px;'>:</td>
<td width='380px;'><p>".$date."</p></td>
</tr>
</table>
</body>\r\n
</html>";
//print_r($message2); exit;
if(mail($to_email2, $subject2, $message2, $headers)){
$statusMsg= "Email send successfully";
}else{
$statusMsg= "Not sent";
}
}
}
exit;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RWA | Sector 40</title>
<?php include_once '../layout/style.php'; ?>
<style type="text/css">
.open{
background-color: #1c84c6;
color: #FFFFFF;
}
.resolved{
background-color: #1ab394;
color: #FFFFFF;
}
.closed{
background-color: #ed5565;
color: #FFFFFF;
}
</style>
</head>
<body>
<div id="wrapper">
<?php include_once '../layout/side-bar.php'; ?>
<div id="page-wrapper" class="gray-bg">
<?php include_once '../layout/header.php'; ?>
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-sm-6">
<h2>Help Support</h2>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once '../layout/script.php'; ?>
<script type="text/javascript">
$('#data_5 .input-daterange').datepicker({
keyboardNavigation: false,
forceParse: false,
autoclose: true
});
</script>
<script>
function tossterMsgAlert(msg='Welcome',title='') {
toastr.options = {
closeButton: true,
//debug: false,
newestOnTop: false,
//progressBar: false,
positionClass: 'toast-top-center',
preventDuplicates: true,
//onclick: null,
//showDuration: 300,
//hideDuration: 1000,
timeOut: 2000,
//extendedTimeOut: 1000,
//showEasing: 'swing',
//hideEasing: 'linear',
//showMethod: 'fadeIn',
hideMethod: 'fadeOut'
};
toastr.warning(title,msg);
}
</script>
<!-- Page-Level Scripts -->
<script>
$(document).ready(function(){
$('.dataTables-example').DataTable({
dom: '<"html5buttons"B>lTfgitp',
columnDefs: [
{ type: "num-fmt", symbols:"R$" , targets: 4 }
],
buttons: [
{ extend: 'copy'},
{extend: 'csv'},
/*{extend: 'excel', title: 'ExampleFile'},
{extend: 'pdf', title: 'ExampleFile'},*/
/*{extend: 'print',
customize: function (win){
$(win.document.body).addClass('white-bg');
$(win.document.body).css('font-size', '10px');
$(win.document.body).find('table')
.addClass('compact')
.css('font-size', 'inherit');
}
}*/
]
});
});
</script>
</body>
</html>


PK 99