cronjobs/shop_rueckmeldungen.php format

This commit is contained in:
OpenXE 2024-07-02 13:54:50 +02:00
parent 4ed783a7ca
commit ea515b0727

View File

@ -1,4 +1,5 @@
<?php <?php
error_reporting(E_ERROR | E_WARNING | E_PARSE); error_reporting(E_ERROR | E_WARNING | E_PARSE);
if (!class_exists('ApplicationCore') && is_file(dirname(__DIR__) . '/xentral_autoloader.php')) { if (!class_exists('ApplicationCore') && is_file(dirname(__DIR__) . '/xentral_autoloader.php')) {
include_once dirname(__DIR__) . '/xentral_autoloader.php'; include_once dirname(__DIR__) . '/xentral_autoloader.php';
@ -34,19 +35,15 @@ if($phpversion[0] == '7' && (int)$phpversion[2] > 0) {
} }
if ($aes == 2 && is_file(dirname(__DIR__) . '/www/lib/class.aes2.php')) { if ($aes == 2 && is_file(dirname(__DIR__) . '/www/lib/class.aes2.php')) {
include_once dirname(__DIR__) . '/www/lib/class.aes2.php'; include_once dirname(__DIR__) . '/www/lib/class.aes2.php';
} } else {
else{
include_once dirname(__DIR__) . '/www/lib/class.aes.php'; include_once dirname(__DIR__) . '/www/lib/class.aes.php';
} }
$classes = array('briefpapier', 'lieferschein', 'auftrag', 'anfrage', 'gutschrift', 'bestellung', 'rechnung', 'mahnwesen'); $classes = array('briefpapier', 'lieferschein', 'auftrag', 'anfrage', 'gutschrift', 'bestellung', 'rechnung', 'mahnwesen');
foreach($classes as $class) foreach ($classes as $class) {
{ if (file_exists(dirname(__DIR__) . '/www/lib/dokumente/class.' . $class . '_custom.php')) {
if(file_exists(dirname(__DIR__).'/www/lib/dokumente/class.'.$class.'_custom.php'))
{
include_once dirname(__DIR__) . '/www/lib/dokumente/class.' . $class . '_custom.php'; include_once dirname(__DIR__) . '/www/lib/dokumente/class.' . $class . '_custom.php';
} } elseif (file_exists(dirname(__DIR__) . '/www/lib/dokumente/class.' . $class . '.php')) {
elseif(file_exists(dirname(__DIR__).'/www/lib/dokumente/class.'.$class.'.php')) {
include_once dirname(__DIR__) . '/www/lib/dokumente/class.' . $class . '.php'; include_once dirname(__DIR__) . '/www/lib/dokumente/class.' . $class . '.php';
} }
} }
@ -62,17 +59,18 @@ include_once(dirname(__FILE__)."/../www/lib/dokumente/class.bestellung.php");
include_once(dirname(__FILE__)."/../www/lib/dokumente/class.rechnung.php"); include_once(dirname(__FILE__)."/../www/lib/dokumente/class.rechnung.php");
include_once(dirname(__FILE__)."/../www/lib/dokumente/class.mahnwesen.php"); */ include_once(dirname(__FILE__)."/../www/lib/dokumente/class.mahnwesen.php"); */
include_once dirname(__DIR__) . '/phpwf/plugins/class.string.php'; include_once dirname(__DIR__) . '/phpwf/plugins/class.string.php';
if(!class_exists('app_t2')) if (!class_exists('app_t2')) {
{
class app_t2 extends ApplicationCore { class app_t2 extends ApplicationCore {
var $DB; var $DB;
var $erp; var $erp;
var $User; var $User;
var $mail; var $mail;
var $remote; var $remote;
var $Secure; var $Secure;
function GetLandLang($isocode)
{ function GetLandLang($isocode) {
$flipped = array_flip($this->GetLaender()); $flipped = array_flip($this->GetLaender());
if (isset($flipped[$isocode])) if (isset($flipped[$isocode]))
$land = $flipped[$isocode]; $land = $flipped[$isocode];
@ -82,8 +80,7 @@ function GetLandLang($isocode)
return $land; return $land;
} }
function GetLaender() function GetLaender() {
{
$laender = array( $laender = array(
'Afghanistan' => 'AF', 'Afghanistan' => 'AF',
'&Auml;gypten' => 'EG', '&Auml;gypten' => 'EG',
@ -331,6 +328,7 @@ function GetLaender()
return $laender; return $laender;
} }
} }
} }
//ENDE //ENDE
@ -354,8 +352,7 @@ function GetLaender()
if (is_file(dirname(__DIR__) . '/www/lib/class.remote_custom.php')) { if (is_file(dirname(__DIR__) . '/www/lib/class.remote_custom.php')) {
require_once dirname(__DIR__) . '/www/lib/class.remote_custom.php'; require_once dirname(__DIR__) . '/www/lib/class.remote_custom.php';
$app->remote = new RemoteCustom($app); $app->remote = new RemoteCustom($app);
} } else {
else{
$app->remote = new Remote($app); $app->remote = new Remote($app);
} }
} }
@ -366,7 +363,6 @@ function GetLaender()
define('FPDF_FONTPATH', dirname(__DIR__) . '/www/lib/pdf/font/'); define('FPDF_FONTPATH', dirname(__DIR__) . '/www/lib/pdf/font/');
} }
//ENDE //ENDE
const MAXIMUM_NUMBER_OF_TRIES = 10; const MAXIMUM_NUMBER_OF_TRIES = 10;
@ -466,3 +462,4 @@ function GetLaender()
} }
$app->DB->Update("UPDATE prozessstarter SET mutex = 0, mutexcounter = 0, letzteausfuerhung = now() WHERE (parameter = 'shop_rueckmeldungen' ) AND aktiv = 1"); $app->DB->Update("UPDATE prozessstarter SET mutex = 0, mutexcounter = 0, letzteausfuerhung = now() WHERE (parameter = 'shop_rueckmeldungen' ) AND aktiv = 1");