This commit is contained in:
doudoudzj 2019-06-26 01:33:12 +08:00
parent cd80052f47
commit 98e8745cdd
3 changed files with 16 additions and 23 deletions

View file

@ -5,7 +5,6 @@ session_start();
define("IN_SYS", true);
require_once("core.php");
include_once "{$ROOT}/library/common.php";
include_once "{$ROOT}/library/api.php";
include_once "{$ROOT}/admin/library.php";
// getVersion();

View file

@ -1,21 +0,0 @@
<?php
if (!defined('IN_SYS')) {
// exit('禁止访问');
header("Location: ../index.php");
exit;
}
/**
* Verify PHP version
*/
function getVersion()
{
if ((float)phpversion() < 5.5) {
exit('<center style="font-family:Verdana, Geneva, sans-serif;font-size:14px;margin:10% auto;"><p><b>Oops!</b> There was a problem. Apparently <br/>You are using the php <b>version ' . phpversion() . '</b> a lower version than the one indicated <br/></p><h2>Anake script requires the php version</h2><h1 style="font-size:4em;">5.5.+</h1></center>');
}
}
// Protect the entered data function
function setProtect($var)
{
return htmlentities(htmlspecialchars($var));
}

View file

@ -207,7 +207,7 @@ function setURL($module, $section = "")
}
/** Determine if a variable is an email address
*
*
* @param string $email
* @return bool
*/
@ -215,3 +215,18 @@ function is_email($email = "")
{
return preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/", $email);
}
/** check PHP version
* @return bool
*/
function getVersion()
{
if ((float) phpversion() < 5.5) {
exit('requires the php version 5.5.+');
}
}
function setProtect($x)
{
return htmlentities(htmlspecialchars($x));
}