Example #1
0
<?php

define('ROOT_PATH', str_replace("\\", "/", realpath(dirname(__FILE__) . "/../../")));
require ROOT_PATH . "/include/config.php";
require ROOT_PATH . "/include/parameter.php";
include ROOT_PATH . "/source/function/etag.php";
require ROOT_PATH . "/source/function/global.php";
require ROOT_PATH . "/source/function/web.php";
require ROOT_PATH . "/source/function/admin.php";
require ROOT_PATH . "/source/class/abstract.class.php";
require ROOT_PATH . "/source/class/mystep.class.php";
$mystep = new MyStep();
$mystep->getLanguage(dirname(ROOT_PATH . $_SERVER['PHP_SELF']) . "/language/");
$mystep->pageStart(true);
$db->Reconnect(true, $setting['db']['name']);
$method = $req->getGet("method");
if (empty($method)) {
    $method = "list";
}
$mid = $req->getReq("mid");
$id = $req->getReq("id");
$field = $req->getReq("f");
if (empty($field) || empty($id)) {
    header("HTTP/1.0 404 Not Found");
    $db->close();
    unset($db, $req);
    exit;
}
if ($data = $db->result($setting['db']['pre'] . "custom_form_" . $mid, $field, array("id", "n=", $id))) {
    $data = explode("::", $data);
    $the_file = dirname(__FILE__) . "/setting/" . $mid . "/" . $data[2];
Example #2
0
 public function regLog($login, $logout = "", $logcheck = "", $chg_psw = "")
 {
     $this->func_log = array();
     if (is_callable($login)) {
         $this->func_log['login'] = $login;
     }
     if (is_callable($logout)) {
         $this->func_log['logout'] = $logout;
     }
     if (is_callable($logcheck)) {
         $this->func_log['logcheck'] = $logcheck;
     }
     if (is_callable($chg_psw)) {
         $this->func_log['chg_psw'] = $chg_psw;
     }
     self::$func_log_s = $this->func_log;
 }
Example #3
0
    exit;
}
foreach ($_GET as $k => $v) {
    if (!preg_match("/^\\w+\$/", $k)) {
        header("location: /");
        exit;
    }
}
define('ROOT_PATH', str_replace("\\", "/", dirname(__FILE__)));
require ROOT_PATH . "/include/config.php";
require ROOT_PATH . "/include/parameter.php";
require ROOT_PATH . "/source/function/global.php";
require ROOT_PATH . "/source/function/web.php";
require ROOT_PATH . "/source/class/abstract.class.php";
require ROOT_PATH . "/source/class/mystep.class.php";
$mystep = new MyStep();
$mystep->pageStart(true);
if ($setting['web']['close'] && $req->getCookie("force") == "" && $setting['info']['self'] != "vcode.php") {
    $goto_url = $setting['web']['close_page'];
    $mystep->pageEnd(false);
}
$cache_path = ROOT_PATH . "/" . $setting['path']['cache'] . "/html/" . $setting['info']['web']['idx'] . "/";
if ($req->getCookie("template", false) != "") {
    $setting['gen']['template'] = $req->getCookie("template", false);
}
$tpl_info = array("idx" => "main", "style" => $setting['gen']['template'], "path" => ROOT_PATH . "/" . $setting['path']['template']);
includeCache("news_cat");
includeCache("link");
$keyword = $req->getReq("k");
if (empty($keyword)) {
    $keyword = $setting['language']['plug_search_default'];
Example #4
0
<?php

$ms_sign = 1;
$etag_expires = 604800;
define('ROOT_PATH', str_replace("\\", "/", realpath(dirname(__FILE__) . "/../")));
require ROOT_PATH . "/include/config.php";
require ROOT_PATH . "/include/parameter.php";
require ROOT_PATH . "/source/function/etag.php";
require ROOT_PATH . "/source/function/global.php";
require ROOT_PATH . "/source/function/web.php";
require ROOT_PATH . "/source/class/abstract.class.php";
require ROOT_PATH . "/source/class/mystep.class.php";
require ROOT_PATH . "/source/class/minify.class.php";
$mystep = new MyStep();
$mystep->pageStart(true);
$type = $req->GetServer("QUERY_STRING");
$result = "";
$cache_file = ROOT_PATH . "/" . $setting['path']['cache'] . "script/" . $setting['info']['web']['idx'] . "_cache." . $type;
$header = array('js' => 'Content-Type: application/x-javascript', 'css' => 'Content-Type: text/css', 'jpg' => 'Content-Type: image/jpg', 'gif' => 'Content-Type: image/gif', 'png' => 'Content-Type: image/png', 'jpeg' => 'Content-Type: image/jpeg', 'swf' => 'Content-Type: application/x-shockwave-flash');
if (isset($header[$type])) {
    header($header[$type]);
}
if (file_exists($cache_file) && filemtime($cache_file) + $etag_expires > $setting['info']['time_start'] / 1000) {
    $result = GetFile($cache_file);
} else {
    switch ($type) {
        case "css":
            $css = $mystep->getCSS();
            for ($i = 0, $m = count($css); $i < $m; $i++) {
                $result .= CSSMin::minify(GetFile($css[$i]));
            }
Example #5
0
<?php

define('ROOT_PATH', str_replace("\\", "/", realpath(dirname(__FILE__) . "/../")));
require ROOT_PATH . "/include/config.php";
require ROOT_PATH . "/include/parameter.php";
require ROOT_PATH . "/source/function/global.php";
require ROOT_PATH . "/source/function/web.php";
require ROOT_PATH . "/source/function/admin.php";
require ROOT_PATH . "/source/class/abstract.class.php";
require ROOT_PATH . "/source/class/mystep.class.php";
header("Expires: -1");
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0", false);
header("Pragma: no-cache");
$mystep = new MyStep();
$mystep->getLanguage(dirname(__FILE__) . "/language/");
$mystep->pageStart();
$db->Reconnect(true, $setting['db']['name']);
$setting['gen']['minify'] = false;
$usergroup = $req->getSession("usergroup");
if ($usergroup === 0) {
    $goto_url = "../";
    $mystep->pageEnd(false);
}
$group = getParaInfo("user_group", "group_id", $usergroup);
if ($setting['info']['self'] == "login.php") {
    $method = $req->getServer("QUERY_STRING");
    if (!empty($group['power_func']) && $method != "logout") {
        $goto_url = "./index.php";
        $mystep->pageEnd(false);
    }
} else {
Example #6
0
    header("HTTP/1.0 404 Not Found");
    exit;
}
$id = intval($id);
define('ROOT_PATH', str_replace("\\", "/", realpath(dirname(__FILE__) . "/../")));
include ROOT_PATH . "/include/config.php";
if ($setting['web']['close'] && !isset($_COOKIE['force'])) {
    header("HTTP/1.0 404 Not Found");
    exit;
}
include ROOT_PATH . "/include/parameter.php";
include ROOT_PATH . "/source/function/global.php";
include ROOT_PATH . "/source/function/web.php";
include ROOT_PATH . "/source/class/abstract.class.php";
include ROOT_PATH . "/source/class/mystep.class.php";
$mystep = new MyStep();
$mystep->pageStart(false);
ob_end_clean();
set_time_limit(1200);
$sql = $db->buildSel(array(array("name" => $setting['db']['pre'] . "attachment", "idx" => "a", "col" => "*", "condition" => array("id", "n=", $id)), array("name" => $setting['db']['pre'] . "news_show", "idx" => "b", "col" => "view_lvl", "join" => "web_id,news_id")));
if ($record = getData($sql, "record", 1800)) {
    if ($record['view_lvl'] > $setting['info']['user']['type']['view_lvl']) {
        $db->close();
        header("location: " . getUrl("read", $record['news_id'], 1, $record['web_id']));
        exit;
    }
    if (strpos($record['file_type'], "image") === 0) {
        include ROOT_PATH . "/source/function/etag.php";
    }
    $the_ext = "." . GetFileExt($record['file_name']);
    $the_path = ROOT_PATH . "/" . $setting['path']['upload'] . date("/Y/m/d", substr($record['file_time'], 0, 10));
Example #7
0
    MultiDel(dirname(__FILE__));
}
if (is_file("../include/install.lock")) {
    header("location: ../");
    exit;
}
header("Expires: Tue, 1 Jan 1980 00:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/html;charset=" . $setting['gen']['charset']);
date_default_timezone_set("PRC");
set_time_limit(30);
ini_set('memory_limit', '32M');
ini_set('magic_quotes_runtime', 0);
error_reporting(E_ALL ^ E_NOTICE);
$mystep = new MyStep();
$req = $mystep->getInstance("MyReq", $setting['cookie'], $setting['session']);
$step = $req->getReq("step");
switch ($step) {
    case 1:
        break;
    case 2:
        break;
    case 3:
        if (strtolower($_POST['setting']['db']['charset']) == "utf-8") {
            $_POST['setting']['db']['charset'] = "utf8";
        }
        $_POST['setting']['web']['s_pass'] = md5($_POST['setting']['web']['s_pass']);
        $_POST['setting']['cookie']['prefix'] = "ms_";
        $_POST['setting']['web']['sign'] = md5($_POST['setting']['web']['title'] . $req->GetServer("HTTP_HOST"));
        $content = changeSetting($_POST['setting']);