示例#1
0
 * You should have received a copy of the GNU General Public License
 * along with JonesCMS; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
if (eregi("header.php", $_SERVER['PHP_SELF'])) {
    Header("Location: ../index.php");
    die;
}
$num_users = num_users();
if ($num_users == 0) {
    Header("Location: init.php");
    die;
}
list($title, $sitename, $topname, $logo, $theme, $homepage) = getSiteData();
$cookie = getCookie();
if (!isRoot($cookie)) {
    Header("Location: denied.php");
    die;
}
header("Content-type: text/html; charset=iso-8859-1");
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <link rel="stylesheet" href="../themes/<?php 
echo $theme;
?>
/style.css" type="text/css" />
    <title><?php 
echo $title;
示例#2
0
function checkRootLogin($user_id, $password)
{
    $user_id = escape($user_id);
    //first verify login information
    $login_result = verifyLogin($user_id, $password);
    if ($login_result === TRUE) {
        //check that admin is a root administrator
        $isRoot = isRoot($user_id);
        if (!$isRoot) {
            return 1;
        } else {
            return TRUE;
        }
    } else {
        return $login_result;
    }
}