33 lines
615 B
PHP
33 lines
615 B
PHP
<?php
|
|
|
|
const _ONLINE = 1;
|
|
const _DEBUG = 2;
|
|
const _TEST = 3;
|
|
|
|
if (getenv('SERVER_ENV') == 'DEBUG') {
|
|
define('SERVER_ENV', _DEBUG);
|
|
} else if (getenv('SERVER_ENV') == 'TEST') {
|
|
define('SERVER_ENV', _TEST);
|
|
} else {
|
|
define('SERVER_ENV', _ONLINE);
|
|
}
|
|
|
|
include_once "channelid.php";
|
|
include_once "errno.php";
|
|
include_once "httpclient.php";
|
|
include_once "mysql.php";
|
|
include_once "redis.php";
|
|
include_once "functions.php";
|
|
|
|
function _isValidWord($word)
|
|
{
|
|
return !strstr($word, '(') &&
|
|
!strstr($word, ';');
|
|
}
|
|
|
|
if (!_isValidWord($_REQUEST['c']) ||
|
|
!_isValidWord($_REQUEST['a'])) {
|
|
die();
|
|
}
|
|
|