Şuanki Dizin: /home/wwwdreamtechnolo/www/kpmim.org/admin/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/kpmim.org/admin/grivience-report.php |
<?php require_once("lib/functions.php"); $db = new login_function(); $flag=0; $var_title=""; $var_contents=""; $flag = 0; $actual_image_name=""; $success_msg= 0; $image_error=""; $succ_flag = 0; $title = ""; $text1 = 0; $text2 = 0; $text3 = 0; if(!isset($_SESSION['current_login_admin'])) { header("Location:/admin/index.php"); } if(isset($_SESSION['current_login_admin'])) { $email = $_SESSION['current_login_admin']; } if(isset($_POST['add_btn'])) { $valid_formats = array("jpg","png","gif","bmp","jpeg","pdf","JPEG","JPG","BMP","PNG","GIF","PDF"); if(isset($_POST) and $_SERVER['REQUEST_METHOD'] == "POST") { $name = $_FILES['picture']['name']; $size = $_FILES['picture']['size']; if(strlen($name)) { list($txt, $ext) = explode(".", $name); if(in_array($ext,$valid_formats)) { $files = array(); function generateRandomString($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; } $current_random_string = generateRandomString(); $actual_image_name = $current_random_string.".".strtolower($ext); $tmp = $_FILES['picture']['tmp_name']; $img_Dir = "../alumnidocs/"; if(!file_exists($img_Dir)) { mkdir($img_Dir); } if(move_uploaded_file($tmp,$img_Dir.$actual_image_name)) { } else { $image_error = "failed" ; $flag = 1; } } else { $image_error = "Invalid file format"; $flag = 1; } } } $title = $_POST['title']; $text1 = $_POST['text1']; $text2 = $_POST['text2']; $text3 = $_POST['text3']; if($flag==0) { $db->alumni_data($actual_image_name,$title,$text1,$text2,$text3); $succ_flag = 1 ; $title = ""; } } if(isset($_GET['delete_id'])) { $delete_id = $_GET['delete_id']; if($db->delete_grivience_data($delete_id)) { $flag = 3; } } ?> <?php require_once('header.php'); ?> <div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h1 class="page-header">Grievance Report</h1> <?php if($succ_flag == 1) { ?> <div class="alert alert-success"> Saved Successfully. </div> <?php } ?> <?php if($success_msg == 2) { ?> <div class="alert alert-danger"> Deleted Successfully. </div> <?php } ?> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-body"> <div class="row"> <div class="col-lg-6"> </div> <div class="row"> <div class="col-lg-12"> <!-- /.panel-heading --> <div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover"> <thead> <tr> <th>Sr No</th> <th>Complain No</th> <th>Name</th> <th>Category of Complainant </th> <th>Course of Study</th> <th>Section </th> <th>Roll No</th> <th>Mobile No </th> <th>Email</th> <th>Category of Grievance</th> <th>Others (please specify)</th> <th>Address for communication</th> <th>Brief Subject of Grievance</th> <th>Complete details of Grievance</th> <th>Uploaded documents</th> <th> I hereby declaration</th> <th>Date</th> <th>Time</th> <th class="text-center">Delete</th> </tr> </thead> <tbody> <?php $groups_data= array(); $groups_data = $db->get_all_frivience_data(); if(!empty($groups_data)) { $counter =0; foreach($groups_data as $record) { $id=$record[0] ; $complain_no=$record[1] ; $full_name=$record[2] ; $category_of_complainant=$record[3] ; $course_of_study=$record[4] ; $roll_no=$record[5] ; $mobile_no1=$record[6] ; $email1=$record[7] ; $category_of_grievance=$record[8] ; $others_please_specify=$record[9] ; $address_for_communication=$record[10] ; $brief_subject_of_grievance=$record[11] ; $complete_details_of_grievance=$record[12] ; $upload_documents_if_any=$record[13] ; $i_hereby_declare=$record[14] ; $currentdate=$record[15] ; $currenttime=$record[16] ; $section= $record[17] ; ?> <tr> <!-- <td><?php echo $counter+1; ?></td> --> <td class=""><?php echo $counter++; ?></td> <td class=""><?php echo $complain_no; ?></td> <td class=""><?php echo $full_name; ?></td> <td class=""><?php echo $category_of_complainant; ?></td> <td class=""><?php echo $course_of_study; ?></td> <td class=""><?php echo $section; ?></td> <td class=""><?php echo $roll_no; ?></td> <td class=""><?php echo $mobile_no1; ?></td> <td class=""><?php echo $email1; ?></td> <td class=""><?php echo $category_of_grievance; ?></td> <td class=""><?php echo $others_please_specify; ?></td> <td class=""><?php echo $address_for_communication; ?></td> <td class=""><?php echo $brief_subject_of_grievance; ?></td> <td class=""><?php echo $complete_details_of_grievance; ?></td> <td class=""><?php if($upload_documents_if_any!="") { ?> <a href="Grivience_images/<?php echo $upload_documents_if_any; ?>" target="_blank"> <img src="Grivience_images/<?php echo $upload_documents_if_any; ?>" style="height:100px; width:100px;" /> </a> <?php } ?> </td> <td class=""><?php echo $i_hereby_declare; ?></td> <td class=""><?php echo $currentdate; ?></td> <td class=""><?php echo $currenttime; ?></td> <!--<td class="text-center"> <a class="btn btn-sm btn-icon text-primary flex-end" data-bs-toggle="tooltip" title="Edit User" href="edit-agent.php?edit_id=<?php echo $res_id; ?>"> <span class="btn-inner"> <svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.4925 2.78906H7.75349C4.67849 2.78906 2.75049 4.96606 2.75049 8.04806V16.3621C2.75049 19.4441 4.66949 21.6211 7.75349 21.6211H16.5775C19.6625 21.6211 21.5815 19.4441 21.5815 16.3621V12.3341" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M8.82812 10.921L16.3011 3.44799C17.2321 2.51799 18.7411 2.51799 19.6721 3.44799L20.8891 4.66499C21.8201 5.59599 21.8201 7.10599 20.8891 8.03599L13.3801 15.545C12.9731 15.952 12.4211 16.181 11.8451 16.181H8.09912L8.19312 12.401C8.20712 11.845 8.43412 11.315 8.82812 10.921Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M15.1655 4.60254L19.7315 9.16854" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </svg> </span> </a> </td>--> <td class="text-center"> <a class="btn btn-sm btn-icon text-danger " data-bs-toggle="tooltip" title="Delete User" onclick="return confirm('Are You Sure To Delete?');" href="<?php echo $_SERVER['PHP_SELF']."?delete_id=".$id; ?>"> <span class="btn-inner"> <svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"> <path d="M19.3248 9.46826C19.3248 9.46826 18.7818 16.2033 18.4668 19.0403C18.3168 20.3953 17.4798 21.1893 16.1088 21.2143C13.4998 21.2613 10.8878 21.2643 8.27979 21.2093C6.96079 21.1823 6.13779 20.3783 5.99079 19.0473C5.67379 16.1853 5.13379 9.46826 5.13379 9.46826" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M20.708 6.23975H3.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M17.4406 6.23973C16.6556 6.23973 15.9796 5.68473 15.8256 4.91573L15.5826 3.69973C15.4326 3.13873 14.9246 2.75073 14.3456 2.75073H10.1126C9.53358 2.75073 9.02558 3.13873 8.87558 3.69973L8.63258 4.91573C8.47858 5.68473 7.80258 6.23973 7.01758 6.23973" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </svg> </span> </a> </td> </tr> <?php } } ?> </tbody> </table> </div> <!-- /.table-responsive --> </div> <!-- /.panel-body --> <!-- /.panel --> </div> <!-- /.col-lg-6 --> </div> </div> </div> </div> </div> </div> </div> </div> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4