-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
50 lines (34 loc) · 1001 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
//自动加载类
function __autoload($class_name){
require 'DB/'.$class_name.'.class.php';
}
/**
* 判断是否已被打开
*/
//从数据库读取开关状态
$verify=new verify_sql;
$value=$verify->verify_status();
//判断是否已经提交歌名或故事名
// $song = !empty($_POST['song'])? 'resource/song/'. $_POST['song'] . '.mp3' : 0;
// $story = !empty($_POST['story'])? 'resource/story/'. $_POST['story']. '.mp3' :0;
//如果状态打开则弹出选歌选故事表单
if ($value) {
$verify->kid_correct();
//未开启则显示系统已经关闭
/*
此处可写自动跳转到登陆页面
*/
} else $verify->kid_error();
// if ($value && $song) {
// header("Location: $song");
// }
// if ($value && $story) {
// header("Location: $story");
// }
// function play($addr){
// $player = '<audio src="' . $addr . '" preload="auto" />';
// echo '<center>' . $player . '</center>';
// echo '<br><br><br><br><br>';
// }
?>