| Server IP : 104.21.21.239 / Your IP : 216.73.216.201 Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/hotel-prod/public_html/ |
Upload File : |
<?php
ini_set('display_errors',1);
if (php_sapi_name() != 'cli') :
die('Only allowed from command line!');
endif;
//return;
session_start();
foreach($argv as $i) :
list($k, $v) = explode('=', $i, 2);
$_GET[$k] = $v;
endforeach;
//print_r($_GET);
require_once('vendor_classes/PHPWord/Autoloader.php');
use PhpOffice\PhpWord\Autoloader;
use PhpOffice\PhpWord\Settings;
//require_once('mod/_sanitize.php');
include_once('config.php');
date_default_timezone_set(APP_TIMEZONE);
try {
$db = new PDO(DB_CONNECT_STRING, DB_USER, DB_PWD);
} catch (Exception $e) {
die('Could not connect: ' . 'Database Error!');
}
$sql_tz = "SET time_zone = '".APP_TIMEZONE."'";
$db->query($sql_tz);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
include_once('mod/_functions.php');
$rpt = trim($_GET['rpt']);
$type = trim($_GET['type']);
$fmt = trim($_GET['fmt']);
//echo '$type = '.$type.PHP_EOL;
$_SESSION['rand_key'] = generate_random_string(32);
$authorized_call = 1;
if ($type == 'report') :
if ($fmt == 'pdf') :
ini_set('display_errors', '0');
ini_set("pcre.backtrack_limit","10000000");
ini_set("memory_limit","2048M");
elseif ($fmt == 'excel') :
//require_once dirname(__FILE__) . '/vendor_classes/PHPExcel.php';
endif;
include_once('rpt/'.$rpt.'.php');
endif;
?>