예제 #1
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('option', 'option_library');
set_page_power(array(1));
set_title("网站设置");
library_option();
//加载图书管理设置
get_admin_header();
?>
<div id="option-setting">

<h2 class="left">图书管理设置</h2>
<?php 
if (isset($_GET['status'])) {
    if ($_GET['status'] == 'OK') {
        echo '<p class="status blue center">成功更新设置信息</p>';
    } else {
        echo '<p class="status red center">', $_GET['status'], '</p>';
    }
}
?>
<form method="post" action="option-action.php">
<table align="center" cellspacing="1" class="list">
<tr>
<th>图书每页显示数目</th>
<td><input name="library-one-page" value="<?php 
예제 #2
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library', 'library_return');
set_page_power(array(1));
set_title("图书归还");
$all_user = new user_info();
$all_user->get_id_list();
get_admin_header();
?>
<div id="library-lent">
<h2 class="center">图书归还</h2>
<?php 
if (isset($_GET['status'])) {
    if ($_GET['status'] == 'OK') {
        echo '<p class="status blue center">成功归还图书</p>';
    } else {
        echo '<p class="status red center">', $_GET['status'], '</p>';
    }
}
?>
<form action="library-action.php" method="get">
图书ID:<input name="id" value="<?php 
if (isset($_GET['id'])) {
    echo $_GET['id'];
}
?>
예제 #3
0
파일: user.php 프로젝트: dalinhuang/zxtd
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('user');
set_page_power(array(1, 0));
get_admin_header();
?>

<p>用户</p>

<?php 
get_admin_footer();
예제 #4
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library', 'library_history');
set_page_power(array(0, 1));
set_title("个人借书历史");
$all_user = new user_info();
$all_user->get_id_list();
get_admin_header();
?>
<div id="library-lent">
<h2 class="center">个人借书历史</h2>
<form method="get">
<?php 
if (get_power() == 1) {
    echo '用户:<select name="id">', "\n";
    foreach ($all_user->id_list as $n => $v) {
        if (isset($_GET['id']) && $_GET['id'] == $n) {
            $c = ' selected';
        } else {
            $c = NULL;
        }
        echo "<option value=\"{$n}\"{$c}>{$v} ({$n})</option>\n";
    }
    echo '</select>', "\n";
}
?>
예제 #5
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library');
set_page_power(array(1));
set_title("图书操作");
$all_user = new user_info();
$all_user->get_id_list();
$category = new library_category();
$category->get_id_list();
get_admin_header();
$status = NULL;
if (!isset($_POST['action'])) {
    if (isset($_GET['act'])) {
        switch ($_GET['act']) {
            case 'del':
                $book_del = new library_book_del();
                if (isset($_GET['id'])) {
                    $book_del->add($_GET['id']);
                    $status = $book_del->del();
                    if ($status == 'OK') {
                        print_successful_notice("图书删除成功");
                    } else {
                        print_err_notice($status);
                    }
                }
                library_category_up_all();
예제 #6
0
파일: option.php 프로젝트: dalinhuang/zxtd
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('option');
set_page_power(array(1));
set_title("网站设置");
get_admin_header();
?>
<div id="option-setting">
<h2 class="left">站点设置</h2>
<?php 
if (isset($_GET['status'])) {
    if ($_GET['status'] == 'OK') {
        echo '<p class="status blue center">成功更新设置信息</p>';
    } else {
        echo '<p class="status red center">', $_GET['status'], '</p>';
    }
}
?>
<form method="post" action="option-action.php">
<table align="center" cellspacing="1" class="list">
<tr>
<th>网站标题</th><td><input name="site-title" value="<?php 
echo $option->arr['sitename'];
?>
" type="text">
<span>设置网站标题</span></td>
예제 #7
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('user', 'user_manage');
set_page_power(array(1));
set_title("用户管理");
$all_user = new user_info();
$all_user->get_all_user();
$all_group = new group();
$all_group->get_id_list();
if (isset($_GET['status']) && $_GET['status'] != 'OK') {
    add_footer_str('<script language="javascript">error_notic("' . $_GET['status'] . '","");</script>');
}
get_admin_header();
?>
<div id="user-manage">
<h2 class="center">用户管理中心</h2>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="title"><th>ID</th><th>用户名</th><th>姓名</th><th>专业</th><th>班级</th><th>年级</th><th>分组</th><th>电话</th><th>QQ</th><th>邮箱</th><th>权限</th><th>状态</th><th>操作</th></tr>
<?php 
$i = 0;
foreach ($all_user->all as $id => $v) {
    echo "<tr class=\"list-", $i++ % 2, "\">", "<td>", $v['id'], "</td>", "<td>", $v['user'], "</td>", "<td>", $v['name'], "</td>", "<td>", $v['major'], "</td>", "<td>", $v['class'], "</td>", "<td>", $v['grade'], "</td>", "<td>", $all_group->id_list[$v['group']], '-', $v['group'], "</td>", "<td>", $v['tel'], "</td>", "<td>", $v['qq'], "</td>", "<td>", $v['email'], "</td>", '<td><a href="user-manage.php?act=chang-power&id=', $v['id'], '" title="修改权限">', get_power_name($v['power']), "</a></td>", "<td>", $v['active'] == 1 ? '<a href="user-action.php?act=unactive&id=' . $v['id'] . '" title="取消激活">激活</a>' : '<a href="user-action.php?act=active&id=' . $v['id'] . '" title="激活">未激活</a>', "</td>", '<td><a href="user-edit-info.php?id=', $v['id'], '">编辑</a>&nbsp;<a href="user-action.php?act=del&id=', $v['id'], '">删除</a></td>', "</tr>\n";
}
?>
</table>
</div>
예제 #8
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('user', 'change_pwd');
set_page_power(array(0, 1));
get_admin_header();
if (isset($_GET['status'])) {
    echo "<p>状态:" . $_GET['status'] . "</p>";
}
?>
<form action="user-action.php" method="post">
原密码:<input name="oldpwd" type="password"><br>
新密码:<input name="pwd" type="password"><br>
再次输入:<input name="pwd2" type="password"><br>
<script language="javascript">function RefreshCode(obj){
            obj.src = obj.src + "?code=" + Math.random();
}</script>
验证码:<input name="Checkcode" type="text"><img src="../include/ver-code.php" align="absmiddle" onclick="RefreshCode(this)"><br>
<input name="act" value="changePwd" type="hidden">
<button type="submit">提交</button>
</form>
<?php 
get_admin_footer();
예제 #9
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library', 'library_manage');
set_page_power(array(1));
set_title("图书管理");
$category = new library_category();
$category->get_id_list();
$all_user = new user_info();
$all_user->get_id_list();
library_option();
get_admin_header();
$library = new library();
$library->check_parameter();
$library->get_book();
?>
<div id="library">
<div class="manage">
<h2 align="center">图书管理</h2>
<form name="tableform" action="library-action.php" method="post">
<table border="0" align="center" cellspacing="0">
<?php 
if (empty($library->list)) {
    echo "<tr class=\"title\"><td>没有搜索到相关图书</td></tr>\n";
} else {
    echo "<tr class=\"title\"><th>ID</th><th>图书名</th><th>图书馆<br>编号</th><th>ISBN</th><th>分类</th><th>所有者</th><th>借来时间</th><th>借阅者</th><th>借出时间</th><th>距到期</th><th>电子书</th><th>操作</th><th><a href=\"javascript:selectAll('select');\" title=\"全选\\取消全选\">选择</a></th></tr>\n";
    $i = 0;
예제 #10
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('user', 'user_group');
set_page_power(array(1));
set_title("用户组管理");
$group = new group();
$user_info = new user_info();
$group->get_group();
$user_info->get_all_user();
$user_info->get_id_list();
$group->get_user_group();
if (isset($_GET['status']) && $_GET['status'] != 'OK') {
    add_footer_str('<script language="javascript">error_notic("' . $_GET['status'] . '","");</script>');
}
get_admin_header();
?>
<div id="user-group">
<h2 class="center">用户组管理</h2>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="title"><th>ID</th><th>分组名</th><th>组长</th><th>组员</th><th>操作</th></tr>
<?php 
$i = 0;
foreach ($group->group as $v) {
    echo '<tr class="list-', $i++ % 2, '"><td>', $v['id'], '</td>', '<td>', $v['name'], '</td>', '<td>';
    if (isset($user_info->id_list[$v['lader']])) {
        echo '<a href="user.php?id=', $v['lader'], '">', $group->lader_id[$v['lader']], '(', $v['lader'], ')</a>';
예제 #11
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('user', 'edit_info');
set_page_power(array(0, 1));
$all_group = new group();
$all_group->get_group();
if (isset($_GET['id']) && is_number($_GET['id']) && get_power() == 1) {
    $new_user = new user();
    $user_info = $new_user->get_user_info($_GET['id']);
    unset($new_user);
} else {
    $user_info = $GLOBALS['user'];
}
set_title("编辑用户信息");
get_admin_header();
if (isset($_GET['status'])) {
    echo "<p>状态:" . $_GET['status'] . "</p>";
}
if (count($user_info) == 0) {
    echo "<p>信息错误,请检查ID是否正确</p>";
} else {
    ?>

<form action="user-action.php" method="post">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
예제 #12
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library', 'library_category');
set_page_power(array(1));
set_title("分类管理操作");
$category = new admin_library_category();
$category->get_all_list();
$category->get_id_list();
get_admin_header();
?>
<div id="library-category">
<div class="manage">
<?php 
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case 'del':
            $arr = array();
            if (isset($_GET['id'])) {
                foreach ($category->list as $v) {
                    if ($v['id'] == $_GET['id']) {
                        $arr = $v;
                    }
                }
            }
            if (empty($arr)) {
                print_err_notice('分类ID未找到', 'library-category.php');
예제 #13
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library', 'library_publish');
set_page_power(array(1));
set_title("图书发布");
$category = new library_category();
$category->get_id_list();
$all_user = new user_info();
$all_user->get_id_list();
get_admin_header();
?>
<div id="library-publish">
<h2 align="center">图书发布</h2>
<?php 
if (isset($_GET['status'])) {
    if ($_GET['status'] == 'OK') {
        echo '<p class="status blue center">图书发布成功</p>';
    } else {
        echo '<p class="status red center">', $_GET['status'], '</p>';
    }
}
?>
<form action="library-action.php" method="post">
<table>
<tr><th></th><th></th><th width="100px"></th>
<tr><td>图书名:</td><td><input type="text" name="bkn"></td><td></td></tr>
예제 #14
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('library', 'library_lent');
set_page_power(array(1));
set_title("图书借出");
$all_user = new user_info();
$all_user->get_id_list();
get_admin_header();
?>
<div id="library-lent">
<h2 class="center">图书借出</h2>
<?php 
if (isset($_GET['status'])) {
    if ($_GET['status'] == 'OK') {
        echo '<p class="status blue center">成功借出图书</p>';
    } else {
        echo '<p class="status red center">', $_GET['status'], '</p>';
    }
}
?>
<form action="library-action.php" method="post">
图书ID:<input name="id" type="text" value="<?php 
if (isset($_GET['id'])) {
    echo $_GET['id'];
}
?>
예제 #15
0
<?php

define('ROOT', dirname($_SERVER['SCRIPT_FILENAME']));
require ROOT . "/include/admin-init.php";
if (!is_login()) {
    die(html_jump('login.php'));
}
set_page_type('user', 'new_user');
set_page_power(array(1));
get_admin_header();
if ($GLOBALS['user']['power'] != 1) {
    die("Forbidden");
    get_admin_footer();
}
if (isset($_GET['status'])) {
    echo "<p>状态:" . $_GET['status'] . "</p>";
}
?>
<form action="user-action.php" method="post">
用户名:<input name="user" type="text"><br>
密码:<input name="pwd" type="password"><br>
密码(再一次):<input name="pwd2" type="password"><br>
邮箱:<input name="email" type="text"><br>
电话:<input name="tel" type="text"><br>
<input type="hidden" name="act" value="new_user">
<button type="submit">提交</button><br>
</form>
<?php 
get_admin_footer();