<?php
// ini_set('display_errors', 1);
require("dbconnect_mysqli.php");
require("functions.php");

if (!function_exists('array_column')) {
    function array_column($array, $column, $index_key = null) {
        $toret = array();
        foreach ($array as $key => $value) {
            if ($index_key === null){
                $toret[] = $value[$column];
            }else{
                $toret[$value[$index_key]] = $value[$column];
            }
        }
        return $toret;
    }
}

if (!function_exists('secondsToTime')) {
	function secondsToTime($seconds_time = 0){
		if(is_numeric($seconds_time) && $seconds_time > 0){
			$seconds_time = (int)$seconds_time;
			

			$remainder_m = $seconds_time % 3600;
			$hours = ($seconds_time - $remainder_m) / 3600;

			$remainder_s = $remainder_m % 60;
			$minutes = ($remainder_m - $remainder_s) / 60;

			$seconds = $remainder_s;

			$hours = str_pad($hours, 2, "0", STR_PAD_LEFT );
			$minutes = str_pad($minutes, 2, "0", STR_PAD_LEFT );
			$seconds = str_pad($seconds, 2, "0", STR_PAD_LEFT );



			// $hours = floor($seconds_time / 3600);
			// $hours = str_pad($hours, 2, "0");
			// $minutes = floor(($seconds_time - $hours * 3600) / 60);
			// $minutes = str_pad($minutes, 2, "0");
			// $seconds = floor($seconds_time - ($hours * 3600) - ($minutes * 60));
			// $seconds = str_pad($seconds, 2, "0");
			return "$hours:$minutes:$seconds";
		}else{
			return "00:00:00";
		}
		
	}
}


$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
$QUERY_STRING = getenv("QUERY_STRING");

if ($force_logout)
{
	if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) )
	{
		Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
		Header("HTTP/1.0 401 Unauthorized");
	}
	echo "You have now logged out. Thank you\n<BR>To log back in, <a href=\"$PHP_SELF\">click here</a>";
	exit;
}

$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");

$user_auth=0;
$auth=0;
$reports_auth=0;
$qc_auth=0;
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'QC',1);

if ($auth_message == 'GOOD')
{
	$user_auth=1;
}

if ($user_auth > 0)
{
	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7;";
	if ($DB) {echo "|$stmt|\n";}
	$rslt=mysql_to_mysqli($stmt, $link);
	$row=mysqli_fetch_row($rslt);
	$auth=$row[0];

	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports > 0;";
	if ($DB) {echo "|$stmt|\n";}
	$rslt=mysql_to_mysqli($stmt, $link);
	$row=mysqli_fetch_row($rslt);
	$reports_auth=$row[0];

	$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 1 and qc_enabled > 0;";
	if ($DB) {echo "|$stmt|\n";}
	$rslt=mysql_to_mysqli($stmt, $link);
	$row=mysqli_fetch_row($rslt);
	$qc_auth=$row[0];

	$reports_only_user=0;
	$qc_only_user=0;
	if ( ($reports_auth > 0) and ($auth < 1) )
	{
		$ADD=999999;
		$reports_only_user=1;
	}
	if ( ($qc_auth > 0) and ($reports_auth < 1) and ($auth < 1) )
	{
		if ( ($ADD != '881') and ($ADD != '100000000000000') )
		{
	        $ADD=100000000000000;
		}
		$qc_only_user=1;
	}
	if ( ($qc_auth < 1) and ($reports_auth < 1) and ($auth < 1) )
	{
		$VDdisplayMESSAGE = "You do not have permission to be here";
		Header ("Content-type: text/html; charset=utf-8");
		echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
		exit;
	}
}
else
{
	$VDdisplayMESSAGE = "Login incorrect, please try again";
	if ($auth_message == 'LOCK')
	{
		$VDdisplayMESSAGE = "Too many login attempts, try again in 15 minutes";
		Header ("Content-type: text/html; charset=utf-8");
		echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
		exit;
	}
	Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
	Header("HTTP/1.0 401 Unauthorized");
	echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
	exit;
}


$today = date("Y-m-d");
if((isset($_POST['dateto']) && !empty($_POST['dateto'])) && (isset($_POST['datefrom']) && !empty($_POST['datefrom'])))
{
	if((strtotime($_POST['dateto']) - strtotime($_POST['datefrom'])) > 0)
	{
		if((strtotime(date('Y-m-d 23:59:59')) - strtotime($_POST['dateto'])) >= 0 && (strtotime(date('Y-m-d 23:59:59')) - strtotime($_POST['dateto'])) >= 0)
		{
			$from_to_date_check = true;
			$from_date = $_POST['datefrom'];
			$end_date = $_POST['dateto'];
		}
		else
		{
			$wrong_date = "greater";
		}
	}
	else
	{
		$wrong_date = "from_date_greater";
	}
}

else
{
	$from_to_date_check = true;
	$from_date = date("Y-m-d 00:00:00");
	$end_date = date("Y-m-d 23:59:59");
}

if($from_to_date_check == true)
{

	$data = array();
	$campaign_id = array();
	//$campaign = "select campaign_id,campaign_name from vicidial_campaigns where active='Y' and campaign_name != 'testcampaign'";

	$campaign = "select val.campaign_id,vc.campaign_name from vicidial_users,vicidial_agent_log val,  vicidial_campaigns vc  where event_time <= '".$end_date."' and event_time >= '".$from_date."' and vicidial_users.user=val.user and pause_sec<65000 and lead_id is not NULL and vc.campaign_id=val.campaign_id group by vc.campaign_id  order by sub_status desc limit 100000;";


	if ($DB) {echo "|$campaign|\n";}
	$cmp_rslt=mysql_to_mysqli($campaign, $link);
	while($row=mysqli_fetch_row($cmp_rslt)) { 
		$cmp[] = "'$row[0]'";
		
		$cmp_array[] = $row[0];
		$cmp_array1[] = $row[1];
	}
	$campaign_id = implode(",", $cmp);




    //$stmt="select campaign_id,full_name,vicidial_users.user,sum(dispo_sec) as dispo ,sum(pause_sec) as pause_sec,sub_status,sum(wait_sec + talk_sec + dispo_sec + pause_sec), sum(talk_sec) as talk, sum(wait_sec) as wait, count(*) as count,vicidial_users.user_group from vicidial_users,vicidial_agent_log where event_time <= '".$end_date."' and event_time >= '".$from_date."' and vicidial_users.user=vicidial_agent_log.user and pause_sec<65000 and campaign_id IN($campaign_id) and vicidial_users.user_group IN('ADMIN','EURUSTEST','HANSA','HIDE_MY_ROUTE') and lead_id is not NULL group by user,full_name,campaign_id  order by user,full_name,sub_status desc limit 100000;";

   //$stmt="select campaign_id,full_name,vicidial_users.user,sum(dispo_sec) as dispo ,sum(CASE WHEN sub_status = 'LOGIN' THEN 0 WHEN sub_status is null THEN 0 ELSE pause_sec END) as pause_sec,sub_status,sum(wait_sec + talk_sec + dispo_sec + pause_sec) as loginWbrk,  sum(talk_sec) as talk, sum(wait_sec) as wait,sum(CASE WHEN sub_status is null and comments = 'MANUAL' THEN 1 WHEN sub_status = 'LOGIN' and comments is null THEN 1 ELSE 0 END) as count,vicidial_users.user_group, sum(wait_sec + talk_sec + dispo_sec) as loginWoutbrk, sum(dead_sec) as dead_sec from vicidial_users,vicidial_agent_log where event_time <= '".$end_date."' and event_time >= '".$from_date."' and vicidial_users.user=vicidial_agent_log.user and pause_sec<65000 and campaign_id IN($campaign_id)  group by user,full_name,campaign_id  order by user,full_name,sub_status desc limit 100000;";


    $stmt="select val.campaign_id,full_name,vu.user,sum(dispo_sec) as dispo ,sum(CASE WHEN sub_status = 'LOGIN' THEN 0 WHEN sub_status is null THEN 0 ELSE pause_sec END) as pause_sec,sub_status,sum(CASE WHEN wait_sec <= vc.dial_timeout THEN wait_sec ELSE vc.dial_timeout END + talk_sec + dispo_sec + pause_sec) as loginWbrk,  sum(talk_sec) as talk, sum(CASE WHEN wait_sec <= vc.dial_timeout THEN wait_sec ELSE vc.dial_timeout END) as wait,sum(CASE WHEN status is not null THEN 1 ELSE 0 END) as count,vu.user_group, sum(CASE WHEN wait_sec <= vc.dial_timeout THEN wait_sec ELSE vc.dial_timeout END + talk_sec + dispo_sec) as loginWoutbrk, sum(dead_sec) as dead_sec, sum(CASE WHEN sub_status = 'LAGGED' THEN pause_sec ELSE 0 END) as lagged, sum(CASE WHEN sub_status = 'LOGIN'  THEN pause_sec WHEN sub_status != 'LOGIN' or sub_status is not null or sub_status != 'LAGGED'  THEN 0 ELSE pause_sec END) as pause_sec_login, sum(pause_sec) as pause2 from vicidial_users vu,vicidial_agent_log val INNER JOIN vicidial_campaigns vc ON vc.campaign_id = val.campaign_id  where event_time <= '".$end_date."' and event_time >= '".$from_date."' and vu.user=val.user and pause_sec<65000 and val.campaign_id IN($campaign_id)  group by val.user,full_name,val.campaign_id  order by user,full_name,sub_status desc limit 100000;";


   


   //and sub_status!='LOGIN'



	if ($DB) {echo "|$stmt|\n";}
	$rslt=mysql_to_mysqli($stmt, $link);

	while($row=mysqli_fetch_row($rslt)) { 

				

			$data[$row[1]][$row[0]] = array('login'   => $row[6],
										'loginWoutBrk'   => $row[11],
										'dead_sec'   => $row[12],
										'lagged'  => $row[13],
										'pause_sec_login' => $row[14],
										'pause2' => $row[15],
										'wrap'    => $row[3],
										'pause'   => $row[4],
										'talk'    => $row[7],
										'wait'    => $row[8],
										'ncalls'  => $row[9] 
									);

	
		
	}
	 // echo "<pre>";
	 // print_r($data);
} ?>


<!DOCTYPE html>
	<html>
		<head>
			<title>Login Hours Report</title>
			<meta name="viewport" content="width=device-width, initial-scale=1">
		   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
		    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
		    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
		    <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js"></script>
		    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
		    <script src="js/datetime.js"></script>

		    <script type="text/javascript">
		    	// Quick and simple export target #table_id into a csv
				function download_table_as_csv(table_id, separator = ',') {
				    // Select rows from table_id
				    var rows = document.querySelectorAll('table#' + table_id + ' tr');
				    // Construct csv
				    var csv = [];
				    for (var i = 0; i < rows.length; i++) {
				        var row = [], cols = rows[i].querySelectorAll('td, th');
				        for (var j = 0; j < cols.length; j++) {
				            // Clean innertext to remove multiple spaces and jumpline (break csv)
				            var data = cols[j].innerText.replace(/(\r\n|\n|\r)/gm, '').replace(/(\s\s)/gm, ' ')
				            // Escape double-quote with double-double-quote (see https://stackoverflow.com/questions/17808511/properly-escape-a-double-quote-in-csv)
				            data = data.replace(/"/g, '""');
				            // Push escaped string
				            row.push('"' + data + '"');
				        }
				        csv.push(row.join(separator));
				    }
				    var csv_string = csv.join('\n');
				    // Download it
				    var filename = 'clientCall_' + table_id + '_' + new Date().toLocaleDateString() + '.csv';
				    var link = document.createElement('a');
				    link.style.display = 'none';
				    link.setAttribute('target', '_blank');
				    link.setAttribute('href', 'data:text/csv;charset=utf-8,' + encodeURIComponent(csv_string));
				    link.setAttribute('download', filename);
				    document.body.appendChild(link);
				    link.click();
				    document.body.removeChild(link);
				}
		    </script>

			<link href="timeTo.css" type="text/css" rel="stylesheet"/>

    <style>
        pre {
            margin-bottom: 10px;
            padding-left: 10px;
            border-left: 3px #DDD solid;
        }

        body {
		    padding: 10px;
		}
		#spinner {
		position: fixed;
		left: 0px;
		top: 0px;
		width: 100%;
		height: 100%;
		z-index: 9999;
		background: url(load.gif) 50% 50% no-repeat #ede9df;
		}

		.tooltip {
		  position: relative;
		  display: inline-block;
		  border-bottom: 1px dotted black;
		}

		.tooltip .tooltiptext {
		  visibility: hidden;
		  width: 120px;
		  background-color: black;
		  color: #fff;
		  text-align: center;
		  border-radius: 6px;
		  padding: 5px 0;
		  
		  /* Position the tooltip */
		  position: absolute;
		  z-index: 1;
		  bottom: 100%;
		  left: 50%;
		  margin-left: -60px;
		}

		.tooltip:hover .tooltiptext {
		  visibility: visible;
		}

		.tooltip .tooltiptext::after {
		  content: " ";
		  position: absolute;
		  top: 100%; /* At the bottom of the tooltip */
		  left: 50%;
		  margin-left: -5px;
		  border-width: 5px;
		  border-style: solid;
		  border-color: black transparent transparent transparent;
		}
    </style>
        
	<link href="css/num.css" rel="stylesheet" />
	<link rel="stylesheet" href="css/sam.css" charset="ISO-8859-1"/>
	<link rel="stylesheet" href="css/samc.css" charset="ISO-8859-1"/>

   	<script type="text/javascript">

       
	function popitup(url) {
		 
		newwindow=window.open(url,'name','height=400,width=400');
		if (window.focus) {newwindow.focus()}
		return false;
	} 

	</script>   

    </head>
    <body>
			<div class="ui clearing segment" style="text-align: center;background: #448eca;color: white;">
				<h2 class="ui left floated header" style="color: white;">Login Hours Report</h2>

				<div class="ui two column stackable center aligned page grid">
				<form class="ui sixteen wide column form segment" method="post" style="background: #448eca;">
					<div class="fields">
						<div class="five wide field">
							<label style="color: #ffffff;">From</label>
							<div class="ui action input">
								<input type="text" placeholder="Start date" name="datefrom" id="datefrom" value="<?php echo $from_date;?>" readonly="" required>
								<div class="ui icon button" onclick="javascript:NewCssCal ('datefrom','yyyyMMdd','arrow',true,'24',true)">
									<i class="calendar icon"></i>
								</div>
							</div>
						</div>
						<div class="five wide field">
							<label style="color: #ffffff;">To</label>
							<div class="ui action input">
								<input type="text" placeholder="End date" name="dateto" id="dateto" value="<?php echo $end_date;?>" readonly="" required>
								<div class="ui icon button" onclick="javascript:NewCssCal ('dateto','yyyyMMdd','arrow',true,'24',true)">
									<i class="calendar icon"></i>
								</div>
							</div>
						</div>
						<div class="six wide field">
							<label>&nbsp;</label>
							<input class="ui submit button" type="submit" name="submit" style="background: #101118; color: white;">
							<!-- <a href = "Report_Voice_Completes_N_Login_Hours_CSV.php?datefrom=<?php echo $from_date;?>&dateto=<?php echo $end_date;?>" target="_blank"><button class="ui positive button" type="button">Download</button></a> -->
							<a href="#" onclick="download_table_as_csv('export');" class="ui positive button" type="button">Download</a>
						</div>
					</div>
				</form>
			</div>

				<a href="admin.php?force_logout=1"><h3 class="ui right floated header" style="color: white;">Sign Out</h3></a>
			</div>

			<?php if($from_to_date_check == true) { $col_count = count($cmp_array1) + 7; ?>
				<div class="table-container" >
				<!-- 	<table cellspacing="0" cellpadding="0" class="ctl-table ctl-table-normal">
						<tr>
								<th colspan="< ?php echo $col_count; ?>" style = "text-align : center; font-size : 22px; background-color: #448eca; color: white; height: 60px;">Record between < ?php $date=date_create($from_date); $tdate=date_create($end_date); echo date_format($date,"d-m-Y H:i:s")." and ".date_format($tdate,"d-m-Y H:i:s"); ?></th>
							</tr>


					</table>
 -->
					



					<table class="ctl-table ctl-table-normal caption" id="export" >
						<thead>
							<tr class="header">
								<th colspan="9" style="border: 1px solid;">Agent Login Hours Report</th>
								<th colspan="1" style="border: 1px solid; background: grey;"></th>
								<th colspan="7" style="border: 1px solid;"><?php echo date("Y-m-d H:i:s");?></th>
							</tr>
							<tr class="header">
								<th colspan="9" style="border: 1px solid;">Time Range</th>
								<th colspan="1" style="border: 1px solid; background: grey;"></th>
								<th colspan="7" style="border: 1px solid;"><?php echo $from_date?> to <?php echo $end_date;?>(EST)</th>
							</tr>
							<tr class="header">
								<th>#</th>
								<th><div class="tooltip">Name
  										<span class="tooltiptext">Name of an Agent</span>
									</div>
								</th>

								<th><div class="tooltip">Total Login
  										<span class="tooltiptext">Total of system generated pauses added to agent generated pauses.</span>
									</div>
								</th>

								<th><div class="tooltip">Eff Login
  										<span class="tooltiptext">Total Login Time minus Total Break Time.</span>
									</div>
								</th>

								<!-- <th><div class="tooltip">Dead
  										<span class="tooltiptext">Time the agent is in a call where the customer has hung up but agent has not.</span>
									</div>
								</th> -->

								<th><div class="tooltip">Talk Time
  										<span class="tooltiptext">Time agent is on call</span>
									</div>
								</th>

								<th><div class="tooltip">Wrap
  										<span class="tooltiptext">Time agent is on Dispo screen added to Dead time (Time agent is in a call after the customer has hung up.)<!-- Total of (Dispo) time the agent uses at the disposition screen (where the agent picks NI, SALE etc) --></span>
									</div>
								</th>

								<th><div class="tooltip">Break
  										<span class="tooltiptext">Time agent is on Break</span>
									</div>
								</th>

								<th><div class="tooltip">Ring
  										<span class="tooltiptext">Time agent is waiting for dialed call to connect (Ring Time)</span>
									</div>
								</th>

								<th><div class="tooltip">Pause
  										<span class="tooltiptext">Total of system generated pauses added to agent generated pauses.</span>
									</div>
								</th>

								<th style="background: grey;"><div class="tooltip">Lagged
  										<span class="tooltiptext">Time the agent is in pause mode (only LAGGED) and does not include any other thing</span>
									</div>
								</th>
								
		
								<?php foreach ($cmp_array1 as $key => $value) { ?>

								<th><?php echo $value; ?></th>
									<!-- <th><table class="caption"><tbody><tr><td class="text"><div class="text"><?php echo $value; ?></div></td><td></td></tr></tbody></table></th> -->

									
								<?php } ?>
							</tr>
						</thead>
						<tbody>
							<?php 
							$i = 1; 
							// echo "<pre>";
							// print_r($data);
							// echo "</pre>";
							if(isset($data) && !empty($data)) { 
								foreach ($data as $key => $value) { 
									// echo "<pre>";
									// print_r($value);
									// echo "</pre>";

									$total_login = array_column($value, 'login' );
									$total_login = array_sum($total_login);
									
									$total_login_without_brk = array_column($value, 'loginWoutBrk' );
									$total_login_without_brk = array_sum($total_login_without_brk);
									
									$total_dead_sec = array_column($value, 'dead_sec' );
									$total_dead_sec = array_sum($total_dead_sec);
									
									$total_lagged = array_column($value, 'lagged' );
									$total_lagged = array_sum($total_lagged);
									
									$total_pause_sec_login = array_column($value, 'pause_sec_login' );
									$total_pause_sec_login = array_sum($total_pause_sec_login);
									
									$total_wrap = array_column($value, 'wrap' );
									$total_wrap = array_sum($total_wrap);
									
									$total_pause = array_column($value, 'pause' );
									$total_pause = array_sum($total_pause);
									
									$total_pause2 = array_column($value, 'pause2' );
									$total_pause2 = array_sum($total_pause2);
									
									$total_talk = array_column($value, 'talk' );
									$total_talk = array_sum($total_talk);
									
									$total_wait = array_column($value, 'wait' );
									$total_wait = array_sum($total_wait);
									
									$total_ncalls = array_column($value, 'ncalls' );
									$total_ncalls = array_sum($total_ncalls);

									if($i%2=='0'){$oe='odd';}else{$oe='even';}

								?>
								<tr class='<?php echo $oe; ?>'>
										<td  class=" textbox center"><?php echo $i++;?></td>
										<td  class=" textbox left"><?php echo $key;?></td>
										<?php foreach ($value as $key1 => $value1) { 
											$cmp_in[$i][] = $key1; 
											$ltime[$i][$key1] = $value1['ncalls']; 
										} ?>

										<!-- <td  class=" textbox center"><?php echo secondsToTime($total_login_without_brk); ?></td>
										<td  class=" textbox center"><?php echo secondsToTime($total_pause_sec_login); ?></td> -->
										<td  class=" textbox center"><?php echo secondsToTime($total_login); ?></td>
										<td  class=" textbox centercenter"><?php echo secondsToTime(($total_login_without_brk + $total_pause_sec_login)); ?></td>
										<!-- <td  class=" textbox center"><?php echo secondsToTime($total_dead_sec); ?></td> -->
										<td  class=" textbox center"><?php echo secondsToTime(($total_talk - $total_dead_sec)); ?></td>
										<td  class=" textbox center"><?php echo secondsToTime($total_wrap + $total_dead_sec); ?></td>
										<td  class=" textbox center"><?php echo secondsToTime($total_pause); ?></td>
										<td  class=" textbox center"><?php echo secondsToTime($total_wait); ?></td>
										<td  class=" textbox center"><?php echo secondsToTime($total_pause2 - $total_pause); ?></td>
										<td  class=" textbox center"><?php echo secondsToTime($total_lagged); ?></td>
										
										<?php foreach ($cmp_array as $key2 => $value2) { 
										if (in_array($value2, $cmp_in[$i])) { ?>
										<td  class=" textbox center"><?php echo $ltime[$i][$value2];  ?></td>
										<?php } else { ?>
										<td  class=" textbox center">0</td>
										<?php  } 
										} ?>
								</tr>
							<?php } } else {?>
								<tr class='.$oe.'>
									<td colspan="<?php echo $col_count; ?>"  class=" textbox right"><strong>No Data Found</strong></td>
								</tr>
							<?php } ?>
						</tbody>
					</table>
				</div>
			<?php } else { 
			if($wrong_date == "greater") {echo "<div class='oaerror danger'><strong>Error</strong> - <strong style='color:#f0ad4e;'>From date</strong> and <strong style='color:#f0ad4e;'>To date</strong> cannot be greater than current date. Choose correct date</div>"; }
			elseif($wrong_date == "from_date_greater") {echo "<div class='oaerror danger'><strong>Error</strong> - <strong style='color:#f0ad4e;'>From date</strong> must be less than <strong style='color:#f0ad4e;'>To date</strong>. Choose correct date</div>"; }
			echo "<br><div class='oainfo info'><strong>Message</strong> - No records found.</div>";
		} ?>
		</body>
	</html>
	
