Şuanki Dizin: /home/wwwdreamtechnolo/public_html/vahtuksanghatana.com/admin/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/vahtuksanghatana.com/admin/excel-report.php |
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); ob_start(); require_once("lib/function.php"); $db = new login_function(); $flag = 0; $success_msg = 0; if(!isset($_SESSION['current_login_admin'])) { header("Location:index.php"); } if(isset($_SESSION['current_login_admin'])) { $email = $_SESSION['current_login_admin']; } $flag = 0; $contact_no_error=""; $success_msg=0; if(!isset($_SESSION['current_login_admin'])) { header("Location:index.php"); } if(isset($_SESSION['current_login_admin'])) { $email = $_SESSION['current_login_admin']; } if(isset($_GET['delete_id'])) { $delete_id = $_GET['delete_id']; $db->delete_user_record($delete_id); $success_msg = 1; } if(isset($_GET['approve_id'])) { $approve_id = $_GET['approve_id']; $status = "approved"; $db->update_card_status_to_approved($approve_id,$status); ?> <script> alert("Record approved successfully"); </script> <?php } if(isset($_GET['pending_id'])) { $pending_id = $_GET['pending_id']; $status = "pending"; $db->update_card_status_to_approved($pending_id,$status); ?> <script> alert("Record made pending successfully"); </script> <?php } ?> <div class="table-responsive row"> <table class="table table-bordered table-hover" id="example" style="overflow-x:auto;overflow-y:auto;" cellpadding=0 cellspacing=0> <thead class="thead-default thead-lg"> <tr> <th>Sr No</th> <th>Full Name</th> <th>Designation</th> <th>Reference ID</th> <th>Status</th> <th>Mobile Number</th> <th>Address</th> <th>DOB</th> <th>Aadhar No</th> <th>Licence No</th> <th>Gadi No</th> <th>Photo</th> <th>Date</th> <th>Time</th> </tr> </thead> <tbody> <?php $std_data = $db->get_all_registration_record(); if(!empty($std_data)) { $counter =0; foreach($std_data as $record) { $id = $std_data[$counter][0]; $full_name = $std_data[$counter][1]; $mo_no = $std_data[$counter][2]; $address = $std_data[$counter][3]; $aadhar_no = $std_data[$counter][4]; $licence_no = $std_data[$counter][5]; $gadi_no = $std_data[$counter][6]; $photo = $std_data[$counter][7]; $date = $std_data[$counter][8]; $time = $std_data[$counter][9]; $dob = $std_data[$counter][10]; $designation = $std_data[$counter][11]; $status = $std_data[$counter][12]; $ref_id = $std_data[$counter][13]; ?> <tr class="odd gradeX"> <td><?php echo $counter+1; ?></td> <td><?php echo $full_name; ?></td> <td><?php echo $designation; ?></td> <td><?php echo $ref_id; ?></td> <td><?php echo $status; ?></td> <td><?php echo $mo_no; ?></td> <td><?php echo $address; ?></td> <td><?php echo $dob; ?></td> <td><?php echo $aadhar_no; ?></td> <td><?php echo $licence_no; ?></td> <td><?php echo $gadi_no; ?></td> <td> <?php if($photo != "") { ?> <!--<a href="id_photo_images/<?php echo $photo; ?>" target="_blank"><img src="id_photo_images/<?php echo $photo; ?>" height="50px" width="50px"></a>--> <a href="id_photo_images/<?php echo $photo; ?>" target="_blank">View Photo</a> <?php }else { ?> <img src="id_photo_images/no-image.png" height="50px" width="50px"></a> <?php } ?> <!--<?php echo $photo; ?>--> </td> <td><?php echo $date; ?></td> <td><?php echo $time; ?></td> </tr> <?php $counter++; } }else { ?> <td colspan="7">No Data Found..</td> <?php } $excelData = ""; $filename = "users_report_".date('Y-m-d') . ".xls"; header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=\"$filename\""); //header("Content-Type: text/csv"); //header("Content-Disposition: attachment; filename=$filename.csv"); $show_coloumn = false; if(!empty($std_data)) { foreach($std_data as $record) { if(!$show_coloumn) { // display field/column names in first row echo $excelData = implode("\t", array_keys($record)) . "\n"; $show_coloumn = true; } echo $excelData = implode("\t", array_values($record)) . "\n"; } } exit; ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </body> </html> <?php ob_flush(); ?>
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