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/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u490972518/domains/ppschool.org.in/public_html/code/user_code.php
<?php
include("../link/databaseconnection.php");
$flag=$_REQUEST['flag'];

switch($flag)
{
	case 1:
	
	$area=$_POST['area'];
	$email=$_POST['email'];
	$password=$_POST['password'];
	$name=$_POST['name'];
	
	$sel="select * from admin_login where email='$email' order by id desc";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	$date=date('d-m-Y');
	if($row)
	{
	echo "Allready Email Exist";
	} 
	else
	{
$ins="insert into admin_login(name,email,password,area,status,date) values('$name','$email','$password','$area','','$date')";
	
	if(mysqli_query($conn,$ins))
	{
	
		echo "Successfully Add";
	}
	else
	{
		echo "not insert";
	}
	}
	
	
	
	
	break;
	
	
	
	
	
	case 2:
	
	$sel="select * from admin_login where id>1 and status='' order by id desc";
	$res=mysqli_query($conn,$sel);
	
	?>
	<div class="table-responsive">
	<table class="table table-stript">
	<tr>
	<th>Sr</th><th>Area</th><th>Name</th><th>Email</th><th>Password</th><th>Delete</th>
	</tr>
	<?php 
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
	
	?>
	<tr>
	
	<td><?php echo $s++;?></td><td><?php echo $row['area'];?></td><td><?php echo $row['name'];?></td><td><?php echo $row['email'];?></td><td><?php echo $row['password'];?></td><td><a href="javascript:;" onclick="deleterow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-trash"></span></a></td>
	<?php
	}
	
	?>
	</tr>
	</table>
	</div>
	<?php 
	
	break;
	
	
	case 3:
	
	$rowid=$_POST["rowid"];
	$del="update admin_login  set status='Delete' where id='$rowid'";
	if(mysqli_query($conn,$del))
	{
		echo"Data deleted";
	}
	else
	{
		echo"not delete";
		
	}
	
	
	break;
	
	
	case 41:
	
	$product=$_POST['article'];
	$purpose=$_POST['purpose'];
	$amount=$_POST['amount'];
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	//$subclass=strtoupper($subclass1);
	
	if($product!='' and $purpose!='' and $amount!='')
	{
	$ins="insert into hisab(product,purpose,amount,date) values('$product','$purpose','$amount','$date')";
	if(mysqli_query($conn,$ins))
	{
		echo"successfully Add";
	}
	else
	{
		echo"not add";
	}
	}
	else
	{
		echo"Fillup Box";
	}
	break;
	case 411:
	?>
	

	<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>Article</th><th>Purpose</th><th>Amount</th><th>Date</th><th>Action</th>
	</tr>
        </thead>

<tbody>		
  <?php
	$sel="select * from hisab order by id desc";
	$res=mysqli_query($conn,$sel);
	
	 
	$s=1;
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$date1=$row['date'];
	$date=date("d-m-Y",strtotime($date1));
	?>
	<tr>
	
	<td><?php echo $s++;?></td><td><textarea rows="3" cols="30"><?php echo $row['product'];?></textarea></td><td><?php echo $row['purpose'];?></td>
	<td><?php echo $row['amount'];?></td><td><?php echo $date;?></td><td><a href="javascript:;" onclick="editrow(<?php echo $row['id'];?>)"><span class="glyphicon glyphicon-pencil"></span></a></td>
	
	</tr>
	<?php
	}
	
	?>
	</tbody>
	</table>
	</div>
	<?php 
	
	break;
	
	case 412:
	$eid=$_REQUEST['id'];
	//echo"$eid";
	$sel="select * from  hisab where id='$eid'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	//$a=$row['village'];
	//$b=$row['postoffice'];
	//$c=$row['dist'];
	//$d=$a." ".$b." ".$c;
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	?>
	
	<div class="panel-group">
				<div class="panel panel-primary">
				
				
				<div class="panel-body">
				<form class="form-horizontal" id="myform" onsubmit="return updaterow(this)">
				<div class="form-group">
				<input type="hidden" value="<?php echo $row['id'];?>" name="id"/>
				<input type="hidden" value="<?php echo $date;?>" name="date"/>
				<label class="col-sm-3 control-label">Article</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['product'];?>" name="product"/></div>
				</div>
				<br/>
				<div class="form-group">
				<label class="col-sm-3 control-label">Purpose</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['purpose'];?>" name="purpose"/></div>
				</div>
				<br/>
				
				
				
				
				
				<br/>
				
				
				
				<div class="form-group">
				<label class="col-sm-3 control-label">Amount</label>
				<div class="col-sm-8"><input type="text" class="form-control" value="<?php echo $row['amount'];?>" name="amount"/></div>
				<br/>
				</div>
				
				
				<center><button class="btn btn-primary">Update</button>
				
				 &emsp;&emsp;&emsp;<button class="btn btn-danger" data-dismiss="modal"> Close</button>
				</center>
				</div>
				</form>
	</div>
	</div>
	
	
	
	<?php
	break;
	case 413:
	$id=$_POST['id'];
	$product=$_POST['product'];
	$amount=$_POST['amount'];
	//$mname=$_POST['mname'];
	//$dob=$_POST['dob'];
	//$class=$_POST['class'];
	//$subject=$_POST['subject'];
	//$add=$_POST['add'];
	$purpose=$_POST['purpose'];
	date_default_timezone_set('asia/kolkata');
	$date=date('Y-m-d');
	
	$sel="select * from  hisab where id='$id'";
	$res=mysqli_query($conn,$sel);
	$row=mysqli_fetch_array($res,MYSQLI_BOTH);
	
	$up="update hisab set product='$product',purpose='$purpose',date='$date',amount='$amount' where id='$id' ";
	if(mysqli_query($conn,$up))
	{
		
		echo"Update";
	}
	else
	{
		echo"not update";
	}
	
	break;
	case 414:
	?>
	

	<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>Article</th><th>Purpose</th><th>Amount</th><th>Date</th><th> Total Income</th><th>  Available Balance </th>
	</tr>
        </thead>

<tbody>		
  <?php
  $sdate=$_POST['sdate'];
  $edate=$_POST['edate'];
 // $sesion=$row['session'];
	$sel1="select * from studentfees where  date between '$sdate' and '$edate' order by id asc ";
	$res1=mysqli_query($conn,$sel1);
	$paidt='0';
	while($row1=mysqli_fetch_array($res1,MYSQLI_BOTH))
	{
		$paid=$row1['paid'];
	$paidt=$paidt+$paid;
	}
	
	 $sel="select * from hisab where  date between '$sdate' and '$edate' order by id asc ";
	$res=mysqli_query($conn,$sel);
	$s=1;
	$tot='0';
	while($row=mysqli_fetch_array($res,MYSQLI_BOTH))
	{
		$date1=$row['date'];
	$date=date("d-m-Y",strtotime($date1));
	$amounta=$row['amount'];
	$tot=$tot+$amounta;
	$balance=$paidt-$tot;
	?>
	<tr>
	
	<td><?php echo $s++;?></td><td><textarea rows="3" cols="30"><?php echo $row['product'];?></textarea></td><td><?php echo $row['purpose'];?></td>
	<td><?php echo $row['amount'];?></td><td><?php echo $date;?></td><td>-</td><td>-</td>
	
	</tr>
	<?php
	}
	
	?>
	<tr align="center">
	
	<td style="font-weight:bold;font-size:19px">Total</td><td></td><td style="font-weight:bold;font-size:19px;color:red">Spend</td><td style="font-weight:bold;font-size:19px;color:red"><?php echo $tot;?>&nbsp;(Rs)</td><td style="font-weight:bold;font-size:19px;color:green"></td><td style="font-weight:bold;font-size:19px;color:green"><?php echo $paidt ;?>&nbsp;(Rs)</td><td style="font-weight:bold;font-size:19px;color:green"><?php echo $balance;?>&nbsp;(Rs)</td>
	
	</tr>
	</tbody>
	</table>
	</div>
	<?php 
	
	break;
}

?>

MMCT - 2023