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 | : 52.14.255.122
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 /
oasis /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
system
[ DIR ]
drwxr-xr-x
CIEAttendanceNotEligible.php
3.28
KB
-rw-rw-r--
CIEpendingList.php
5.85
KB
-rw-rw-r--
Dispatch_ans_script_setup.php
5.84
KB
-rwxr-xr-x
Dispatch_ans_script_setup_qp.p...
5.18
KB
-rwxr-xr-x
DisplayPrintApplication_ru.php
65.63
KB
-rw-rw-r--
ECHblk.php
14.61
KB
-rwxr-xr-x
ECHblk_15042021.php
11.68
KB
-rwxr-xr-x
FormulaEvaluate.php
14.15
KB
-rwxr-xr-x
MarkEntry-Setup.php
30.6
KB
-rw-rw-r--
MarkEntry-Setup_bf_gcg.php
22.89
KB
-rwxr-xr-x
MarkEntry-Setupx.php
30.61
KB
-rwxr-xr-x
SelectSubjType.php
3.05
KB
-rw-rw-r--
SubjectType.php
3.62
KB
-rw-rw-r--
TarkaFormatStyles.php
15.37
KB
-rwxr-xr-x
UpdateCollDet.php
2.03
KB
-rwxr-xr-x
absentAndMalReportPdf.php
8.25
KB
-rw-rw-r--
absentEntryYearModewise.php
991
B
-rw-rw-r--
absent_entry_setup.php
8.13
KB
-rwxr-xr-x
absent_entry_setupQp.php
11.36
KB
-rwxr-xr-x
ack_adm_application.php
103.36
KB
-rwxr-xr-x
ack_adm_application.php.orig
58.73
KB
-rwxr-xr-x
ack_admentry_application.php
59.63
KB
-rwxr-xr-x
ack_exam_app_form.php
20.27
KB
-rwxr-xr-x
ack_exam_app_form_bulk.php
12.71
KB
-rwxr-xr-x
ack_report.php
3.69
KB
-rwxr-xr-x
ack_rv_rt_application.php
9.34
KB
-rwxr-xr-x
actClass.php
6.21
KB
-rwxr-xr-x
adm_delete_data.php
5.58
KB
-rwxr-xr-x
admapprove.php
10.33
KB
-rwxr-xr-x
admapprove_kus.php
9.28
KB
-rwxr-xr-x
admissionHallTicket.php
4.43
KB
-rw-r--r--
admission_entry_status.php
2.73
KB
-rwxr-xr-x
admissionapplist.php
5.06
KB
-rwxr-xr-x
admlist.php
13.87
KB
-rwxr-xr-x
admstuddate.php
6.06
KB
-rwxr-xr-x
admuploadexsheet.php
20.48
KB
-rwxr-xr-x
affliation_fee.php
5.04
KB
-rwxrwxrwx
approve.php
41.53
KB
-rwxr-xr-x
approve_kus.php
24.12
KB
-rwxr-xr-x
assignUserMenu.php
13.66
KB
-rw-rw-r--
attCisshortList_sjbit.php
11.91
KB
-rw-r--r--
attEntTeachWise.php
2.07
KB
-rw-rw-r--
attEntryDaywise.php
26.9
KB
-rw-rw-r--
attTeachSum.php
3.63
KB
-rw-r--r--
attendEntry.php
5.32
KB
-rw-rw-r--
attendance.php
17.09
KB
-rwxr-xr-x
attendanceReportForm.php
6.36
KB
-rw-rw-r--
attendance_freez.php
8.51
KB
-rwxr-xr-x
attendance_freez_mth.php
8.24
KB
-rwxr-xr-x
attendanceentrydaywise.php
11.36
KB
-rw-r--r--
attendenceshort.php
7.58
KB
-rw-rw-r--
attshort.php
6.29
KB
-rwxr-xr-x
atttechblp.php
2.48
KB
-rw-r--r--
auto-complete.php
4.89
KB
-rwxr-xr-x
backup.php
4.12
KB
-rwxr-xr-x
backup_1.php
7.85
KB
-rwxr-xr-x
backup_restore.php
8.14
KB
-rwxr-xr-x
backupandrestore.php
10.18
KB
-rwxr-xr-x
backupold.php
2.73
KB
-rwxr-xr-x
bill_details.php
14.21
KB
-rw-rw-r--
board.php
4
KB
-rwxr-xr-x
bundle_dispatch.php
3.2
KB
-rwxr-xr-x
bundle_rec_ack.php
4.67
KB
-rwxr-xr-x
cManualMailer.php
2.54
KB
-rwxr-xr-x
caccesscontext.php
1.28
KB
-rwxr-xr-x
candidate-entry.php
50.68
KB
-rwxr-xr-x
cappcontext.php
2.71
KB
-rwxr-xr-x
challan_entries.php
15.05
KB
-rwxr-xr-x
challan_preparation.php
11.29
KB
-rwxr-xr-x
changeDegree.php
1.56
KB
-rwxr-xr-x
changeMobile.php
2.13
KB
-rwxr-xr-x
cmailer.php
6.83
KB
-rwxr-xr-x
cntDeclaration.php
4.23
KB
-rwxr-xr-x
coll_exam_app_form.php
3.29
KB
-rwxr-xr-x
collbankdet.php
1.9
KB
-rwxr-xr-x
colldesp_ack.php
4.03
KB
-rw-rw-r--
college.php
5.39
KB
-rwxr-xr-x
college_approve.php
5.59
KB
-rwxr-xr-x
college_degree_status.php
5.65
KB
-rwxr-xr-x
collegewisedownload.php
9.46
KB
-rw-rw-r--
colltransfer.php
6.83
KB
-rw-rw-r--
connect.php
2.58
KB
-rwxr-xr-x
convdet.php
8.02
KB
-rwxr-xr-x
convo.php
8.14
KB
-rw-rw-r--
copoMarksList.php
1.27
KB
-rw-rw-r--
copomarksentry.php
10.46
KB
-rw-r--r--
copomarksexternal.php
23.05
KB
-rw-r--r--
coporeport.php
4.56
KB
-rw-r--r--
courserep.php
1.68
KB
-rw-r--r--
coutput.php
1.84
KB
-rwxr-xr-x
createAdmission.php
14.91
KB
-rwxr-xr-x
create_all_grid_files.php
8.57
KB
-rwxr-xr-x
create_all_grid_group_files.ph...
9.94
KB
-rwxr-xr-x
create_all_popup_files.php
5.93
KB
-rwxr-xr-x
create_all_schema_files.php
4.31
KB
-rwxr-xr-x
create_all_views.php
16.52
KB
-rwxr-xr-x
create_html_files.php
52.03
KB
-rwxr-xr-x
create_html_files_without_tab....
44.49
KB
-rwxr-xr-x
create_module_meta_columns.php
5.16
KB
-rwxr-xr-x
createattclass.php
6.99
KB
-rw-rw-r--
createclassattend.php
22.03
KB
-rw-r--r--
crequestbroker.php
2.49
KB
-rwxr-xr-x
csessions.php
548
B
-rwxr-xr-x
cuser.php
3.53
KB
-rwxr-xr-x
custom_mregistry.php
122
B
-rwxr-xr-x
datadictionary.php
3.96
KB
-rwxr-xr-x
daterange.php
6.67
KB
-rwxr-xr-x
degree.php
8.28
KB
-rwxr-xr-x
degree_SujectReport.php
893
B
-rw-rw-r--
degstudymat.php
6.51
KB
-rwxr-xr-x
degstudymatdet.php
6.27
KB
-rwxr-xr-x
degwiseIAreport.php
2.95
KB
-rw-rw-r--
display_details_in_grid.php
107.2
KB
-rw-rw-r--
display_details_in_grid_bf_231...
111.76
KB
-rwxr-xr-x
display_details_in_grid_custom...
2.72
KB
-rwxr-xr-x
display_details_in_grid_studta...
96.56
KB
-rwxr-xr-x
display_details_in_grid_withde...
97.45
KB
-rwxr-xr-x
doc_verify.php
7.52
KB
-rwxr-xr-x
download_misc_files.php
5.19
KB
-rwxr-xr-x
download_misc_files_bcu_comm.p...
4.19
KB
-rwxr-xr-x
download_photo.php
35.98
KB
-rwxr-xr-x
download_photo_pgadm_photos.ph...
4.73
KB
-rw-rw-r--
download_upload.php
3.86
KB
-rwxr-xr-x
dynamicmastersdetails.php
117.45
KB
-rwxr-xr-x
dynamicmastersdetails_one.php
119.36
KB
-rwxr-xr-x
editstddet.php
7.01
KB
-rw-rw-r--
enableStudReg.php
7.65
KB
-rwxr-xr-x
entregupd.php
1.91
KB
-rw-rw-r--
entryexitevents.php
3.09
KB
-rwxr-xr-x
error_log.php
749
B
-rwxr-xr-x
examappfeereport.php
2.12
KB
-rw-rw-r--
execute_query.php
2.5
KB
-rwxr-xr-x
export_import_setup.php
7.62
KB
-rwxr-xr-x
export_import_utility.php
2.67
KB
-rwxr-xr-x
feepaidreports.php
2.77
KB
-rwxr-xr-x
format.php
7.43
KB
-rwxr-xr-x
freeze_Ad_Cl_Me.php
6.64
KB
-rwxr-xr-x
freeze_module_at_admin_college...
10.48
KB
-rwxr-xr-x
freeze_module_at_admin_college...
9.35
KB
-rwxr-xr-x
freeze_module_at_university_co...
7.45
KB
-rwxr-xr-x
freezeiaprici.php
10.87
KB
-rwxr-xr-x
general_report_format.php
11
KB
-rwxr-xr-x
getAutoCompleteFromFrameWork.p...
2.97
KB
-rwxr-xr-x
getDegreeAndSem.php
4.32
KB
-rw-rw-r--
getMessages.php
11.39
KB
-rwxr-xr-x
getTestTotalMarksReport.php
11.96
KB
-rw-rw-r--
getdata.php
39.06
KB
-rwxrwxrwx
getdataold.php
29.62
KB
-rwxr-xr-x
getfeeinformation.php
7.26
KB
-rwxr-xr-x
getmoduledetails.php
23.77
KB
-rwxr-xr-x
getnumword.php
7.45
KB
-rwxr-xr-x
getreportdetails.php
3.21
KB
-rwxr-xr-x
getreportfilefordisplay.php
1.37
KB
-rwxr-xr-x
getsearchcondition.php
1.3
KB
-rwxr-xr-x
ggridmodel.php
9.27
KB
-rwxr-xr-x
golden_palm_payslip.php
12.48
KB
-rwxr-xr-x
helptext.php
5.38
KB
-rwxr-xr-x
htblk.php
6.13
KB
-rwxr-xr-x
ia_room_allotment_datewise.php
12.13
KB
-rwxr-xr-x
iaabsententry.php
3.1
KB
-rw-r--r--
iamarks.php
7.68
KB
-rw-r--r--
iaroomdeclaration.php
2.6
KB
-rwxr-xr-x
iasectionwise.php
30.09
KB
-rw-r--r--
iasectionwisenew.php
35.77
KB
-rw-r--r--
iatimetable.php
7.61
KB
-rw-r--r--
identifyCoMarksNew.php
2.6
KB
-rw-rw-r--
identify_transactions.php
6.4
KB
-rwxr-xr-x
import_marks.php
4.11
KB
-rwxr-xr-x
invigilatorDairyRoomWise.php
6.07
KB
-rw-rw-r--
json.php
34.52
KB
-rwxr-xr-x
lateralentry.php
2.39
KB
-rwxr-xr-x
login.php
8.88
KB
-rwxr-xr-x
login_old.php
3.15
KB
-rwxr-xr-x
marksEntryExt.php
9.11
KB
-rwxr-xr-x
marksentryext.php
13.1
KB
-rw-rw-r--
marksentryquestionwise.php
41.93
KB
-rw-rw-r--
message_board.php
4.67
KB
-rwxr-xr-x
messagetext.php
1.68
KB
-rwxr-xr-x
module_setup.php
2.48
KB
-rwxr-xr-x
mregistry.php
155.51
KB
-rwxr-xr-x
mregistry18.06.2021.php
99.46
KB
-rwxr-xr-x
mregistry_14092024.php
150.27
KB
-rw-rw-r--
mrn_approval.php
9
KB
-rwxr-xr-x
oldqnpaper.php
4.44
KB
-rw-rw-r--
pendingcie.php
4.21
KB
-rw-rw-r--
picharttesting.php
24.76
KB
-rw-r--r--
pmarks.php
5.97
KB
-rw-rw-r--
post.php
6
KB
-rwxr-xr-x
practicalMarks.php
8.67
KB
-rw-rw-r--
prbillreport.php
5.07
KB
-rw-r--r--
prientCodeStikers.php
6.35
KB
-rw-r--r--
principalFreeze.php
6.92
KB
-rw-rw-r--
principalfreezingsubject.php
1.9
KB
-rw-rw-r--
printAdmRegn.php
13.13
KB
-rwxr-xr-x
printApp_ru.php
1.12
KB
-rw-rw-r--
printMarkListDetailsWisenew_sj...
14.42
KB
-rw-r--r--
qnwiseMarksStats.php
6.14
KB
-rw-rw-r--
qnwisemarksentrynew.php
18.61
KB
-rw-rw-r--
qpSummaryReport.php
1.03
KB
-rw-rw-r--
receive_rv_rt_application.php
8.33
KB
-rwxr-xr-x
receive_teach_trans.php
2.49
KB
-rw-rw-r--
receive_teach_transfer.js
5.06
KB
-rw-rw-r--
remunerationEntry.php
7.14
KB
-rw-rw-r--
repeateriamarksentry.php
4.86
KB
-rw-rw-r--
report_bulk_applications.php
19.42
KB
-rwxr-xr-x
report_iamarks_pending.php
12.04
KB
-rwxr-xr-x
report_ra_invigilator_dairy.ph...
22.93
KB
-rwxr-xr-x
report_ra_qp_wise_student_coun...
8.54
KB
-rwxr-xr-x
report_setup.php
25.12
KB
-rwxr-xr-x
report_tool.php
73.03
KB
-rwxr-xr-x
resetPasswordUser.php
2.69
KB
-rw-rw-r--
result.php
5.06
KB
-rwxr-xr-x
revaluation.php
16.66
KB
-rwxr-xr-x
revaluation_oldtype.php
8.45
KB
-rwxr-xr-x
revaluation_withdegree.php
16.77
KB
-rwxr-xr-x
roomAllotment.php
37.45
KB
-rw-rw-r--
room_allotment.php
9.14
KB
-rwxr-xr-x
room_allotment_datewise.php
26.07
KB
-rwxr-xr-x
room_allotment_datewise_bf_rcu...
16.97
KB
-rwxr-xr-x
room_allotment_datewise_stph.p...
21.57
KB
-rwxr-xr-x
room_allotment_datewise_stph_n...
29.01
KB
-rwxr-xr-x
room_allotment_shifiting.php
3.34
KB
-rwxr-xr-x
roomallotmentExcel.php
8.23
KB
-rw-rw-r--
roomallotmentqpwise.php
10.22
KB
-rw-rw-r--
roomallotmentqpwisenew.php
13.92
KB
-rw-rw-r--
roomcreationnew.php
2.81
KB
-rw-rw-r--
roomdeclaration.php
2.2
KB
-rwxr-xr-x
roomdeclaration_stph.php
2.51
KB
-rwxr-xr-x
roomwiseinvigilatorsEntry.php
9.86
KB
-rw-rw-r--
rvdates.php
6.46
KB
-rw-rw-r--
rvrt_ack_exam_app.php
6
KB
-rw-rw-r--
rvrt_report.php
1.92
KB
-rw-rw-r--
savePassword.php
1.14
KB
-rw-rw-r--
saveclsdets.php
1.91
KB
-rw-rw-r--
savesspdetails.php
9.93
KB
-rw-rw-r--
sectionwisepermission.php
5.67
KB
-rwxr-xr-x
sendLoginPassword.php
3.09
KB
-rwxr-xr-x
sendsmsapi.php
814
B
-rwxr-xr-x
sendusrandpws.php
1002
B
-rwxr-xr-x
serchbygrid.php
822
B
-rwxr-xr-x
shortLists.php
1.65
KB
-rw-rw-r--
std_register_det.php
3.56
KB
-rw-rw-r--
stringspliter.php
693
B
-rwxr-xr-x
studSubIdent.php
11.23
KB
-rw-r--r--
stud_name_doc_upload.php
1.24
KB
-rw-rw-r--
stud_wise_report.php
3.02
KB
-rw-rw-r--
student.php
58.23
KB
-rwxr-xr-x
student_entry.php
61.39
KB
-rwxr-xr-x
student_entry_kswu.php
51.23
KB
-rwxr-xr-x
student_entry_nitte.php
88.09
KB
-rw-rw-r--
student_entry_rur.php
74.42
KB
-rw-rw-r--
student_entry_vku.php
66.58
KB
-rwxr-xr-x
student_rur.php
64.37
KB
-rw-rw-r--
student_vku.php
57.95
KB
-rwxr-xr-x
studentfeesandattiashortagedat...
11.38
KB
-rw-rw-r--
studentportal_remove.php
6.18
KB
-rwxr-xr-x
studentreport.php
15.37
KB
-rw-rw-r--
studnamecorr.php
6.69
KB
-rw-rw-r--
subIAMarksEntry.php
11.14
KB
-rw-rw-r--
subblock.php
6.12
KB
-rwxr-xr-x
subdet.php
9.61
KB
-rw-rw-r--
subjReg.php
12.04
KB
-rw-r--r--
subjectList_display.php
11.7
KB
-rwxr-xr-x
subject_freshExam.php
33.18
KB
-rwxr-xr-x
subject_freshExam_rcub.php
28.33
KB
-rwxr-xr-x
subjectfreez.php
13.02
KB
-rwxr-xr-x
subjectwise_freezing_sectionwi...
12.43
KB
-rwxr-xr-x
subshort.php
8.97
KB
-rw-rw-r--
system_utility.php
1.84
KB
-rwxr-xr-x
systemsetup.php
80.41
KB
-rwxr-xr-x
teachFreeze.php
8.17
KB
-rw-r--r--
teachOficerEntry.php
11.46
KB
-rwxr-xr-x
teachers.php
19.76
KB
-rwxr-xr-x
theoryMarksEntry.php
4.89
KB
-rw-rw-r--
thvalmarks.php
2.72
KB
-rw-r--r--
time_table_degreewise.php
5
KB
-rwxrwxrwx
transaction-series.php
4.86
KB
-rwxr-xr-x
updateSection.php
4.74
KB
-rwxr-xr-x
update_defined_flag.php
3.41
KB
-rwxr-xr-x
updatecopo.php
9.34
KB
-rw-r--r--
updatedegreegroup.php
3.21
KB
-rw-rw-r--
updateexamcnt.php
2.92
KB
-rwxr-xr-x
updatefreshexam.php
1.33
KB
-rw-rw-r--
updatestudentsem.php
2.03
KB
-rw-rw-r--
updatetimetable.php
9.14
KB
-rw-r--r--
updateuvcms.php
2.37
KB
-rw-rw-r--
updmarks.php
22.24
KB
-rw-r--r--
updnemp.php
1.78
KB
-rw-r--r--
upload_doc_demo.php
84
B
-rw-rw-r--
upload_studentPhoto.php
10.81
KB
-rwxr-xr-x
upload_studentPhoto_before_dow...
8.02
KB
-rwxr-xr-x
uploadcopo.php
7.89
KB
-rw-r--r--
uploadmoduledetails.php
39.65
KB
-rwxr-xr-x
uploadteacherattendance.php
5.23
KB
-rw-r--r--
userpasswordreset.php
754
B
-rw-rw-r--
usersetup.php
24.46
KB
-rwxr-xr-x
usersetupNew.php
12.76
KB
-rw-r--r--
usersubj_identification.php
5.15
KB
-rwxr-xr-x
viewNotifications.php
1.21
KB
-rw-rw-r--
view_ledger.php
3.64
KB
-rwxrwxrwx
yearmode.php
1.83
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : report_tool.php
<?php /*Author : M.Srikanth Date : 2009-07-30 Project : Reporting tool (Frame Work) Description : This class is for dynamically to create reports */ //Start : 'reporttool' Class $my_aobj_context; class reporttool { public $report_setup; //Start : Constructor function __construct($aobj_context) { session_start(); $this->aobj_context=$aobj_context; $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); $this->user_id = $_SESSION['user_id']; $this->save_cond_flag = 0 ; $my_aobj_context = $this->aobj_context; $this->setup_name = ''; } //End : Constructor //Start : createReport() /* This function is for to get market modules names*/ function getCompanyDetails() { $select_company_details = "select company_name,city from company_setup"; $lobj_select_company_details = $this->aobj_context->mobj_db->GetRow($select_company_details); return $lobj_select_company_details; } function excelReportPreDefineSetup() { if(trim($this->report_setup['page_orientation']) == 'landscape') $this->worksheet->setLandscape(); else $this->worksheet->setPortrait(); if(!empty($this->report_setup['print_scale'])) $this->worksheet->setPrintScale($this->report_setup['print_scale']); if(!empty($this->report_setup['header_repeat'])) $this->worksheet->repeatRows($this->report_setup['header_repeat']['x'], $this->report_setup['header_repeat']['y']); if($this->report_setup['hide_grid_lines'] == "yes") $this->worksheet->hideScreenGridlines(); if(!empty($this->report_setup['freezePanes'])) $this->worksheet->freezePanes (array($this->report_setup['freezePanes'])); if(!empty($this->report_setup['printRowColHeaders'])) $this->worksheet->printRowColHeaders($this->report_setup['printRowColHeaders ']); if(!empty($this->report_setup['setPaperSize'])) $this->worksheet->setPaper($this->report_setup['setPaperSize']); // DEFULT SETTING if(empty($this->report_setup['page_orientation'])) $this->worksheet->setPortrait(); } function createReport() { ini_set("memory_limit",-1); ini_set('max_execution_time', 1400); $excel_writer=$this->aobj_context->main_src."/Excel_Writer/Writer.php"; $file_path=$this->aobj_context->main_src."/imported_files/{$this->report_name}_report_{$this->report_id}.xls"; $logo_path=$this->aobj_context->main_src."/img/bioplus logo_bit.bmp"; // echo $file_path; // die(); include($excel_writer); $user_id = $_SESSION['user_id']; if($this->save_cond_flag == 1) $workbook = new Spreadsheet_Excel_Writer($file_path); else $workbook = new Spreadsheet_Excel_Writer(); $workbook->setVersion(9); // Use Excel97/2000 Format $tarka_format_file=$this->aobj_context->main_src."/src/TarkaFormatStyles.php"; include_once($tarka_format_file); $objfrmt =& new FormatStyle(); $Data_Center_Bold_NoBorder =& $workbook->addFormat($objfrmt->Data_Center_Bold_NoBorder); $Data_Left_Bold_NoBorder =& $workbook->addFormat($objfrmt->Data_Left_Bold_NoBorder); $Data_Right_Bold_NoBorder =& $workbook->addFormat($objfrmt->Data_Right_Bold_NoBorder); $Data_top_bottm_border =& $workbook->addFormat($objfrmt->Data_top_bottm_border_bold); $Data_border =& $workbook->addFormat($objfrmt->Data_top_bottm_border); $this->worksheet =& $workbook->addWorksheet($Type.' Summary '.$ex_cur_year); // $this->worksheet->setPaper(9); // report setup $Data_border->setTextWrap(); $Data_top_bottm_border->setTextWrap(); $this->worksheet->setMarginTop(0.3); $this->worksheet->setMarginLeft(0.3); $this->worksheet->setMarginRight(0.1); $this->worksheet->setMarginBottom(0.7); $this->worksheet->setPaper(9); //$this->worksheet->setVersion(9); $this->worksheet->setZoom(100); $nextrow = 0; $this->excelReportPreDefineSetup(); $this->getQueries(); $max_col = $this->lobj_get_max_col[maxcol]; $min_col = $this->lobj_get_max_col[mincol]; //$this->worksheet->setColumn(0,$max_col,15); $get_company_header = $this->getCompanyDetails(); $company_name_name = $get_company_header[company_name]; $company_city = $get_company_header[city]; $this->worksheet->insertBitmap(0, 0, $logo_path, 0, 0, 1, 1); $this->worksheet->setColumn(0,0,2); $this->worksheet->write(0,1,$company_name_name,$Data_Center_Bold_NoBorder); $this->worksheet->mergeCells(0,1,0,$max_col); $this->worksheet->write(1,1,$company_city,$Data_Center_Bold_NoBorder); $this->worksheet->mergeCells(1,1,1,$max_col); //$worksheet->setHeader('&C'.$company_name_name."\n".'&C'.$company_city, 0.5); for($tit = 0 ; $tit < count($this->titles) ; $tit++) { $title_name = $this->titles[$tit]['title']; $this->worksheet->write($this->titles[$tit]['row'],$this->titles[$tit]['col'],$title_name,$Data_Center_Bold_NoBorder); $this->worksheet->mergeCells($this->titles[$tit]['row'],$this->titles[$tit]['col'],$this->titles[$tit]['row'],$max_col); if($this->titles[$tit]['row'] > $next_row) $nextrow = $this->titles[$tit]['row']; } $max_nextrow = $this->lobj_get_max_row[nextrow]; $nextrow += 1; $max_st_ctr = 0; for($hed = 0 ; $hed < count($this->lobj_get_report_setup_details); $hed++) { $column_name = $this->lobj_get_report_setup_details[$hed]['query_columns']; $header_row = $nextrow + $this->lobj_get_report_setup_details[$hed]['row']; $header_col = $this->lobj_get_report_setup_details[$hed]['col']; $data_row = $this->lobj_get_report_setup_details[$hed]['row']; $sub_tot_col = $this->lobj_get_report_setup_details[$hed]['sub_total']; $tot = $this->lobj_get_report_setup_details[$hed]['total']; $width = $this->lobj_get_report_setup_details[$hed]['width']; $width = ($width=='0')?19:$width; if($tot > 1) { $check_grand_tot = $tot; } $col_title = $this->lobj_get_report_setup_details[$hed]['title']; if($sub_tot_col > $max_st_ctr) { $max_st_ctr = $sub_tot_col; } $index_col[$column_name] = $header_col; $index_row[$column_name] = $data_row; if($col_title == 1) continue; $this->worksheet->setColumn($header_col,$header_col,$width); $this->worksheet->write($header_row,$header_col,$column_name,$Data_top_bottm_border); } $first = 1; $nextrow = $nextrow+$max_nextrow; for($data = 0 ; $data < count($this->data_set); $data++) { if($first == 1) { $first = 0; for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details); $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $col_title = $this->lobj_get_report_sub_hed_details[$hed]['title']; $value = $this->data_set[$data][$column_name]; $col_ind = $index_col[$column_name]; $title_hed = $column_name.': '.$value; if($col_title == 1) { $this->worksheet->write($nextrow+1,$min_col,$title_hed,$Data_Left_Bold_NoBorder); $nextrow++; } } } for($hed = 0 ; $hed < count($this->lobj_get_report_setup_details); $hed++) { $column_name = $this->lobj_get_report_setup_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_setup_details[$hed]['sub_total']; $total = $this->lobj_get_report_setup_details[$hed]['total']; $data_col_title = $this->lobj_get_report_setup_details[$hed]['title']; $value = $this->data_set[$data][$column_name]; $col_ind = $index_col[$column_name]; $row_ind = $index_row[$column_name]; if($total == 1) { for($cnt = 0; $cnt <= $max_st_ctr ; $cnt++) { $totals[$cnt][$row_ind][$col_ind] += $value; } } if($sub_total > 0) { $totals[$sub_total]['val'] = $value; $totals[$sub_total]['check_val'] = $value; } if($data_col_title == 0) { $value = strtr($value, array( "\r\n" => "\n", "\r" => "\n", )); $this->worksheet->write($nextrow+$row_ind,$col_ind,$value,$Data_border); } } $nextrow = $nextrow+$max_nextrow; $change = false; for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details) ; $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_sub_hed_details[$hed]['sub_total']; if($change) { $totals[$sub_total]['check_val'] = 'changed'; } else { $next_value = $this->data_set[$data+1][$column_name]; if($totals[$sub_total]['check_val'] != $next_value ) { $change = true; } } } for($hed = 0 ; $hed < count($this->lobj_get_report_total_details) ; $hed++) { $column_name = $this->lobj_get_report_total_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_total_details[$hed]['sub_total']; $next_value = $this->data_set[$data+1][$column_name]; $col_ind = $index_col[$column_name]; $row_ind = $index_row[$column_name]; if($totals[$sub_total]['check_val'] != $next_value ) { // $sub_tot_name = 'Total for =>'.$totals[$sub_total]['val']; // $this->worksheet->write($nextrow+$row_ind,$col_ind,$sub_tot_name,$Data_Right_Bold_NoBorder); $print_sub_title = false; for($sub_hed = 0 ; $sub_hed < count($this->lobj_get_report_setup_details); $sub_hed++) { $sub_head_name = $this->lobj_get_report_setup_details[$sub_hed]['query_columns']; $sub_col_ind = $index_col[$sub_head_name]; $sub_row_ind = $index_row[$sub_head_name]; $sub_tot_value = $totals[$sub_total][$sub_row_ind][$sub_col_ind]; if(!empty($sub_tot_value)) { $this->worksheet->write($nextrow+$sub_row_ind,$sub_col_ind,$sub_tot_value,$Data_Right_Bold_NoBorder); $totals[$sub_total][$sub_row_ind][$sub_col_ind] = 0; } } if($print_sub_title == true) { $sub_tot_name = 'Total for =>'.$totals[$sub_total]['val']; $worksheet->write($nextrow+$row_ind,$col_ind,$sub_tot_name,$Data_Right_Bold_NoBorder); } $nextrow = $nextrow+$max_nextrow; } } if($data < count($this->data_set)-1) { for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details) ; $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_sub_hed_details[$hed]['sub_total']; $col_title = $this->lobj_get_report_sub_hed_details[$hed]['title']; $next_value = $this->data_set[$data+1][$column_name]; $title_hed = $column_name.': '.$next_value; $col_ind = $index_col[$column_name]; $row_ind = $index_row[$column_name]; if($totals[$sub_total]['check_val'] != $next_value ) { if($col_title == 1) { $this->worksheet->write($nextrow+1,$min_col,$title_hed,$Data_Left_Bold_NoBorder); $nextrow++; } } } } } if(!empty($check_grand_tot)) { $sub_tot_name = 'Grand Total =>'; $this->worksheet->write($nextrow+$row_ind,$min_col,$sub_tot_name,$Data_Right_Bold_NoBorder); } for($sub_hed = 0 ; $sub_hed < count($this->lobj_get_report_setup_details); $sub_hed++) { $sub_head_name = $this->lobj_get_report_setup_details[$sub_hed]['query_columns']; $sub_col_ind = $index_col[$sub_head_name]; $sub_row_ind = $index_row[$sub_head_name]; $sub_tot_value = $totals[0][$sub_row_ind][$sub_col_ind]; if(!empty($sub_tot_value)) { $this->worksheet->write($nextrow+$sub_row_ind,$sub_col_ind,$sub_tot_value,$Data_Right_Bold_NoBorder); $totals[0][$sub_row_ind][$sub_col_ind] = 0; } } //die(); $this->worksheet->setFooter('&LDate: &D &CPage &P of &N &R'.$this->report_setup['footerLoginName'], "0.3"); $workbook->close(); if($this->save_cond_flag == 0) $workbook->send("{$this->report_name}_report_{$this->report_id}.xls"); } //End : createReport() //STR_PAD_LEFT (integer) //STR_PAD_RIGHT (integer) function createTextReport() { $print_file= "c:\\print_file.txt"; $fh = fopen($print_file,'w') or die("can't open file"); // $title_name = str_pad('-',$this->page_size,"-", STR_PAD_BOTH); // fputs($fh,$title_name."\r\n"); $this->getQueries(); $get_col_width = "select rsd.col,max(rsd.width) as wdt from report_setup_details rsd inner join report_setup_header rsh on rsh.internal_code = rsd.ref_report_setup_header_code where rsh.report_id = '{$this->report_id}' and ifnull(rsh.report_name,'') = '{$this->setup_name}' group by col "; $lobj_get_col_width = $this->aobj_context->mobj_db->GetAll($get_col_width); $max_row = $this->lobj_get_max_row[nextrow]; $get_company_header = $this->getCompanyDetails(); $this->company_name_name = $get_company_header[company_name]; $this->company_city = $get_company_header[city]; //$max_col = $this->lobj_get_max_col[maxcol]; for($ent = 1 ; $ent <= $max_row ; $ent++) { for($dt = 0 ; $dt < count($lobj_get_col_width) ; $dt++) { $blank_print_data[$ent][$lobj_get_col_width[$dt]['col']] = str_pad(" ",$lobj_get_col_width[$dt]['wdt']); } } $max_st_ctr = $this->header($blank_print_data,$max_row,$fh); $title_name = $this->title_name; //start : Printing First subtotal Title $first = 1; for($data = 0 ; $data < count($this->data_set); $data++) { if($first == 1) { $first = 0; $print = 0; $print_data = $blank_print_data; for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details); $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $col_title = $this->lobj_get_report_sub_hed_details[$hed]['title']; $col_width = $this->lobj_get_report_sub_hed_details[$hed]['width']; $sep_txt = $this->lobj_get_report_sub_hed_details[$hed]['sep_text']; $bold = $this->lobj_get_report_sub_hed_details[$hed]['bold']; $get_bold = $this->getBold($bold); $bold_on = $get_bold['on']; $bold_off = $get_bold['off']; $style = $this->lobj_get_report_sub_hed_details[$hed]['style']; $add_style = $this->getStyle($style); $style_on = $add_style['on']; $style_off = $add_style['off']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_sub_hed_details[$hed]['col']; $row_num = $this->lobj_get_report_sub_hed_details[$hed]['row']; $alignment = $this->lobj_get_report_sub_hed_details[$hed]['alignment']; $pad_align = $this->getDataPad($alignment); $alias_name = $this->lobj_get_report_sub_hed_details[$hed]['alias_name']; $nor_alias_name = strtolower($alias_name); $value = $this->data_set[$data][$column_name]; if($nor_alias_name == 'value') $tit_val = $value; else if($nor_alias_name == 'name') $tit_val = $column_name; else $tit_val = $alias_name; $title_hed = $column_name.': '.$tit_val; if($col_title == 1) { $prt_val = substr(str_pad($title_hed,$col_width,' ',$pad_align),0,$col_width) ; $print_data[$row_num][$col_num] = $bold_on.$style_on.$prt_val.$style_off.$bold_off; $print = 1; } } $this->pageBreak($fh,$blank_print_data,$title_name,$max_row); if($print == 1) { for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt]; } fwrite($fh,$print_string."\r\n"); $this->page_count++; $st_len = strlen(trim($print_string)); $head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); fputs($fh,$head_line."\r\n"); $this->page_count++; } } } //End : Printing First subtotal Title //Strat : Printing Normal data $print_data = $blank_print_data; for($hed = 0 ; $hed < count($this->lobj_get_report_setup_details); $hed++) { $column_name = $this->lobj_get_report_setup_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_setup_details[$hed]['sub_total']; $total = $this->lobj_get_report_setup_details[$hed]['total']; if($total > 0) { $text_grand_tot = 1; } $data_col_title = $this->lobj_get_report_setup_details[$hed]['title']; $col_width = $this->lobj_get_report_setup_details[$hed]['width']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_setup_details[$hed]['col']; $row_num = $this->lobj_get_report_setup_details[$hed]['row']; $sep_txt = $this->lobj_get_report_setup_details[$hed]['sep_text']; $style = $this->lobj_get_report_setup_details[$hed]['style']; $add_style = $this->getStyle($style); $style_on = $add_style['on']; $style_off = $add_style['off']; $alignment = $this->lobj_get_report_setup_details[$hed]['alignment']; $pad_align = $this->getDataPad($alignment); $value = $this->data_set[$data][$column_name]; if($total == 1) { for($cnt = 0; $cnt <= $max_st_ctr ; $cnt++) { $totals[$cnt][$row_num][$col_num] += $value; } } if($sub_total > 0) { $totals[$sub_total]['val'] = $value; $totals[$sub_total]['check_val'] = $value; } if($data_col_title == 0) { $prt_val = substr(str_pad($value,$col_width,' ',$pad_align),0,$col_width) ; $print_data[$row_num][$col_num] = $style_on.$prt_val.$style_off; } } $this->pageBreak($fh,$blank_print_data,$title_name,$max_row); for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt].$sep_txt; } fwrite($fh,$print_string."\r\n"); $this->page_count++; if($data == count($this->data_set)-1) { for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt].$sep_txt; } $st_len = strlen(trim($print_string)); $head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); fputs($fh,$head_line."\r\n"); $this->page_count++; } } $pgbr = ''; } //End : Printing Normal data $change = false; for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details) ; $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_sub_hed_details[$hed]['sub_total']; if($change) { $totals[$sub_total]['check_val'] = 'changed'; } else { $next_value = $this->data_set[$data+1][$column_name]; if($totals[$sub_total]['check_val'] != $next_value ) { $change = true; } } } //Start : Printing subtotal values //$print_data = $blank_print_data; $print = 0; for($hed = 0 ; $hed < count($this->lobj_get_report_total_details) ; $hed++) { $column_name = $this->lobj_get_report_total_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_total_details[$hed]['sub_total']; $col_width = $this->lobj_get_report_total_details[$hed]['width']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_total_details[$hed]['col']; $row_num = $this->lobj_get_report_total_details[$hed]['row']; $sep_txt = $this->lobj_get_report_total_details[$hed]['sep_text']; $bold = $this->lobj_get_report_total_details[$hed]['bold']; $get_bold = $this->getBold($bold); $bold_on = $get_bold['on']; $bold_off = $get_bold['off']; $style = $this->lobj_get_report_total_details[$hed]['style']; $add_style = $this->getStyle($style); $style_on = $add_style['on']; $style_off = $add_style['off']; $alignment = $this->lobj_get_report_total_details[$hed]['alignment']; $pad_align = $this->getDataPad($alignment); $next_value = $this->data_set[$data+1][$column_name]; if($totals[$sub_total]['check_val'] != $next_value ) { fputs($fh,$title_name."\r\n"); $print_data = $blank_print_data; $sub_tot_name = 'Total for =>'.$totals[$sub_total]['val']; $prt_val = substr(str_pad($sub_tot_name,$col_width,' ',$pad_align),0,$col_width) ; $print_data[$row_num][$col_num] = $bold_on.$style_on.$prt_val.$style_off.$bold_off; for($sub_hed = 0 ; $sub_hed < count($this->lobj_get_report_setup_details); $sub_hed++) { $sub_head_name = $this->lobj_get_report_setup_details[$sub_hed]['query_columns']; $col_width = $this->lobj_get_report_setup_details[$sub_hed]['width']; if(empty($col_width)) $col_width = 20; $sub_col_ind = $this->lobj_get_report_setup_details[$sub_hed]['col']; $sub_row_ind = $this->lobj_get_report_setup_details[$sub_hed]['row']; $sep_txt = $this->lobj_get_report_setup_details[$sub_hed]['sep_text']; $bold = $this->lobj_get_report_setup_details[$sub_hed]['bold']; $get_bold = $this->getBold($bold); $bold_on = $get_bold['on']; $bold_off = $get_bold['off']; $style = $this->lobj_get_report_setup_details[$sub_hed]['style']; $add_style = $this->getStyle($style); $style_on = $add_style['on']; $style_off = $add_style['off']; $alignment = $this->lobj_get_report_setup_details[$sub_hed]['alignment']; $pad_align = $this->getDataPad($alignment); $sub_tot_value = $totals[$sub_total][$sub_row_ind][$sub_col_ind]; if(!empty($sub_tot_value)) { $prt_val = substr(str_pad($sub_tot_value,$col_width,' ',$pad_align),0,$col_width) ; $print_data[$sub_row_ind][$sub_col_ind] = $bold_on.$style_on.$prt_val.$style_off.$bold_off; $totals[$sub_total][$sub_row_ind][$sub_col_ind] = 0; $print = 1; } } $this->pageBreak($fh,$blank_print_data,$title_name,$max_row); if($print == 1) { for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt].$sep_txt; } fwrite($fh,$print_string."\r\n"); $this->page_count++; } } fputs($fh,$title_name."\r\n"); $this->page_count++; } } //End : Printing subtotal values //Start : Printing Titels $print_data = $blank_print_data; $print = 0; if($data < count($this->data_set)-1) { for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details) ; $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_sub_hed_details[$hed]['sub_total']; $col_title = $this->lobj_get_report_sub_hed_details[$hed]['title']; $col_width = $this->lobj_get_report_sub_hed_details[$hed]['width']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_sub_hed_details[$hed]['col']; $row_num = $this->lobj_get_report_sub_hed_details[$hed]['row']; $sep_txt = $this->lobj_get_report_sub_hed_details[$hed]['sep_text']; $bold = $this->lobj_get_report_sub_hed_details[$hed]['bold']; $get_bold = $this->getBold($bold); $bold_on = $get_bold['on']; $bold_off = $get_bold['off']; $style = $this->lobj_get_report_sub_hed_details[$hed]['style']; $add_style = $this->getStyle($style); $style_on = $add_style['on']; $style_off = $add_style['off']; $alignment = $this->lobj_get_report_sub_hed_details[$hed]['alignment']; $pad_align = $this->getDataPad($alignment); $alias_name = $this->lobj_get_report_sub_hed_details[$hed]['alias_name']; $nor_alias_name = strtolower($alias_name); $next_value = $this->data_set[$data+1][$column_name]; if($nor_alias_name == 'value') $tit_val = $next_value; else if($nor_alias_name == 'name') $tit_val = $column_name; else $tit_val = $alias_name; $title_hed = $column_name.': '.$tit_val; if($totals[$sub_total]['check_val'] != $next_value ) { if($col_title == 1) { $prt_val = substr(str_pad($title_hed,$col_width,' ',$pad_align),0,$col_width) ; $print_data[$row_num][$col_num] = $bold_on.$style_on.$prt_val.$style_off.$bold_off; $print = 1; } } } $this->pageBreak($fh,$blank_print_data,$title_name,$max_row); if($print == 1) { for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt]; } fwrite($fh,$print_string."\r\n"); $this->page_count++; $st_len = strlen(trim($print_string)); $head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); fputs($fh,$head_line."\r\n"); $this->page_count++; } } } } //End : Printing Titels //Start : Printing Grand Total if($text_grand_tot > 0) { $sub_tot_name = 'Grand Total =>'; $print_data = $blank_print_data; $print_data[1][1] = str_pad($sub_tot_name,$col_width); for($sub_hed = 0 ; $sub_hed < count($this->lobj_get_report_setup_details); $sub_hed++) { $sub_head_name = $this->lobj_get_report_setup_details[$sub_hed]['query_columns']; $col_width = $this->lobj_get_report_setup_details[$sub_hed]['width']; $col_num = $this->lobj_get_report_setup_details[$sub_hed]['col']; $row_num = $this->lobj_get_report_setup_details[$sub_hed]['row']; $sep_txt = $this->lobj_get_report_setup_details[$sub_hed]['sep_text']; $bold = $this->lobj_get_report_setup_details[$sub_hed]['bold']; $get_bold = $this->getBold($bold); $bold_on = $get_bold['on']; $bold_off = $get_bold['off']; $style = $this->lobj_get_report_setup_details[$sub_hed]['style']; $add_style = $this->getStyle($style); $style_on = $add_style['on']; $style_off = $add_style['off']; $alignment = $this->lobj_get_report_setup_details[$sub_hed]['alignment']; $pad_align = $this->getDataPad($alignment); $sub_tot_value = $totals[0][$row_num][$col_num]; if(!empty($sub_tot_value)) { $prt_val = substr(str_pad($sub_tot_value,$col_width,' ',$pad_align),0,$col_width) ; $print_data[$row_num][$col_num] = $bold_on.$style_on.$prt_val.$style_off.$bold_off; $totals[0][$row_num][$col_num] = 0; } } $this->pageBreak($fh,$blank_print_data,$title_name,$max_row); for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt].$sep_txt; } fwrite($fh,$print_string."\r\n"); $this->page_count++; $st_len = strlen(trim($print_string)); $head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); fputs($fh,$head_line."\r\n"); $this->page_count++; } } //End : Printing Grand Total fclose($fh); $header_value='Following Records are not inserted'; header("Content-type:application/txt"); header("Content-Disposition:attachment;filename=print_file.txt"); readfile($print_file); } function createPdfReport() { $pdf_writer=$this->aobj_context->main_src."/tarka_pdf/fpdf.php"; require_once($pdf_writer); $root_rpt_file_download="c:\\Temp\print_pdf.pdf"; $root_rpt_file_dname="print_pdf.pdf"; //unlink($root_rpt_file_download); $PageSetup = ''; if($this->report_setup['page_orientation'] == 'landscape') $PageSetup_orient = 'L'; else $PageSetup = 'P'; if(!empty($this->report_setup['pdfPaperSize'])) $PageSetup_size = $this->report_setup['pdfPaperSize']; //echo $PageSetup; die(); $pdf= new myFPDF($PageSetup_orient, 'mm', $PageSetup_size); //$pdf= new myFPDF($PageSetup); $pdf->lgin_name = $this->report_setup['footerLoginName']; $pdf->logo_path_tool = $this->aobj_context->main_src."/img/bioplus logo.jpg"; $get_company_header = $this->getCompanyDetails(); $company_name_name = $get_company_header[company_name]; $company_city = $get_company_header[city]; $this->getQueries(); $get_col_width = "select rsd.col,max(rsd.width) as wdt from report_setup_details rsd inner join report_setup_header rsh on rsh.internal_code = rsd.ref_report_setup_header_code where rsh.report_id = '{$this->report_id}' and rsh.report_name = '{$this->setup_name}' group by col "; $lobj_get_col_width = $this->aobj_context->mobj_db->GetAll($get_col_width); $max_row = $this->lobj_get_max_row[nextrow]; //$max_col = $this->lobj_get_max_col[maxcol]; for($ent = 1 ; $ent <= $max_row ; $ent++) { for($dt = 0 ; $dt < count($lobj_get_col_width) ; $dt++) { $blank_print_data[$ent][$lobj_get_col_width[$dt]['col']]['data'] = str_pad(" ",$lobj_get_col_width[$dt]['wdt']); $blank_print_data[$ent][$lobj_get_col_width[$dt]['col']]['algn'] = ''; $blank_print_data[$ent][$lobj_get_col_width[$dt]['col']]['width'] = ''; } } $pdf->company_name = $company_name_name; $pdf->company_city = $company_city; $pdf->hd_title = $this->titles; $pdf->hd_maxrow = $max_row; $pdf->hd_pdf_size = $this->pdf_page_size; $pdf->hd_blank_data = $blank_print_data; $pdf->lobj_get_report_setup_details = $this->lobj_get_report_setup_details; $pdf->tarka_constant_pages = 0; $pdf->AliasNbPages(); $pdf->SetMargins(20,14); $max_st_ctr = $pdf->AddPage(); //$pdf->SetFont('Times','B',20); $pdf->SetFont('Times','B',10); //start : Printing First subtotal Title $first = 1; for($data = 0 ; $data < count($this->data_set); $data++) { if($first == 1) { $first = 0; $print = 0; $print_data = $blank_print_data; for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details); $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $col_title = $this->lobj_get_report_sub_hed_details[$hed]['title']; $col_width = $this->lobj_get_report_sub_hed_details[$hed]['width']; $sep_txt = $this->lobj_get_report_sub_hed_details[$hed]['sep_text']; $bold = $this->lobj_get_report_sub_hed_details[$hed]['bold']; $style = $this->lobj_get_report_sub_hed_details[$hed]['style']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_sub_hed_details[$hed]['col']; $row_num = $this->lobj_get_report_sub_hed_details[$hed]['row']; $alignment = $this->lobj_get_report_sub_hed_details[$hed]['alignment']; $pad_align = $this->getPdfDataPad($alignment); $alias_name = $this->lobj_get_report_sub_hed_details[$hed]['alias_name']; $nor_alias_name = strtolower($alias_name); $value = $this->data_set[$data][$column_name]; if($nor_alias_name == 'value') $tit_val = $value; else if($nor_alias_name == 'name') $tit_val = $column_name; else $tit_val = $alias_name; $title_hed = $column_name.': '.$tit_val; if($col_title == 1) { //$prt_val = substr(str_pad($title_hed,$col_width,' ',$pad_align),0,$col_width) ; // $print_data[$row_num][$col_num] = $prt_val; $print_data[$row_num][$col_num]['data'] = $title_hed; $print_data[$row_num][$col_num]['algn'] = $pad_align; $print_data[$row_num][$col_num]['width'] = $col_width; $print = 1; } } if($print == 1) { for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string = $print_data[$ent][$dt]['data']; $print_align = $print_data[$ent][$dt]['algn']; $print_width = $print_data[$ent][$dt]['width']; if(empty($print_width)) $print_width = strlen($print_string); if($ent == $max_row and $dt == count($print_data[$ent])) { $pdf->Cell($print_width*2,5,$print_string,'LR',0,$print_align); } else { if(!empty($print_align)) $pdf->Cell($print_width*2,5,$print_string,'LB',0,$print_align); else $pdf->Cell($print_width*2,5,$print_string,'L',0,$print_align); } } $pdf->Cell(1,5,'',"",1); //$st_len = strlen(trim($print_string)); //$head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); //$pdf->Cell($st_len,5,$head_line,"",1,"R"); } } } //End : Printing First subtotal Title $pdf->SetFont('Times','',10); //Strat : Printing Normal data $print_data = $blank_print_data; for($hed = 0 ; $hed < count($this->lobj_get_report_setup_details); $hed++) { $column_name = $this->lobj_get_report_setup_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_setup_details[$hed]['sub_total']; $total = $this->lobj_get_report_setup_details[$hed]['total']; if($total > 0) { $pdf_gran_tot = 1; } $data_col_title = $this->lobj_get_report_setup_details[$hed]['title']; $col_width = $this->lobj_get_report_setup_details[$hed]['width']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_setup_details[$hed]['col']; $row_num = $this->lobj_get_report_setup_details[$hed]['row']; $sep_txt = $this->lobj_get_report_setup_details[$hed]['sep_text']; $style = $this->lobj_get_report_setup_details[$hed]['style']; $alignment = $this->lobj_get_report_setup_details[$hed]['alignment']; $pad_align = $this->getPdfDataPad($alignment); $value = $this->data_set[$data][$column_name]; if($total == 1) { for($cnt = 0; $cnt <= $max_st_ctr ; $cnt++) { $totals[$cnt][$row_num][$col_num] += $value; } } if($sub_total > 0) { $totals[$sub_total]['val'] = $value; $totals[$sub_total]['check_val'] = $value; } if($data_col_title == 0) { // $prt_val = substr(str_pad($value,$col_width,' ',$pad_align),0,$col_width) ; //$print_data[$row_num][$col_num] = $prt_val; $print_data[$row_num][$col_num]['data'] = $value; $print_data[$row_num][$col_num]['algn'] = $pad_align; $print_data[$row_num][$col_num]['width'] = $col_width; } } for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string = $print_data[$ent][$dt]['data']; $print_align = $print_data[$ent][$dt]['algn']; $print_width = $print_data[$ent][$dt]['width']; if(empty($print_width)) $print_width = strlen($print_string); if($ent == $max_row and $dt == count($print_data[$ent])) { if($data == count($this->data_set)-1) { $pdf->Cell($print_width*2,5,$print_string,'LRB',0,$print_align); } else { $pdf->Cell($print_width*2,5,$print_string,'LR',0,$print_align); } } else { if($data == count($this->data_set)-1) { $pdf->Cell($print_width*2,5,$print_string,'LB',0,$print_align); } else { $pdf->Cell($print_width*2,5,$print_string,'L',0,$print_align); } } } $pdf->Cell(1,5,'',"",1); } //End : Printing Normal data $change = false; for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details) ; $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_sub_hed_details[$hed]['sub_total']; if($change) { $totals[$sub_total]['check_val'] = 'changed'; } else { $next_value = $this->data_set[$data+1][$column_name]; if($totals[$sub_total]['check_val'] != $next_value ) { $change = true; } } } //Start : Printing subtotal values $pdf->SetFont('Times','B',10); //$print_data = $blank_print_data; $print = 0; for($hed = 0 ; $hed < count($this->lobj_get_report_total_details) ; $hed++) { $column_name = $this->lobj_get_report_total_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_total_details[$hed]['sub_total']; $col_width = $this->lobj_get_report_total_details[$hed]['width']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_total_details[$hed]['col']; $row_num = $this->lobj_get_report_total_details[$hed]['row']; $sep_txt = $this->lobj_get_report_total_details[$hed]['sep_text']; $bold = $this->lobj_get_report_total_details[$hed]['bold']; $style = $this->lobj_get_report_total_details[$hed]['style']; $alignment = $this->lobj_get_report_total_details[$hed]['alignment']; $pad_align = $this->getPdfDataPad($alignment); $next_value = $this->data_set[$data+1][$column_name]; if($totals[$sub_total]['check_val'] != $next_value ) { //fputs($fh,$title_name."\r\n"); // $pdf->Cell(140,5,$title_name,"",1,"R"); $print_data = $blank_print_data; $sub_tot_name = 'Total for =>'.$totals[$sub_total]['val']; //$prt_val = substr(str_pad($sub_tot_name,$col_width,' ',$pad_align),0,$col_width) ; // $print_data[$row_num][$col_num] = $prt_val; $print_data[$row_num][$col_num]['data'] = $sub_tot_name; $print_data[$row_num][$col_num]['algn'] = $pad_align; $print_data[$row_num][$col_num]['width'] = $col_width; for($sub_hed = 0 ; $sub_hed < count($this->lobj_get_report_setup_details); $sub_hed++) { $sub_head_name = $this->lobj_get_report_setup_details[$sub_hed]['query_columns']; $col_width = $this->lobj_get_report_setup_details[$sub_hed]['width']; if(empty($col_width)) $col_width = 20; $sub_col_ind = $this->lobj_get_report_setup_details[$sub_hed]['col']; $sub_row_ind = $this->lobj_get_report_setup_details[$sub_hed]['row']; $sep_txt = $this->lobj_get_report_setup_details[$sub_hed]['sep_text']; $bold = $this->lobj_get_report_setup_details[$sub_hed]['bold']; $style = $this->lobj_get_report_setup_details[$sub_hed]['style']; $alignment = $this->lobj_get_report_setup_details[$sub_hed]['alignment']; $pad_align = $this->getPdfDataPad($alignment); $sub_tot_value = $totals[$sub_total][$sub_row_ind][$sub_col_ind]; if(!empty($sub_tot_value)) { //$prt_val = substr(str_pad($sub_tot_value,$col_width,' ',$pad_align),0,$col_width) ; //$print_data[$sub_row_ind][$sub_col_ind] = $prt_val; $print_data[$sub_row_ind][$sub_col_ind]['data'] = $sub_tot_value; $print_data[$sub_row_ind][$sub_col_ind]['algn'] = $pad_align; $print_data[$sub_row_ind][$sub_col_ind]['width'] = $col_width; $totals[$sub_total][$sub_row_ind][$sub_col_ind] = 0; $print = 1; } } if($print == 1) { for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; $fir = 0; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string = $print_data[$ent][$dt]['data']; $print_align = $print_data[$ent][$dt]['algn']; $print_width = $print_data[$ent][$dt]['width']; if(empty($print_width)) $print_width = strlen($print_string); if($fir == 0) { $grd_width = $print_width; $grd_algn = $print_align; $pdf->Cell($print_width*2,5,$print_string,'LTB',0,$print_align); } else if($dt == count($print_data[$ent])) { $pdf->Cell($print_width*2,5,$print_string,'RTB',0,$print_align); } else { $pdf->Cell($print_width*2,5,$print_string,'TB',0,$print_align); } $fir = 1 ; } //fwrite($fh,$print_string."\r\n"); $pdf->Cell(1,5,'',"",1); } } //fputs($fh,$title_name."\r\n"); //$pdf->Cell(140,5,$title_name,"",1,"R"); } } //End : Printing subtotal values //Start : Printing Titels $print_data = $blank_print_data; $print = 0; if($data < count($this->data_set)-1) { for($hed = 0 ; $hed < count($this->lobj_get_report_sub_hed_details) ; $hed++) { $column_name = $this->lobj_get_report_sub_hed_details[$hed]['query_columns']; $sub_total = $this->lobj_get_report_sub_hed_details[$hed]['sub_total']; $col_title = $this->lobj_get_report_sub_hed_details[$hed]['title']; $col_width = $this->lobj_get_report_sub_hed_details[$hed]['width']; if(empty($col_width)) $col_width = 20; $col_num = $this->lobj_get_report_sub_hed_details[$hed]['col']; $row_num = $this->lobj_get_report_sub_hed_details[$hed]['row']; $sep_txt = $this->lobj_get_report_sub_hed_details[$hed]['sep_text']; $bold = $this->lobj_get_report_sub_hed_details[$hed]['bold']; $style = $this->lobj_get_report_sub_hed_details[$hed]['style']; $alignment = $this->lobj_get_report_sub_hed_details[$hed]['alignment']; $pad_align = $this->getPdfDataPad($alignment); $alias_name = $this->lobj_get_report_sub_hed_details[$hed]['alias_name']; $nor_alias_name = strtolower($alias_name); $next_value = $this->data_set[$data+1][$column_name]; if($nor_alias_name == 'value') $tit_val = $next_value; else if($nor_alias_name == 'name') $tit_val = $column_name; else $tit_val = $alias_name; $title_hed = $column_name.': '.$tit_val; if($totals[$sub_total]['check_val'] != $next_value ) { if($col_title == 1) { // $prt_val = substr(str_pad($title_hed,$col_width,' ',$pad_align),0,$col_width) ; //$print_data[$row_num][$col_num] = $prt_val; $print_data[$row_num][$col_num]['data'] = $title_hed; $print_data[$row_num][$col_num]['algn'] = $pad_align; $print_data[$row_num][$col_num]['width'] = $col_width; $print = 1; } } } if($print == 1) { for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string = $print_data[$ent][$dt]['data']; $print_align = $print_data[$ent][$dt]['algn']; $print_width = $print_data[$ent][$dt]['width']; if(empty($print_width)) $print_width = strlen($print_string); if(!empty($print_align)) $pdf->Cell($print_width*2,5,$print_string,'LB',0,$print_align); else $pdf->Cell($print_width*2,5,$print_string,'L',0,$print_align); } // fwrite($fh,$print_string."\r\n"); $pdf->Cell(1,5,'',"",1); //$st_len = strlen(trim($print_string)); // $head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); // $pdf->Cell(100,5,$head_line,"",1,"R"); // fputs($fh,$head_line."\r\n"); } } } } //End : Printing Titels //Start : Printing Grand Total if($pdf_gran_tot > 0) { $sub_tot_name = 'Grand Total =>'; $print_data = $blank_print_data; $print_data[1][1]['data'] = $sub_tot_name; $print_data[1][1]['algn'] = $grd_algn; $print_data[1][1]['width'] = $grd_width; for($sub_hed = 0 ; $sub_hed < count($this->lobj_get_report_setup_details); $sub_hed++) { $sub_head_name = $this->lobj_get_report_setup_details[$sub_hed]['query_columns']; $col_width = $this->lobj_get_report_setup_details[$sub_hed]['width']; $col_num = $this->lobj_get_report_setup_details[$sub_hed]['col']; $row_num = $this->lobj_get_report_setup_details[$sub_hed]['row']; $sep_txt = $this->lobj_get_report_setup_details[$sub_hed]['sep_text']; $bold = $this->lobj_get_report_setup_details[$sub_hed]['bold']; $style = $this->lobj_get_report_setup_details[$sub_hed]['style']; $alignment = $this->lobj_get_report_setup_details[$sub_hed]['alignment']; $pad_align = $this->getPdfDataPad($alignment); $sub_tot_value = $totals[0][$row_num][$col_num]; if(!empty($sub_tot_value)) { //$prt_val = substr(str_pad($sub_tot_value,$col_width,' ',$pad_align),0,$col_width) ; // $print_data[$row_num][$col_num] = $prt_val; $print_data[$row_num][$col_num]['data'] = $sub_tot_value; $print_data[$row_num][$col_num]['algn'] = $pad_align; $print_data[$row_num][$col_num]['width'] = $col_width; $totals[0][$row_num][$col_num] = 0; } } for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; $fir = 0; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string = $print_data[$ent][$dt]['data']; $print_align = $print_data[$ent][$dt]['algn']; $print_width = $print_data[$ent][$dt]['width']; if(empty($print_width)) $print_width = strlen($print_string); if($fir == 0) { $pdf->Cell($print_width*2,5,$print_string,'LB',0,$print_align); } else if($dt == count($print_data[$ent])) { $pdf->Cell($print_width*2,5,$print_string,'RB',0,$print_align); } else { $pdf->Cell($print_width*2,5,$print_string,'B',0,$print_align); } $fir = 1; } // fwrite($fh,$print_string."\r\n"); // $pdf->Cell(100,5,$print_string,"",1,"R"); //$st_len = strlen(trim($print_string)); // $head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); // $pdf->Cell(100,5,$head_line,"",1,"R"); // fputs($fh,$head_line."\r\n"); } } //End : Printing Grand Total $pdf->output($root_rpt_file_download,'D'); } function getQueries() { $get_max_col = "select max(col) as maxcol , min(col) mincol from report_setup_details rsd inner join report_setup_header rsh on rsh.internal_code = rsd.ref_report_setup_header_code where rsh.report_id = '{$this->report_id}' and ifnull(rsh.report_name,'') = '{$this->setup_name}' order by rsd.internal_code"; $this->lobj_get_max_col = $this->aobj_context->mobj_db->GetRow($get_max_col); $get_report_setup_details = "select rsd.* from report_setup_details rsd inner join report_setup_header rsh on rsh.internal_code = rsd.ref_report_setup_header_code where rsh.report_id = '{$this->report_id}' and ifnull(rsh.report_name,'') = '{$this->setup_name}' order by rsd.row,rsd.col"; $this->lobj_get_report_setup_details = $this->aobj_context->mobj_db->GetAll($get_report_setup_details); $get_report_total_details = "select rsd.* from report_setup_details rsd inner join report_setup_header rsh on rsh.internal_code = rsd.ref_report_setup_header_code where rsh.report_id = '{$this->report_id}' and ifnull(rsh.report_name,'') = '{$this->setup_name}' and sub_total > 0 order by sub_total desc"; $this->lobj_get_report_total_details = $this->aobj_context->mobj_db->GetAll($get_report_total_details); $get_report_sub_hed_details = "select rsd.* from report_setup_details rsd inner join report_setup_header rsh on rsh.internal_code = rsd.ref_report_setup_header_code where rsh.report_id = '{$this->report_id}' and ifnull(rsh.report_name,'') = '{$this->setup_name}' and sub_total > 0 order by sub_total"; $this->lobj_get_report_sub_hed_details = $this->aobj_context->mobj_db->GetAll($get_report_sub_hed_details); $get_max_row = "select max(row) as nextrow from report_setup_details rsd inner join report_setup_header rsh on rsh.internal_code = rsd.ref_report_setup_header_code where rsh.report_id = '{$this->report_id}' and ifnull(rsh.report_name,'') = '{$this->setup_name}' order by rsd.internal_code"; $this->lobj_get_max_row = $this->aobj_context->mobj_db->GetRow($get_max_row); } function getDataPad($alignment) { if($alignment == 'Left') $pad_align = STR_PAD_LEFT; else if($alignment == 'Center') $pad_align = STR_PAD_BOTH; else $pad_align = STR_PAD_RIGHT; return $pad_align; } function getPdfDataPad($alignment) { if($alignment == 'Left') $pad_align = "L"; else if($alignment == 'Center') $pad_align = "C"; else $pad_align = "R"; return $pad_align; } function getStyle($style) { $comppress_on = chr(15); $comppress_off = chr(18); $medium_on = ''; $medium_off = ''; $wide_on = chr(27).'W1'; $wide_off = chr(27).'W0'; if($style == 'Compress') { $get_style['on'] = $comppress_on; $get_style['off'] = $comppress_off; } else if($style == 'Medium') { $get_style['on'] = $medium_on; $get_style['off'] = $medium_off; } else if($style == 'Wide') { $get_style['on'] = $wide_on; $get_style['off'] = $wide_off; } else { $get_style['on'] = ''; $get_style['off'] = ''; } return $get_style; } function getBold($bold) { $bold_on = chr(27).'E1'; $bold_off = chr(27).'E0'; if($bold == 1) { $bold_data['on'] = $bold_on; $bold_data['off'] = $bold_off; } else { $bold_data['on'] = ''; $bold_data['off'] = ''; } } function header($blank_print_data,$max_row,$fh) { $this->page_count = 0; $print_data = $blank_print_data; //Getting Printing data and Length also. for($hed = 0 ; $hed < count($this->lobj_get_report_setup_details); $hed++) { $column_name = $this->lobj_get_report_setup_details[$hed]['query_columns']; $header_row = $this->lobj_get_report_setup_details[$hed]['row']; $header_col = $this->lobj_get_report_setup_details[$hed]['col']; $col_width = $this->lobj_get_report_setup_details[$hed]['width']; $sep_txt = $this->lobj_get_report_setup_details[$hed]['sep_text']; $bold = $this->lobj_get_report_setup_details[$hed]['bold']; $get_bold = $this->getBold($bold); $bold_on = $get_bold['on']; $bold_off = $get_bold['off']; $style = $this->lobj_get_report_setup_details[$hed]['style']; $add_style = $this->getStyle($style); $style_on = $add_style['on']; $style_off = $add_style['off']; $alignment = $this->lobj_get_report_setup_details[$hed]['alignment']; $pad_align = $this->getDataPad($alignment); if(empty($col_width)) $col_width = 20; $sub_tot_col = $this->lobj_get_report_setup_details[$hed]['sub_total']; $col_title = $this->lobj_get_report_setup_details[$hed]['title']; if($sub_tot_col > $max_st_ctr) { $max_st_ctr = $sub_tot_col; } if($col_title == 1) continue; $prt_val = substr(str_pad($column_name,$col_width,' ', $pad_align),0,$col_width); $print_data[$header_row][$header_col] = $bold_on.$style_on.$prt_val.$style_off.$bold_off; } // Start: Getting Global Line Length $head_line = ''; for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt].$sep_txt; } $st_len = strlen(trim($print_string)); $gb_str_len += $st_len; $this->title_name .= str_pad('-',$st_len,"-", STR_PAD_BOTH); } fputs($fh,$this->title_name."\r\n"); $this->page_count++; // End Getting Global Line Length //Start : Displaying Header $company_name_name = str_pad($this->company_name_name,$gb_str_len," ", STR_PAD_BOTH); fputs($fh,$company_name_name."\r\n"); $this->page_count++; $company_city = str_pad($this->company_city,$gb_str_len," ", STR_PAD_BOTH); fputs($fh,$company_city."\r\n"); $this->page_count++; for($tit = 0 ; $tit < count($this->titles) ; $tit++) { $title_name = $this->titles[$tit]['title']; $title_name = str_pad($title_name,$gb_str_len," ", STR_PAD_BOTH); fputs($fh, $title_name."\r\n"); $this->page_count++; } fputs($fh,$this->title_name."\r\n"); $this->page_count++; // displaying Menue Header for($ent = 1 ; $ent <= $max_row ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string .= $print_data[$ent][$dt].$sep_txt; } fwrite($fh,$print_string."\r\n"); $this->page_count++; $st_len = strlen(trim($print_string)); $head_line = str_pad('-',$st_len,"-", STR_PAD_BOTH); fputs($fh,$head_line."\r\n"); $this->page_count++; } //End : Displaying Header return $max_st_ctr; } function pageBreak($fh,$blank_print_data,$title_name,$max_row) { if ($this->page_count+$max_row >= 65) { $pgbr = chr(12); fputs($fh,$title_name."\r\n".$pgbr); $this->header($blank_print_data,$max_row,$fh); } } } //End : Class file //Start : getModuleNames() /* This function is for to get market module names*/ function getModuleNames($aobj_context) { try { $class_obj=new marketreport($aobj_context); $class_obj->report_id = $aobj_context->mobj_data["report_id"]; $market_modules = $class_obj->getMarketModulesNames(); echo $aobj_context->mobj_output->ToJSONEnvelope($market_modules,0,"Success"); } catch (Exception $aobj_exp) { echo 'Caught exception: ', $aobj_exp->getMessage(), "\n"; } } //End: getModuleNames() //print_r($my_aobj_context); $main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7); $pdf_writer_class =$main_src."/tarka_pdf/fpdf.php"; include_once($pdf_writer_class); class myFPDF extends FPDF { function Header() { $this->SetFont('Times','B',12); $this->Image($this->logo_path_tool, 12, 7, 22, 22, JPG); $company_name = str_pad($this->company_name, 125, " ", STR_PAD_BOTH); $this->Cell(0,5,$company_name,"C",1,0); $company_city = str_pad($this->company_city, 130, " ", STR_PAD_BOTH); $this->Cell(0,4,$company_city,"C",1,0); for($tit = 0 ; $tit < count($this->hd_title) ; $tit++) { $title_name = $this->hd_title[$tit]['title']; $title_name = str_pad($title_name, $this->hd_pdf_size, " ", STR_PAD_BOTH); $this->Cell(0,5,$title_name,"C",1,0); } //$title_name = str_pad('-',$this->hd_pdf_size,"-", STR_PAD_BOTH); $this->Cell(0,5,'',"",1,""); $this->SetFont('Times','B',10); $print_data = $this->hd_blank_data; for($hed = 0 ; $hed < count($this->lobj_get_report_setup_details); $hed++) { $column_name = $this->lobj_get_report_setup_details[$hed]['query_columns']; $header_row = $this->lobj_get_report_setup_details[$hed]['row']; $header_col = $this->lobj_get_report_setup_details[$hed]['col']; $col_width = $this->lobj_get_report_setup_details[$hed]['width']; $sep_txt = $this->lobj_get_report_setup_details[$hed]['sep_text']; $bold = $this->lobj_get_report_setup_details[$hed]['bold']; $style = $this->lobj_get_report_setup_details[$hed]['style']; $alignment = $this->lobj_get_report_setup_details[$hed]['alignment']; if($alignment == 'Left') $pad_align = "L"; else if($alignment == 'Center') $pad_align = "C"; else $pad_align = "R"; if(empty($col_width)) $col_width = 20; $sub_tot_col = $this->lobj_get_report_setup_details[$hed]['sub_total']; $col_title = $this->lobj_get_report_setup_details[$hed]['title']; if($sub_tot_col > $max_st_ctr) { $max_st_ctr = $sub_tot_col; } if($col_title == 1) continue; //$prt_val = substr(str_pad($column_name,$col_width,' ', $pad_align),0,$col_width); $print_data[$header_row][$header_col]['data'] = $column_name; $print_data[$header_row][$header_col]['algn'] = $pad_align; $print_data[$header_row][$header_col]['width'] = $col_width; } for($ent = 1 ; $ent <= $this->hd_maxrow ; $ent++) { $print_string = ''; for($dt = 1 ; $dt <= count($print_data[$ent]) ; $dt++) { $print_string = $print_data[$ent][$dt]['data']; $print_align = $print_data[$ent][$dt]['algn']; $print_width = $print_data[$ent][$dt]['width']; $this->Cell($print_width*2,5,$print_string,1,0,$print_align); } } $this->Cell(1,5,'',"",1); //FPDF::Header(); return $max_st_ctr; } function Footer() { //Go to 1.5 cm from bottom $this->SetY(-12); //Select Arial italic 8 $this->SetFont('Arial','I',8); //Print centered page number $this->Cell(10,10,$this->lgin_name.' '.date("m.d.Y"),0,0,'L'); $this->Cell(0,10,'Page: '.$this->PageNo().'/{nb}',0,0,'R'); } } ?>
Close