| Server IP : 172.67.201.108 / Your IP : 216.73.216.37 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/connections/mod/ |
Upload File : |
<?php include('_mod_security.php'); ?>
<?php
session_start();
switch ($_REQUEST['type']) :
case 'batch_email_ical' :
$sql = "SELECT * FROM events WHERE event_id = ".nz($_GET['event_id'], '0');
$result = $db->query($sql) or die(json_encode(['result' => 'Database Error!']));
if ($result->rowCount() > 0) :
$row = $result->fetch(PDO::FETCH_OBJ);
$downloadfile = APP_UPLOAD_DIR.'/eventdocs/batch_email_ical/'.str_pad($row->event_id, 10, '0', STR_PAD_LEFT).'/event.ics';
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header('Content-type: application/force-download');
header('Content-Disposition: attachment; filename="event_'.$row->event_id.'.ics"');
readfile($downloadfile);
endif;
break;
case 'batch_email_attachment' :
$sql = "SELECT * FROM email_templates WHERE id = ".nz($_GET['id'], '0');
$result = $db->query($sql) or die(json_encode(['result' => 'Database Error!']));
if ($result->rowCount() > 0) :
$ordinal = '';
$allowed_ordinals = ['1', '2'];
if (in_array($_GET['ordinal'], $allowed_ordinals)) :
$ordinal = $_GET['ordinal'];
endif;
$row = $result->fetch(PDO::FETCH_OBJ);
$downloadfile = APP_UPLOAD_DIR.'/batch_email_attachments/'.str_pad($row->id, 10, '0', STR_PAD_LEFT).'/'.$row->{'attachment_'.$ordinal};
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header('Content-type: application/force-download');
header('Content-Disposition: attachment; filename="'.$row->{'attachment_'.$ordinal}.'"');
readfile($downloadfile);
endif;
break;
endswitch;
?>