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.223.239.65
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_status.php
<?php include("sys_session.php"); include("sys_mainphp.php"); include("sys_connect.php"); include("api_sendmail.php"); $resp_stat = ""; $resp_file = ""; $mail_fil1 = ""; $mail_fil2 = ""; $mail_fil3 = ""; $mail_main = ""; $mail_copy = ""; $mail_bccy = ""; $mail_subj = ""; $mail_file = ""; $mail_text = ""; // INSERT CLIENT HOLIDAY STATUS $mysql = "insert ignore into attendance (fdeptcode,fattndept,fattndate,femplcode,fattnstat,fupdtuser,fattnremk,fupdttime) select em.fdeptcode,em.fdeptcode,current_date,em.femplcode,if(dayname(current_date)='Sunday','WO','HD') as fattnstat,'AUTO' as fupdtuser,hd.fholidesc as fattnremk, now() as fupdttime from masempl em inner join masholiday hd on em.fdeptcode = hd.fdeptcode where fempltype='P' and femplstat='T' and fattnentr='T' and hd.fholidate=current_date and ifnull(em.fdeleted,'F')<>'T' and ifnull(em.fdeptcode,'') not in ('DEP','IHF');"; $myres = mysqli_query($mycon, $mysql); // INSERT ABSENT / WEEKLY OFF STATUS $mysql = "insert ignore into attendance (fdeptcode,fattndept,fattndate,femplcode,fattnstat,fupdtuser,fattnremk,fupdttime) select em.fdeptcode,em.fdeptcode,current_date,em.femplcode,if(dayname(current_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=current_date where em.fempltype='p' and em.femplstat='T' and em.fattnentr='T' and ifnull(em.fdeleted,'F')<>'T' and ifnull(em.fdeptcode,'') not in ('DEP','IHF') and at.femplcode is null;"; $myres = mysqli_query($mycon, $mysql); //UPDATE AS HW IF PRESENT ON HOLIDAYS $mysql = "update ignore attendance at, masempl em, masholiday hd set at.fattnstat='HW' where at.femplcode = em.femplcode and em.fempltype='p' and em.femplstat='T' and em.fattnentr='T' and ifnull(em.fdeleted,'F')<>'T' and ifnull(em.fdeptcode,'') not in ('DEP','IHF') and at.fattnstat='PR' and at.fattndate = hd.fholidate and at.fattndept = hd.fdeptcode and at.fattndate = current_date and em.femplcode = at.femplcode;"; $myres = mysqli_query($mycon, $mysql); //UPDATE AS HW IF PRESENT ON SUNDAYS $mysql = "update ignore attendance at, masempl em set at.fattnstat='HW' where at.femplcode = em.femplcode and em.fempltype='p' and em.femplstat='T' and em.fattnentr='T' and ifnull(em.fdeleted,'F')<>'T' and ifnull(em.fdeptcode,'') not in ('DEP','IHF') and at.fattnstat='PR' and at.fattndate = current_date and dayname(at.fattndate)='Sunday';"; $myres = mysqli_query($mycon, $mysql); //UPDATE SUNDAY AS CH / CL / AB IF SATURDAY & MONDAY IS CH / CL / AB //UPDATE CH AGAINST AB $mysql = "update attendance ad, (select ad.femplcode, sum(case when fattnstat='HW' then 1 else 0 end) - sum(case when fattnstat='CH' then 1 else 0 end) as avlch from attendance ad inner join masempl em on ad.femplcode = em.femplcode and femplstat = 'T' and ifnull(fstopleav,'F')='F' where fattndate>'2021-12-31' and ad.fdeptcode not in ('dep','ihf') group by ad.femplcode having avlch > 0) ch, (select ad.femplcode, sum(case when fattnstat in ('CH','CL') then 1 else 0 end) as totch from attendance ad where date_format(fattndate,'%Y-%m')=date_format(current_date,'%Y-%m') and ad.fdeptcode not in ('dep','ihf') group by ad.femplcode having totch < 6) mx set ad.fattnstat = 'CH' where ad.femplcode = ch.femplcode and ad.femplcode = mx.femplcode and fattndate = current_date and fattnstat = 'AB';"; $myres = mysqli_query($mycon, $mysql); //UPDATE CL AGAINST AB $mysql = "update attendance ad, (select em.femplcode,period_diff(date_format(now(), '%Y%m'), date_format(if('2022-04-30'>fjoindate,'2022-04-30',fjoindate), '%Y%m')) - sum(case when fattnstat='CL' and fattndate>'2022-04-30' then 1 else 0 end) as avlcl from attendance ad inner join masempl em on ad.femplcode = em.femplcode and femplstat = 'T' and ifnull(fstopleav,'F')='F' where em.fdeptcode not in ('dep','ihf') group by ad.femplcode having avlcl > 0) cl, (select ad.femplcode, sum(case when fattnstat in ('CH','CL') then 1 else 0 end) as totch from attendance ad where date_format(fattndate,'%Y-%m')=date_format(current_date,'%Y-%m') and ad.fdeptcode not in ('dep','ihf') group by ad.femplcode having totch < 6) mx set ad.fattnstat = 'CL' where ad.femplcode = cl.femplcode and ad.femplcode = mx.femplcode and fattndate = current_date and fattnstat = 'AB';"; $myres = mysqli_query($mycon, $mysql); //UPDATE ATTENDANCE FOR MANAGEMENT STAFF $mysql = "update ignore attendance ad, masempl em set ad.fattnstat='PR' where ad.femplcode = em.femplcode and em.fupdtabcl='T' and ad.fattnstat in ('AB','CH') and ad.fattndate = current_date;"; $myres = mysqli_query($mycon, $mysql); //UPDATE PH & REMARKS FOR EXCEPTIONS IN FOR WEEKDAYS $mysql = "update attendance ad, masempl em, masdept dp set ad.fattnstat = 'PH', ad.flogistat = (case when timediff(ad.flogitime,dp.flogitime)>'00:10:00' and ifnull(ad.flogitime,'00:00:00')<>'00:00:00' then 'CHECK_IN_DELAY' else '' end), ad.flogostat = (case when timediff(dp.flogotime,ad.flogotime)>'00:10:00' and ifnull(ad.flogotime,'00:00:00')<>'00:00:00' then 'CHECK_OUT_EARLY' else (case when ifnull(ad.flogotime,'00:00:00')='00:00:00' then 'CHECK_OUT_SKIP' else '' end) end), ad.fattnremk = concat( (case when timediff(ad.flogitime,dp.flogitime)>'00:10:00' and ad.flogitime<>'00:00:00' then concat('Check In delay by ',time_format(abs(timediff(dp.flogitime,ad.flogitime)),'%H:%i:%s'),' ') else '' end), (case when timediff(dp.flogotime,ad.flogotime)>'00:10:00' and ad.flogotime<>'00:00:00' then concat('Check Out early by ',time_format(abs(timediff(dp.flogotime,ad.flogotime)),'%H:%i:%s'),' ') else (case when ifnull(ad.flogotime,'00:00:00')='00:00:00' then 'Check Out Skipped' else '' end) end)) where ad.femplcode = em.femplcode and em.femplstat='T' and em.fattnentr='T' and em.fempltype='P' and ifnull(em.fdeleted,'F')<>'T' and ifnull(em.fupdtabcl,'F')<>'T' and ad.fattndept = dp.fdeptcode and ((timediff(ad.flogitime,dp.flogitime)>'00:10:00' and ad.flogitime<>'00:00:00') or (timediff(dp.flogotime,ad.flogotime)>'00:10:00') or (ifnull(ad.flogotime,'00:00:00')='00:00:00')) and ifnull(ad.fexcpperm,'')<>'T' and ad.fattnstat in ('PR','PH') and ad.fattndate=date_sub(current_date,interval 1 day) and weekday(fattndate)<>5 and ifnull(em.fdeptcode,'') not in ('DEP','IHF');"; $myres = mysqli_query($mycon, $mysql); //UPDATE PH & REMARKS FOR EXCEPTIONS IN FOR SATURDAY $mysql = "update attendance ad, masempl em, masdept dp set ad.fattnstat = 'PH', ad.flogistat = (case when timediff(ad.flogitime,dp.fsatdlogi)>'00:10:00' and ifnull(ad.flogitime,'00:00:00')<>'00:00:00' then 'CHECK_IN_DELAY' else '' end), ad.flogostat = (case when timediff(dp.fsatdlogo,ad.flogotime)>'00:10:00' and ifnull(ad.flogotime,'00:00:00')<>'00:00:00' then 'CHECK_OUT_EARLY' else (case when ifnull(ad.flogotime,'00:00:00')='00:00:00' then 'CHECK_OUT_SKIP' else '' end) end), ad.fattnremk = concat( (case when timediff(ad.flogitime,dp.fsatdlogi)>'00:10:00' and ad.flogitime<>'00:00:00' then concat('Check In delay by ',time_format(abs(timediff(dp.fsatdlogi,ad.flogitime)),'%H:%i:%s'),' ') else '' end), (case when timediff(dp.fsatdlogo,ad.flogotime)>'00:10:00' and ad.flogotime<>'00:00:00' then concat('Check Out early by ',time_format(abs(timediff(dp.fsatdlogo,ad.flogotime)),'%H:%i:%s'),' ') else (case when ifnull(ad.flogotime,'00:00:00')='00:00:00' then 'Check Out Skipped' else '' end) end)) where ad.femplcode = em.femplcode and em.femplstat='T' and em.fattnentr='T' and em.fempltype='P' and ifnull(em.fdeleted,'F')<>'T' and ifnull(em.fupdtabcl,'F')<>'T' and ad.fattndept = dp.fdeptcode and ((timediff(ad.flogitime,dp.fsatdlogi)>'00:10:00' and ad.flogitime<>'00:00:00') or (timediff(dp.fsatdlogo,ad.flogotime)>'00:10:00') or (ifnull(ad.flogotime,'00:00:00')='00:00:00')) and ifnull(ad.fexcpperm,'')<>'T' and ad.fattnstat in ('PR','PH') and ad.fattndate=date_sub(current_date,interval 1 day) and weekday(fattndate)=5 and ifnull(em.fdeptcode,'') not in ('DEP','IHF');"; $myres = mysqli_query($mycon, $mysql); //ABSENT / LEAVE REPORT $mysql = "select date_format(ad.fattndate,'%d/%m/%Y') as lattndate, ad.fattndate,dp.fdeptcode,dp.fdeptname,dp.fdeptshrt,em.femplcode,femplname,fempldesn,ap.fstatdesc from attendance ad inner join masempl em on ad.femplcode = em.femplcode and em.femplstat='T' and em.fattnentr='T' and em.fempltype='P' and ifnull(em.fdeleted,'F')<>'T' and em.femplcode not in ('1002') inner join masdept dp on ad.fdeptcode = dp.fdeptcode inner join masattn_stat ap on ad.fattnstat = ap.fattnstat where ad.fattndate=current_date and ad.fdeptcode like '%' and ad.fattnstat in ('AB','CL','CH','WH','AL') and ifnull(em.fdeptcode,'') not in ('DEP','IHF') order by fdepttype desc,fdeptcode,femplname;"; $myres = mysqli_query($mycon, $mysql); $mycnt = mysqli_num_rows($myres); if ($mycnt != 0) { $line_no = 0; $i = 1; require_once("fpdf/fpdf.php"); $pdf = new FPDF('L', 'mm', 'A4'); $pdf->SetMargins(15, 10); $pdf->SetFont('Arial', '', 9); while ($myrow = mysqli_fetch_assoc($myres)) { if ($line_no == 0 || $line_no % 36 == 0) { $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(0, 7, "LOGISYS, BENGALURU", 0, 1, "C"); $line_no++; $pdf->Cell(0, 7, "ATTENDANCE LEAVE / ABSENT REPORT - " . $myrow['lattndate'], 0, 1, "C"); $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(10, 7, "Sl. No.", 1, 0, "C"); $pdf->Cell(25, 7, "Client", 1, 0, "C"); $pdf->Cell(100, 7, "Employee Name", 1, 0, "C"); $pdf->Cell(80, 7, "Designation", 1, 0, "C"); $pdf->Cell(50, 7, "Remarks", 1, 1, "C"); $line_no++; } $pdf->SetFont('Arial', '', 9); $pdf->Cell(10, 7, "{$i}", 1, 0, "C"); $pdf->Cell(25, 7, "[{$myrow['fdeptcode']}] {$myrow['fdeptshrt']}", 1, 0, "L"); $pdf->Cell(100, 7, "[{$myrow['femplcode']}] {$myrow['femplname']}", 1, 0, "L"); $pdf->Cell(80, 7, "{$myrow['fempldesn']}", 1, 0, "L"); $pdf->Cell(50, 7, "{$myrow['fstatdesc']}", 1, 0, "C"); $i++; $pdf->ln(); $line_no++; } $mail_fil1 = "reports/attend_absent_report.pdf"; $pdf->output($mail_fil1, 'F'); } // EXCEPTIONAL REPORT CURRENT DATE $mysql = "select date_format(ad.fattndate,'%d/%m/%Y') as lattndate,ad.fattndate,dp.fdeptcode,dp.fdeptname,dp.fdeptshrt, em.femplcode,femplname,fempldesn,dp.flogitime,dp.flogotime,ad.flogitime as llogitime,ad.flogotime as llogotime, (case when timediff(ad.flogitime,dp.flogitime)>'00:10:00' and ad.flogitime<>'00:00:00' then concat('Check In delay by ',time_format(abs(timediff(dp.flogitime,ad.flogitime)),'%H:%i:%s'),' ') else '' end) as flogiremk from attendance ad inner join masempl em on ad.femplcode = em.femplcode and em.femplstat='T' and em.fattnentr='T' and em.fempltype='P' and ifnull(em.fdeleted,'F')<>'T' inner join masdept dp on ad.fattndept = dp.fdeptcode where ( (timediff(ad.flogitime,dp.flogitime)>'00:10:00' and ad.flogitime<>'00:00:00')) and ad.fattnstat in ('PR','PH') and ad.fattndate=current_date and ifnull(em.fdeptcode,'') not in ('DEP','IHF') order by fdepttype desc,fdeptcode,femplname;"; $myres = mysqli_query($mycon, $mysql); $mycnt = mysqli_num_rows($myres); if ($mycnt != 0) { $line_no = 0; $i = 1; require_once("fpdf/fpdf.php"); $pdf = new FPDF('L', 'mm', 'A4'); $pdf->SetMargins(15, 10); $pdf->SetFont('Arial', '', 9); while ($myrow = mysqli_fetch_assoc($myres)) { if ($line_no == 0 || $line_no % 24 == 0) { $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(0, 7, "LOGISYS, BENGALURU", 0, 1, "C"); $line_no++; $pdf->Cell(0, 7, "ATTENDANCE EXCEPTIONAL REPORT - " . $myrow['lattndate'], 0, 1, "C"); $line_no++; $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(12, 7, "Sl. No.", 1, 0, "C"); $pdf->Cell(70, 7, "Employee Name", 1, 0, "C"); $pdf->Cell(50, 7, "Designation", 1, 0, "C"); $pdf->Cell(25, 7, "Location", 1, 0, "C"); $pdf->Cell(20, 7, "In Time", 1, 0, "C"); $pdf->Cell(20, 7, "Out Time", 1, 0, "C"); $pdf->Cell(70, 7, "Remarks", 1, 1, "C"); $line_no++; } $pdf->SetFont('Arial', '', 9); $pdf->Cell(12, 7, "{$i}", 1, 0, "C"); $pdf->Cell(70, 7, "[{$myrow['femplcode']}] {$myrow['femplname']}", 1, 0, "L"); $pdf->Cell(50, 7, "{$myrow['fempldesn']}", 1, 0, "L"); $pdf->Cell(25, 7, "[{$myrow['fdeptcode']}] {$myrow['fdeptshrt']}", 1, 0, "L"); $pdf->Cell(20, 7, "{$myrow['llogitime']}", 1, 0, "C"); $pdf->Cell(20, 7, "{$myrow['llogotime']}", 1, 0, "C"); $pdf->Cell(70, 7, "{$myrow['flogiremk']}", 1, 0, "L"); $i++; $pdf->ln(); $line_no++; } $mail_fil2 = "reports/attend_except_report_today.pdf"; $pdf->output($mail_fil2, 'F'); } // EXCEPTIONAL REPORT PREVIOUS DATE $mysql = "select date_format(ad.fattndate,'%d/%m/%Y') as lattndate,ad.fattndate,dp.fdeptcode,dp.fdeptname,dp.fdeptshrt, em.femplcode,femplname,fempldesn,dp.flogitime,dp.flogotime,ad.flogitime as llogitime,ad.flogotime as llogotime,ad.fattnremk as lattnremk from attendance ad inner join masempl em on ad.femplcode = em.femplcode and em.femplstat='T' and em.fattnentr='T' and em.fempltype='P' and ifnull(em.fdeleted,'F')<>'T' inner join masdept dp on ad.fattndept = dp.fdeptcode where ( (timediff(ad.flogitime,dp.flogitime)>'00:10:00' and ad.flogitime<>'00:00:00') or (timediff(dp.flogotime,ad.flogotime)>'00:10:00') or (ifnull(ad.flogotime,'00:00:00')='00:00:00')) and ad.fattnstat in ('PR','PH') and ad.fattndate=date_sub(current_date,interval 1 day) and ifnull(em.fdeptcode,'') not in ('DEP','IHF') order by fdepttype desc,fdeptcode,femplname;"; $myres = mysqli_query($mycon, $mysql); $mycnt = mysqli_num_rows($myres); if ($mycnt != 0) { $line_no = 0; $i = 1; require_once("fpdf/fpdf.php"); $pdf = new FPDF('L', 'mm', 'A4'); $pdf->SetMargins(15, 10); $pdf->SetFont('Arial', '', 9); while ($myrow = mysqli_fetch_assoc($myres)) { if ($line_no == 0 || $line_no % 24 == 0) { $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(0, 7, "LOGISYS, BENGALURU", 0, 1, "C"); $line_no++; $pdf->Cell(0, 7, "ATTENDANCE EXCEPTIONAL REPORT - " . $myrow['lattndate'], 0, 1, "C"); $line_no++; $pdf->SetFont('Arial', 'B', 9); $pdf->Cell(12, 7, "Sl. No.", 1, 0, "C"); $pdf->Cell(70, 7, "Employee Name", 1, 0, "C"); $pdf->Cell(50, 7, "Designation", 1, 0, "C"); $pdf->Cell(25, 7, "Location", 1, 0, "C"); $pdf->Cell(20, 7, "In Time", 1, 0, "C"); $pdf->Cell(20, 7, "Out Time", 1, 0, "C"); $pdf->Cell(70, 7, "Remarks", 1, 1, "C"); $line_no++; } $pdf->SetFont('Arial', '', 9); $pdf->Cell(12, 7, "{$i}", 1, 0, "C"); $pdf->Cell(70, 7, "[{$myrow['femplcode']}] {$myrow['femplname']}", 1, 0, "L"); $pdf->Cell(50, 7, "{$myrow['fempldesn']}", 1, 0, "L"); $pdf->Cell(25, 7, "[{$myrow['fdeptcode']}] {$myrow['fdeptshrt']}", 1, 0, "L"); $pdf->Cell(20, 7, "{$myrow['llogitime']}", 1, 0, "C"); $pdf->Cell(20, 7, "{$myrow['llogotime']}", 1, 0, "C"); $pdf->Cell(70, 7, "{$myrow['lattnremk']}", 1, 0, "L"); $i++; $pdf->ln(); $line_no++; } $mail_fil3 = "reports/attend_except_report_prev_day.pdf"; $pdf->output($mail_fil3, 'F'); } //DEPARTMENT WISE SUMMARY EXCEPT DEEPAK AND IHF $mysql = "select ad.fdeptcode,dp.fdepttype,dp.fdeptname,dp.fdeptshrt,count(*) as ltotalem, sum(case when ad.fattnstat in ('pr','ph','hw') then 1 else 0 end) as ltotalpr, sum(case when ad.fattnstat in ('cl','ch','al') then 1 else 0 end) as ltotalcl, sum(case when ad.fattnstat='ab' then 1 else 0 end) as ltotalab, sum(case when ad.fattnstat in ('hd','wo') then 1 else 0 end) as ltotalhd, sum(case when ad.femplcode is null then 1 else 0 end) as ltotalpd,fholidesc from masempl em inner join attendance ad on em.femplcode = ad.femplcode and ad.fattndate = current_date inner join masdept dp on ad.fdeptcode = dp.fdeptcode and fdeptstat='T' and fattnenbl='T' left join masholiday hl on ad.fdeptcode = hl.fdeptcode and fholidate = current_date where em.femplstat='T' and em.fattnentr='T' and em.fempltype='P' and ifnull(em.fdeleted,'F')<>'T' and ifnull(em.fdeptcode,'') not in ('DEP','IHF') group by ad.fdeptcode order by dp.fdepttype desc, dp.fdeptcode;"; $myres = mysqli_query($mycon, $mysql); if (mysqli_num_rows($myres) == 0) { $mail_text = " <div style='background-color:#CCC; float:left; padding:10px;'> <table cellpadding='5' cellspacing='0' border='1' align='center' style='border:1px solid #BBB;border-collapse: collapse;background-color:#FFF;width:1024px;'> <tr> <th colspan=99> No attendance details found on " . date('d/m/Y') . "</th> </tr></table></div>"; } else { $mail_text = " <div style='background-color:#CCC; float:left; padding:10px;'> <table cellpadding='5' cellspacing='0' border='1' align='center' style='border:1px solid #BBB;border-collapse: collapse;background-color:#FFF;width:1024px;'> <tr style='color:#0000FF;'> <th colspan=99> Attendance Summary - " . date("d/m/Y") . "</th> </tr> <tr style='color:#0000FF;'> <th width='4%' align='center'>#</th> <th width='6%' align='center'>Type</th> <th width='50%'align='center'>Client</th> <th width='5%' align='center'>Total</th> <th width='5%' align='center'>Present</th> <th width='5%' align='center'>Leave</th> <th width='5%' align='center'>Absent</th> <th width='5%' align='center'>Holiday</th> <th width='15%' align='center'>Remarks</th> </tr>"; $i = 1; $totalem = 0; $totalpr = 0; $totalab = 0; $totalcl = 0; $totalhd = 0; $totalwo = 0; while ($myrow = mysqli_fetch_assoc($myres)) { $mail_text .= "<tr> <td align='center'> $i</td> <td align='center'> $myrow[fdepttype]</td> <td align='left' >[$myrow[fdeptcode]] $myrow[fdeptname]</td> <td align='center'> $myrow[ltotalem]</td> <td align='center'> $myrow[ltotalpr]</td> <td align='center'> $myrow[ltotalcl]</td> <td align='center'> $myrow[ltotalab]</td> <td align='center'> $myrow[ltotalhd]</td> <td align='left'> $myrow[fholidesc]</td> </tr>"; $i++; $totalem = $totalem + $myrow['ltotalem']; $totalpr = $totalpr + $myrow['ltotalpr']; $totalcl = $totalcl + $myrow['ltotalcl']; $totalab = $totalab + $myrow['ltotalab']; $totalhd = $totalhd + $myrow['ltotalhd']; } $mail_text .= "<tr style='font-weight:bold;'> <td align='center' colspan=3>Total</td> <td align='center'>$totalem</td> <td align='center'>$totalpr</td> <td align='center'>$totalcl</td> <td align='center'>$totalab</td> <td align='center'>$totalhd</td> <td align='center'></td> </tr>"; if ($mail_fil1 == "") { $mail_text .= "<tr><td colspan='99'>Absent details not found!</td></tr>"; } if ($mail_fil2 == "") { $mail_text .= "<tr><td colspan='99'>Exceptional details not found Today!</td></tr>"; } if ($mail_fil3 == "") { $mail_text .= "<tr><td colspan='99'>Exceptional details not found Yesterday!</td></tr>"; } $mail_text .= "</table></div>"; } $mysql = "select group_concat(distinct femplmail) as mail_copy from masempl em inner join masdesn ds on em.fempldesn = ds.fempldesn and fmailupdt='T' where femplstat='t' and ifnull(femplmail,'')<>'' and ifnull(em.fdeleted,'F')<>'T' and femplcode<>'1001' and ifnull(em.fdeptcode,'') not in ('DEP','IHF')"; $myres = mysqli_query($mycon, $mysql); while ($myrow = mysqli_fetch_assoc($myres)) { $mail_copy = $myrow['mail_copy']; } $mail_main = "hr@logisys.org"; $mail_bccy = ""; $mail_subj = "Attendance Status - " . date("d/m/Y"); $mail_file = $mail_fil1 . ',' . $mail_fil2 . ',' . $mail_fil3; $resp_stat = send_mail($mail_main, $mail_copy, $mail_bccy, $mail_subj, $mail_text, $mail_file);
Close