<?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">Joborder Status Report</p>
            <p class="note" align="right"><a href="http://ogcrecruitment.com/camp1/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>Position</th>
    <th>1</th>
    <th>2</th>
    <th>3</th>
    <th>4</th>
    <th>5</th>
    <th>6</th>
    <th>7</th>
    <th>8</th>
    <th>9</th>
    <th>10</th>
    <th>11</th>
    <th>12</th>
    <th>13</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'];
  
 $qry1 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=100");
  $res1 = mysql_num_rows($qry1);
  
  $qry2 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=200");
  $res2 = mysql_num_rows($qry2);
  
  $qry3 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=250");
  $res3 = mysql_num_rows($qry3);
  
  $qry4 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=300");
  $res4 = mysql_num_rows($qry4);
  
  $qry5 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=400");
  $res5 = mysql_num_rows($qry5);
  
  $qry6 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=500");
  $res6 = mysql_num_rows($qry6);
  
  $qry7 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=525");
  $res7 = mysql_num_rows($qry7);
  
  $qry8 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=550");
  $res8 = mysql_num_rows($qry8);
  
  $qry9 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=600");
  $res9 = mysql_num_rows($qry9);
  
  $qry10 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=650");
  $res10 = mysql_num_rows($qry10);
  
  $qry11 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=700");
  $res11 = mysql_num_rows($qry11);
  
  $qry12 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=800");
  $res12 = mysql_num_rows($qry12);
  
  $qry13 = mysql_query("SELECT * FROM candidate_joborder WHERE joborder_id='$joborder_id' AND date_created NOT LIKE '0000%' AND site_id=1 AND status=825");
  $res13 = mysql_num_rows($qry13);
  

  $total = $res1 + $res2 + $res3 + $res4 + $res5 + $res6 + $res7 + $res8 + $res9 + $res10 + $res11 + $res12 + $res13;
  
  $query1 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=100");
  $resu1 = mysql_num_rows($query1);
  
  $query2 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=200");
  $resu2 = mysql_num_rows($query2);
  
  $query3 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=250");
  $resu3 = mysql_num_rows($query3);
  
  $query4 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=300");
  $resu4 = mysql_num_rows($query4);
  
  $query5 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=400");
  $resu5 = mysql_num_rows($query5);
  
  $query6 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=500");
  $resu6 = mysql_num_rows($query6);
  
  $query7 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=525");
  $resu7 = mysql_num_rows($query7);
  
  $query8 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=550");
  $resu8 = mysql_num_rows($query8);
  
  $query9 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=600");
  $resu9 = mysql_num_rows($query9);
  
  $query10 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=650");
  $resu10 = mysql_num_rows($query10);
  
  $query11 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=700");
  $resu11 = mysql_num_rows($query11);
  
  $query12 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=800");
  $resu12 = mysql_num_rows($query12);
  
  $query13 = mysql_query("SELECT * FROM candidate_joborder WHERE site_id=1 AND joborder_id!=0 AND date_created NOT LIKE '0000%' AND status=825");
  $resu13 = mysql_num_rows($query13);
  

  $total_resu = $resu1 + $resu2 + $resu3 + $resu4 + $resu5 + $resu6 + $resu7 + $resu8 + $resu9 + $resu10 + $resu11 + $resu12 + $resu13;

  
  
  ?>
  <tr>
    <td><?php echo $rwJobTitle['title'];?></td>
    <td><?php echo $res1;?></td>
    <td><?php echo $res2;?></td>
    <td><?php echo $res3;?></td>
    <td><?php echo $res4;?></td>
    <td><?php echo $res5;?></td>
    <td><?php echo $res6;?></td>
    <td><?php echo $res7;?></td>
    <td><?php echo $res8;?></td>
    <td><?php echo $res9;?></td>
    <td><?php echo $res10;?></td>
    <td><?php echo $res11;?></td>
    <td><?php echo $res12;?></td>
    <td><?php echo $res13;?></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 $resu1;?></td>
    <td style="font-weight:bold;"><?php echo $resu2;?></td>
    <td style="font-weight:bold;"><?php echo $resu3;?></td>
    <td style="font-weight:bold;"><?php echo $resu4;?></td>
    <td style="font-weight:bold;"><?php echo $resu5;?></td>
    <td style="font-weight:bold;"><?php echo $resu6;?></td>
    <td style="font-weight:bold;"><?php echo $resu7;?></td>
    <td style="font-weight:bold;"><?php echo $resu8;?></td>
    <td style="font-weight:bold;"><?php echo $resu9;?></td>
    <td style="font-weight:bold;"><?php echo $resu10;?></td>
    <td style="font-weight:bold;"><?php echo $resu11;?></td>
    <td style="font-weight:bold;"><?php echo $resu12;?></td>
    <td style="font-weight:bold;"><?php echo $resu13;?></td>
    <td style="font-weight:bold;"><?php echo $total_resu;?></td></tr>
    <tr><td colspan="15">
     <div align="center"> 
<div style="border:1px solid; border-color:#C0C0C0; width:700px;height:50px;padding:25px 0 0 0;">
   1 <font face='arial' size='1'>CV Screening</font> &nbsp;
   2 <font face='arial' size='1'>Screening Reject</font> &nbsp;
   3 <font face='arial' size='1'>Shortlisted</font> &nbsp;
   4 <font face='arial' size='1'>Shortlist Reject</font> &nbsp;
   5 <font face='arial' size='1'>Online Test</font> &nbsp;
   6 <font face='arial' size='1'>Online Test Reject</font> &nbsp;
   7 <font face='arial' size='1'>Face to Face</font> <br>&nbsp;
   8 <font face='arial' size='1'>Face to Face Reject</font> &nbsp;
   9 <font face='arial' size='1'>Final Interview</font> &nbsp;
   10 <font face='arial' size='1'>Final Interview Reject</font> &nbsp;
   11 <font face='arial' size='1'>Offered</font> &nbsp;
   12 <font face='arial' size='1'>Joined</font> &nbsp;
   13 <font face='arial' size='1'>Dropout</font> 
</div>
</div>
  </td></tr>

</table>      
  </div>
    </div>

<br>
    <div id="bottomShadow"></div>
<?php TemplateUtility::printFooter(); ?>
