-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
66 lines (64 loc) · 1.91 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
include './MinPHP/run/init.php';
$act = $_GET['act'];
$act = empty($act) ? 'index' : $_GET['act'];
$api_url=$_SERVER['PATH_INFO'];
$menu = '';
if(strlen($api_url)>1){
include('./MinPHP/run/other.php');
//die('接口测试模式');
}
switch($act){
//接口分类
case 'cate':
$menu = ' - 分类管理';
$file = './MinPHP/run/cate.php';
break;
//登录退出
case 'login':
$menu = ' - 登录';
$file = './MinPHP/run/login.php';
break;
//首页
case 'index':
$menu = ' - 欢迎';
$file ='./MinPHP/run/hello.php';
break;
//接口详细页
case 'api':
$sql = "select cname from cate where aid='{$_GET['tag']}' and isdel=0";
$menu = find($sql);
$menu = ' - ' . $menu['cname'];
$file ='./MinPHP/run/info.php';
break;
//接口排序页
case 'sort':
$sql = "select cname from cate where aid='{$_GET['tag']}' and isdel=0";
$menu = find($sql);
$menu = ' - ' . "<a href='".U(array('act'=>'api','tag'=>$_GET['tag']))."'>{$menu['cname']}</a>";
$file ='./MinPHP/run/sort.php';
break;
//导出静态文件
case 'export':
die(include('./MinPHP/run/export.php'));
break;
//ajax请求
case 'ajax':
die(include('./MinPHP/run/ajax.php'));
break;
//修改密码
case 'modpwd':
$menu = ' - 修改密码';
$file = './MinPHP/run/modpwd.php';
break;
case 'generate_file':
include('./MinPHP/run/generate_file.php');
die;
break;
default :
//$menu = ' - 欢迎';
$file = './MinPHP/run/other.php';
break;
die;
}
include './MinPHP/run/main.php';