diff options
author | chai <chaifix@163.com> | 2022-03-19 12:26:19 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-03-19 12:26:19 +0800 |
commit | 627b8e416d138112ad20b1299aca21dccebcd11c (patch) | |
tree | e522a5e7204e81649a36451e31c2c91b1a8342e3 /functions.php | |
parent | a90ed9f20c76fbb4b340e51e6ba05500540feba5 (diff) |
*admin music page
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/functions.php b/functions.php index 8a7824b..6d3d3cc 100644 --- a/functions.php +++ b/functions.php @@ -1,29 +1,14 @@ <?php - -function echoln($content){ - if($content === true){ - $content = "true"; - } - if($content === false){ - $content = "false"; +// 是否已经登录 +function isLogin() { + session_start(); + if (isset($_SESSION["admin"]) && $_SESSION["admin"] === true) { + return true; + } else { + return false; } - echo $content; - echo "<br/>"; -} -function println($content) -{ - print_r($content); - echo "<br/>"; } -// 替换为html转义字符,否则插入sql会有问题 -function html_escape_string($str) { - $str = str_replace("'", "'", $str); // ' - $str = str_replace('"', """, $str); // " - return $str; -} - -?> - +?>
\ No newline at end of file |