Added CORS(Cross-Origin Resource Sharing) support for the VICIdial agent PHP scripts. see the CORS_SUPPORT.txt doc for more information.

git-svn-id: svn://192.168.202.10@3459 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-06-18 03:24:05 +00:00
parent 062d318dc0
commit e2e0505570
35 changed files with 491 additions and 72 deletions
+12 -3
View File
@@ -1,7 +1,7 @@
<?php
# timeclock.php - VICIDIAL system user timeclock
#
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# CHANGELOG
# 80523-0134 - First Build
@@ -24,10 +24,12 @@
# 161106-2112 - Added screen colors, fixed formatting
# 190111-0901 - Fix for PHP7
# 201117-2117 - Changes for better compatibility with non-latin data input
# 210616-2101 - Added optional CORS support, see options.php for details
#
$version = '2.12-19';
$build = '201117-2117';
$version = '2.14-20';
$build = '210616-2101';
$php_script = 'timeclock.php';
$StarTtimE = date("U");
$NOW_TIME = date("Y-m-d H:i:s");
@@ -94,6 +96,13 @@ $VD_pass=preg_replace("/\'|\"|\\\\|;| /","",$VD_pass);
require_once("dbconnect_mysqli.php");
require_once("functions.php");
# if options file exists, use the override values for the above variables
# see the options-example.php file for more information
if (file_exists('options.php'))
{
require_once('options.php');
}
#############################################
##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP #####
$VUselected_language = '';