init
This commit is contained in:
29
REST/index.php
Normal file
29
REST/index.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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');
|
||||
require_once('./REST/functions.php');
|
||||
if ($_GET['key'] != $restConfig['e5Key']) {
|
||||
echo 'Unauthorized';
|
||||
exit;
|
||||
}
|
||||
// Enable SugarCRM features
|
||||
if(!defined('sugarEntry'))define('sugarEntry', true);
|
||||
require_once('./include/entryPoint.php');
|
||||
// Make action
|
||||
switch ($_GET["action"]) {
|
||||
case 'getInvoice':
|
||||
sendInvoice($_GET['record']);
|
||||
break;
|
||||
case 'getProduct':
|
||||
sendProduct($_GET['record']);
|
||||
break;
|
||||
case 'copySaleFromTwinpol':
|
||||
copySaleFromTwinpol($_GET['record']);
|
||||
break;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user