Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/student/
Upload File :
Current File : /var/www/html/mmishra/indem/student/instats.php

<?php
ini_set('display_errors', 1);
require_once("class/list.class.php");

$THIS_MODULE_PATH=$ABS_MOD_PATH;
$rahul = new rahul();//**--Base Class rahul Object --**//
$rahul->validate_admin();//**--Method Called to Validate Admini3rator --**//


$sql="Select Distinct(B.countryId) from tbl_forrecord A, tbl_country B where A.countryId=B.countryId  ";
$query=mysql_query($sql);


require_once("../innerHeader.inc.php");
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="225" valign="top" class="blue"><?php require_once("../left.inc.php");?></td>
            <td width="5" valign="top">&nbsp;</td>
            <td valign="top"><table width="100%" border="0" cellspacing="2" cellpadding="2">
              <tr>
                <td valign="top" class="height10"></td>
              </tr>
              <tr>
                <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td valign="top" class="curve-top-left"></td>
                      <td valign="top" class="top-line"></td>
                      <td valign="top" class="curve-top-right"></td>
                    </tr>
                    <tr>
                      <td valign="top" class="left-line">&nbsp;</td>
                      <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td width="6%" valign="top">&nbsp;</td>
                            <td width="73%" valign="middle" class="main-heading">Summary  Manager</td>
                            <td width="21%" align="right" valign="middle"><a href="JavaScript:newPopup('summaryPrintSt.php')"class="link4" title="Print"><u>Print Summary</u></a> </td>
                          </tr>
                      </table></td>
                      <td valign="top" class="right-line">&nbsp;</td>
                    </tr>
                    <tr>
                      <td valign="top" class="curve-bottom-left"></td>
                      <td valign="top" class="bottom-line"></td>
                      <td valign="top" class="curve-bottom-right"></td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td valign="top" class="height5"></td>
              </tr>
              <tr>
                <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td valign="top" >&nbsp;</td>
                      <td valign="top"><form name="userManagerFrm" action="" method="po3"><table width="100%" cellpadding="2" cellspacing="2" class="li3ing-bg-color">
          <tr class="heading-color">
            <td colspan="13" align="center" >Data Entry By Each Country ( in Numbers ) </td>
            </tr>
          <tr class="heading-color">
            <td width="13%" align="center" >Country Name </td>
            <td colspan="2" align="center" >Gender</td>
            <td colspan="2" align="center" >Participation Status </td>
			<td colspan="6" align="center">Subject</td>
			<td width="9%" align="center" >&nbsp;</td>
          </tr>
          
          <tr class="heading-color">
             <td align="center" >&nbsp;</td>
             <td width="7%" align="center" >Male</td>
			 <td width="8%" align="center" >Female</td>
             <td width="6%" align="center" >Student</td>
             <td width="6%" align="center" >Teacher</td>
             <td width="6%" align="center" >Physics</td>
             <td width="6%" align="center" >Chemistry</td>
             <td width="7%" align="center" >Mathematics</td>
             <td width="6%" align="center" >Bio. Sc. </td>
             <td width="7%" align="center" >Engineering</td> 
             <td width="9%" align="center" >Others</td>
             <td width="10%" align="center" >Total</td>
  </tr>
  
<?php if(mysql_num_rows($query)>0)
	{
	$grandTotal=0;
	$total=0;
	$grandTotal=0;
	$total=0;
	$grandTotalM=0;
	$totalM=0;
	$grandTotalF=0;
	$totalF=0;
	$grandTotal2=0;
	$total2=0;
	$grandTotal3=0;
	$total3=0;
	$grandTotalOBC=0;
	$totalOBC=0;
	$grandTotalGEN=0;
	$totalGEN=0;
	$grandTotal6=0;
	$total6=0;
	$grandTotal7=0;
	$total7=0;
	$grandTotal8=0;
	$total8=0;
	$grandTotal9=0;
	$total9=0;
	$grandTotal10=0;
	$total10=0;
	?>
<?php		while($row=mysql_fetch_array($query))
		{
		
		//print_r($row);
	?>
<tr>
    <td align="center" class="heading6"><?php echo $rahul->getUserName($row['countryId'])?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'gender','0');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'gender','1');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'participantStatus','0');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'participantStatus','1');?></td> 
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'areaOfInterest','Physics');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'areaOfInterest','Chemistry');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'areaOfInterest','Mathematics');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'areaOfInterest','Biological Sciences');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'areaOfInterest','Engineering');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($row['countryId'],'areaOfInterest','Others');?></td>
	<td align="center" class="heading6"><?php echo $rahul->CountRecrd($countryId=$row['countryId'],$field='',$value='');?></td> 
</tr>
<?php 
$total=$rahul->CountRecrd($countryId=$row['countryId'],$field='',$value='');
$grandTotal=$total+$grandTotal;
$totalM=$rahul->CountRecrd($countryId=$row['countryId'],$field='gender',$value='0');
$grandTotalM=$totalM+$grandTotalM;
$totalF=$rahul->CountRecrd($countryId=$row['countryId'],$field='gender',$value='1');
$grandTotalF=$totalF+$grandTotalF;
$total2=$rahul->CountRecrd($countryId=$row['countryId'],$field='participantStatus',$value='0');
$grandTotal2=$total2+$grandTotal2;
$total3=$rahul->CountRecrd($countryId=$row['countryId'],$field='participantStatus',$value='1');
$grandTotal3=$total3+$grandTotal3;
$totalOBC=$rahul->CountRecrd($countryId=$row['countryId'],$field='areaOfInterest',$value='Physics');
$grandTotalOBC=$totalOBC+$grandTotalOBC;
$totalGEN=$rahul->CountRecrd($countryId=$row['countryId'],$field='areaOfInterest',$value='Chemistry');
$grandTotalGEN=$totalGEN+$grandTotalGEN;
$total6=$rahul->CountRecrd($countryId=$row['countryId'],$field='areaOfInterest',$value='Mathematics');
$grandTotal6=$total6+$grandTotal6;
$total7=$rahul->CountRecrd($countryId=$row['countryId'],$field='areaOfInterest',$value='Biological Sciences');
$grandTotal7=$total7+$grandTotal7;
$total8=$rahul->CountRecrd($countryId=$row['countryId'],$field='areaOfInterest',$value='Engineering');
$grandTotal8=$total8+$grandTotal8;
$total9=$rahul->CountRecrd($countryId=$row['countryId'],$field='areaOfInterest',$value='Others' );
$grandTotal9=$total9+$grandTotal9;
 ?>
<?php }}else{?>
<tr>
    <td align="center" colspan='13' class="error">Sorry,No Record Found</td>
  </tr>
<?php }?> 
<tr>
  <td align="right" colspan='13' class="error"><hr></td>
  </tr>
<tr class="">
	<td align="center"  class="error">Grand Total:&nbsp;</td>
	<td align="center"  class="heading6"><?php echo $grandTotalM+$rahul->CountRecrd($countryId=0,$field='gender',$value='0');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotalF+$rahul->CountRecrd($countryId=0,$field='gender',$value='1');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotal2+$rahul->CountRecrd($countryId=0,$field='participantStatus',$value='0');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotal3+$rahul->CountRecrd($countryId=0,$field='participantStatus',$value='1');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotalOBC+$rahul->CountRecrd($countryId=0,$field='areaOfInterest',$value='Physics');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotalGEN+$rahul->CountRecrd($countryId=0,$field='areaOfInterest',$value='Chemistry');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotal6+$rahul->CountRecrd($countryId=0,$field='areaOfInterest',$value='Mathematics');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotal7+$rahul->CountRecrd($countryId=0,$field='areaOfInterest',$value='Biological Sciences');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotal8+$rahul->CountRecrd($countryId=0,$field='areaOfInterest',$value='Engineering');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotal9+$rahul->CountRecrd($countryId=0,$field='areaOfInterest',$value='Others');?></td>
	<td align="center"  class="heading6"><?php echo $grandTotal+$rahul->CountRecrd($countryId=0,$field='',$value='');?></td>
  </tr>
  </table></form></td>
                      <td valign="top" >&nbsp;</td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td valign="top">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          
        </table></td>
      </tr>
      
    </table>
<?php require_once("../footer.inc.php");	?>