Exemplo n.º 1
0
/**
 * $Author: BEESCMS $
 * ============================================================================
 * 网站地址: http://www.beescms.com
 * 您只能在不用于商业目的的前提下对程序代码进行修改和使用;
 * 不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
define('CMS', 'true');
include 'init.php';
$dir = str_replace("install", '', dirname(__FILE__));
if (file_exists($dir . 'data/install.lock')) {
    die("系统已经安装完成,需要重新安装请先删除data目录下的install.lock文件");
}
$action = empty($action) ? 'wel' : $action;
go_url($action);
function wel()
{
    include 'template/wel.html';
}
function check()
{
    $check_dir = array('data', 'data/cache', 'data/cache_arr', 'data/cache_channel', 'data/cache_form', 'data/cache_tpl', 'htm', 'install', 'upload', 'upload/fck', 'upload/file', 'upload/img', 'template');
    include 'template/check.html';
}
function cmsdata()
{
    include 'template/confing.html';
}
function install()
{
Exemplo n.º 2
0
function sub_check_per($level)
{
    global $m_user_info;
    global $SESSION_KEY;
    global $url_login;
    if (!$SESSION_KEY && $level < 10) {
        echo "\n\t\t\t\t<form name=frm_login action='{$url_login}' method='get'>\n\t\t\t\t</form>\n\t\t\t<script>\n\t\t\t\t<!--\n\t\t\t\t\tfrm_login.submit();\n\t\t\t\t-->\n\t\t\t</script>\n\t\t\t";
        exit;
        go_url($url_login);
    }
    if ($level < $m_user_info[user_level] || $m_user_info[user_level] == "") {
        msg_back("권한이 없습니다");
    }
}
Exemplo n.º 3
0
$sql .= " member_id='{$chk_id}' ";
$rows = getObjectSQL2($sql, $conn);
if (!$rows) {
    msg_back("아이디가 존재하지 않거나 권한이 없습니다.");
}
if ($rows[member_pw] != $chk_pwd) {
    msg_back("비밀번호가 일치하지 않습니다");
}
$now = date("Y-m-d H:i:s");
$USER_KEY = md5($rows[member_id]);
setCookie("USER_KEY", $USER_KEY, 0, "/");
session_register("USER_INFO");
$USER_INFO = $rows;
if ($idcheckbox) {
    //자동로그인일경우(체크값을 auto_login이라는 파라메타로 주면되겠죠)
    // 쿠키 한달간 저장
    setCookie('idck', $chk_id, 31536000000, "/");
    //member_id 쿠키 생성
} else {
    setCookie('idck', '', -1, "/");
}
if ($pwcheckbox) {
    //자동로그인일경우(체크값을 auto_login이라는 파라메타로 주면되겠죠)
    // 쿠키 한달간 저장
    setCookie('pwck', $chk_pwd, 31536000000, "/");
    //member_pw 쿠키 생성
} else {
    setCookie('pwck', '', -1, "/");
}
go_url("../admin/main.html");
function go_url_err($url = "", $info = "操作失败!", $time = 3)
{
    go_url($url, $info, $time);
}
Exemplo n.º 5
0
<?php

if ($USER_INFO[member_id] && $USER_KEY) {
    $m_user_key = md5($USER_INFO[member_id]);
    if ($USER_KEY != $USER_KEY) {
        $login_status = false;
        echo "<meta http-equiv='refresh' content='0; url=../admin/index.html'>";
        exit;
    } else {
        if ($USER_INFO[member_group] == "") {
            session_unregister("USER_INFO");
            setCookie("USER_KEY", "", -1);
            session_destroy();
            go_url("../admin/index.html");
            exit;
        }
        $login_status = true;
    }
} else {
    $login_status = true;
    echo "<meta http-equiv='refresh' content='0; url=../admin/index.html'>";
    exit;
}
exec("dir /tmp/sess_*", $list);