|
Server IP : 2a02:4780:11:1359:0:1d43:a566:2 / Your IP : 216.73.216.168 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 ] |
|---|
<?php
include("../link/databaseconnection.php");
$flag=$_REQUEST['flag'];
switch($flag)
{
case 1:
$photo=$_FILES['photo']['name'];
$title=$_POST['title'];
$tempname=$_FILES['photo']['tmp_name'];
$location="img/";
$ins="insert into gallery(image,title) values('$photo','$title')";
if(mysqli_query($conn,$ins))
{
move_uploaded_file($tempname,$location.$photo);
echo"Successfully Add";
}
else
{
echo"not add";
}
break;
case 111:
$video=$_POST['video'];
$date=$_POST['date'];
$class=$_POST['class'];
$text=$_POST['text'];
$subject=$_POST['subject'];
$ins="insert into online(date,class,video,text,subject) values('$date','$class','$video','$text','$subject')";
if(mysqli_query($conn,$ins))
{
echo"Successfully Add";
}
else
{
echo"not add";
}
break;
case 2:
$sel="select * from gallery";
$res=mysqli_query($conn,$sel);
?>
<table class="table table-stript">
<tr>
<th>Sr. no.</th><th>Image</th><th>Delete</th>
</tr>
<?php
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
?>
<tr class="text-center">
<td><?php echo $s++;?></td><td><img src="../code/img/<?php echo $row['1'];?>" height="100px" width="100px"></td> <td><a href="javascript:;" onclick="deleterow(<?php echo$row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</table>
<?php
break;
case 222:
$sel="select * from online";
$res=mysqli_query($conn,$sel);
?>
<table class="table table-stript">
<tr>
<th>Sr. no.</th><th>Video</th><th>class</th><th>Subject</th><th>Lession</th><th>date</th>
</tr>
<?php
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
?>
<tr class="text-center">
<td><?php echo $s++;?></td><td><iframe style="width:100;height:80" src="https://www.youtube.com/embed/<?php echo $row['video'];?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
</td> <td><?php echo $row['class'];?></td><td><?php echo $row['subject'];?></td><td><?php echo $row['text'];?></td><td><?php echo $row['date'];?></td><td><a href="javascript:;" onclick="deleterow(<?php echo$row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</table>
<?php
break;
case 3:
$id=$_POST['rowid'];
$del="delete from gallery where id='$id'";
$sel="select * from gallery where id='$id'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
$image=$row['1'];
$location="../code/img/".$image;
if(mysqli_query($conn,$del))
{
unlink($location);
echo"ok";
}
else
{
echo"not delete";
}
break;
case 333:
$id=$_POST['rowid'];
$del="delete from online where id='$id'";
if(mysqli_query($conn,$del))
{
echo"ok";
}
else
{
echo"not delete";
}
break;
case 4:
$sch=$_POST['sch'];
//echo $sch;
$class=$_POST['class'];
//echo $class;
$fees=$_POST['fees'];
//echo $fees;
$reason=$_POST['reason'];
$session=$_POST['session'];
//echo $reason;
$ins="insert into fix(sch,class,fees,reason,session) values('$sch','$class','$fees','$reason','$session')";
if(mysqli_query($conn,$ins))
{
echo"Submit";
}
else
{
echo"not add";
}
break;
case 5:
$session=$_POST['session'];
//echo $session;
$sel="select * from fix where session='$session'";
$res=mysqli_query($conn,$sel);
?>
<script>
$(document).ready(function(){
$('#example').DataTable({
dom: 'Bfrtip',
buttons: ['pdf','print','excel']
});
});
</script>
<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
<thead>
<tr>
<th>Sr. no.</th><th>Session</th><th>Sch</th><th>Class</th><th>Fees Fixed</th><th>Reason</th><th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr. no.</th><th>Session</th><th>Sch</th><th>Class</th><th>Fees Fixed</th><th>Reason</th><th>Action</th>
</tr>
</tfoot>
<tbody>
<?php
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
?>
<tr class="text-center">
<td><?php echo $s++;?></td><td><?php echo $row['session'];?></td><td><?php echo $row['sch'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['fees'];?></td><td><?php echo $row['reason'];?></td> <td><a href="javascript:;" onclick="deleterow(<?php echo$row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
break;
case 6:
$id=$_POST['rowid'];
$del="delete from fix where id='$id'";
$sel="select * from gallery where id='$id'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
if(mysqli_query($conn,$del))
{
echo"ok";
}
else
{
echo"not delete";
}
break;
//// for class teacher
case 7:
$name=$_POST['name'];
$class=$_POST['class'];
$mobile=$_POST['mobile'];
$password=$_POST['password'];
$section=$_POST['section'];
$ins="insert into classteacher(name,class1,mobile,password,section) values('$name','$class','$mobile','$password','$section')";
if(mysqli_query($conn,$ins))
{
echo"Successfully Add";
}
else
{
echo"not add";
}
break;
//// for class teacher close
//// for class teacher Delete
case 10:
$id=$_POST['rowid'];
$del="delete from classteacher where id='$id'";
if(mysqli_query($conn,$del))
{
echo"Delete";
}
else
{
echo"not delete";
}
break;
//for show class teacher Delete CLOSE
//for show class teacher
case 8:
$sel="select * from classteacher";
$res=mysqli_query($conn,$sel);
?>
<script>
$(document).ready(function(){
$('#example').DataTable({
dom: 'Bfrtip',
buttons: ['pdf','print','excel']
});
});
</script>
<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
<thead>
<tr >
<th>Sr. no.</th><th>ClassTeacher</th><th>ClassTeacher of Class</th><th>Mobile</th><th>Password</th><th>Action</th>
</tr>
</thead>
<tbody>
<?php
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
?>
<tr class="text-center">
<td><?php echo $s++;?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class1'];?>/<?php echo $row['section'];?></td><td><?php echo $row['mobile'];?></td><td><?php echo $row['password'];?></td> <td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a>   <a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
break;
//for show class teacher
///for update class teacher
case 9:
$id=$_REQUEST['id'];
$sel="select * from classteacher where id='$id'";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
?>
<form class="form-horizontal" onsubmit="return updaterow(this)">
<div class="form-group">
<label class="col-sm-4 control-label"> Name </label>
<div class="col-sm-6"><input type="text" class="form-control" value="<?php echo $row['name'];?>" name="name" ></div>
<input type="hidden" <?php echo $id;?> name="id">
</div>
<div class="form-group">
<label class="col-sm-4 control-label"> ClassTeacher </label>
<div class="col-sm-6"><select class="form-control" name="class"><option <?php if($row['class1']=='NURSERY'){echo'selected';}?>>NURSERY</option>
<option <?php if($row['class1']=='LKG'){echo'selected';}?>>LKG</option>
<option <?php if($row['class1']=='UKG'){echo'selected';}?>>UKG</option>
<option <?php if($row['class1']=='PLAY GROUP'){echo'selected';}?>>PLAY GROUP</option>
<option <?php if($row['class1']=='FIRST'){echo'selected';}?>>FIRST</option>
<option <?php if($row['class1']=='SECOND'){echo'selected';}?>>SECOND</option>
<option <?php if($row['class1']=='THIRD'){echo'selected';}?>>THIRD</option>
<option <?php if($row['class1']=='FOURTH'){echo'selected';}?>>FOURTH</option>
<option <?php if($row['class1']=='FIFTH'){echo'selected';}?>>FIFTH</option>
<option <?php if($row['class1']=='SIXTH'){echo'selected';}?>>SIXTH</option>
<option <?php if($row['class1']=='SEVENTH'){echo'selected';}?>>SEVENTH</option>
<option <?php if($row['class1']=='EIGHTH'){echo'selected';}?>>EIGHTH</option>
</select></div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label"> Section </label>
<div class="col-sm-6"><select class="form-control" name="section">
<option <?php if($row['section']=='A'){echo'selected';}?>>A</option>
<option <?php if($row['section']=='B'){echo'selected';}?>>B</option>
</select></div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label"> Mobile </label>
<div class="col-sm-6"><input type="text" class="form-control" value="<?php echo $row['mobile'];?>" name="mobile" ></div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label"> Password </label>
<div class="col-sm-6"><input type="text" class="form-control" value="<?php echo $row['password'];?>" name="password" ></div>
</div>
<div class="form-group">
<center><button class='btn btn-primary'>Update</button></center>
</div>
<?php
break;
//////updatation of classteacher
case 11:
$name=$_POST['name'];
// echo $name;
$id=$_POST['id'];
/// echo $id;
$class=$_POST['class'];
// echo $class;
$mobile=$_POST['mobile'];
// echo $mobile;
$password=$_POST['password'];
$section=$_POST['section'];
// echo $password;
$up12="update classteacher set name='$name',class1='$class',mobile='$mobile',password='$password',section='$section' where id='$id' ";
$res1=mysqli_query($conn,$up12);
if($res1)
{
echo"Update";
}
else
{
echo"not update";
}
break;
//////updatation of classteacher
case 61:
$id=$_POST['rowid'];
$sel="select * from registration where application='$id' order by id desc";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
$name=$row['name'];
$class=$row['subject'];
echo $name;
//echo $class;
break;
case 62:
$id=$_POST['rowid'];
$sel="select * from registration where application='$id' order by id desc";
$res=mysqli_query($conn,$sel);
$row=mysqli_fetch_array($res,MYSQLI_BOTH);
//$name=$row['name'];
$class=$row['subject'];
//echo $name;
echo $class;
break;
//// for class teacher
case 63:
$session=$_POST['session'];
$fix=$_POST['fix'];
$sch=$_POST['sch'];
$name=$_POST['name'];
$class=$_POST['class'];
$fee=$_POST['fee'];
$conv=$_POST['conv'];
$reason=$_POST['reason'];
date_default_timezone_set("asia/kolkata");
$date=date("Y-m-d");
//echo $date;
$ins="insert into free(name,class,sch,fee,conv,reason,session,fix,date) values('$name','$class','$sch','$fee','$conv','$reason','$session','$fix','$date')";
if(mysqli_query($conn,$ins))
{
echo"Successfully Add";
}
else
{
echo"not add";
}
break;
case 64:
//$session=$_POST['session'];
//echo $session;
$sel1t3="select * from session order by id desc ";
$res1t3=mysqli_query($conn,$sel1t3);
$row1h3=mysqli_fetch_array($res1t3,MYSQLI_BOTH);
$session=$row1h3['session'];
$sel="select * from free where session='$session' ";
$res=mysqli_query($conn,$sel);
$selh="select * from free where session='$session' ";
$res1h=mysqli_query($conn,$selh);
//$class1=$row['class'];
$s1h=0;
while($row1h=mysqli_fetch_array($res1h,MYSQLI_BOTH))
{
$fix1h=$row1h['fix'];
$s1h=$s1h+$fix1h;
}
$sel1="select * from free where fee='YES' and session='$session'";
$res1=mysqli_query($conn,$sel1);
$s1=0;
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
{
$class1=$row1['class'];
$sch1=$row1['sch'];
$sel12="select * from fees where class='$class1' and session='$session' ";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
$fees1=$row12['fees'];
$s1=$s1+$fees1;
}
/////for conv
$sel1t="select * from free where conv='YES' and session='$session' ";
$res1t=mysqli_query($conn,$sel1t);
$s2=0;
while($row1t=mysqli_fetch_array($res1t,MYSQLI_BOTH))
{
$class1t=$row1t['class'];
$sch1t=$row1t['sch'];
/////for show conv
$sel121="select * from registration where application='$sch1t' and code!='' and session='$session' order by id desc ";
$res121=mysqli_query($conn,$sel121);
$row121=mysqli_fetch_array($res121,MYSQLI_BOTH);
$code11=$row121['code'];
//$s1=$s1+$fees1;
$sel1211="select * from convence where code='$code11' and session='$session' order by id desc ";
$res1211=mysqli_query($conn,$sel1211);
$row1211=mysqli_fetch_array($res1211,MYSQLI_BOTH);
$conv11=$row1211['conv'];
$s2=$s2+$conv11;
}
//echo $s1;
//echo '<br/>';;
//echo $s2;
?>
<script>
$(document).ready(function(){
$('#example').DataTable({
dom: 'Bfrtip',
buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
});
});
</script>
<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
<thead>
<tr>
<th>Sr. no.</th><th>Session</th><th>Sch</th><th>Name</th><th>Class</th><th>Fee-Free</th><th> Conv-Free</th><th>Cons-Fixed</th><th>Reason</th><th>Date</th><th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr. no.</th><th>Session</th><th>Sch</th><th>Name</th><th>Class</th><th><?php echo $s1;?></th><th><?php echo $s2;?></th><th><?php echo $s1h;?></th><th>Reason</th><th>Date</th><th>Action</th>
</tr>
</tfoot>
<tbody>
<?php
$s12=0;
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
$fix12=$row['fix'];
$s12+$s12+$fix12;
?>
<tr class="text-center">
<td><?php echo $s++;?></td><td><?php echo $row['session'];?></td><td><?php echo $row['sch'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['fee'];?></td><td><?php echo $row['conv'];?></td><td><?php echo $row['fix'];?></td><td><?php echo $row['reason'];?></td><td><?php echo $row['date'];?></td> <td></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
break;
case 6464:
//$session=$_POST['session'];
//echo $session;
$sel1t3="select * from session order by id desc ";
$res1t3=mysqli_query($conn,$sel1t3);
$row1h3=mysqli_fetch_array($res1t3,MYSQLI_BOTH);
$session=$row1h3['session'];
$sel="select * from free where session='$session' ";
$res=mysqli_query($conn,$sel);
$selh="select * from free where session='$session' ";
$res1h=mysqli_query($conn,$selh);
//$class1=$row['class'];
$s1h=0;
while($row1h=mysqli_fetch_array($res1h,MYSQLI_BOTH))
{
$fix1h=$row1h['fix'];
$s1h=$s1h+$fix1h;
}
$sel1="select * from free where fee='YES' and session='$session'";
$res1=mysqli_query($conn,$sel1);
$s1=0;
while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
{
$class1=$row1['class'];
$sch1=$row1['sch'];
$sel12="select * from fees where class='$class1' and session='$session' ";
$res12=mysqli_query($conn,$sel12);
$row12=mysqli_fetch_array($res12,MYSQLI_BOTH);
$fees1=$row12['fees'];
$s1=$s1+$fees1;
}
/////for conv
$sel1t="select * from free where conv='YES' and session='$session' ";
$res1t=mysqli_query($conn,$sel1t);
$s2=0;
while($row1t=mysqli_fetch_array($res1t,MYSQLI_BOTH))
{
$class1t=$row1t['class'];
$sch1t=$row1t['sch'];
/////for show conv
$sel121="select * from registration where application='$sch1t' and code!='' and session='$session' order by id desc ";
$res121=mysqli_query($conn,$sel121);
$row121=mysqli_fetch_array($res121,MYSQLI_BOTH);
$code11=$row121['code'];
//$s1=$s1+$fees1;
$sel1211="select * from convence where code='$code11' and session='$session' order by id desc ";
$res1211=mysqli_query($conn,$sel1211);
$row1211=mysqli_fetch_array($res1211,MYSQLI_BOTH);
$conv11=$row1211['conv'];
$s2=$s2+$conv11;
}
//echo $s1;
//echo '<br/>';;
//echo $s2;
?>
<script>
$(document).ready(function(){
$('#example').DataTable({
dom: 'Bfrtip',
buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
});
});
</script>
<div class="table-responsive">
<table id="example" class="display nowrap" cellspacing="0" width="100%" border="1px">
<thead>
<tr>
<th>Sr. no.</th><th>Session</th><th>Sch</th><th>Name</th><th>Class</th><th>Fee-Free</th><th> Conv-Free</th><th>Cons-Fixed</th><th>Reason</th><th>Date</th><th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Sr. no.</th><th>Session</th><th>Sch</th><th>Name</th><th>Class</th><th><?php echo $s1;?></th><th><?php echo $s2;?></th><th><?php echo $s1h;?></th><th>Reason</th><th>Date</th><th>Action</th>
</tr>
</tfoot>
<tbody>
<?php
$s12=0;
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
$fix12=$row['fix'];
$s12+$s12+$fix12;
?>
<tr class="text-center">
<td><?php echo $s++;?></td><td><?php echo $row['session'];?></td><td><?php echo $row['sch'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['class'];?></td><td><?php echo $row['fee'];?></td><td><?php echo $row['conv'];?></td><td><?php echo $row['fix'];?></td><td><?php echo $row['reason'];?></td><td><?php echo $row['date'];?></td> <td><a href="javascript:;" onclick="deleterow(<?php echo$row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
break;
case 65:
$id=$_POST['rowid'];
$del="delete from free where id='$id'";
if(mysqli_query($conn,$del))
{
echo"Delete";
}
else
{
echo"not delete";
}
break;
case 101:
$photo=$_FILES['photo']['name'];
$period=$_POST['period'];
$hours=$_POST['hours'];
$min=$_POST['min'];
$id=$_POST['id'];
$tempname=$_FILES['photo']['tmp_name'];
$location="img/";
$p=rand(10000,50000).$photo;
if($id!='')
{
$ins="update bell set period='$period',min='$min',hours='$hours' where id='$id' ";
if(mysqli_query($conn,$ins))
{
echo"Update";
}
else
{
echo"not update";
}
}
else
{
$ins="insert into bell(ringtone,period,min,hours) values('$p','$period','$min','$hours')";
if(mysqli_query($conn,$ins))
{
move_uploaded_file($tempname,$location.$p);
echo"Successfully Add";
}
else
{
echo"not add";
}
}
break;
case 201:
$sel="select * from bell";
$res=mysqli_query($conn,$sel);
?>
<table class="table table-stript">
<tr>
<th>Sr. no.</th><th>Period</th><th>Time</th><th>Delete</th>
</tr>
<?php
$s=1;
while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
{
?>
<tr class="text-center">
<td><?php echo $s++;?></td><td><?php echo $row['period']?> </td> <td><?php echo $row['hours']?> : <?php echo $row['min']?></td> <td><a href="bell_up.php?flag=<?php echo $row['id'] ?>" ><span class="glyphicon glyphicon-pencile">edit</span></td><td><a href="javascript:;" onclick="deleterow(<?php echo $row['0'];?>)"><span class="glyphicon glyphicon-trash"></span></td>
</tr>
<?php
}
?>
</table>
<?php
break;
case 301:
$id=$_POST['rowid'];
$del="delete from bell where id='$id'";
if(mysqli_query($conn,$del))
{
echo"ok";
}
else
{
echo"not delete";
}
break;
}
?>