ok

Mini Shell

Direktori : /home/shopnoc1/www/
Upload File :
Current File : /home/shopnoc1/www/dashboard.php

<?php
session_start();
if (!isset($_SESSION['user'])) {
  // code...
  header("Location:admin.php");
}

include("header.php");
include("db.php");



?>
<style type="text/css">
	
	table {
  display: block;
  max-width: -moz-fit-content;
  max-width: fit-content;
  margin: 0 auto;
  overflow-x: auto;
  white-space: nowrap;
}

#saf,#adstlist,#applicantlist{
  display: none;
}

</style>

<div class="container py-2">
    <div class="row">
    <div class="col-sm-6 py-2 m-2">
<a href="adminlogout.php" class="btn btn-danger">Click here to Log Out</a>
</div></div>


    <div class="row">
      
      <button class="btn btn-primary btn-block btn-lg m-1"  onclick="document.getElementById('saf').style.display='block'">Student Admission Form</button>
       <button class="btn btn-primary m-1 btn-block btn-lg" onclick="document.getElementById('adstlist').style.display='block'">Admitted Student Information</button>
              <button class="btn btn-primary m-1 btn-block btn-lg" onclick="document.getElementById('applicantlist').style.display='block'">Applicants Information</button>
         </div>
</div>


<div class="container" id="saf">


<!-- Student Admission Form -->

<div class="row">
  <div class="col-sm-12 py-2">
    <h1 class="btn bg-primary text-white text-center">
      Student's Admission Form
      <button class="btn btn-danger" onclick="document.getElementById('saf').style.display='none'">HIDE</button>
    </h1>
</div>

  <div class="col-sm-12">
    <form class="form-horizontal" action="insert.php" method="post" enctype="multipart/form-data">
    <input type="hidden" name="entrydate" value="<?php echo date("jS \ M Y"); ?>" readonly="readonly">
   

    <div class="form-group">
      
      <div class="col-sm-10">
        <input type="text" class="form-control" id="admissiondate" name="admissiondate" required placeholder="Admission Date (dd-mm-yyyy)">
      </div>
</div>

   <div class="form-group">
      
      <div class="col-sm-10">
        <input type="text" class="form-control" id="stdid" name="stdid" required placeholder="Student's ID">
      </div>
</div>


    <div class="form-group">
      
      <div class="col-sm-10">
        <input type="text" class="form-control" id="name" name="nm" required placeholder="Type Student's Name">
      </div>
</div>


  <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="fname" name="fnm" required placeholder="Type Student's Father's Name">
      </div>
</div>

 <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="mname" name="mnm" required placeholder="Type Student's Mother's Name">
      </div>
</div>


 <div class="form-group">

      <div class="col-sm-10">
        <input type="text" class="form-control" id="dob" name="dob" required placeholder="Date of Birth (dd-mm-yyyy)">
      </div>
</div>

 <div class="form-group">

      <div class="col-sm-10">
        <input type="text" class="form-control" id="email" name="email" required placeholder="Type Email Address">
      </div>
</div>

<div class="form-group">
     
      <div class="col-sm-10">          
        <select class="form-control" id="division" name="div" required onchange="updateDistricts()" name="div">
        
        <option value="">--Select Division--</option>
        <option value="Dhaka">Dhaka</option>
        <option value="Chattogram">Chattogram</option>
        <option value="Khulna">Khulna</option>
        <option value="Rajshahi">Rajshahi</option>
        <option value="Barishal">Barishal</option>
        <option value="Sylhet">Sylhet</option>
        <option value="Rangpur">Rangpur</option>
        <option value="Mymensingh">Mymensingh</option>
    </select>
      </div>
    </div>




    <div class="form-group">
           <div class="col-sm-10">          
        <select class="form-control" id="district" name="dis" required>
          <option value="">--Select District--</option>

        
         
        </select>
      </div>
    </div>


 <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="upz" name="upz" required placeholder="Upazilla">
      </div>
</div>



    <div class="form-group">
      
      <div class="col-sm-10">          
        <select class="form-control" id="course" name="gen" required>
          <option value="0">--Select Gender--</option>
          <option value="Male">Male</option>
          <option value="Female">Female</option>
        
         
        </select>
      </div>
    </div>




    <div class="form-group">
      
      <div class="col-sm-10">          
        <select class="form-control" id="course" name="course" required>
          <option value="0">--Select Course--</option>
          <option value="Academic Course">Academic Course</option>
          <option value="Kids Spoken English">Kid's Spoken English</option>
          <option value="Junior Spoken English">Junior Spoken English</option>
          <option value="Basic English Grammar">Basic English Grammar</option>
          <option value="Phonics">Phonics</option>
          <option value="Microsoft Office Program">Microsoft Office Program</option>
          <option value="Graphics Design">Graphics Design</option>
          <option value="Web Design">Web Design</option>
          <option value="AutoCAD">AutoCAD (2D & 3D)</option>
          <option value="Digital Marketing">Digital Marketing</option>
          <option value="Freelancing">Freelancing</option>
          <option value="Arabic & Quran">Quran and Arabic Language</option>
          <option value="Fashion and Dress">Fashiom Design and Dress Making</option>
          <option value="Electrical">Electrical Work</option>
          <option value="Plumbing">Plumbing</option>
          <option value="Driving">Driving</option>
         
        </select>
      </div>
    </div>

 <div class="form-group">
      
      <div class="col-sm-10">          
        <select class="form-control" id="ctime" name="ctime" required>
          <option value="0">--Select Class Time--</option>
          <option value="8:00 AM">8:00 AM</option>
          <option value="9:00 AM">9:00 AM</option>
          <option value="10:00 AM">10:00 AM</option>
          <option value="11:00 AM">11:00 AM</option>
          <option value="12:00 PM">12:00 PM</option>
          <option value="1:00 PM">1:00 PM</option>
          <option value="2:00 PM">2:00 PM</option>
          <option value="3:00 PM">3:00 PM</option>
          <option value="4:00 PM">4:00 PM</option>
          <option value="5:00 PM">5:00 PM</option>
          <option value="6:00 PM">6:00 PM</option>
          <option value="7:00 PM">7:00 PM</option>
          <option value="8:00 PM">8:00 PM</option>
          
         
        </select>
      </div>
    </div>



 <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="phone" name="phone" required placeholder="Type Student's Phone Number">
      </div>
</div>


 <div class="form-group">
 
      <div class="col-sm-10">
        <label class="col-sm-2" for="pic">Upload a Picture</label>
        <input type="file" class="form-control" id="file" name="file">
      </div>
</div>

    <div class="form-group">
      
      <div class="col-sm-10">          
        <select class="form-control" id="stdstatus" name="stdstatus" required>
          <option value="0">--Select Student Status--</option>
          <option value="Admitted">Admitted</option>
          <option value="Completed">Completed</option>
        
         
        </select>
      </div>
    </div>



  <div class="form-group">
      
      <div class="col-sm-10">          
        <select class="form-control" id="cerstatus" name="cerstatus" required>
          <option value="0">--Select Certificate Status--</option>
          <option value="Not Apply">Not Apply</option>
          <option value="Applied">Applied</option>
          <option value="Issued">Issued</option>
        
         
        </select>
      </div>
    </div>


  <div class="form-group">
      
      <div class="col-sm-10">          
        <select class="form-control" id="docstatus" name="docstatus" required>
          <option value="0">--Select Document Submission Status--</option>
          <option value="Submitted">Submitted</option>
          <option value="Not Submitted">Not Submitted</option>
        
         
        </select>
      </div>
    </div>



 <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="cfee" name="cfee" required placeholder="Course Fee">
      </div>
</div>



 <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="tpay" name="tpay" required placeholder="Total Payment">
      </div>
</div>

 <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="due" name="due" required placeholder="Due Amount">
      </div>
</div>


  <div class="form-group">
      
      <div class="col-sm-10">          
        <select class="form-control" id="examstatus" name="examstatus" required>
          <option value="0">--Select Examination Status--</option>
          <option value="Taken">Taken</option>
          <option value="Not Taken">Not Taken</option>
        
         
        </select>
      </div>
    </div>



 <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="result" name="result" required placeholder="Enter Result (Ex-> No Result or Grade : A, GPA : 4.00 )">
      </div>
</div>


    <div class="form-group">        
      <div class="col-sm-offset-2 col-sm-10">
        <input type="submit" class="btn btn-primary py-2 m-2" name="adminsub" value="Submit">
      </div>
    </div>
  </form>




</div>
<script>
        const districts = {
            Dhaka: ["Dhaka", "Gazipur", "Narayanganj", "Narsingdi", "Manikganj", "Munshiganj", "Shariatpur", "Faridpur", "Rajbari", "Kishoreganj", "Tangail", "Gopalganj", "Madaripur"],
            Chattogram: ["Chattogram", "Coxs Bazar", "Feni", "Noakhali", "Lakshmipur", "Bandarban", "Rangamati", "Khagrachari", "Brahmanbaria", "Comilla", "Chandpur"],
            Khulna: ["Khulna", "Jessore", "Satkhira", "Bagerhat", "Jhenaidah", "Magura", "Chuadanga", "Narail", "Kushtia", "Meherpur"],
            Rajshahi: ["Rajshahi", "Bogura", "Naogaon", "Joypurhat", "Pabna", "Chapainawabganj", "Natore", "Sirajganj"],
            Barishal: ["Barishal", "Patuakhali", "Bhola", "Jhalokati", "Borguna", "Pirojpur"],
            Sylhet: ["Sylhet", "Moulvibazar", "Habiganj", "Sunamganj"],
            Rangpur: ["Rangpur", "Dinajpur", "Kurigram", "Thakurgaon", "Panchagarh", "Lalmonirhat", "Nilphamari", "Gaibandha"],
            Mymensingh: ["Mymensingh", "Jamalpur", "Netrokona", "Sherpur"]
        };

        function updateDistricts() {
            const divisionSelect = document.getElementById("division");
            const districtSelect = document.getElementById("district");
            const selectedDivision = divisionSelect.value;

            districtSelect.innerHTML = "";
            if (selectedDivision) {
                districts[selectedDivision].forEach(district => {
                    const option = document.createElement("option");
                    option.value = district;
                    option.text = district;
                    districtSelect.add(option);
                });
            }
        }
    </script>
</div>



</div>






<!-- Admitted student View -->

<div class="container" id="adstlist">
<div class="row">
    <div class="col-sm-12 bg-dark text-white py-2">
      <h1>Admitted/Completed Students</h1>
<button class="btn btn-danger" onclick="document.getElementById('adstlist').style.display='none'">HIDE</button>


    </div>

  </div>

    <table class="table table-condensed">
    <thead>
      <tr>
        
        <th>Online Entry Date</th>
        <th>Admission Date</th>
        <th>Student ID</th>
        <th>Photo</th>
        <th>Name</th>
        <th>Father's Name</th>
        <th>Mother's Name</th>
        <th>DOB</th>
        <th>Email</th>
        <th>Phone</th>
        <th>Gender</th>
        <th>District</th>
        <th>Upazilla</th>
        <th>Course Name</th>
        <th>Class Time</th>
        <th>Student Status</th>
        <th>Certificate Status</th>
        <th>Document Submission Status</th>
        <th>Course Fee</th>
        <th>Advanced</th>
        <th>Due Amount</th>
        <th>Exam Status</th>
        <th>Result</th>
        
        <th></th>

      </tr>
    </thead>
    <tbody>
      <tr>
<?php
$sqlstd = "SELECT * FROM admittedstudentinfo ORDER BY id desc";
$resultstd = $conn->query($sqlstd);

if ($resultstd->num_rows > 0) {
  // output data of each row
  while($rowstd = $resultstd->fetch_assoc()) {
    
 
?>

        <td><?php echo $rowstd['entrydate']; ?></td>
        <td><?php echo $rowstd['admissiondate']; ?></td>
        <td><?php echo $rowstd['stdid']; ?></td>
        <td><img src='<?php echo$rowstd["picture"];?>' width='150'></td>
        <td><?php echo $rowstd['name']; ?></td>
        <td><?php echo $rowstd['fathername']; ?></td>
        <td><?php echo $rowstd['mothername']; ?></td>
        <td><?php echo $rowstd['dob']; ?></td>
        <td><?php echo $rowstd['email']; ?></td>
        <td><?php echo $rowstd['phone']; ?></td>
        <td><?php echo $rowstd['gender']; ?></td>
        <td><?php echo $rowstd['district']; ?></td>
        <td><?php echo $rowstd['upazilla']; ?></td>
        <td><?php echo $rowstd['course']; ?></td>
        <td><?php echo $rowstd['classtime']; ?></td>
        <td><?php echo $rowstd['stdstatus']; ?></td>
        <td><?php echo $rowstd['certstatus']; ?></td>
        <td><?php echo $rowstd['docsub']; ?></td>
        <td><?php echo $rowstd['coursefee']; ?></td>
        <td><?php echo $rowstd['totalpayment']; ?></td>
        <td><?php echo $rowstd['due']; ?></td>
        <td><?php echo $rowstd['examstatus']; ?></td>
        <td><?php echo $rowstd['result']; ?></td>
        <td><a class='btn btn-success text-white'href='edit.php?sid=<?php echo$rowstd["id"]; ?>'>Edit</a></td>
        <td><a class='btn btn-danger text-white' href='stddelete.php?stid=<?php echo$rowstd["id"]; ?>'>Delete</a></td>



      </tr>
      <?php  } } else {
  echo "<span class='bg-danger tect-white'>0 results</span>";
}


?>  
 
  
    </tbody>
  </table>
</div>















<!-- Applicant View -->
<div class="container" id="applicantlist">
	<div class="row">
		<div class="col-sm-12 bg-dark text-white py-2">
			<h1>Applicants For Training / Academic Courses</h1>
      <button class="btn btn-danger"onclick="document.getElementById('applicantlist').style.display='none'">HIDE</button>
		</div>

	</div>

	  <table class="table table-condensed">
    <thead>
      <tr>
      	
      	<th>Application Date</th>
        <th>Name</th>
        <th>Father's Name</th>
        <th>Mother's name</th>
        <th>Bith Year</th>
        <th>Gender</th>
        <th>Course</th>
        <th>Phone</th>
        <th>District</th>
        <th></th>

      </tr>
    </thead>
    <tbody>
      <tr>
<?php
$sql = "SELECT * FROM studentinfo ORDER BY id desc";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
  // output data of each row
  while($row = $result->fetch_assoc()) {
    
 
?>

        <td><?php echo $row['date']; ?></td>
        <td><?php echo $row['name']; ?></td>
        <td><?php echo $row['fathername']; ?></td>
        <td><?php echo $row['mothername']; ?></td>
        <td><?php echo $row['birthyear']; ?></td>
        <td><?php echo $row['gender']; ?></td>
        <td><?php echo $row['course']; ?></td>
        <td><?php echo $row['phone']; ?></td>
        <td><?php echo $row['district']; ?></td>
        <td><a class='btn btn-danger text-white' href='delete.php?sid=<?php echo$row["id"]; ?>'>Delete</a></td>

      </tr>
      <?php  } } else {
  echo "<span class='bg-danger tect-white'>0 results</span>";
}

$conn->close();
?>  
 
  
    </tbody>
  </table>
</div>




<div class="container">
  <div class="row">
    <h2>Add Notice for Shopnochra Art IT & Language Training Center</h2>
    <form class="form-horizontal" action="insert.php" method="post">
      
       <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="notice1" name="notice1" required placeholder="Type Notice Here">
      </div>
      <div class="col-sm-10">
        <input type="submit" class="form-control btn btn-success" id="noticesub" name="noticesub" required placeholder="Type Notice Here">
      </div>
</div>
    </form>
  </div>
  
</div>



<div class="container">
  <div class="row">
    <h2>Add Notice for Shopnochra Academy</h2>
    <form class="form-horizontal" action="insert.php" method="post">
      
       <div class="form-group">
 
      <div class="col-sm-10">
        <input type="text" class="form-control" id="notice2" name="notice2" required placeholder="Type Notice Here">
      </div>
      <div class="col-sm-10">
        <input type="submit" class="form-control btn btn-success" id="noticeacademy" name="noticeacademy" required placeholder="Type Notice Here">
      </div>
</div>
    </form>
  </div>
  
</div>



<div class="container">
  <div class="row">
    <h2>Add Advertisement Image for Shopnochra Art IT</h2>
    <form class="form-horizontal" action="insert.php" method="post" enctype="multipart/form-data">
      
       <div class="form-group">
        <div class="col-sm-10">
        <input type="text" class="form-control " id="sid" name="sid" required placeholder="Type an AD ID (Must be Unique)">
      </div>
 
      <div class="col-sm-10">
        <input type="file" class="form-control " id="file" name="file" required>
      </div>
      <div class="col-sm-10">
        <input type="submit" class="form-control btn btn-success" id="adpic" name="adpic">
      </div>
</div>
    </form>
  </div>
  
</div>



<?php
include("footer.php");

?>

Zerion Mini Shell 1.0