<?php 
$pgMod="student_print";
?>
<style>
.top-bar-minimize {
	display: none;
}
thead, tfoot {
	display: table-header-group;
}
.top-bar+.well, .accordion .accordion-heading+.accordion-body {
	display: inline-block !important;
	width: 100% !important;
	overflow: inherit !important;
}
</style>
<script type="text/javascript">
function getType(id){
	$.post( "ajax.php", { type: "exmtype" ,class: id } , function( data ) {
	  	$("#extype").html(data);
	});
}
function smsDivNoHeader(){
	var id=$("#smsTXT").val();
	var examtype=$("#examtype").val();
	$.post( "ajax.php", { type: "sendsmsexam" ,AllData: id, examtype: examtype } , function( data ) {
	  	alert(data);
	});
}
function findStudent(t){
	var cls=$("#class").val();
	var section=$("#section").val();
	$.post( "ExamCBSE/ajax.php", { type: "findStudent" ,cls: cls, section: section } , function( data ) {
	  	$("#findStudent").html(data);
	});
}
</script>
<style>
.headPrint {
	display: none
}
.table .dt{
	font-size:18px !important;
	line-height:22px;
}

</style>
<form method="get" action="">
 <input type="hidden" name="page_id" value="<?php echo $pgMod; ?>" />
  <div class="row-fluid">
    <div class="span12">
      <div class="top-bar">
        <h3><i class="icon-cog"></i>Search Student Record</h3>
        <div>
          <?php 
						if($_GET){
							?>
          <button type="button" name="fee" onClick="printDivNoHeader('printableDiv')" class="btn btn-primary"> Print</button>
          <!--<button type="button" name="fee" onClick="smsDivNoHeader()" class="btn btn-primary"> SMS</button>-->
          <?php
						}
						?>
          <button type="submit" name="profile" class="btn btn-primary"> View Record</button>
           <button type="submit" name="msg" class="btn btn-primary"> Message</button>
            <button type="submit" name="last" class="btn btn-primary"> Last Page</button>
        </div>
      </div>
      <div class="well no-padding">
        <div class="controls controls-row">
          <div class="control-group span4">
            <label class="control-label" for="class">Class</label>
            <div class="controls">
              <select onchange="findStudent()" name="class" id="class">
                <option value="">Class</option>
                <?php 
                                        $class=$db->getRows("select * from class where school_id='".$_SESSION["admin"]["school_id"]."' ");
                                        foreach($class as $cla){
                                            ?>
                <option <?php if($cla["class"]==$aryForm["class"])echo 'selected';?> value="<?php echo $cla["class"] ?>"> <?php echo $cla["class"] ?> </option>
                <?php
                                        }
                                    ?>
              </select>
            </div>
          </div>
           <div class="control-group span4">
                            <label class="control-label" for="class">Section</label>
                            <div class="controls">
                               <select name="section" onchange="findStudent()" id="section" >
                <option value="">Section</option>
                <?php 
                    $class=$db->getRows("select * from section where school_id='".$_SESSION["admin"]["school_id"]."'");
                    foreach($class as $cla){
                        ?>
                        <option <?php if($cla["name"]==$_GET["section"])echo 'selected';?> value="<?php echo $cla["name"] ?>">
                            <?php echo $cla["name"] ?>
                        </option>
                        <?php
            
                    }
                ?>
            </select>
                            </div>
                        </div>
          <div class="control-group span4">
          <label class="control-label" for="class">Student List</label>
            <div class="controls" id="findStudent">
              <select  name="idno" id="idno">
               <option value="">All Student</option>
              </select>
            </div>
          </div>
        </div>
        <br>
      </div>
      <!-- / Forms: Content --> 
      
    </div>
  </div> 
</form>
<div id="printableDiv">
  <?php
	if(isset($_GET['profile'])){
		$mss=0; $smsAry="";$stsearch="";
		$where="";
	if(isset($_GET["section"]) && $_GET["section"]!="")
			$where=" AND section='".$_GET["section"]."' ";
if(isset($_GET["idno"]) && $_GET["idno"]!="")$stsearch=" and idno='".$_GET["idno"]."' ";
$allStudent=$db->getRows("select * from student where school_id='".$_SESSION["admin"]["school_id"]."' and session='".$_SESSION["admin"]["session"]."' and class='".$_GET["class"]."' and status =1 and issue_TC = 0 $where $stsearch order by name");
if(is_array($allStudent) && count($allStudent)>0){
  $he=0;
	foreach($allStudent as $aryForm){$mss++;$he++;
		?>
        <div style="height:1050px;margin: 0px 0px 60px 0px;<?php if($he!=1)echo 'padding-top: 15px;'?>">
  <div style="height:1030px;border:10px solid #D81212;margin:20px 0px;">
   <div style="height:1016px;border: 7px solid #D8C212;">
  <div style="height:1006px;border: 5px solid #0f0896;">
  <div class="outer_print" style="height:1000px;background: none;">
  <div class="inner-print" style="height:1000px;">
    <div style="height:500px;width: 92.5%;position: absolute;">
    <img src="assets/css/123.jpg" height="100%" width="100%;" /></div>
    <div class="headPrint hp" style="border-bottom: 4px solid rgba(255, 255, 255, 0.01) !important;position: relative;top: 0px;">
    <center>
      <table style="width:100%">
   		 <tr>
   			  <td style="text-align:center;background: rgba(171, 171, 171, 0.39);">
           <img src="<?php echo $LinksDetails["logo"] ?>" height="110px" width="140px" style="float:none;margin:10px 0px 0px 0px;">						<br/>
            <h5 style="font-size:20px;margin:3px;color: #bf0707;background: rgba(204, 204, 204, 0.28);">A Complete Child Maker</h5>
          <h1 class="school" style="font-size:48px;margin:3px;color: #000;word-spacing: 10px;background: rgba(204, 204, 204, 0.28);"><?php echo $LinksDetails["site_name"] ?></h1>
           <span style="font-size:18px;font-weight:800;color: #000;background:rgba(204, 204, 204, 0.63)"><?php echo ucfirst(nl2br($LinksDetails["contact_content"])) ?> </span>
      </br>
           
           </td>
        </tr>
      </table>
      <br /><br /><br /><br /><br />
      <div style="border: 7px solid;
    border-color: #6062c1;
    background-color: #f9f9f9;
    font-weight: 800;
    font-size: 30px;
    color: #e50d0d;
    padding:2px 8px;
    width: 368;"><b>ACHIEVEMENT RECORD</b></div> 
      
      <br/>
      <div style="font-size:18px;font-weight:800;color: #000;margin-top:-10px;"><b style="background: #4c524c;color: #fff;padding:2px 5px;">Session - <?php echo $aryForm["session"] ?></b></span><br/>
      </center>
    </div>
    <br /><br />
    <div style="position: relative;top: 0px;margin-top: 3px;">
      <?php if($aryForm['photo']!=""){ ?> <div style="float:right;margin:65px 30px 0px 0px;  border: 5px solid #6B6868;">
            <img src="media/photo/<?php echo $aryForm["photo"]; ?>" style="height:140px;width:120px" />
           
     </div>     <?php } ?>            
    

    <span style="font-size:24px;font-weight:700;margin-left: 0px;margin-bottom:5px;  color: rgb(197, 26, 39);  background: #F6FC25;
  padding: 2px 66px 2px 15px;">STUDENT PROFILE</span>
  <br />
  
    <table class="table" style="font-weight:700;margin-left:10px;width: 70%;margin-top:5px;">
      <tr>
        <td class="dd" width="30%">Name</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["name"] ?></td>
      </tr>
      <tr>
        <td class="dd" width="30%">Class</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["class"] ?></td>
      </tr>
       <tr>
        <td class="dd" width="30%">Section</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["section"] ?></td>
      </tr>
       <tr>
        <td class="dd" width="30%">D.O.B</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo date("d-M-Y",strtotime($aryForm["dob"])) ?></td>
      </tr>
       <tr>
        <td class="dd" width="30%">Roll Number</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["foccupation"] ?></td>
      </tr>
       <tr>
        <td class="dd" width="30%">Admission No.</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["admissionno"] ?></td>
      </tr>
      
      
      
      <tr>
        <td class="dd" width="30%">Mother's Name</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["mname"] ?></td>
      </tr>
      <tr>
        <td class="dd" width="30%">Father's Name</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["fname"] ?></td>
      </tr>
      
      <tr>
        <td class="dd" width="30%">Contact </td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["mobile"] ?></td>
      </tr>
      
      <!-- <tr>
        <td class="dd" widph="30%">Roll No.</td>
        <td class="dd" widph="2%">:</td>
        <td class="dd" widph="68%"><?php echo $aryForm["foccupation"] ?></td>
      </tr>-->
      <tr>
        <td class="dd" width="30%">Address</td>
        <td class="dd" width="2%">:</td>
        <td class="dd" width="68%"><?php echo $aryForm["address"] ?></td>
      </tr>
    </table>
    <br/>
    
      <span style="font-size:24px;font-weight:700;color:blue; margin-left:0px;margin-bottom:5px;  color: rgb(197, 26, 39);  background: #F6FC25;
  padding: 2px 135px 2px 15px;">HEALTH STATUS</span> <br />
   
     <table class="table" style="font-weight:700;font-size:15px !important;margin-left:10px;width:90%;margin-top:5px;">
      <tr>
        <td class="dd" width="10%">Height</td>
        <td class="dd" width="15%" style="border-bottom:1px dotted black"><?php echo $aryForm["height"] ?></td>
        <td class="dd" width="15%">Weight</td>
        <td class="dd" width="15%" style="border-bottom:1px dotted black"><?php echo $aryForm["weight"] ?></td>
        <td class="dd" width="25%">Blood group</td>
        <td class="dd" width="20%" style="border-bottom:1px dotted black"><?php // echo $aryForm["feducation"] ?></td>
      </tr>
      <tr>
       <td style="border-top:none;" class="dd">Vision(L)</td>
        <td class="dd" style="border-bottom:1px dotted black;border-top:none;"><?php echo $aryForm["mincome"] ?></td>
        <td style="border-top:none;" class="dd">Vision(R)</td>
        <td class="dd" style="border-bottom:1px dotted black;border-top:none;"><?php echo $aryForm["fincome"] ?></td>
        <td style="border-top:none;" class="dd">Dental Hygiene</td>
        <td class="dd" style="border-bottom:1px dotted black;border-top:none;"><?php //echo $aryForm["hygiene"] ?></td>
        
      </tr>
     </table>
   </div>
     </div>
     </div>
     </div>
     </div>
  </div>
  </div>
  <?php
	}
}
?>
</div>
<input type="hidden" name="smsTXT" id="smsTXT" value="<?php echo $smsAry; ?>" />
<input type="hidden" name="examtype" id="examtype" value="<?php echo $_GET["type"]; ?>" />
<?php
}
elseif(isset($_GET['msg'])){
?>
	 <div style="height:950px;  border: 5px solid #218E27;;margin:10px 0px;">
		 <center>
     		 <h1 style="color: #213308;font-family: cursive;color: #DD1921;font-size: 48px;">Principal's Message</h1>
       </center>
     <div style="border:5px solid #ccc;margin:5px 10px 5px 25px;width:400px;"> <img src="<?php echo $LinksDetails["principal_image"] ?>" height="300px" width="400px"/></div>
     <div style="  width: 275px;  margin: 10px 0px 0px 62px;">
     <span style="color:#2B7109;font-size:25px;font-weight:800;"><?php echo ucfirst(nl2br($LinksDetails["admin_fname"])) ?></span>
     <br/>
     </div>
     <br/>
         <center> <div style="font-size:17px;text-align: justify;font-weight: bold;padding: 5px 25px;color:#1224A5;"><?php echo ucfirst(nl2br($LinksDetails["message"])) ?></div></center>
      
   
    </div>
<?php
  }
elseif(isset($_GET['last'])){
?>
	<div style="height:1010px;margin: 0px 0px 0px 0px;">
  <div style="height:1002px;border:10px solid #219408;margin:15px 0px;">
   <div style="height:987px;border: 7px solid #D8C212;">
  <div style="height:978px;border: 5px solid #D81212; font-weight:800;">
 
 		 <div class="inner-print" style="height: 513px;border: 2px solid #D81212;margin: 5px;">
    <center>
      <span style="font-weight:800;font-size:20px;  color: rgb(245, 25, 25);"><b>Students are assessed according to the following grades :</b></span>
      <h3 style="margin-bottom:0px;color: #219408;">GRADING SYSTEM</h3>
  </center>
 	  <div style="width:50%;float:left;margin:8px 0px 0px 10px;">
       <span style="font-size:22px;font-weight:700;margin-left: 45px;margin-bottom:5px;  color:rgb(245, 25, 25);">
       SCHOLASTIC - A</span>
        <table border="1" cellpadding="1" cellspacing="0" style="text-align:center;color:#1224A5;font-size: 14px;width:100%;font-weight: 800;">
           
            <tr>
            	<td>MARK RANGE</td><td>GRADE</td><td>GRADE POINT</td>
            </tr>
            <tr>
            	<td>91 - 100</td><td>A1</td><td>10.0</td>
            </tr>
            <tr>
            	<td>81 - 90</td><td>A2</td><td>9.0</td>
            </tr>
            <tr>
            	<td>71 - 80</td><td>B1</td><td>8.0</td>
            </tr>
            <tr>
            	<td>61 - 70</td><td>B2</td><td>7.0</td>
            </tr>
            <tr>
            	<td>51 - 60</td><td>C1</td><td>6.0</td>
            </tr>
            <tr>
            	<td>41 - 50</td><td>C2</td><td>5.0</td>
            </tr>
            <tr>
            	<td>33 - 40</td><td>D</td><td>4.0</td>
            </tr>
            <tr>
            	<td>21 - 32</td><td>E1</td><td>3.0</td>
            </tr>
            <tr>
            	<td>0 - 20</td><td>E2</td><td>2.0</td>
            </tr>
        </table>
        </div>
      <div style="width:40%;float:right;margin:8px 0px 0px 50px;">
       <span style="font-size:22px;font-weight:700;margin-left: 45px;margin-bottom:5px;  color: rgb(245, 25, 25);">
       SCHOLASTIC - B</span>
        <table border="1" cellpadding="1" cellspacing="0" style="text-align:center;width:95%;color:#1224A5;font-size: 14px;font-weight:800;line-height:29px;">
           
            <tr>
            	<td>GRADE</td>
            </tr>
            <tr>
            	<td>A</td>
            </tr>
            <tr>
            	<td>B</td>
            </tr>
            <tr>
            	<td>C</td>
            </tr>
            <tr>
            	<td>D</td>
            </tr>
            <tr>
            	<td>E</td>
            </tr>
            
            
        </table>
        </div>
      <div style="margin:15px 5px 0px 5px ; float: left;color:#1224A5;">  
        <p style="font-size: 14px;font-weight: 800;">Promotion is based on the day-to-day work of the students throughout the year and also on the performance in the terminal examination.</p>
          <table border="1" cellpadding="1" cellspacing="0" style="text-align:center;width:98%;color:#1224A5;font-size: 14px;font-weight:800;">
           
            <tr>
            	<td>* First Term</td>
                <td>-FA1(10%) + FA2(10%) + SA1(30%)</td>
                <td>Formative Assesment(FA)1+2+3+4</td>
                <td> = 40%</td>
            </tr>
            <tr>
            	<td>* Second Term</td>
                <td>-FA3(10%) + FA4(10%) + SA2(30%)</td>
                <td>Summative Assesment(SA)1+2</td>
                <td> = 60%</td>
            </tr>
            </table>
            <p style="color:#1224A5;font-size: 14px;font-weight: 800;"><b>Percentile : </b> A percentile rank is the percentage of scores that fall below a given score. To find the percentile rank of a score x, out of a set of n scores, where x is not included, use </p>
            <span style="border-bottom: 1px solid #000;margin-left:20px;">No.of Score below x </span> * 100 = Percentile Rank
            <p style=" margin: -1px 0px 0px 80px;">n</p>
        </div>
   </div>
  		 <div style="height: 150px;border: 2px solid #D81212;margin: 5px;color:#1224A5;padding-left:5px;">
   		<h3 style="text-align:center;margin: -1px;color: #219408;">LIFE SKILLS ASSESSMENT (2A)</h3>
        <p>The 5 point grading scale for life skills Assessment is given below : </p>
        <ul style="width:100%">
        	<li style="width:40%;float:left;">Most Indicators in a skill - A</li>
            <li style="width:60%;float:left;">Some Indicators in a skill - C</li>
            <li style="width:40%;float:left;">Most Indicators in a skill - B</li>
            <li style="width:60%;float:left;">Few Indicators in a skill - D</li>
            <li style="width:40%;float:left;">Most Indicators in a skill - E</li>
        </ul>
   </div>  
   			 <h3 style="text-align:center;color:#1224A5;margin: -1px;color: #219408;">Note to Parents</h3>
   		 <div style="height: 125px;border: 2px solid #D81212;margin: 0 auto;color:#1224A5;width:85%;">
           
            <ol style="width:92%">
                <li>Reports will not be issued if fee is pending.</li>
                <li>Promotion depends on the child's performance throughout the year and not merely on marks scored in the final examination.                </li>
                <li>The decision of the Principal with regard to promotion in final.</li>
                <li>If this report card is lost or multilated by the student, a duplicate card will be issued on payment of Rs.300/-</li>
            </ol>
       </div>
          <div style="height: 125px;margin: 0 auto;color:#1224A5;width:80%;">
         	 <h4 style="margin: 5px 0px -1px 230px;">Prepared By:</h4>
          	 <div style="margin: -12px 0px 0px 15px;float:left;"> <img src="<?php echo $LinksDetails["logo"] ?>" height="80px" width="100px" style="margin:12px 0px 0px 10px;"></div>
             <div style="float:left;text-align:center;margin-left:5px;"> <h3 style="font-size:30px;margin:5px 0px 0px 0px;color: #EC1E1E;font-family: Algerian;"><?php echo ucfirst($LinksDetails["site_name"]) ?></h3>
          		 <span style="font-size:18px;font-weight:800;color: #186916;"> <?php echo $LinksDetails["website"] ?></span>
         	</div> 
            <div style=" margin: 85px 0px -1px 30px;"><?php echo ucfirst(nl2br($LinksDetails["extra_footer"])) ?></div>
      </div>
           
         </div>
         
     </div>
     </div>
  </div>
  </div>
<?php 
}
?>
</div>
