<?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">Gender Report</p>
            <p class="note" align="right"><a href="http://menarpms.com/downstreamjobs/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>
             <table width="200" border="1" class="home-table">
  <tr>
    <th>Resume Receipt</th>
    <th>Male</th>
    <th>Female</th>
    <th>Total</th>
  </tr>
  <?php 
  include('dbinfo.php');
  $rsJobTitle = mysql_query("SELECT * FROM joborder");
  while($rwJobTitle = mysql_fetch_array($rsJobTitle)){
  $joborder_id = $rwJobTitle['joborder_id'];
  $joborder_name = $rwJobTitle['title'];
  
   $qry1 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id='$joborder_id' AND b.site_id=1 AND b.date_created NOT LIKE '0000%' AND a.gender='1' AND a.candidate_id=b.candidate_id AND a.site_id=1");
   $res1 = mysql_num_rows($qry1);

   $qry2 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id='$joborder_id' AND b.site_id=1 AND b.date_created NOT LIKE '0000%' AND a.gender='2' AND a.candidate_id=b.candidate_id AND a.site_id=1");
   $res2 = mysql_num_rows($qry2);
  
  $total = $res1 + $res2;
  
  $qry3 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created NOT LIKE '0000%' AND a.gender='1' AND a.candidate_id=b.candidate_id AND a.site_id=1");
   $res3 = mysql_num_rows($qry3);

   $qry4 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created NOT LIKE '0000%' AND a.gender='2' AND a.candidate_id=b.candidate_id AND a.site_id=1");
     $res4 = mysql_num_rows($qry4);
 
  
  $total_res = $res3 + $res4;

  ?>
  <tr>
    <td><?php echo $joborder_name;?></td>
    <td><?php echo $res1;?></td>
    <td><?php echo $res2;?></td>
    <td><b><?php echo $total;?></b></td>
  </tr>
  
  <?php } ?>
  <tr><td style="font-weight:bold;">Total</td>
    <td style="font-weight:bold;"><?php echo $res3;?></td>
    <td style="font-weight:bold;"><?php echo $res4;?></td>
    <td style="font-weight:bold;"><?php echo $total_res;?></td></tr>
</table>      
  </div>
    </div>
    <div id="bottomShadow"></div>
<?php TemplateUtility::printFooter(); ?>
