예제 #1
0
파일: login.php 프로젝트: nsdown/ffs
<?php

session_save_path('./session/');
session_start();
if (!empty($_POST['password'])) {
    include 'glob.php';
    include 'glob/admin/config.php';
    if (STR_ENCRYPT($_POST['password']) == ADMIN_PASSWORD) {
        $_SESSION['login'] = true;
        header('Location:admin.php');
    } else {
        echo '<script type="text/JavaScript">alert("登陆密码错误");</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>FFS-后台</title>
<link href="glob/admin/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.loginbox{ width:300px; height:120px; position:absolute; left:50%; top:50%; margin-left:-170px; margin-top:-130px; padding:20px;}
.loginbox p{ line-height:30px; font-size:14px; margin-bottom:10px;}
.loginbox input{ width:200px;}
.loginbox input.roundbtn{ margin-top:10px; width:50px;}
</style>
</head>

<body>
<div id="container">
예제 #2
0
파일: Engine.php 프로젝트: nsdown/ffs
         } else {
         }
     }
 } elseif (ACT == 'adminSet') {
     /*创建页面数组*/
     $FFS['html']['path'] = ROT . 'glob/admin/adminSet.html';
     include 'glob/admin/config.php';
     if ($_POST) {
         if (STR_ENCRYPT(trim($_POST['OLD_PASSWORD'])) != ADMIN_PASSWORD) {
             STR_EDITNOTICE('The_OldPassWord_Is_Wrong!');
         } else {
             if ($_POST['ADMIN_PASSWORD'] != $_POST['ADMIN_PASSWORD_AGAIN'] || $_POST['ADMIN_PASSWORD'] == "") {
                 STR_EDITNOTICE('The_PassWord_Is_Not_Alike!');
             } else {
                 $context = '<?php ' . "\n";
                 $context = $context . 'define(\'ADMIN_PASSWORD\',\'' . STR_ENCRYPT(trim($_POST['ADMIN_PASSWORD'])) . '\'); ' . "\n";
                 $context = $context . ' ?>';
                 if (file_put_contents('glob/admin/config.php', $context)) {
                     chmod('glob/admin/config.php', 0777);
                     STR_EDITNOTICE('The_Action_Is_Ok!');
                 }
             }
         }
     }
 } elseif (ACT == 'mailConfig') {
     /*创建页面数组*/
     $FFS['html']['path'] = ROT . 'glob/admin/email/mailConfig.html';
     include 'glob/admin/email/mailConfig.php';
     $FFS['html']['tag']['{html:MAILWAY}'] = MAILWAY;
     $FFS['html']['tag']['{html:SMTPSERVER}'] = SMTPSERVER;
     $FFS['html']['tag']['{html:SMTPSERVERPORT}'] = SMTPSERVERPORT;