diff --git a/.gitignore b/.gitignore
index 5a2ce6e7..164d3732 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,4 +19,7 @@ system/plugin/ui/*
!system/plugin/ui/index.html
ui/ui_custom/**
!ui/ui_custom/index.html
-!ui/ui_custom/README.md
\ No newline at end of file
+!ui/ui_custom/README.md
+system/uploads/admin.png
+system/uploads/logo.png
+system/uploads/user.jpg
\ No newline at end of file
diff --git a/system/controllers/export.php b/system/controllers/export.php
index 0cd60ac7..0d2ba727 100644
--- a/system/controllers/export.php
+++ b/system/controllers/export.php
@@ -61,6 +61,12 @@ switch ($action) {
$title = ' Reports [' . $mdate . ']';
$title = str_replace('-', ' ', $title);
+ if(file_exists('system/uploads/logo.png')){
+ $logo = 'system/uploads/logo.png';
+ }else{
+ $logo = 'system/uploads/logo.default.png';
+ }
+
if ($x) {
$html = '
@@ -69,7 +75,7 @@ switch ($action) {
' . $config['address'] . '
' . $_L['Phone_Number'] . ': ' . $config['phone'] . '
- 
+ 
@@ -178,7 +184,6 @@ EOF;
if ($stype != '') {
$d->where('type', $stype);
}
-
$d->where_gte('recharged_on', $fdate);
$d->where_lte('recharged_on', $tdate);
$d->order_by_desc('id');
@@ -207,7 +212,6 @@ EOF;
$fdate = _post('fdate');
$tdate = _post('tdate');
$stype = _post('stype');
-
$d = ORM::for_table('tbl_transactions');
if ($stype != '') {
$d->where('type', $stype);
@@ -229,6 +233,11 @@ EOF;
$title = ' Reports [' . $mdate . ']';
$title = str_replace('-', ' ', $title);
+ if(file_exists('system/uploads/logo.png')){
+ $logo = 'system/uploads/logo.png';
+ }else{
+ $logo = 'system/uploads/logo.default.png';
+ }
if ($x) {
$html = '
@@ -238,7 +247,7 @@ EOF;
' . $config['address'] . '
' . $_L['Phone_Number'] . ': ' . $config['phone'] . '
- 
+ 
@@ -281,11 +290,7 @@ EOF;
' . $config['currency_code'] . ' ' . number_format($xy, 2, $config['dec_point'], $config['thousands_sep']) . '
';
run_hook('pdf_by_period'); #HOOK
- define('_MPDF_PATH', 'system/vendors/mpdf/');
-
- require('system/vendors/mpdf/mpdf.php');
-
- $mpdf = new mPDF('c', 'A4', '', '', 20, 15, 25, 25, 10, 10);
+ $mpdf = new \Mpdf\Mpdf();
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle($config['CompanyName'] . ' Reports');
$mpdf->SetAuthor($config['CompanyName']);
diff --git a/system/uploads/admin.png b/system/uploads/admin.default.png
similarity index 100%
rename from system/uploads/admin.png
rename to system/uploads/admin.default.png
diff --git a/system/uploads/logo.png b/system/uploads/logo.default.png
similarity index 100%
rename from system/uploads/logo.png
rename to system/uploads/logo.default.png
diff --git a/system/uploads/user.jpg b/system/uploads/user.default.jpg
similarity index 100%
rename from system/uploads/user.jpg
rename to system/uploads/user.default.jpg