Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 18.117.74.47
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
oums /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
fpdf
[ DIR ]
drwxrwxrwx
phpexcel
[ DIR ]
drwxrwxrwx
phpmailer
[ DIR ]
drwxrwxrwx
reports
[ DIR ]
drwxrwxrwx
api_sendmail.php
2.22
KB
-rwxrwxrwx
api_sendmail1.php
2.03
KB
-rwxrwxrwx
api_sendsms.php
1.08
KB
-rwxrwxrwx
attendance.php
13.66
KB
-rwxrwxrwx
attendance_report.php
40.23
KB
-rwxrwxrwx
attendance_report_attn_stat_mn...
16.79
KB
-rw-rw-r--
attendance_report_attn_stat_sa...
18.77
KB
-rw-rw-r--
attendance_report_datewise.php
5.59
KB
-rwxrwxrwx
attendance_report_excel.php
14.66
KB
-rwxrwxrwx
attendance_report_month_detail...
2.76
KB
-rwxrwxrwx
attendance_report_month_summar...
4.01
KB
-rwxrwxrwx
attendance_report_monthwise_in...
6.85
KB
-rwxrwxrwx
attendance_report_monthwise_su...
5.09
KB
-rwxrwxrwx
attendance_report_monthwise_su...
4.13
KB
-rwxrwxrwx
attendance_report_yearwise_sum...
4.56
KB
-rwxrwxrwx
attendance_statement_2023-03.x...
11.39
KB
-rw-r--r--
attendance_statement_2024-01.x...
60.03
KB
-rw-r--r--
attendance_statement_2024-02.x...
48.48
KB
-rw-r--r--
attendance_statement_2024-03.x...
10.73
KB
-rw-r--r--
attendance_statement_2024-04.x...
10.56
KB
-rw-r--r--
attendance_statement_2024-05.x...
10.63
KB
-rw-r--r--
attendance_statement_2024-06.x...
10.63
KB
-rw-r--r--
attendance_statement_2024-07.x...
47.43
KB
-rw-r--r--
attendance_statement_2024-08.x...
11.54
KB
-rw-r--r--
attendance_statement_2024-09.x...
43.78
KB
-rw-r--r--
attendance_statement_2024-10.x...
11.15
KB
-rw-r--r--
attendance_statement_2024-11.x...
43.35
KB
-rw-r--r--
attendance_statement_2024-12.x...
9.32
KB
-rw-r--r--
attendance_statement_2025-01.x...
16.99
KB
-rw-r--r--
attendance_statement_salary_.x...
7.04
KB
-rw-r--r--
attendance_statement_salary_20...
7.06
KB
-rw-r--r--
attendance_statement_salary_20...
7.36
KB
-rw-r--r--
attendance_statement_salary_20...
19.89
KB
-rw-r--r--
attendance_statement_salary_20...
18.32
KB
-rw-r--r--
attendance_statement_salary_20...
18.06
KB
-rw-r--r--
attendance_statement_salary_20...
17.78
KB
-rw-r--r--
attendance_statement_salary_20...
17.63
KB
-rw-r--r--
attendance_statement_salary_20...
7.72
KB
-rw-r--r--
attendance_statement_salary_20...
7.67
KB
-rw-r--r--
attendance_statement_salary_20...
7.72
KB
-rw-r--r--
attendance_statement_salary_20...
7.52
KB
-rw-r--r--
attendance_statement_salary_20...
7.06
KB
-rw-r--r--
attendance_statement_salary_20...
7.36
KB
-rw-r--r--
attendance_statement_salary_20...
7.53
KB
-rw-r--r--
attendance_status.php
20.13
KB
-rwxrwxrwx
attendance_status_deepak.php
9.38
KB
-rw-rw-r--
attendance_status_ihf.php
9.38
KB
-rwxrwxrwx
backup_data.php
903
B
-rwxrwxrwx
control.php
5.78
KB
-rwxrwxrwx
departments.php
8.79
KB
-rwxrwxrwx
departments_logo_upload.php
679
B
-rwxrwxrwx
documents.php
4.16
KB
-rwxrwxrwx
employees.php
17.28
KB
-rwxrwxrwx
employees2.php
14.04
KB
-rw-rw-r--
employees_form.php
20.19
KB
-rw-rw-r--
employees_photo_upload.php
647
B
-rwxrwxrwx
employees_print_id_card.php
2.76
KB
-rw-rw-r--
employees_print_nda_form.php
12.86
KB
-rw-rw-r--
employees_report_excel.php
5.07
KB
-rw-rw-r--
expense.php
10.79
KB
-rwxrwxrwx
expense_advance.php
4.69
KB
-rwxrwxrwx
expense_advance2.php
4.55
KB
-rw-rw-r--
expense_report.php
3.26
KB
-rwxrwxrwx
expense_report_daywise_details...
4.46
KB
-rwxrwxrwx
expense_report_daywise_summary...
5.27
KB
-rwxrwxrwx
expense_report_details_date.ph...
5.32
KB
-rwxrwxrwx
expense_report_details_date_su...
5.43
KB
-rwxrwxrwx
expense_report_details_head.ph...
22.11
KB
-rwxrwxrwx
expense_report_details_head_su...
22.13
KB
-rwxrwxrwx
expense_report_headwise_detail...
18.32
KB
-rwxrwxrwx
expense_report_headwise_summar...
18.32
KB
-rwxrwxrwx
expense_report_monthwise_detai...
3.3
KB
-rwxrwxrwx
expense_report_monthwise_summa...
3.3
KB
-rwxrwxrwx
expense_report_statement.php
5.69
KB
-rwxrwxrwx
expense_report_statement_date....
6.15
KB
-rwxrwxrwx
expense_report_statement_excel...
19.74
KB
-rw-rw-r--
expense_report_statement_excel...
32.6
KB
-rwxrwxrwx
expense_report_statement_excel...
32.79
KB
-rw-rw-r--
expense_report_statement_mnth....
4.88
KB
-rwxrwxrwx
expense_report_statement_year....
4.86
KB
-rwxrwxrwx
expense_report_summary.php
18.43
KB
-rwxrwxrwx
expense_statement_monthly_.xls...
6.04
KB
-rw-r--r--
expense_statement_monthly_2023...
10.08
KB
-rw-r--r--
expense_statement_monthly_2024...
10
KB
-rw-r--r--
expense_statement_monthly_2024...
8.99
KB
-rw-r--r--
expense_statement_monthly_2024...
9.16
KB
-rw-r--r--
expense_statement_monthly_2024...
8.87
KB
-rw-r--r--
expense_statement_monthly_2024...
30.05
KB
-rw-r--r--
expense_statement_monthly_2024...
9
KB
-rw-r--r--
expense_statement_monthly_2024...
9.61
KB
-rw-r--r--
expense_statement_monthly_2024...
11.03
KB
-rw-r--r--
expense_statement_monthly_2024...
10.92
KB
-rw-r--r--
expense_statement_monthly_2024...
9.65
KB
-rw-r--r--
expense_statement_monthly_2024...
9.66
KB
-rw-r--r--
expense_statement_monthly_2024...
10.37
KB
-rw-r--r--
grievance_status.php
5.44
KB
-rw-rw-r--
header_menu.php
3.46
KB
-rwxrwxrwx
header_note.php
5.06
KB
-rwxrwxrwx
holidays.php
6.19
KB
-rwxrwxrwx
home_appraisals.php
185
B
-rwxrwxrwx
home_attendance.php
26.81
KB
-rwxrwxrwx
home_clients.php
10.62
KB
-rwxrwxrwx
home_dashboard.php
236
B
-rwxrwxrwx
home_employees.php
9.47
KB
-rwxrwxrwx
home_events.php
9.71
KB
-rwxrwxrwx
home_expenses.php
27.27
KB
-rwxrwxrwx
home_flash.php
2.38
KB
-rwxrwxrwx
home_inventory.php
3.14
KB
-rwxrwxrwx
home_movements.php
9.03
KB
-rwxrwxrwx
home_note_count.php
6.75
KB
-rw-rw-r--
home_salary.php
12.81
KB
-rwxrwxrwx
home_task.php
6.15
KB
-rwxrwxrwx
home_userlogs.php
2.02
KB
-rw-rw-r--
home_work_entry.php
15.08
KB
-rwxrwxrwx
home_work_flash.php
2.36
KB
-rwxrwxrwx
home_work_view.php
11.96
KB
-rwxrwxrwx
login.php
3.3
KB
-rwxrwxrwx
logout.php
261
B
-rwxrwxrwx
mc_print.php
9.54
KB
-rwxrwxrwx
mcf_status.php
2.87
KB
-rw-rw-r--
office_logisys3_oums_2024-09-2...
20.57
MB
-rw-r--r--
oums_sms_push.php
18.18
KB
-rwxrwxrwx
oums_sms_send.php
5.39
KB
-rwxrwxrwx
pg_app_edit.php
5.17
KB
-rwxrwxrwx
popup_empl_events.php
3.53
KB
-rw-rw-r--
popup_empl_salary.php
2.67
KB
-rw-rw-r--
popup_work_entry.php
3.14
KB
-rw-rw-r--
popup_work_review.php
1.55
KB
-rw-rw-r--
salary.php
24.44
KB
-rwxrwxrwx
salary_statement.php
40.09
KB
-rw-rw-r--
salary_statement_2024-05.xlsx
18.57
KB
-rw-r--r--
salary_statement_2024-06.xlsx
18.43
KB
-rw-r--r--
salary_statement_2024-07.xlsx
17.89
KB
-rw-r--r--
salary_statement_2024-08.xlsx
17.46
KB
-rw-r--r--
salary_statement_2024-09.xlsx
16.97
KB
-rw-r--r--
salary_statement_2024-10.xlsx
16.94
KB
-rw-r--r--
salary_statement_2024-11.xlsx
17.36
KB
-rw-r--r--
salary_statement_month_excel.p...
21.36
KB
-rw-rw-r--
send_mail.php
383
B
-rwxrwxrwx
send_sms.php
203
B
-rwxrwxrwx
sendsmsapi.php
759
B
-rwxrwxrwx
staff_move.php
8.55
KB
-rwxrwxrwx
status_report.php
23.7
KB
-rwxrwxrwx
status_report_03022018.php
14.76
KB
-rwxrwxrwx
status_report_import_attendanc...
3.27
KB
-rwxrwxrwx
sys_connect.php
492
B
-rwxrwxrwx
sys_connect_old.php
123
B
-rwxrwxrwx
sys_connect_pget.php
311
B
-rwxrwxrwx
sys_employees.php
2.55
KB
-rwxrwxrwx
sys_grid_data.php
805
B
-rwxrwxrwx
sys_grid_navbar.php
1.72
KB
-rwxrwxrwx
sys_mainphp.php
6.92
KB
-rwxrwxrwx
sys_mode.php
780
B
-rwxrwxrwx
sys_module.php
580
B
-rwxrwxrwx
sys_modules.php
2.47
KB
-rwxrwxrwx
sys_session.php
1.04
KB
-rwxrwxrwx
task_reminder.php
16.45
KB
-rwxrwxrwx
task_review.php
11.37
KB
-rwxrwxrwx
upcoming_events.php
8.79
KB
-rw-rw-r--
user_departments.php
4.09
KB
-rwxrwxrwx
user_logs.php
5.8
KB
-rwxrwxrwx
user_password.php
3.67
KB
-rwxrwxrwx
user_password_request.php
2.09
KB
-rwxrwxrwx
user_rights.php
7.34
KB
-rwxrwxrwx
user_setup.php
10.79
KB
-rwxrwxrwx
user_validate.php
3.07
KB
-rwxrwxrwx
work_assign.php
5.86
KB
-rw-rw-r--
work_done_report.xlsx
7.91
KB
-rw-r--r--
work_done_report_empl.xlsx
6.57
KB
-rw-r--r--
work_entry.php
9.04
KB
-rwxrwxrwx
work_entry_org.php
3.48
KB
-rwxrwxrwx
work_entry_report.php
2.71
KB
-rwxrwxrwx
work_entry_report_appraisal.ph...
8.79
KB
-rw-rw-r--
work_entry_report_assn_work_ex...
8.79
KB
-rw-rw-r--
work_entry_report_assn_work_vi...
9.03
KB
-rw-rw-r--
work_entry_report_statement.ph...
4.63
KB
-rwxrwxrwx
work_entry_report_work_done_as...
9.34
KB
-rw-rw-r--
work_entry_report_work_done_as...
9.46
KB
-rw-rw-r--
work_entry_report_work_done_em...
8.91
KB
-rw-rw-r--
work_entry_report_work_done_em...
8.91
KB
-rw-rw-r--
work_entry_report_work_done_ex...
8.79
KB
-rw-rw-r--
work_entry_report_work_done_li...
9.43
KB
-rw-rw-r--
work_entry_report_work_done_li...
8.91
KB
-rw-rw-r--
work_entry_report_work_done_st...
4.65
KB
-rw-rw-r--
work_review.php
6.08
KB
-rwxrwxrwx
workentry_report.php
9.43
KB
-rw-rw-r--
xattendance_report_01.php
7.77
KB
-rwxrwxrwx
xattendance_report_02.php
4.49
KB
-rwxrwxrwx
xattendance_report_03.php
6
KB
-rwxrwxrwx
xattendance_report_04.php
5.18
KB
-rwxrwxrwx
xattendance_report_05.php
4.84
KB
-rwxrwxrwx
xget_master_info.php
801
B
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : attendance_report_attn_stat_mnth_excl.php
<?php /** Error reporting */ error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); include("sys_session.php"); include("sys_connect.php"); include("sys_mainphp.php"); $resp_mesg = ""; $resp_stat = ""; $resp_file = ""; $d = 1; $mnth_days = cal_days_in_month(CAL_GREGORIAN, substr($_POST['attn_mnth'], 5, 2), substr($_POST['attn_mnth'], 0, 4)); if ($_POST['attn_mnth'] == date('Y-m')) { $entr_days = date('d') - 1; $rept_days = date('d'); } else { $entr_days = $mnth_days; $rept_days = $mnth_days; } for ($d = 1; $d <= $entr_days; $d++) { $caln_date = $_POST['attn_mnth'] . '-' . substr('0' . $d, -2, 2); if ($caln_date != date('Y-m-d')) { // INSERT CLIENT HOLIDAY STATUS $mysql = "insert ignore into attendance (fdeptcode,fattndate,femplcode,fattnstat,fupdtuser,fattnremk,fupdttime) select em.fdeptcode,'$caln_date' as fattndate,em.femplcode,if(dayname('$caln_date')='Sunday','WO','HD') as fattnstat, 'AUTO' as fupdtuser,'' as fattnremk, now() as fupdttime from masempl em inner join masholiday hd on em.fdeptcode = hd.fdeptcode and hd.fholidate='$caln_date' where '$caln_date' between date_format(em.fjoindate,'%Y-%m-%d') and date_format(em.ftermdate,'%Y-%m-%d') and femplstat='T' and fempltype='P' and fattnentr='T';"; $myres = mysqli_query($mycon, $mysql); // INSERT ABSENT / WEEKLY OFF STATUS $mysql = "insert ignore into attendance (fdeptcode,fattndate,femplcode,fattnstat,fupdtuser,fattnremk,fupdttime) select em.fdeptcode,'$caln_date' as fattndate,em.femplcode,if(dayname('$caln_date')='Sunday','WO','AB') as fattnstat, 'AUTO' as fupdtuser,'' as fattnremk, now() as fupdttime from masempl em left join attendance at on em.femplcode = at.femplcode and fattndate='$caln_date' where '$caln_date' between date_format(em.fjoindate,'%Y-%m-%d') and date_format(em.ftermdate,'%Y-%m-%d') and em.fdeptcode not in ('dep','ihf') and femplstat='T' and fempltype='P' and fattnentr='T' and at.femplcode is null;"; $myres = mysqli_query($mycon, $mysql); // INSERT NA STATUS FOR NEW STAFF $mysql = "insert ignore into attendance (fdeptcode,fattndate,femplcode,fattnstat,fupdtuser,fattnremk,fupdttime) select em.fdeptcode,'$caln_date' as fattndate,em.femplcode,'NA' as fattnstat, 'AUTO' as fupdtuser,'' as fattnremk, now() as fupdttime from masempl em left join attendance at on em.femplcode = at.femplcode and fattndate='$caln_date' where date_format('$caln_date','%Y-%m-%d') < date_format(em.fjoindate,'%Y-%m-%d') and date_format('$caln_date','%Y-%m') = date_format(em.fjoindate,'%Y-%m') and em.fdeptcode not in ('dep','ihf') and femplstat='T' and fempltype='P' and fattnentr='T' and at.femplcode is null;"; $myres = mysqli_query($mycon, $mysql); // INSERT NA STATUS FOR LEFT STAFF $mysql = "insert ignore into attendance (fdeptcode,fattndate,femplcode,fattnstat,fupdtuser,fattnremk,fupdttime) select em.fdeptcode,'$caln_date' as fattndate,em.femplcode,'NA' as fattnstat, 'AUTO' as fupdtuser,'' as fattnremk, now() as fupdttime from masempl em left join attendance at on em.femplcode = at.femplcode and fattndate='$caln_date' where date_format('$caln_date','%Y-%m-%d') > date_format(em.ftermdate,'%Y-%m-%d') and date_format('$caln_date','%Y-%m') = date_format(em.ftermdate,'%Y-%m') and em.fdeptcode not in ('dep','ihf') and femplstat='T' and fempltype='P' and fattnentr='T' and at.femplcode is null;"; $myres = mysqli_query($mycon, $mysql); } } require_once("phpexcel/Classes/PHPExcel.php"); $objPHPExcel = new PHPExcel(); $objPHPExcel->getProperties()->setCreator("Logisys") ->setLastModifiedBy("Logisys") ->setTitle("Office 2007 XLSX Test Document") ->setSubject("Office 2007 XLSX Test Document") ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") ->setKeywords("office 2007 openxml php") ->setCategory("Report File"); $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE); $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4); $objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 2); $objPHPExcel->getActiveSheet()->getDefaultColumnDimension()->setWidth(10); $objPHPExcel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(25); $objPHPExcel->getActiveSheet()->setPrintGridlines(TRUE); $objPHPExcel->getActiveSheet()->getPageSetup()->setFitToWidth(1); $objPHPExcel->getActiveSheet()->getPageSetup()->setFitToHeight(0); $objPHPExcel->getActiveSheet()->getPageMargins()->setTop(0.5); $objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.2); $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.2); $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(0.5); $objPHPExcel->getActiveSheet()->getPageSetup()->setHorizontalCentered(true); $objPHPExcel->getActiveSheet()->getPageSetup()->setVerticalCentered(false); $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&G&C&HLogisys, Bangalore' . chr(10) . 'Attendance Statement - ' . $_POST['attn_mnth']); $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . '&CPage &P of &N'); $mysql = "SET SESSION group_concat_max_len = 1000000;"; $myres = mysqli_query($mycon, $mysql); if ($_POST['late_time'] == "") { $myqry1 = ""; } else { $myqry1 = " and timediff(at.flogidiff,'$_POST[late_time]')>'00:00:00' "; } $mysql = "select date_format(fattndate,'%Y-%m') as fattnmnth, dp.fdeptcode,dp.fdeptname,em.femplcode,em.femplname,fempldesn,em.femplmobl,em.fsalrhead, sum(case when fattnstat='PR' then 1 else 0 end) as ftotpr, sum(case when fattnstat='HW' then 1 else 0 end) as ftothw, sum(case when fattnstat='AB' then 1 else 0 end) as ftotab, sum(case when fattnstat='CL' then 1 else 0 end) as ftotcl, sum(case when fattnstat in ('HD','WO') then 1 else 0 end) as ftothd, sec_to_time(sum(case when flogidiff>'-00:00:00' then time_to_sec(flogidiff) else 0 end)) as ftottime, sum(case when flogidiff>'-00:00:00' then 1 else 0 end) as ftotlate, group_concat(at.fattndate,',',at.fattnstat,',',at.flogitime,',',at.flogotime,',',flogidiff order by at.fattndate separator '|') as fattndetl from masempl em inner join attendance at on em.femplcode = at.femplcode and date_format(at.fattndate,'%Y-%m')='$_POST[attn_mnth]' " . $myqry1 . " inner join masdept dp on em.fdeptcode = dp.fdeptcode and dp.fattnenbl='T' and dp.fdeptcode like '$_POST[dept_code]' and dp.fdeptcode not in ('dep','ihf') where fempltype='p' group by em.femplcode order by em.fsalrhead,em.fdeptcode,fempldesn,em.fempltype,em.femplname"; $myres = mysqli_query($mycon, $mysql); $objPHPExcel->setActiveSheetIndex(0) ->setCellValue('A1', 'Sl. No.') ->setCellValue('B1', 'Company') ->setCellValue('C1', 'Client') ->setCellValue('D1', 'Month') ->setCellValue('E1', 'Empl ID') ->setCellValue('F1', 'Empl Name') ->setCellValue('G1', 'Summary') ->setCellValue('G2', 'Present') ->setCellValue('H2', 'Absent') ->setCellValue('I2', 'Leave With Pay') ->setCellValue('j2', 'Paid Holidays') ->setCellValue('K2', 'Leave W/O Pay') ->setCellValue('L2', 'Tot Late in H:M') ->setCellValue('M2', 'No. of Times Late'); $d = 1; $j = 12; $k = 13; $l = 14; for ($d = 1; $d <= $mnth_days; $d++) { $objPHPExcel->setActiveSheetIndex(0) ->setCellValue(getNameFromNumber($d + $j) . '1', $d) ->setCellValue(getNameFromNumber($d + $j) . '2', 'In Time') ->setCellValue(getNameFromNumber($d + $k) . '1', $d) ->setCellValue(getNameFromNumber($d + $k) . '2', 'Out Time') ->setCellValue(getNameFromNumber($d + $l) . '1', $d) ->setCellValue(getNameFromNumber($d + $l) . '2', 'Loss in Min.'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $j) . '1')->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $k) . '1')->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $l) . '1')->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $j) . '2')->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $k) . '2')->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $l) . '2')->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $j) . '1')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $k) . '1')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $l) . '1')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $j) . '2')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $k) . '2')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $l) . '2')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->mergeCells(getNameFromNumber($d + $j) . '1:' . getNameFromNumber($d + $j + 2) . '1'); $j = $j + 2; $k = $k + 2; $l = $l + 2; } $i = 3; while ($myrow = mysqli_fetch_object($myres)) { $objPHPExcel->setActiveSheetIndex(0) ->setCellValue('A' . $i, $i - 2) ->setCellValue('B' . $i, $myrow->fsalrhead) ->setCellValue('C' . $i, $myrow->fdeptname) ->setCellValue('D' . $i, $myrow->fattnmnth) ->setCellValue('E' . $i, $myrow->femplcode) ->setCellValue('F' . $i, $myrow->femplname) ->setCellValue('G' . $i, $myrow->ftotpr + $myrow->ftothw) ->setCellValue('H' . $i, $myrow->ftotab) ->setCellValue('I' . $i, $myrow->ftotcl) ->setCellValue('J' . $i, $myrow->ftothd) ->setCellValue('K' . $i, $myrow->ftotab) ->setCellValue('L' . $i, $myrow->ftottime) ->setCellValue('M' . $i, $myrow->ftotlate); $d = 1; $j = 12; $k = 13; $l = 14; $attn_indx = explode('|', $myrow->fattndetl); for ($d = 1; $d <= $rept_days; $d++) { $attn_date = ""; $attn_stat = ""; $logi_time = ""; $logo_time = ""; $logi_diff = ""; $attn_remk = ""; if (!isset($attn_indx[$d - 1])) { $attn_date = "-"; $attn_stat = "-"; $logi_time = "-"; $logo_time = "-"; $logi_diff = "-"; $attn_remk = "-"; } else { $attn_indz = explode(',', $attn_indx[$d - 1]); $attn_date = $attn_indz[0]; $attn_stat = $attn_indz[1]; $logi_time = $attn_indz[2]; $logo_time = $attn_indz[3]; $logi_diff = $attn_indz[4]; if ($attn_stat == 'AB') { $attn_remk = "Absent"; } elseif ($attn_stat == 'WO') { $attn_remk = "Sunday"; } elseif ($attn_stat == 'HD') { $attn_remk = "Holiday"; } else { $attn_remk = $logi_diff; } } $objPHPExcel->setActiveSheetIndex(0) ->setCellValue(getNameFromNumber($d + $j) . $i, $logi_time) ->setCellValue(getNameFromNumber($d + $k) . $i, $logo_time) ->setCellValue(getNameFromNumber($d + $l) . $i, $attn_remk); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $j) . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $k) . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle(getNameFromNumber($d + $l) . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $j = $j + 2; $k = $k + 2; $l = $l + 2; } $objPHPExcel->getActiveSheet()->getRowDimension($i)->setRowHeight(25); $objPHPExcel->getActiveSheet()->getRowDimension($i + 1)->setRowHeight(25); $i++; } $objPHPExcel->getActiveSheet()->freezePane('A3'); $objPHPExcel->getActiveSheet()->mergeCells('A1:A2'); $objPHPExcel->getActiveSheet()->mergeCells('B1:B2'); $objPHPExcel->getActiveSheet()->mergeCells('C1:C2'); $objPHPExcel->getActiveSheet()->mergeCells('D1:D2'); $objPHPExcel->getActiveSheet()->mergeCells('E1:E2'); $objPHPExcel->getActiveSheet()->mergeCells('F1:F2'); $objPHPExcel->getActiveSheet()->mergeCells('G1:M1'); $objPHPExcel->getActiveSheet()->getStyle('A1:X2')->getAlignment()->setWrapText(true); $objPHPExcel->getActiveSheet()->getStyle('A1:A' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('B1:B' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('C1:C' . $i)->getAlignment()->setHorizontal('left')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('D1:D' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('E1:E' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('F1:F' . $i)->getAlignment()->setHorizontal('left')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('G1:G' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('H1:H' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('I1:I' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('J1:J' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('K1:K' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('L1:L' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('M1:M' . $i)->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('A1:X2')->getAlignment()->setHorizontal('center')->setVertical('center'); $objPHPExcel->getActiveSheet()->getStyle('A1:X2')->getFont()->setBold(true); $objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(30); $objPHPExcel->getActiveSheet()->getRowDimension(2)->setRowHeight(30); $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(8); $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(50); $objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(30); $objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('I')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('J')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('K')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('L')->setWidth(10); $objPHPExcel->getActiveSheet()->getColumnDimension('M')->setWidth(10); $objPHPExcel->getActiveSheet()->setTitle('attendance_summary'); $objPHPExcel->setActiveSheetIndex(0); $file_name = "attendance_statement_" . $_POST['attn_mnth'] . ".xlsx"; // Redirect output to a client’s web browser (Excel2007) header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); header('Content-Disposition: attachment;filename="' . $file_name . '"'); header('Cache-Control: max-age=0'); // If you're serving to IE 9, then the following may be needed header('Cache-Control: max-age=1'); // If you're serving to IE over SSL, then the following may be needed header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified header('Cache-Control: cache, must-revalidate'); // HTTP/1.1 header('Pragma: public'); // HTTP/1.0 $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); ob_end_clean(); $objWriter->save($file_name); $resp_file = $file_name; echo json_encode(array("mesg" => $resp_mesg, "stat" => $resp_stat, "file" => $resp_file)); function getNameFromNumber($num) { $numeric = $num % 26; $letter = chr(65 + $numeric); $num2 = intval($num / 26); if ($num2 > 0) { return getNameFromNumber($num2 - 1) . $letter; } else { return $letter; } }
Close