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
/
View File Name :
excel.php
<? include "inc/config.php"; //Enter the headings of the excel columns $contents="S/NO,FILE NO,NAMES,SEX,DOB,QUALIFICATION,PLACE OF WORK,CATEGORY,PROPOSERS,STATUS,TEL.NO,EMAIL,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 b.date > '2013-09-20' AND c.dean_verify='1' AND c.branch_verify='1' AND c.ad_comm='1' ORDER BY a.surname DESC"); if(!$user_query){ echo mysql_error(); } //While loop to fetch the records $sno=0; while($row = mysql_fetch_array($user_query)) { $sno++; $file_no=$row['file_no']; $name=$row['othernames']." ".strtoupper($row['surname']); if($row['sex']=='Male') { $sex='M'; } elseif($row['sex']=='Female') { $sex='F'; } $dob=$row['dob']; $qualification=$row['qual']."-".GetAny("universities",$row['school'],"id","name").",-".$row['edu_city1']."-".$row['edu_state1'].",-".$row['grad_year']; $position=$row['position'].",-".$row['work']."-".$row['work_city'].",-".GetAny("state",$row['work_state'],"stateid","state_name"); $category=getCat($row['category']); $proposer=$row['proposer1']."-".$row['proposer2']; $amount=$row['amount']."-PAID"; $phone=$row['phone']; $email=$row['email']; $branch=GetAny("branch",$row['branch_id'],"branchid","branch_name"); $contents.=$sno.","; $contents.="$file_no".","; $contents.="$name".","; $contents.="$sex".","; $contents.="$dob".","; $contents.="$qualification".","; $contents.="$position". ","; $contents.="$category".","; $contents.="$proposer".","; $contents.="$amount".","; $contents.="$phone".","; $contents.="$email".","; $contents.="$branch"."\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"]; } ?>