Preview: H1B_xls_report.php
Size: 6.02 KB
/home/jambtst2015/public_html/giraffeng.com/admin/H1B_xls_report.php
<?php
session_start();
if($_SESSION['sat_login_id']!=''){
include('lib/conn.php');
include("functions.php");
$Randid=rand(100,500);
$date=date("m-d-Y");
$filename = $Randid."_".$date."_"."H1B_data.xls";
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".date("D, d M Y H:i:s")." GMT");
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
session_cache_limiter("must-revalidate");
header("Content-Type: application/vnd.ms-excel");
header('Content-Disposition: attachment; filename="' . $filename .'"');
$col_heading="H1B Petition Status"."\t";
$col_heading.="H1B Count"."\t";
$col_heading.="Employee Name"."\t";
$col_heading.="Date of Employment Began"."\t";
$col_heading.="Date of Employement Terminate"."\t";
$col_heading.="Edu. Requirement for Position"."\t";
$col_heading.="Associate's Qualification"."\t";
$col_heading.="Field of Study"."\t";
$col_heading.="Associate Current Immigration Status"."\t";
$col_heading.="Employment Status"."\t";
$col_heading.="GC Status"."\t";
$col_heading.="H1B Petition Application Status"."\t";
$col_heading.="H1B Filed By"."\t";
$col_heading.="Receipt Date"."\t";
$col_heading.="Notice Number"."\t";
$col_heading.="H1B Consulate"."\t";
$col_heading.="Approval Date"."\t";
$col_heading.="H1B Start Date"."\t";
$col_heading.="H1B End Date"."\t";
$col_heading.="I 94 Expiry Date"."\t";
$col_heading.="Signed H1B Receipt"."\t";
$col_heading.="LCA Copy Receipt"."\t";
$col_heading.="H1B Position Title"."\t";
$col_heading.="H1B Revoke Letter Status"."\t";
$col_heading.="H1B Revoke Letter Date"."\t";
$col_heading.="USCIS Revoke Conf Date"."\t";
$col_heading.="Notes"."\t";
$col_heading.="Additional Notes"."\t";
$col_heading.="Created By"."\t";
$col_heading.="Created Date"."\t";
$col_heading.="Last Update By"."\t";
$col_heading.="Last Update Date"."\t\n";
//$col_heading.="Vendor Contact Email"."\t";
//$col_heading.="Account Manager"."\t";
//$col_heading.="HR Manager"."\t";
//$col_heading.="Sales Manager"."\t";
//$col_heading.="Source"."\t";
//$col_heading.="Notes"."\t";
//$col_heading.="Current Associate Status"."\t";
//$col_heading.="Add Date"."\t\n";
if($_SESSION['sqlCandidate']!=''){
$sql =$_SESSION['sqlCandidate'];
}else{
$sql ="select * from `h1b_details` where 1 AND `employee_name` = '".$_REQUEST['userid']."'";
}
$result=mysql_query($sql);
if(mysql_num_rows($result)>0){
while($row_domestic_productDetails=mysql_fetch_array($result)){
$col_heading.=check_null(stripslashes($row_domestic_productDetails['h1b_petition_status']))."\t";
$col_heading.=check_null($row_domestic_productDetails['h1b_count'])."\t";
$col_heading.=check_null_value('firstname','sat_staff','staff_id',stripslashes($row_domestic_productDetails['employee_name']),'lastname')."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['date_of_employment_began']))."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['date_of_employement_terminate']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['edu_equirement_for_position']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['associates_qualification']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['field_of_study']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['associate_current_immigration_status']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['employment_status']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['gc_status']))."\t";
$col_heading.=check_null($row_domestic_productDetails['h1b_petition_application_status'])."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['h1b_filed_by']))."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['receipt_date']))."\t";
$col_heading.=check_null($row_domestic_productDetails['notice_number'])."\t";
$col_heading.=check_null($row_domestic_productDetails['h1b_consulate'])."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['approval_date']))."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['h1b_start_date']))."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['h1b_end_date']))."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['i94_expiry_date']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['signed_h1b_receipt']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['lca_copy_receipt']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['h1b_position_title']))."\t";
$col_heading.=check_null_date($row_domestic_productDetails['h1b_revoke_letter_status'])."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['h1b_revoke_letter_date']))."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['uscis_revoke_conf_date']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['notes']))."\t";
$col_heading.=check_null(stripslashes($row_domestic_productDetails['additional_notes']))."\t";
$col_heading.=check_null_value('firstname','sat_users','user_id',stripslashes($row_domestic_productDetails['created_by']),'lastname')."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['created_date']))."\t";
$col_heading.=check_null_value('firstname','sat_users','user_id',stripslashes($row_domestic_productDetails['last_update_by']),'lastname')."\t";
$col_heading.=check_null_date(stripslashes($row_domestic_productDetails['last_update_date']))."\t\n";
}
echo $col_heading;
//exit;
}
$_SESSION['sqlCandidate']='';
/*else{
header('location:candidate.php?error=1');
exit();
}*/
}
else{
header('location:index.php');
}
//}
//else{
//header('location:index.php');
//exit();
//}
?>
Directory Contents
Dirs: 17 × Files: 180