<?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 Wise 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>Gender</th>
    <th>19</th>
    <th>20</th>
    <th>21</th>
    <th>22</th>
    <th>23</th>
    <th>24</th>
    <th>25</th>
    <th>26</th>
    <th>27</th>
    <th>28</th>
    <th>29</th>
    <th>30</th>
    <th>31</th>
    <th>Total</th>
  </tr>
  <?php 
  include('dbinfo.php');
  $rsGender = mysql_query("SELECT * FROM cm_gender");
  while($rwGender = mysql_fetch_array($rsGender)){
  $gender_name = $rwGender['gender'];
  $gender_id = $rwGender['id'];
  
   $qry19 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-19%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
   $res19 = mysql_num_rows($qry19);

   $qry20 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-20%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res20 = mysql_num_rows($qry20);
  
  $qry21 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-21%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res21 = mysql_num_rows($qry21);
  
  $qry22 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-22%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res22 = mysql_num_rows($qry22);
  
  $qry23 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-23%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res23 = mysql_num_rows($qry23);
  
  $qry24 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-24%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res24 = mysql_num_rows($qry24);
  
  $qry25 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-25%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res25 = mysql_num_rows($qry25);
  
  $qry26 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-26%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res26 = mysql_num_rows($qry26);
  
  $qry27 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-27%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res27 = mysql_num_rows($qry27);
  
  $qry28 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-28%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res28 = mysql_num_rows($qry28);
  
  $qry29 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-29%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res29 = mysql_num_rows($qry29);
  
  $qry30 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-30%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res30 = mysql_num_rows($qry30);
  
  $qry31 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-31%' AND a.gender='$gender_id' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $res31 = mysql_num_rows($qry31);
  
  $total = $res19 + $res20 + $res21 + $res22 + $res23 + $res24 + $res25 + $res26 + $res27 + $res28 + $res29 + $res30 + $res31;
  
  $query19 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-19%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu19 = mysql_num_rows($query19);
  
  $query20 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-20%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu20 = mysql_num_rows($query20);
  
  $query21 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-21%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu21 = mysql_num_rows($query21);
  
  $query22 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-22%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu22 = mysql_num_rows($query22);
  
  $query23 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-23%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu23 = mysql_num_rows($query23);
  
  $query24 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-24%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu24 = mysql_num_rows($query24);
  
  $query25 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-25%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu25 = mysql_num_rows($query25);
  
  $query26 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-26%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu26 = mysql_num_rows($query26);
  
  $query27 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-27%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu27 = mysql_num_rows($query27);
  
  $query28 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-28%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu28 = mysql_num_rows($query28);
  
  $query29 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-29%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu29 = mysql_num_rows($query29);
  
  $query30 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-30%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu30 = mysql_num_rows($query30);
  
  $query31 = mysql_query("SELECT * FROM candidate a, candidate_joborder b WHERE b.joborder_id!=0 AND b.site_id=1 AND b.date_created LIKE '2014-08-31%' AND a.candidate_id=b.candidate_id AND a.site_id=1");
  $resu31 = mysql_num_rows($query31);
  
  $total_res = $resu19 + $resu20 + $resu21 + $resu22 + $resu23 + $resu24 + $resu25 + $resu26 + $resu27 + $resu28 + $resu29 + $resu30 + $resu31;

  ?>
  <tr>
    <td><?php echo $gender_name;?></td>
    <td><?php echo $res19;?></td>
    <td><?php echo $res20;?></td>
    <td><?php echo $res21;?></td>
    <td><?php echo $res22;?></td>
    <td><?php echo $res23;?></td>
    <td><?php echo $res24;?></td>
    <td><?php echo $res25;?></td>
    <td><?php echo $res26;?></td>
    <td><?php echo $res27;?></td>
    <td><?php echo $res28;?></td>
    <td><?php echo $res29;?></td>
    <td><?php echo $res30;?></td>
    <td><?php echo $res31;?></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 $resu19;?></td>
    <td style="font-weight:bold;"><?php echo $resu20;?></td>
    <td style="font-weight:bold;"><?php echo $resu21;?></td>
    <td style="font-weight:bold;"><?php echo $resu22;?></td>
    <td style="font-weight:bold;"><?php echo $resu23;?></td>
    <td style="font-weight:bold;"><?php echo $resu24;?></td>
    <td style="font-weight:bold;"><?php echo $resu25;?></td>
    <td style="font-weight:bold;"><?php echo $resu26;?></td>
    <td style="font-weight:bold;"><?php echo $resu27;?></td>
    <td style="font-weight:bold;"><?php echo $resu28;?></td>
    <td style="font-weight:bold;"><?php echo $resu29;?></td>
    <td style="font-weight:bold;"><?php echo $resu30;?></td>
    <td style="font-weight:bold;"><?php echo $resu31;?></td>
    <td style="font-weight:bold;"><?php echo $total_res;?></td></tr>
</table>      
  </div>
    </div>
    <div id="bottomShadow"></div>
<?php TemplateUtility::printFooter(); ?>
