Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

Commit

Permalink
加入后台引导页
Browse files Browse the repository at this point in the history
已经登录则进入管理后台,没有登录或权限不足进去登录页面。
  • Loading branch information
kagurazakayashi committed Sep 5, 2015
1 parent 12d5f89 commit a879870
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
22 changes: 22 additions & 0 deletions admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>云颜文字·源商店:管理控制台</title></head><body>
<center>云颜文字·源商店<h1>管理控制台</h1></center>
<hr>
<?php
session_start();
$url = "";
if (isset($_SESSION['username'])) {
if ($_SESSION['userflag'] == 1) {
$url = "emostore_admin_alldata.php";
}
if ($_SESSION['userflag'] == 0) {
$url = "emostore_admin_login_ui.php?backurl=emostore_admin_alldata.php";
}
}else{
$url = "emostore_admin_login_ui.php?backurl=emostore_admin_alldata.php";
}
echo "<meta http-equiv=\"Refresh\" content=\"1;URL=".$url."\">";
echo "<center><i><a href='".$url."'>正在加载</a></i></center>";
include 'emostore_admin_sqlsetting.php';
echo $footer;
?></body></html>
7 changes: 5 additions & 2 deletions emostore_admin_alldata.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<center>当前登录的用户:
<?php

$pagenumber = 10;//一页内有多少条数据
$pagenumber = 5;//一页内有多少条数据
session_start();
include 'emostore_admin_sqlsetting.php';
if (isset($_SESSION['username'])) {
Expand Down Expand Up @@ -133,5 +133,8 @@
<b>应用源列表到API接口:</b>
<form name="addnew" method="get" action="emostore_admin_cache.php">
<input type="submit" name="Submit" value="刷新缓存" />
</form>
</form>查看当前缓存:
<a href="emostore.xml" target="_blank"> XML</a>
<a href="emostore.json" target="_blank"> JSON</a>
<a href="emostore.ylt" target="_blank"> YLT</a>
</center><?php echo $footer; ?></body></html>

0 comments on commit a879870

Please sign in to comment.