Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/iws8/html/hrm/
Upload File :
Current File : /var/www/html/mmishra/iws8/html/hrm/z.php

<?php
include('functions.inc');
require('classes/PHPMailerAutoload.php');
date_default_timezone_set('Asia/Kolkata');

dbConnect("mm");
echo "<table border='1'>";
//$rs = mysql_query("select datediff(expiry,dated) as days,count(id) as no from announcements group by days");
$rs = mysql_query("select count(id) as no,datediff(expiry,dated) as days from announcements group by days");
while ($row = mysql_fetch_row($rs)) {
	echo "<tr><td>".implode($row, '</td><td>')."</td></tr>";
}
echo "</table>";
/*
echo "<table border='1'>
<tr><th>subject</th><th>filename</th><th>dated</th><th>expiry</th><th>days</th><th>counter</th></tr>";
$rs = mysql_query("select * from announcements order by subject,id");
$rs = mysql_query("select datediff(expiry,dated) as days,count(id) from announcements group by days");
while ($o = mysql_fetch_object($rs)) {
	$no++;	

	if ($no == 1) $day1 = $o->dated;
	$day2 = $o->expiry;

	$days = floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));

	echo "<tr><td>$o->subject</td><td>$o->filename</td><td>$o->dated</td><td>$o->expiry</td><td>$days</td><td>$o->counter</td></tr>";
	
	if (strpos($o->filename,'pdf')) {
		$pdfno++;
		$pdfhits += $o->counter;
		$pdfdays += floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));
	}
	if (strpos($o->filename,'doc')) {
		$docno++;
		$dochits += $o->counter;
		$docdays += floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));
	}
	if (strpos($o->filename,'ttp')) {
		$htmno++;
		$htmhits += $o->counter;
		$htmdays += floor((strtotime($o->expiry) - strtotime($o->dated)) / (60*60*24));
	}


	$totalhits += $o->counter;
}
	$totaldays = floor((strtotime($day2) - strtotime($day1)) / (60*60*24));
echo "</table>";

echo "Hits [total: $no/$totalhits in $pdfdays] [pdf: $pdfno/$pdfhits] [doc: $docno/$dochits] [htm: $htmno/$htmhits]";
*/
?>