/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/student_data21092022.php
<?php
include('include/include.php');
$type = $_POST['type'];
$admissionNo = $_POST['admission'];
if( $type == 2){
$keyid = $_POST['keyid'];
$admission = executework ("select * from student_registration where id = '". $keyid."'");
$row = mysqli_fetch_array($admission);
if(!empty($row['photo'])){
$image = $row['photo'];
}
else
{
$image = 'assets/img/user.png';
}
$fee_select = executework("SELECT * from student_fee where class='".$row['PresentClass']."' and admission_no = '".$row['AdmissionNo']."' order by id desc LIMIT 1");
if(mysqli_num_rows($fee_select)>0)
{
$feeRowData = mysqli_fetch_array($fee_select);
$sdAmt = $feeRowData['due_amount'];
}
else
{
$sdAmt = $row['Amount'];
}
$fee_hostel = executework("SELECT * from hostel_payment where class='".$row['PresentClass']."' and admission_no = '".$row['AdmissionNo']."' order by id desc LIMIT 1");
if(mysqli_num_rows($fee_hostel)>0)
{
$hostelRowData = mysqli_fetch_array($fee_hostel);
$hstlAmt = $hostelRowData['due_amount'];
}
else
{
$hstlAmt = $row['hostel_amount'];
}
$fee_add = executework("SELECT * from additional_fee where class='".$row['PresentClass']."' and admission_no = '".$row['AdmissionNo']."' order by id desc LIMIT 1");
if(mysqli_num_rows($fee_add)>0)
{
$AddRowData = mysqli_fetch_array($fee_add);
$AddAmt = $AddRowData['due_amount'];
}
else
{
$AddAmt = $row['add_amount'];
}
$fee_bus = executework("SELECT * from bus_payment where class='".$row['PresentClass']."' and admission_no = '".$row['AdmissionNo']."' order by id desc LIMIT 1");
$BusRowData = mysqli_fetch_array($fee_bus);
$BusAmt1 = $BusRowData['due_amount'];
if(!empty($BusAmt1))
{
$BusAmt = $BusAmt1;
}
else
{
$BusAmt = $row['BusAmount'];
}
// $subCnt = mysqli_num_rows($subject_select);
// // $srow = mysqli_fetch_array($subject_select);
// $sub3 = '';
// for($j=0; $j<$subCnt; $j++)
// {
// $sub4 = $srow['subject']+$j;
// $sub3 .=' '.$sub4;
// }
$p1 = date('Y',strtotime($row['AdmissionDate']));
$p2 = date('Y');
$p3 = '';
$countyear = abs(date('Y',strtotime($row['AdmissionDate']))-date('Y'));
for($i=0; $i<$countyear; $i++)
{
$p4 = $p1+$i.'<br><br>';
$p3 .=' '.$p4;
}
echo json_encode(array(
"studentname" => ucfirst($row['StudentName']),
"AadharNo" => $row['AadharNo'],
"FatherName" => ucfirst($row['FatherName']),
"MotherName" => ucfirst($row['MotherName']),
"FatherMobile" => $row['FatherMobile'],
"Dob" => date('d-m-Y',strtotime($row['Dob'])),
"Gender" => ucfirst($row['Gender']),
"Religion" => ucfirst($row['Religion']),
"Caste" => ucfirst($row['Caste']),
"SubCaste" => ucfirst($row['SubCaste']),
"DoorNo" => ucfirst($row['DoorNo']),
"District" => ucfirst($row['District']),
"Mandal" => ucfirst($row['Mandal']),
"LandMark" => ucfirst($row['LandMark']),
"PinCode" => ucfirst($row['PinCode']),
"SecreName" => ucfirst($row['SecreName']),
"AdmissionDate" => date('d-m-Y',strtotime($row['AdmissionDate'])),
"AdmissionNo" => ucfirst($row['AdmissionNo']),
"Medium" => ucfirst($row['Medium']),
"PresentClass" => ucfirst($row['PresentClass']),
"Section" => ucfirst($row['Section']),
"BankNo" => ucfirst($row['BankNo']),
"IfscCode" => ucfirst($row['IfscCode']),
"Blood" => ucfirst($row['Blood']),
"Email" => ucfirst($row['Email']),
"Mole1" => ucfirst($row['Mole1']),
"Mole2" => ucfirst($row['Mole2']),
"MotherTongue" => ucfirst($row['MotherTongue']),
"StudentPhc" => ucfirst($row['StudentPhc']),
"Hostel" => ucfirst($row['Hostel']),
"Distance" => ucfirst($row['Distance']),
"Transport" => ucfirst($row['Transport']),
"Amount" => $row['Amount'],
"Surname" => ucfirst($row['Surname']),
"syllabus" => $row['syllabus'],
"additional_amount" => $row['add_amount'],
"BusAmount" => $row['BusAmount'],
"RollNo" => $row['RollNo'],
"Academic_year" => $row['Academic_year'],
"Branch" => $row['Branch'],
"studentRollNo" => substr($row['Academic_year'],5).$row['Branch'].'-'.$row['PresentClass'].'-'.$row['RollNo'],
// "countYear1" => $p3,
//"pastYear" => $p3,
"presentYear" => $p1,
// "presentYear" => $p2,
"scount" => $sub3,
"study_amount" => $row['study_amount'],
"study_due_amount" => $sdAmt,
"due_amount" => $feeRowData['due_amount'],
"paid_amount" => $feeRowData['paid_amount'],
"hostel_amount" => $row['hostel_amount'],
"hostel_due_amount" => $hstlAmt,
"hostel_paid_amount" => $hostelRowData['paid_amount'],
"additional_due_amount" => $AddAmt,
"additional_paid_amount" => $AddRowData['paid_amount'],
"bus_due_amount" => $BusAmt,
"bus_paid_amount" => $BusRowData['paid_amount'],
"file_image" => $image,
));
}
$type = $_POST['type'];
$admissionNo = $_POST['admission'];
if($type == 1){
$addCustData = executework("SELECT * FROM student_registration where AdmissionNo like '%".$admissionNo."%'");
$addCust_arr = array();
while($data = mysqli_fetch_assoc($addCustData)){
$id = $data['id'];
$AdmissionNo = $data['AdmissionNo'];
$addCust_arr[] = array("id" => $id, "AdmissionNo" => $AdmissionNo);
}
echo json_encode($addCust_arr);
}
if($_POST['type'] == 3)
{
$admData = executework("SELECT * FROM student_fee where class = '".$_POST['PresentClass']."' and rollno ='".$_POST['studentRollNo']."' and section = '".$_POST['Section']."' and yearOf = '".$_POST['Academic_year']."' and branch = '".$_POST['Branch']."' and syllabus = '".$_POST['syllabus']."'");
$select = mysqli_fetch_array($admData);
$pAmount = $select['paid_amount'];
$total_amount = $pAmount + $_POST['amountdata'];
$paid_amount = executework("UPDATE student_fee set paid_amount = '".$total_amount."',update_date = '".date('Y-m-d H:i:s')."' where class = '".$_POST['PresentClass']."' and rollno ='".$_POST['studentRollNo']."' and section = '".$_POST['Section']."' and yearOf = '".$_POST['Academic_year']."' and branch = '".$_POST['Branch']."' and syllabus = '".$_POST['syllabus']."'");
echo $paid_amount;
}
if($_POST['type'] == 5)
{
$admData = executework("SELECT * FROM student_registration where PresentClass = '".$_POST['PresentClass']."' and Academic_year = '".$_POST['Academic_year']."' and Branch = '".$_POST['Branch']."' order by id desc LIMIT 1");
$rollNoData = mysqli_fetch_array($admData);
$rollNoo = $rollNoData['RollNo'];
$year = substr($_POST['Academic_year'],5);
$code = $_POST['Branch'];
$class = substr($_POST['PresentClass'],0,3);
if($rollNoo > 0)
{
$value = (int) $rollNoo + 1;
$val = sprintf('%03d', $value);
$Roll_value = $year.$code.'-'.$class.'-'.$val;
echo $Roll_value;
}
else {
$value = "1";
$val = sprintf('%03d', $value);
$Roll_value = $year.$code.'-'.$class.'-'.$val;
echo $Roll_value;
}
}
if($_POST['type']==6)
{
$output = '';
$student_profileData = executework("SELECT * FROM student_marks where acadamic_year = '".$_POST['yearOf']."' and Roll_no = '".substr($_POST['stuRoll'],16)."' and class = '".$_POST['stuClass']."'");
$output .= '<h4 align="center"></h4>';
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>Acadamic Year</th>
<th>Exam Type</th>
<th>Subjects</th>
<th>Marks</th>
<th>Subject Marks</th>
</tr>';
$i=1;
while($rowdata = mysqli_fetch_array($student_profileData)){
$output .= '<tr>
<td>'.$rowdata['acadamic_year'].'</td>
<td>'.ucfirst($rowdata['exam_type']).'</td>
<td>'.ucfirst($rowdata['subject']).'</td>
<td>'.ucfirst($rowdata['student_marks']).'</td>
<td>'.ucfirst($rowdata['subject_marks']).'</td>
</tr>';
$i++;
}
echo $output;
}
{
$student_names = executework("SELECT * FROM student_registration PresentClass = '".$_POST['sClass']."' and Section = '".$_POST['Section']."' and Academic_year = '".$_POST['YearOf']."' and syllabus = '".$_POST['syllabusdata']."' and Branch = '".$_POST['Branch']."'");
}
if($_POST['type'] == 8)
{
$student_activity = executework("INSERT INTO student_activity (AdmissionNo,student_name,RollNo,class,section,syllabus,yearOf,branch,name,create_date) values ('".$_POST['AdmissionNo']."','".$_POST['sname']."','".$_POST['RollNo']."','".$_POST['PresentClass']."','".$_POST['Section']."','".$_POST['syllabus']."','".$_POST['Academic_year']."','".$_POST['branch']."','".$_POST['activity_name']."','".date('Y-m-d H:i:s')."')");
echo $student_activity;
}
if($_POST['type'] == 9)
{
$student_remarks = executework("INSERT INTO student_remarks (AdmissionNo,student_name,RollNo,class,section,syllabus,yearOf,branch,name,create_date) values ('".$_POST['AdmissionNo']."','".$_POST['sname']."','".$_POST['RollNo']."','".$_POST['PresentClass']."','".$_POST['Section']."','".$_POST['syllabus']."','".$_POST['Academic_year']."','".$_POST['branch']."','".$_POST['remarks']."','".date('Y-m-d H:i:s')."')");
echo $student_remarks;
}
if($_POST['type'] == 10)
{
$select_remarksData = executework("SELECT * from student_remarks where AdmissionNo = '".$_POST['value']."'");
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>S.No</th>
<th>Remarks</th>
</tr>';
$i=1;
while($remarksData = mysqli_fetch_array($select_remarksData)){
$output .= '<tr>
<td>'.$i.'</td>
<td>'.ucfirst($remarksData['name']).'</td>
</tr>';
$i++;
}
echo $output;
}
if($_POST['type'] == 11)
{
$select_activityData = executework("SELECT * from student_activity where AdmissionNo = '".$_POST['value']."'");
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>S.No</th>
<th>Remarks</th>
</tr>';
$i=1;
while($activityData = mysqli_fetch_array($select_activityData)){
$output .= '<tr>
<td>'.$i.'</td>
<td>'.ucfirst($activityData['name']).'</td>
</tr>';
$i++;
}
echo $output;
}
?>
<?php
if($_POST['type']==13)
{
$insertData = executework("insert into student_marks (subject,student_marks,acadamic_year,name,Roll_no,class,section,create_date,exam_date,reg_no,syllabus_Type) values ('".$_POST['subject']."','".$_POST['marks']."','".$_POST['Academic_year']."','".$_POST['StudentName']."','".$_POST['RollNo']."','".$_POST['PresentClass']."','".$_POST['Section']."','".date('Y-m-d H:i:s')."','".date('Y-m-d',strtotime($_POST['date']))."','".$_POST['AdmissionNo']."','".$_POST['syllabus']."')");
// $student_marksData = executework("SELECT * from student_marks where reg_no = '".$_POST['AdmissionNo']."'");
// $output .= '<div class="table-responsive">
// <table class="table table-bordered">
// <tr>
// <th>Subjects</th>
// </tr> <th>Marks</th>
// ';
// $i=1;
// while($marksData = mysqli_fetch_array($student_marksData)){
// $output .= '<tr>
// <td>'.$marksData['subject'].'</td>
// <td>'.$marksData['student_marks'].'</td>
// </tr>';
// $i++;
// }
// echo $output;
}
?>
<?php
if($_POST['type'] == 14)
{
$student_marksData = executework("SELECT * from student_marks where reg_no = '".$_POST['value']."'");
$output .= '<div class="table-responsive">
<table class="table table-bordered">
<tr>
<th>Subjects</th>
<th>Marks</th>
</tr>';
$i=1;
while($marksData = mysqli_fetch_array($student_marksData)){
$output .= '<tr>
<td>'.$marksData['subject'].'</td>
<td>'.$marksData['student_marks'].'</td>
</tr>';
$i++;
}
echo $output;
}
if($_POST['type'] == 15)
{
// echo "SELECT * FROM fee_structure where year = '".$_POST['Academic_year']."' and class = '".$_POST['PresentClass']."' and syllabus = '".$_POST['Syllabus']."'";
$fee_structure = executework("SELECT * FROM fee_structure where year = '".$_POST['Academic_year']."' and class = '".$_POST['PresentClass']."' and syllabus = '".$_POST['Syllabus']."'");
$feeRow = mysqli_fetch_array($fee_structure);
echo json_encode(array(
"admission_fee" => $feeRow['admission_fee'],
"studying_amount" => $feeRow['studying_amount'],
"addition_fee" => $feeRow['addition_fee'],
"hostel_fee" => $feeRow['tution_fee'],
"bus_fee" => $feeRow['bus_fee'],
));
}
?>
@LwBee Strong Bypass
Upload File
Create New File