Пример #1
0
function showadminlist($adminid = 0)
{
    $result = getresult("select * from I_admin order by lasttime desc");
    while ($row = getresultArray($result)) {
        echo "<tr class='list'>\n";
        echo "<td align='center'>";
        if (getlogininfo("adminid") == $row["id"]) {
            echo "<input type='checkbox' disabled name='list' value='" . $row["id"] . "' />";
        } else {
            echo "<input type='checkbox' name='list' value='" . $row["id"] . "' />";
        }
        echo "</td>";
        echo "<td> " . $row["id"] . "</td>";
        echo "<td> " . $row["adminname"] . "</td>";
        echo "<td> ";
        if ($row["adminrole"] == 0) {
            echo gettext_r("super") . gettext_r("manager");
        } else {
            echo gettext_r("common") . gettext_r("manager");
        }
        echo "</td>";
        echo "<td> " . $row["lastip"] . "</td>";
        echo "<td> " . $row["lasttime"] . "</td>";
        echo "<td> " . $row["logintimes"] . "</td>";
        echo "<td>";
        if (getlogininfo("adminid") != $row["id"]) {
            echo " <a href=\"javascript:jump('admin_admin.php','modify'," . $row["id"] . ")\">" . gettext_r("update") . gettext_r("power") . "</a> ";
        } else {
            echo " <span style='color:#cccccc'>" . gettext_r("update") . gettext_r("power") . "</span>";
        }
        echo "</td>";
        echo "</tr>\n";
    }
}
Пример #2
0
<?php

include "../library/basefunction.php";
if (getlogininfo("adminname") == "notdefined") {
    echo "notlogin";
} else {
    echo "logined";
}
Пример #3
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改密码</title>
<link rel="stylesheet" type="text/css" href="css/functionstyle.css">
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/adminmainFunction.js"></script>

</head>
<body style="padding:20px;" bgcolor="#f3f9ff">
<?php 
if ($_POST["submit"] == "提交") {
    include '../conn.php';
    include '../library/basefunction.php';
    $adminid = getlogininfo("adminid");
    $result = getresult("select * from I_admin where id = {$adminid}");
    if (md5($_POST["oldpassword"]) != getresultData($result, 0, "password")) {
        die("<script type='text/javascript'>alert('旧密码错误');history.back(-1);</script>");
    }
    if ($_POST["newpwd"] != $_POST["newpwd1"]) {
        die("<script type='text/javascript'>alert('两次密码输入不一致');history.back(-1);</script>");
    }
    if (getresult("update I_admin set password='******' where id={$adminid}")) {
        die("<script type='text/javascript'>alert('密码修改成功\\n请重新登录');parent.location='logout.php';</script>");
    }
}
?>
<div>
<form action="" method="post" onSubmit="return chpasswordcheck();">
  <table cellspacing="0" cellpadding="3" border="1" bordercolor="#FFFFFF" style="border-collapse:collapse">
Пример #4
0
				lockeachother();
			}
		);
</script>
</head>
<body>
<?php 
include "../conn.php";
include_once "../library/basefunction.php";
include_once "../lang/envinit.php";
include "../library/admin.admin.php";
$adminid = $_GET["adminid"];
$action = $_GET["action"];
$preurl = $_GET["url"];
//检查权限超管权限,不是超管不能进行此项管理
if (getlogininfo("adminrole") == NULL || getlogininfo("adminrole") != "0") {
    die(gettext_r("noRight"));
}
switch ($action) {
    case "delete":
        //至少保留一个超管
        try {
            getresult("begin");
            getresult("delete from I_admin where id=" . $adminid);
            //echo getresultRow(getresult("select * from I_admin where adminrole=0"));
            if (getresultRow(getresult("select * from I_admin where adminrole=0")) < 1) {
                getresult("rollback");
                throw new Exception(gettext_r("superManagerLeastOne"));
            }
            getresult("commit");
            getresult("end");
Пример #5
0
<?php

session_start();
include_once "../conn.php";
include_once '../library/basefunction.php';
include_once "../lang/envinit.php";
if (getlogininfo("adminrole") == "notdefined") {
    echo "<script type='text/javascript'>parent.location='login.php';</script>";
}
?>
<!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>left</title>
    <link href="css/menu.css" rel="stylesheet" type="text/css" />
    <link href="css/left.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript" src="../js/adminmainFunction.js"></script>
    <script type="text/javascript">
        $(document).ready(
		function() 
			{ 
				initMenu();
			}
		);
    </script>
</head>

<body>
    <div id="MN_pic"></div>
Пример #6
0
     echo "</tr>";
     echo "</table>";
     break;
 default:
     echo "<div id='navigation'>" . gettext_r("quickLink") . ":";
     echo "<a href=\"admin_vote.php?action=add\">" . gettext_r("add") . gettext_r("vote") . "</a>\n";
     echo "</div>";
     echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='function'>\n";
     echo "<tr class='header'>\n";
     echo "<td align='center' width='40'>" . gettext_r("checkIn") . "</td>\n";
     echo "<td align='center' width='40'>" . gettext_r("serialNumber") . "</td>\n";
     echo "<td align='center'>" . gettext_r("title") . "</td>\n";
     echo "<td align='center' width='300'>" . gettext_r("operate") . "</td>\n";
     echo "</tr>\n";
     $adminid = getlogininfo("adminid");
     if (getlogininfo("adminrole") === "0") {
         $result = getresult("select * from I_vote");
     } else {
         $result = getresult("select * from I_vote where adminid={$adminid}");
     }
     if (getresultNumrows($result) < 1) {
         echo "<tr class='list'>\n";
         echo "<td colspan='4' align='center'>" . gettext_r("haveNot") . gettext_r("vote") . "</td>";
         echo "</tr>";
     }
     while ($row = getresultArray($result)) {
         echo "<tr class='list'>\n";
         echo "<td align='center'><input type='checkbox' name='list' value='" . $row["id"] . "' /></td>";
         echo "<td> " . $row["id"] . "</td>";
         echo "<td> " . $row["title"] . "</td>";
         echo "<td align='center'>";
Пример #7
0
function getarticleidlist($columnid)
{
    global $childcolumnString;
    getchildcolumnid_improveed($columnid);
    if ($functionarray[$columnid] === "2" || getlogininfo("adminrole") === "0") {
        $query = "select id from I_article where columnid in ({$childcolumnString})";
    } else {
        $query = "select id from I_article where columnid in ({$childcolumnString}) and adminid=" . getlogininfo("adminid");
    }
    $result = getresult($query);
    if (getresultNumrows($result) < 1) {
        return "-1";
    } else {
        $articleidlist = "";
        while ($row = getresultArray($result)) {
            if ($articleidlist == "") {
                $articleidlist = $row["id"];
            }
            $articleidlist .= "," . $row["id"];
        }
        return $articleidlist;
    }
}
Пример #8
0
$preurl = $_GET["url"];
$functionarray = translatefunctioncode($_SESSION["functioncode"]);
//检查权限
//得到频道id
$channelid = $columnid;
if ($columnid != "0") {
    //如果不是频道管理
    for (;;) {
        $tempid = getcolumnformationBycolumnid($channelid, "parentid");
        if ($tempid == "0") {
            break;
        }
        $channelid = $tempid;
    }
}
if ($functionarray[$channelid] != "2" && getlogininfo("adminrole") != "0") {
    //如果不是超管或频道管理员
    die("<script type='text/javascript'>alert('" . gettext_r("noRight") . "');history.back('-1');</script>\n");
}
switch ($action) {
    case "delete":
        $result = getresult("select parentid,childcount from I_column where id=" . $columnid);
        $parentid = getresultData($result, 0, "parentid");
        $childcount = getresultData($result, 0, "childcount");
        if ($childcount > 0) {
            echo "<script type='text/javascript'>alert('" . gettext_r("haveChildColumn") . "');history.back('-1');</script>\n";
            die;
        }
        $result1 = getresult("select childcolumn,childcount from I_column where id=" . $parentid);
        $childcolumn = getresultData($result1, 0, "childcolumn");
        $childcount = getresultData($result1, 0, "childcount");
Пример #9
0
function showpage($columnid, $currentpage, $pagesize = 10)
{
    global $childcolumnString, $functionarray;
    getchildcolumnid_improveed($columnid, $childcolumnString);
    //echo $childcolumnString;
    if ($functionarray[$columnid] === "2" || getlogininfo("adminrole") === "0") {
        $tempresult = getresult("select count(*) as countofarticle from I_article where columnid in (" . $childcolumnString . ")");
    } else {
        $tempresult = getresult("select count(*) as countofarticle from I_article where columnid in (" . $childcolumnString . ") and ifpass=0 and adminid=" . getlogininfo("adminid"));
    }
    $countofarticle = getresultData($tempresult, 0, "countofarticle");
    if ($countofarticle % $pagesize == 0) {
        $allpage = $countofarticle / $pagesize;
    } else {
        $allpage = floor($countofarticle / $pagesize) + 1;
    }
    //消除文章数为零时显示下一页链接的bug
    if ($countofarticle == 0) {
        $allpage += 1;
    }
    echo gettext_r("total") . "<b> " . $allpage . " </b>" . gettext_r("page") . "(" . $pagesize . " " . gettext_r("piece") . gettext_r("article") . gettext_r("per") . gettext_r("page") . ") ";
    if ($currentpage == 1) {
        echo gettext_r("firstPage") . " | " . gettext_r("prePage") . " | ";
    } else {
        echo "<a href='admin_article.php?columnid={$columnid}&currentpage=1'>" . gettext_r("firstPage") . "</a> | <a href='admin_article.php?columnid={$columnid}&currentpage=" . ($currentpage - 1) . "'>" . gettext_r("prePage") . "</a> | ";
    }
    $temppage = 1;
    if ($currentpage - 1 < 5) {
        while ($temppage <= $currentpage) {
            if ($currentpage == $temppage) {
                echo "<b>" . $temppage . "</b> ";
                $temppage++;
                continue;
            }
            echo "<a href='admin_article.php?columnid={$columnid}&currentpage={$temppage}'>" . $temppage . "</a> ";
            $temppage++;
        }
    } else {
        while ($temppage <= $currentpage) {
            if ($currentpage == $temppage) {
                echo "<b>" . $temppage . "</b> ";
                $temppage++;
                continue;
            }
            if ($temppage == 1) {
                echo "<a href='admin_article.php?columnid={$columnid}&currentpage={$temppage}'>" . $temppage . "</a> … ";
                $temppage++;
                continue;
            }
            if ($currentpage - $temppage > 3) {
                $temppage++;
                continue;
            }
            echo "<a href='admin_article.php?columnid={$columnid}&currentpage={$temppage}'>" . $temppage . "</a> ";
            $temppage++;
        }
    }
    if ($allpage - $currentpage < 5) {
        while ($temppage <= $allpage) {
            if ($temppage == 1) {
                echo "<a href='admin_article.php?columnid={$columnid}&currentpage={$temppage}'>" . $temppage . "</a> ";
                $temppage++;
                continue;
            }
            echo "<a href='admin_article.php?columnid={$columnid}&currentpage={$temppage}'>" . $temppage . "</a> ";
            $temppage++;
        }
    } else {
        while ($temppage <= $allpage) {
            if ($temppage == $allpage) {
                echo " … <a href='admin_article.php?columnid={$columnid}&currentpage={$temppage}'>" . $temppage . "</a> ";
                $temppage++;
                continue;
            }
            if ($temppage - $currentpage > 3) {
                $temppage++;
                continue;
            }
            echo "<a href='admin_article.php?columnid={$columnid}&currentpage={$temppage}'>" . $temppage . "</a> ";
            $temppage++;
        }
    }
    if ($currentpage == $allpage) {
        echo "| " . gettext_r("nextPage") . " | " . gettext_r("lastPage");
    } else {
        echo "| <a href='admin_article.php?columnid={$columnid}&currentpage=" . ($currentpage + 1) . "'>" . gettext_r("nextPage") . "</a> | <a href='admin_article.php?columnid={$columnid}&currentpage={$allpage}'>" . gettext_r("lastPage") . "</a>";
    }
}
Пример #10
0
        echo "<div id='navigation'>" . gettext_r("quickLink") . ":";
        echo "<a href=\"admin_article.php?action=add&columnid=" . $columnid . "\">" . gettext_r("add") . gettext_r("article") . "</a>\n";
        echo "</div>";
        echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='function'>\n";
        echo "<tr class='header'>\n";
        echo "<td align='center' width='40'>" . gettext_r("checkIn") . "</td>\n";
        echo "<td align='center' width='40'>" . gettext_r("serialNumber") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("column") . "</td>\n";
        echo "<td align='center'>" . gettext_r("articleTitle") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("author") . "</td>\n";
        echo "<td align='center' width='60'>" . gettext_r("hits") . "</td>\n";
        echo "<td align='center' width='80'>" . gettext_r("ifPass") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("operate") . "</td>\n";
        echo "</tr>\n";
        showarticle($columnid, $currentpage);
        echo "</table>\n";
        echo "<div style='height:5px;'></div>";
        echo "<input type='checkbox' id='checkall' onclick='checkall()' value='全选' /><span>" . gettext_r("checkAll") . "  </span> ";
        echo "<input type='button' onclick=\"deleteall('admin_article.php')\" value='" . gettext_r("deleteAll") . "' />";
        if ($functionarray[$columnid] === "2" || getlogininfo("adminrole") === "0") {
            echo "<input type='button' onclick='passall(1)' value='" . gettext_r("pass") . "' />";
            echo "<input type='button' onclick='passall(0)' value='" . gettext_r("canclePass") . "' />";
        }
        echo "<div id='showpage'>";
        showpage($columnid, $currentpage);
        echo "</div>";
}
?>
</body>
</html>
Пример #11
0
echo gettext_r("haveNotSearchResult");
?>
"); 
				} 
		} 
	return false; 
	}
	</script>
</head>

<body>
<!--第一条背景-->
<div id="topbg2" style="overflow:hidden">
  <div id="topbg1"></div>
  <div id="welcome"><img src="images/index_top_arrow1.png" />&nbsp;<?php 
echo getlogininfo("adminname");
?>
&nbsp;&nbsp;<?php 
echo gettext_r("welcomeToSystem");
?>
&nbsp;&nbsp;<?php 
echo gettext_r("youCan");
?>
【<a target="main" href="changepassword.php"><?php 
echo gettext_r("change") . gettext_r("password");
?>
</a>】【<a target="_parent" href="logout.php"><?php 
echo gettext_r("logOut");
?>
</a>】</div>
</div>