示例#1
0
文件: admin.php 项目: molnarzoli82/bs
    $_SESSION["lang"] = $_REQUEST[lang];
} else {
    if ($_SESSION["lang"] == '') {
        $_SESSION["lang"] = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
    }
}
if ($_REQUEST['profil'] != '') {
    $_SESSION["profil"] = $_REQUEST[profil];
} else {
    if ($_SESSION["profil"] == '') {
        $_SESSION["profil"] = 'cnc';
    }
}
$adatkapcsolat = new data_connect();
$adatkapcsolat->connect();
$user = new user_admin();
$user->login();
$admin_htmluj = new html_blokk();
if ($_SESSION["sessfelhasznalojog"] == "1") {
    //belép
    $admin_htmluj->load_template_file("templates/admin_menu.tpl", $array);
    $admin_menu = $admin_htmluj->html_code;
    if ($_REQUEST[tartalom]) {
        include 'admin/' . $_REQUEST[tartalom] . '.php';
    } else {
        include 'admin/admin_cimlap.php';
    }
    $array = array('admin_torzs' => $admin_torzs, 'admin_menu' => $admin_menu);
    $admin_htmluj->load_template_file("templates/admin.tpl", $array);
} else {
    //nem lép be
示例#2
0
<?php

session_start();
require '../config/classes.php';
$new = new user_admin();
if ($_SESSION['web_admin'] >= 9) {
    $action = mysqli_real_escape_string($new->conexion(), $_GET['action']);
    switch ($action) {
        case 'searchip':
            $playername = mysqli_real_escape_string($new->conexion(), $_GET['playername']);
            $new->get_ip($playername);
            break;
        default:
            # code...
            break;
    }
}