php CheckAdmin类(方法)实例源码

下面列出了php CheckAdmin 类(方法)源码代码实例,从而了解它的用法。

作者:raeball    项目:PhpFoodban   
function admin_change($_P)
{
    $info = CheckAdmin($_SESSION['admin'], $_POST['passold']);
    if ($info != "") {
        $_SESSION['info'] = "Password is wrong,please input again";
        header("Location: admin.php");
    } elseif ($_POST['passnew'] != $_POST['passnew1']) {
        $_SESSION['info'] = "两次输入密码不一致,请重新输入";
        header("Location: admin.php");
    } else {
        if (UpdateAdmin($_SESSION['admin'], $_POST['passnew']) == "") {
            echo "<p align='center'>修改成功</p>";
            echo "<p align='center'><a href='index.php'>返回主页</a></p>";
        } else {
            $_SESSION['info'] = "数据库操作失败,请稍后再试";
            header("Location: admin.php");
        }
    }
}

作者:roboco    项目:maxsit   
<?php

CheckAdmin($_SESSION['admin_user'], $_SESSION['admin_pwd']);
?>
<TABLE cellSpacing=0 cellPadding=0 width=720 border=0>
	<TBODY>
		<TR>
			<TD width="10" vAlign=top><IMG src="images/fader.gif" border=0></TD>
				<TD width="710" vAlign=top><IMG src="images/topfader.gif" border=0><BR>
					<!-- News -->
					&nbsp;&nbsp;<IMG SRC="images/menu/textmenu_webboard.gif" BORDER="0"><BR><BR>
						<BR><BR>
							<?php 
$_GET['id'] = intval($_GET['id']);
$ProcessOutput = false;
if (CheckLevel($_SESSION['admin_user'], "webboard_del")) {
    $db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD);
    $BoardResult = $db->select_query("SELECT id,picture FROM " . TB_WEBBOARD . " WHERE id='" . $_GET['id'] . "' ");
    while ($WebBoard = $db->fetch($BoardResult)) {
        $CommentResult = $db->select_query("SELECT id,picture FROM " . TB_WEBBOARD_COMMENT . " WHERE topic_id='" . $WebBoard['id'] . "' ORDER BY id ");
        while ($Comment = $db->fetch($CommentResult)) {
            @unlink("webboard_upload/" . $Comment['picture'] . "");
        }
        @unlink("webboard_upload/" . $WebBoard['picture'] . "");
        $db->del(TB_WEBBOARD_COMMENT, " topic_id='" . $WebBoard['id'] . "' ");
    }
    $db->del(TB_WEBBOARD, " id='" . $_GET['id'] . "' ");
    $db->closedb();
    $ProcessOutput .= "<BR><BR>";
    $ProcessOutput .= "<CENTER><A HREF=\"?name=admin&file=main\"><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
    $ProcessOutput .= "<FONT COLOR=\"#336600\"><B>ได้ทำการลบกระทู้เรียบร้อยแล้ว</B></FONT><BR><BR>";

作者:roboco    项目:iop   
<?php

CheckAdmin($admin_user, $admin_pwd);
include "editor.php";
empty($_POST['ENABLE_COMMENT']) ? $ENABLE_COMMENT = "" : ($ENABLE_COMMENT = $_POST['ENABLE_COMMENT']);
?>

	<TABLE cellSpacing=0 cellPadding=0 width=820 border=0>
      <TBODY>
        <TR>
          <TD width="10" vAlign=top><IMG src="images/fader.gif" border=0></TD>
          <TD width="810" vAlign=top><IMG src="images/topfader.gif" border=0><BR>
		  <!-- Admin -->
		  &nbsp;&nbsp;<IMG SRC="images/menu/textmenu_admin.gif" BORDER="0"><BR>
				<TABLE width="800" align=center cellSpacing=0 cellPadding=5 border=0>
				<TR>
					<TD height="1" class="dotline"></TD>
				</TR>
				<TR>
					<TD>
					<BR><B><IMG SRC="images/icon/plus.gif" BORDER="0" ALIGN="absmiddle"> <A HREF="?name=admin&file=main"><?php 
echo _ADMIN_GOBACK;
?>
</A> &nbsp;&nbsp;<IMG SRC="images/icon/arrow_wap.gif" BORDER="0" ALIGN="absmiddle">&nbsp;&nbsp; <?php 
echo _ADMIN_KNOWLEDGE_MENU_INDEX;
?>
 </B>
					<BR><BR>
					<A HREF="?name=admin&file=knowledge"><IMG SRC="images/admin/open.gif"  BORDER="0" align="absmiddle"> <?php 
echo _ADMIN_KNOWLEDGE_MENU_LISTALL;
?>

作者:Bakyeng    项目:kyeng   
<?php

session_start();
require_once 'Connections/connect.php';
//require_once("pagecheck.php");
require_once 'functions.php';
unset($_SESSION['truck']);
echo $_session['accdnt'];
$ca = CheckAdmin();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" media="screen" href="css/acrav.css" />
<link rel="stylesheet" type="text/css" href="collapse/jquery.css">
<link rel="stylesheet" media="screen" href="css/grid.css" />
<!--<link rel="stylesheet" media="screen" href="css/style.css" />-->
<link rel="stylesheet" media="screen" href="css/messages.css" />
<link rel="stylesheet" media="screen" href="css/tables.css" />
<!--<link rel="shortcut icon" href="images/icon_512.png" type="image/x-icon">-->

<link rel="stylesheet" media="screen" href="css/facebox.css" />

<link rel="stylesheet" media="screen" href="css/demo_table.css" />
<link rel="stylesheet" media="screen" href="css/demo_table_jui.css" />
<!--[if lt IE 8]>
<link rel="stylesheet" media="screen" href="css/ie.css" />
<![endif]-->
<link rel="stylesheet" media="screen" href="simple-calendar/tcal.css" />

作者:VCHSRobot    项目:EpicScout   
<?php

// --------------------------------------------------------------------
// admin.php -- The main admin page.  Come here on "admin" in nav menu.
//
// Created: 12/29/14 DLB
// --------------------------------------------------------------------
require_once "../maindef.php";
$loc = rmabs(__FILE__);
session_start();
log_page();
CheckLogin();
CheckAdmin();
/*
$menubar = array( 
	array( "caption" => "List Users",    "href" => "admin_listusers.php"),
	array( "caption" => "Add User",      "href" => "admin_adduser.php"),
	array( "caption" => "Upload Users",  "href" => "admin_uploadusers.php"),
	array( "caption" => "Show Log",      "href" => "admin_showlog.php"),
	array( "caption" => "Masquerade",    "href" => "admin_masquerade.php"));
*/
include "forms/header.php";
include "forms/nav_form.php";
include "forms/admin_menubar.php";
echo '<div class="content_area">';
echo '<h2>Administration for This Website</h2>';
echo '<p>Use the links above for various admin tasks.</p>';
echo '</div>';
include "forms/footer.php";

作者:roboco    项目:iop   
<?php

CheckAdmin($admin_user, $_SESSION['admin_pwd']);
?>
	<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
      <TBODY>
        <TR>
          <TD width="10" vAlign=top></TD>
          <TD width="740" vAlign=top>
		  <!-- News -->
		  &nbsp;&nbsp;<IMG SRC="images/menu/textmenu_news.gif" BORDER="0"><BR><BR>
				<BR><BR>
<?php 
$_GET['id'] = intval($_GET['id']);
$_GET['comment'] = intval($_GET['comment']);
if (CheckLevel($admin_user, "news_del")) {
    $db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD);
    $db->del(TB_NEWS_COMMENT, " news_id='" . $_GET['id'] . "' AND id='" . $_GET['comment'] . "' ");
    $db->closedb();
    $ProcessOutput .= "<BR><BR>";
    $ProcessOutput .= "<CENTER><A HREF=\"?name=admin&file=main\"><IMG SRC=\"images/icon/login-welcome.gif\" BORDER=\"0\"></A><BR><BR>";
    $ProcessOutput .= "<FONT COLOR=\"#336600\"><B>" . _FROM_COMMENT_DEL . "</B></FONT><BR><BR>";
    $ProcessOutput .= "<A HREF=\"?name=news&file=readnews&id=" . $_GET['id'] . "\"><B>" . _FROM_COMMENT_INDEX . "</B></A>";
    $ProcessOutput .= "</CENTER>";
    $ProcessOutput .= "<BR><BR>";
} else {
    //¡Ã³ÕäÁè¼èÒ¹
    $ProcessOutput = $PermissionFalse;
}
echo $ProcessOutput;
?>


问题


面经


文章

微信
公众号

扫码关注公众号