<?php /* $Id: Reports.tpl 3304 2007-10-25 17:31:55Z will $ */ ?>
<?php TemplateUtility::printHeader('Reports'); ?>
<?php TemplateUtility::printHeaderBlock(); ?>
<?php TemplateUtility::printTabs($this->active); ?>
    <div id="main">
        <?php TemplateUtility::printQuickSearch(); ?>

        <div id="contents">
            <table>
                <tr>
                    <td width="3%">
                        <img src="images/reports.gif" width="24" height="24" border="0" alt="Reports" style="margin-top: 3px;" />&nbsp;
                    </td>
                    <td><h2>Reports</h2></td>
                </tr>
            </table>

            <p class="note">Number of Resumes Receipt</p>
            <p class="note" align="right"><a href="http://ogcrecruitment.com/camp2/rpms/index.php?m=reports">Back to Reports</a>
           <style type="text/css">
body {
font-family:arial;
/*margin:50px 100px;*/
}
a {
    color: #666;
    font-size: 11px;
    text-decoration: none;
}

a:hover {
    color: #37B0DD;
    font-size: 11px;
    text-decoration: none;
}

input {
background:#f1f1f1;
border:1px solid #ccc;
padding:5px;
font-size:11px;
}
 
 .home-table { background:none; border:1px solid #c4c4c4; cellpadding:0;  border-spacing:0;  border-collapse:collapse; width:98%; margin:0 auto 20px auto; box-shadow: 6px 10px 15px #CCCCCC;}
.home-table th{ background: #CCCCCC; url(images/table-bg.png) repeat-x top left; border:1px solid; padding:8px 10px !important; text-align:left; font-size:12px; border-color:#116b85; color:#ffffff; vertical-align: middle; margin:10px; }
.home-table td{ background:white; border:1px solid; padding:6px 10px !important; font-size:11px; color:#000000; vertical-align: middle;}
/*.home-table tbody tr:nth-child(odd) td{ background-color: #f7f7f7 !important; }*/
.home-table td:first-child { text-align:left; }
</style>
<br>
<?php 
$start_date = "2017-12-14";
$end_date = "2017-12-31";
$arr = range(strtotime($start_date),strtotime($end_date), "86400");
array_walk_recursive($arr, function(&$element) { $element = date("Y-m-d", $element); });
?>
             <table width="200" border="1" class="home-table">
  <tr>
    <th>Position</th>
    <?php foreach($arr AS $val){ ?>
    <th><?php echo substr($val,-2);?></th>
    <?php 
    } ?>
    <th>Total</th>
  </tr>
  <?php 
  include('dbinfo.php');
  $rsJobTitle = mysql_query("SELECT * FROM joborder WHERE status='Active' ORDER BY seq_id");
  while($rwJobTitle = mysql_fetch_array($rsJobTitle)){
  $joborder_id = $rwJobTitle['joborder_id'];
  
  ?>
  <tr>
    <td><?php echo $rwJobTitle['title'];?></td>
    <?php
        $total =0; 
  	foreach($arr AS $val){
  	$qry28 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND site_id=1 AND date_created LIKE '$val%'");
        $res28 = mysql_num_rows($qry28);?>
   <td><?php echo $res28;?></td>
	<?php 
             $total += $res28;
           } ?>
   <td><b><?php echo $total;?></b></td>
  </tr>
   <?php } ?>
   
  <tr><td style="font-weight:bold;">Total</td>
   <?php
  $total_res =0; 
  foreach($arr AS $val){
  $query28 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created LIKE '$val%'");
  $resu28 = mysql_num_rows($query28);
  ?>
<td style="font-weight:bold;"><?php echo $resu28;?></td>
<?php 
$total_res += $resu28;
} ?>
    <td style="font-weight:bold;"><?php echo $total_res;?></td></tr>
</table>      
  </div>
    </div>
    <div id="bottomShadow"></div>
<?php TemplateUtility::printFooter(); ?>


                            
                            
                            
                            