| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/seaside.pacim.de/web/crons/ |
Upload File : |
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once("../includes/config.inc.php");
global $oData;
// Sicherheitscheck
if(!isset($_GET['token']) && $_GET['token'] != "eFD6dx2G4RFBkrYS7Z87") die();
// Cronjob in Datenbank eintragen
$createNewCronjob = $oData->insert('pacim_cronjob', array(
'cronjob_title' => 'Monatsabrechnung ' . $_POST['month_number'] . ' ' . $_POST['year'],
'cronjob_url' => '[PACIM_SYSTEM_URL]/crons/accounting/createInvoices.php?data[year]=' . $_POST['year'] . '&data[month]=' . $_POST['month_number'],
'cronjob_email' => $_POST['email'],
'cronjob_status' => 0
));
// Statusmeldung
echo json_encode ( array('status' => ( $createNewCronjob ? "ok" : "error" ) ) );
//echo "<pre>";
//print_r($_GET);
//echo "</pre>";
die();
$firstInit = json_decode( json_encode( $oData->message( $_POST['mail_id'] ) ), TRUE );
sleep(0.5);
$mailData = json_decode( json_encode( $oData->message( $_POST['mail_id'] ) ), TRUE );
//print_r($mailData);
//die();
if(isset($_SESSION['user']) && $_SESSION['user'] == DEBUG_USER) {
$mailData['debug'] = true;
} else {
$mailData['debug'] = false;
}
// Anhänge in String convertieren
if( isset( $mailData['files'] ) ) {
foreach($mailData['files'] as $name => $file) {
$mailData[ 'file_' . $name ] = new CURLFile( $file, 'application/pdf', $name );
}
unset($mailData['files']);
}
//open connection
$ch = curl_init( MAIL_SCRIPT );
curl_setopt( $ch, CURLOPT_POST, count( $mailData ) );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $mailData );
//execute post
$result = curl_exec( $ch );
//close connection
curl_close($ch);