Example #1
0
//  / ___/__  ___  / /________  / / / _ \___ ____  ___ / /
// / /__/ _ \/ _ \/ __/ __/ _ \/ / / ___/ _ `/ _ \/ -_) / 
// \___/\___/_//_/\__/_/  \___/_/ /_/   \_,_/_//_/\__/_/ 
// =========================================================================
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php 
require_once "memory.php";
if (empty($POST_ch_lang) && !$CONFIG_language_select_mode) {
    exit;
}
$HTTP_REFERER = get_referer();
if ($POST_ch_lang != '') {
    $dir = "lang/" . $POST_ch_lang . ".php";
    if (is_file($dir)) {
        $ch_lang = $POST_ch_lang;
    } else {
        $ch_lang = $CONFIG_language;
    }
    if ($CONFIG_save_type == 1) {
        $_SESSION["userlang"] = $ch_lang;
    } else {
        CP_setCookie("userlang", $ch_lang);
        //setcookie("userlang","$ch_lang",$CP[time]+60*60*24*30);
    }
}
header("location:{$HTTP_REFERER}");
Example #2
0
//   _____          /___/        __  ___                __
//  / ___/__  ___  / /________  / / / _ \___ ____  ___ / /
// / /__/ _ \/ _ \/ __/ __/ _ \/ / / ___/ _ `/ _ \/ -_) / 
// \___/\___/_//_/\__/_/  \___/_/ /_/   \_,_/_//_/\__/_/ 
// =========================================================================
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php 
require "memory.php";
if (empty($POST_ch_theme) && !$CONFIG_theme_select_mode) {
    header("location:index.php?act=idx");
}
$HTTP_REFERER = get_referer();
if ($POST_ch_theme != '') {
    $dir = "theme/{$POST_ch_theme}";
    if (is_dir($dir)) {
        $ch_theme = $POST_ch_theme;
    } else {
        $ch_theme = $CONFIG_default_theme;
    }
    if ($CONFIG_save_type == 1) {
        $_SESSION["usertheme"] = $ch_theme;
    } else {
        CP_setCookie("usertheme", $ch_theme);
    }
}
header("location:{$HTTP_REFERER}");
Example #3
0
function do_blacklist($state, $blacklist_code)
{
    switch ($state) {
        case 1:
            CP_setCookie("IP_Blacklist", $blacklist_code);
            header("location:pageerr.php?code=01");
            break;
        case 2:
            $sql = new MySQL();
            global $CONFIG_sql_cpdbname;
            $sql->execute_query("DELETE FROM {$CONFIG_sql_cpdbname}.memory WHERE memory_object=\"ip_blacklist\" AND memory_value3=\"" . mysql_res($blacklist_code) . "\"", 'function.php');
            CP_removeCookie("IP_Blacklist");
            break;
        case 3:
            header("location:pageerr.php?code=01");
            break;
        case 4:
            CP_removeCookie("IP_Blacklist");
            break;
    }
    return true;
}
Example #4
0
        $sql->result = $sql->execute_query($query, "action.php");
        $sql->total_query++;
        $rows = $sql->fetch_row();
        if (!$sql->count_rows() > 0) {
            $display = $lang[login_wrong];
        } else {
            if ($POST_LG_USER == "s1" || $POST_LG_USER == "s2" || $POST_LG_USER == "s3" || $POST_LG_USER == "s4" || $POST_LG_USER == "s5") {
                $display = $lang[login_wrong];
            } else {
                $pass = checkmd5($CONFIG_md5_support ? 0 : 1, $rows[user_pass]);
                if ($CONFIG_save_type == 1) {
                    $_SESSION["loginname"] = md5($rows[account_id]);
                    $_SESSION["loginpass"] = $pass;
                } else {
                    CP_setCookie("loginname", md5($rows['account_id']));
                    CP_setCookie("loginpass", $pass);
                }
                $display = sprintf($lang[login_right], get_displayname($rows['display_name']));
            }
        }
    } else {
        $display = $lang[login_wrong];
    }
}
if ($GET_act == "logout") {
    if ($CONFIG_save_type == 1) {
        session_unregister(loginname);
        session_unregister(loginpass);
    } else {
        CP_removeCookie("loginname");
        CP_removeCookie("loginpass");