One Hat Cyber Team
Your IP :
216.73.216.84
Server IP :
50.6.229.107
Server :
Linux server.hostburly.com 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.2.30
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
andjemzt
/
nportal.andjemztech.com
/
examAdmin
/
Edit File:
excel180314.php
<? include "inc/config.php"; //Enter the headings of the excel columns $contents="NAMES,SEX,DOB,QUALIFICATION,SCHOOL,GRADYEAR,POSITION & PLACE OF EMPLOYMENT,CATEGORY,PROPOSERS,BRANCH\n"; //Mysql query to get records from datanbase //You can customize the query to filter from particular //date and month etc...Which will depends your database structure. //$user_query = mysql_query('SELECT title,lastname,middlename FROM nsemem LIMIT 0,500'); $user_query=mysql_query("SELECT * FROM corp_mem a,corp_reg_pay b,clearance_status c WHERE a.stud_id=b.stud_id AND a.stud_id=c.stud_id AND b.status='Paid' AND c.dean_verify='1' AND c.branch_verify='1' ORDER BY a.surname DESC"); if(!$user_query){ echo mysql_error(); } //While loop to fetch the records while($row = mysql_fetch_array($user_query)) { $contents.=$row['othernames']." ".strtoupper($row['surname']).","; $contents.=$row['sex'].","; $contents.=$row['dob'].","; $contents.=$row['qual'].","; $contents.=GetAny("universities",$row['school'],"id","name").","; $contents.=$row['grad_year'].","; $contents.=$row['work'].","; $contents.=getCat($row['category']).","; $contents.=$row['proposer1']."<br>".$row['proposer2'].","; $contents.=GetAny("branch",$row['brnach_id'],"branchid","branch_name")."\n"; } // remove html and php tags etc. $contents = strip_tags($contents); //header to make force download the file date_default_timezone_set('UTC'); Header("Content-Disposition: attachment; filename=brief.csv"); print $contents; function getCat($id){ switch ($id){ case "1": return "A1"; break; case "2": return "A2"; break; case "3": return "B1"; break; case "4": return "B2"; break; case "5": return "C1"; break; case "6": return "C2"; break; } } function GetAny($table,$value,$field,$output){ $sql=mysql_query("SELECT * FROM $table WHERE $field='$value'"); $row=mysql_fetch_array($sql); return $row["$output"]; } ?>
Simpan