forked from gongwalker/ApiManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·54 lines (54 loc) · 1.69 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
<?php
include './MinPHP/run/init.php';
$act = $_GET['act'];
$act = empty($act) ? 'index' : $_GET['act'];
$menu = '';
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;
default :
$menu = ' - 欢迎';
$file = './MinPHP/run/hello.php';
break;
}
include './MinPHP/run/main.php';