Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

39
REST/index.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
// error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
chdir(dirname(__DIR__));
require_once('./REST/config.php');
$GLOBALS['mailLog'] = '';
if ($_GET['key'] != $restConfig['twinpolKey']) {
echo 'Unauthorized';
exit;
}
require_once('./REST/functions.php');
// Enable SugarCRM features
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('./include/entryPoint.php');
require_once ('data/SugarBean.php');
require_once ('include/utils.php');
// fix db, but why?
$GLOBALS['db']->query("USE preDb_0dcc87940d3655fa574b253df04ca1c3;");
switch ($_GET["action"]) {
case 'createPzFromInvoice':
createPzFromInvoice($_GET['record'], $_GET['stock_id']);
break;
case 'getSale':
sendSale($_GET['record']);
break;
case 'getStocks':
sendStocks();
break;
case 'updateSaleE5Number':
updateSaleE5Number($_GET['record'], $_GET['e5_record'], $_GET['e5_document_no']);
break;
}
?>