$steamid = $lb->player_id;
    }
    $last_ban_arr = array("steamid" => $steamid, "nickname" => htmlspecialchars(_substr($lb->player_nick, 15)), "reason" => htmlspecialchars(_substr($lb->ban_reason, 15)), "created" => $lb->ban_created, "length" => $ban_length, "time" => time());
}
/*
 *
 * 		Template parsing
 *
 */
// Header
$title = "_TITLEVIEW";
// Section
$section = "live";
// Parsing
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("version_web", $config->v_web);
$smarty->assign("server", $server_array);
$smarty->assign("stats", $stats);
$smarty->assign("last_ban", $last_ban_arr);
$smarty->assign("addons", $addons_array);
$smarty->assign("rules", $rules);
$smarty->assign("rules_array", $rules_array);
$smarty->assign("anticheat_array", $anticheat_array);
$smarty->assign("players", isset($player_array) ? $player_array : NULL);
$smarty->assign("empty_result", isset($empty_result) ? $empty_result : NULL);
$smarty->assign("error", $error);
// amxbans.css available in design? if not, take default one.
if (file_exists("templates/" . $config->design . "/amxbans.css")) {
            }
        } else {
            $_SESSION["loginfailed"]++;
            $msg = "_LOGINFAILED";
        }
    }
}
require_once "include/menu.inc.php";
/*
 * Template parsing
 */
$title = "_TITLELOGIN";
// Section
$section = "login";
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("banner", $config->banner);
$smarty->assign("banner_url", $config->banner_url);
$smarty->assign("version_web", $config->v_web);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("menu", $menu);
$smarty->assign("msg", $msg);
if ($loginblocked) {
    $smarty->assign("block_left", $block_left);
} else {
    if ($loginfailed) {
        $smarty->assign("try", $try);
    }
Beispiel #3
0
}
// Make the array for the admin list
$query3 = "SELECT username FROM {$config->webadmins} ORDER BY id ASC";
$resource3 = mysql_query($query3) or die(mysql_error());
$admin_array = array();
while ($result3 = mysql_fetch_object($resource3)) {
    $admin_array[] = $result3->username;
}
/****************************************************************
* Template parsing
****************************************************************/
// Header
$title = lang("_ACCESSLOG");
// Section
$section = "logs";
// Parsing
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("date", $date);
$smarty->assign("admin", $admin);
$smarty->assign("action", $action);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("logs", $log_array);
$smarty->assign("actions", $action_array);
$smarty->assign("admins", $admin_array);
$smarty->display('main_header.tpl');
$smarty->display('log_search.tpl');
$smarty->display('main_footer.tpl');
Beispiel #4
0
            $date = dateMonth($result->ban_created);
            $player = cp1251_to_utf8($result->player_nick);
            $player_id = htmlentities($result->player_id, ENT_QUOTES);
            $duration = $result->ban_length;
            $reason = cp1251_to_utf8($result->ban_reason);
            $admin = cp1251_to_utf8($result->admin_nick);
            if (empty($duration)) {
                $duration = "Permanent";
            } else {
                $duration = $duration . " mins";
            }
            // Assign variables to the array used in the template
            $unban_info = array("date" => $date, "player" => $player, "player_id" => $player_id, "duration" => $duration, "reason" => $reason, "admin" => $admin);
            $unban_array[] = $unban_info;
        }
    }
}
/****************************************************************
* Template parsing						*
****************************************************************/
$title = lang("_BANDETAILS");
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("working_title", "home");
$smarty->assign("dir", $config->document_root);
$smarty->assign("display_admin", $config->display_admin);
$smarty->assign("unban_info", $unban_info);
$smarty->assign("bhans", $unban_array);
$smarty->assign("parsetime", $parsetime);
$smarty->display('findex.tpl');
Beispiel #5
0
if (isset($_POST['action']) && $_POST['action'] == "update" && $_SESSION['bans_edit'] == "yes") {
    $update = mysql_query("UPDATE {$config->amxcomments} SET email = '" . $_POST['email'] . "', comment = '" . $_POST['comment'] . "' WHERE id = '" . $_POST['id'] . "'") or die(mysql_error());
    $url = "{$config->document_root}";
    $delay = "2";
    echo lang("_COMMENT_UPDATED") . " " . lang("_REDIRECT");
    if (isset($_GET["bhid"])) {
        echo "<meta http-equiv=\"refresh\" content=\"" . $delay . ";url=\"ban_details.php?bhid={$bhid}\">";
    }
    exit;
}
/****************************************************************
* Template parsing						*
****************************************************************/
$title = lang("_BANDETAILS");
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("working_title", "home");
$smarty->assign("dir", $config->document_root);
//$smarty->assign("this","ban_details.php");
$smarty->assign("edit", $edit);
$smarty->assign("edit_id", $edit_id);
$smarty->assign("edit_name", $edit_name);
$smarty->assign("edit_email", $edit_email);
$smarty->assign("edit_comment", $edit_comment);
$smarty->assign("display_search", $config->display_search);
$smarty->assign("display_admin", $config->display_admin);
$smarty->assign("display_reason", $config->display_reason);
$smarty->assign("display_demo", $config->display_demo);
$smarty->assign("display_comments", $config->display_comments);
$smarty->assign("ban_info", isset($ban_info) ? $ban_info : "");
    if (isset($_POST['ip_view'])) {
        $ip_view = $_POST['ip_view'];
    } else {
        if (isset($_SESSION['ip_view'])) {
            $ip_view = $_SESSION['ip_view'];
        }
    }
}
if (!isset($uid)) {
    $urlparams = GetUrlParams();
    /////////////////////////////////////////////////////////////////
    //	Template parsing
    /////////////////////////////////////////////////////////////////
    $title = "Login";
    $smarty = new dynamicPage();
    $smarty->assign("meta", "");
    $smarty->assign("title", $title);
    $smarty->assign("dir", $config->document_root);
    $smarty->assign("this", $_SERVER['PHP_SELF']);
    //$smarty->display('main_header.tpl');
    $smarty->display('login.tpl');
    //$smarty->display('main_footer.tpl');
    exit;
}
if (!isset($uip)) {
    $uip = "";
}
$_SESSION['uid'] = $uid;
$_SESSION['pwd'] = $pwd;
$_SESSION['uip'] = $uip;
$_SESSION['uid'] = secure($_SESSION['uid']);
Beispiel #7
0
<?php

// Start session
session_start();
// Require basic site files
require "include/config.inc.php";
if ($config->error_handler == "enabled") {
    include "{$config->error_handler_path}";
}
require "{$config->path_root}/include/functions.lang.php";
require "{$config->path_root}/include/functions.inc.php";
if ($_GET['msg'] == "frontend_disabled") {
    $message = lang("_ERRORAMXBANSDISABLED");
} else {
    if ($_GET['msg'] == "setupfile_exists") {
        $message = lang("_ERRORSETUPPHP");
    }
}
/*
 * Template parsing
 */
$title = lang("_UNAVAILABLE");
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("dir", $config->document_root);
$smarty->assign("message", $message);
$smarty->display('unavailable.tpl');
    $modul_exists = 1;
}
//admin page loader
$site = basename($_GET["site"]);
if (!$modul_exists) {
    if (isset($_GET["site"]) && file_exists("include/admin/admin_" . $site . ".php")) {
        include "include/admin/admin_" . $site . ".php";
    } else {
        include "include/admin/admin_" . $site_start . ".php";
    }
}
//get module menu (only active)
$modules_menu_count = 0;
$modules_menu = sql_get_modules(1, $modules_menu_count);
// Template generieren
$smarty->assign("meta", "");
$smarty->assign("title", $title2);
$smarty->assign("version_web", $config->v_web);
$smarty->assign("banner", $config->banner);
$smarty->assign("banner_url", $config->banner_url);
// amxbans.css available in design? if not, take default one.
if (file_exists("templates/" . $config->design . "/amxbans.css")) {
    $smarty->assign("design", $config->design);
}
$smarty->assign("dir", $config->document_root);
$smarty->assign("current_lang", $config->default_lang);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("menu", $menu);
$smarty->assign("modules_menu", $modules_menu);
$smarty->assign("modules_menu_count", $modules_menu_count);
$smarty->assign("msg", $user_msg);
Beispiel #9
0
    while ($result3 = mysql_fetch_object($resource3)) {
        if (in_array($result3->id, $these_adminids)) {
            $admin_info = array("id" => $result3->id, "username" => $result3->username, "nickname" => $result3->nickname, "checked" => 1);
        } else {
            $admin_info = array("id" => $result3->id, "username" => $result3->username, "nickname" => $result3->nickname, "checked" => 0);
        }
        $all_admins[] = $admin_info;
    }
}
/*
 *
 * Template parsing
 *
 */
$title = "Serveradmins";
// Section
$section = "server_admins";
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("submitted", get_post('submitted'));
$smarty->assign("thisserver", isset($serverid) ? $serverid : NULL);
$smarty->assign("servers", isset($server_array) ? $server_array : NULL);
$smarty->assign("all_admins", isset($all_admins) ? $all_admins : NULL);
$smarty->assign("these_admins", isset($these_admins) ? $these_admins : NULL);
$smarty->display('main_header.tpl');
$smarty->display('server_admins.tpl');
$smarty->display('main_footer.tpl');
//check steamid or bid
if (strpos($sid, "STEAM") !== false) {
    $is_steamid = true;
} else {
    if (substr($sid, 0, 1) == "B" && strlen($sid) > 1) {
        $bid = (int) substr($sid, 1);
    } else {
        $sid = 0;
    }
}
$smarty = new dynamicPage();
//check GET adm
if ($show_admin < 0 || $show_admin > 1) {
    $show_admin = 0;
}
$smarty->assign("show_admin", $show_admin);
// Get ban details
if ($bid) {
    $ban = sql_get_ban_details($bid);
    $smarty->assign("ban_detail", $ban);
}
// Get ban details history with steam
if ($is_steamid === true) {
    $count = 0;
    $exp_bans = sql_get_ban_details_motd_exp($sid, $count);
    $smarty->assign("exp_count", $count);
    $smarty->assign("exp_bans", $exp_bans);
    $smarty->assign("history", 1);
}
//no valid bid
if (!$sid) {
Beispiel #11
0
    }
    $ban_array[] = $ban_info;
}
if ($config->version_checking == "enabled") {
    $new_version_exists = CheckAMXWebVersion();
} else {
    $new_version_exists = 0;
}
/*
 * Template parsing
 */
$title = lang("_BANLIST");
// Section
$section = "banlist";
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("fancy_layers", $config->fancy_layers);
$smarty->assign("display_search", $config->display_search);
$smarty->assign("display_admin", $config->display_admin);
$smarty->assign("display_reason", $config->display_reason);
$smarty->assign("geoip", $config->geoip);
$smarty->assign("bans", $ban_array);
$smarty->assign("pages_results", $pages_results);
$smarty->assign("previous_button", $previous_button);
$smarty->assign("next_button", $next_button);
$smarty->assign("new_version", $new_version_exists);
$smarty->assign("update_url", $config->update_url);
Beispiel #12
0
    	}
    */
    if ($data == 0) {
        echo lang("_NOBANMATCH") . "</td></tr>";
        echo "<br>";
        exit;
    }
}
/****************************************************************
* Template parsing
****************************************************************/
// Header
$title = lang("_EXPORT");
// Section
$section = "export";
// Parsing
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("gametypes", $gametypes);
$smarty->assign("submitted", get_post('submitted'));
$smarty->assign("exported_bans", isset($data) ? $data : "");
$smarty->assign("include_reason", isset($reason) ? $reason : "");
$smarty->assign("gtype", $gtype);
$smarty->assign("bantype", $bantype);
$smarty->display('main_header.tpl');
$smarty->display('export_bans.tpl');
$smarty->display('main_footer.tpl');
Beispiel #13
0
    include "{$config->error_handler_path}";
}
$resource = mysql_query("SELECT admins.id, admins.access, admins.nickname, players.last_seen\r\n    FROM {$config->amxadmins} AS admins\r\n\tLEFT JOIN bio_players AS players ON BINARY admins.nickname = players.nick\r\n\tWHERE ashow = '1' AND is_active = '1'\r\n    ORDER BY access, id ASC") or die(mysql_error());
while ($result = mysql_fetch_object($resource)) {
    $time = $result->last_seen;
    if ($time) {
        $date = date("d-m-Y [H:i]", $time);
    } else {
        $date = "(более мес¤ца назад)";
    }
    $amxadmins_info = array("access" => $result->access, "nickname" => $result->nickname, "time" => $date);
    $amxadmins_array[] = $amxadmins_info;
}
/*
 *
 * Template parsing
 *
 */
$title = "Serveradmins";
$section = "Serveradmins";
$smarty = new dynamicPage();
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("working_title", "home");
$smarty->assign("dir", $config->document_root);
$smarty->assign("amxadmin", isset($amxadmins_array) ? $amxadmins_array : "");
$smarty->display('main_header.tpl');
$smarty->display('admins_list.tpl');
$smarty->display('main_footer.tpl');
Beispiel #14
0
            $any_outdated = true;
        }
    } else {
        $outdated = 0;
    }
    // Asign variables to the array used in the template
    $server_info = array("id" => $result->id, "timestamp" => $result->timestamp, "hostname" => $result->hostname, "address" => $result->address, "gametype" => $result->gametype, "rcon" => $result->rcon, "plugin" => $plugver[0], "version" => $plugver[1], "amxban_version" => $result->amxban_version, "amxban_motd" => $result->amxban_motd, "motd_delay" => $result->motd_delay, "amxban_menu" => $result->amxban_menu, "outdated" => $outdated);
    $server_array[] = $server_info;
}
/////////////////////////////////////////////////////////////////
//	Template parsing
/////////////////////////////////////////////////////////////////
$title = "Banlist";
$section = "servers";
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("update_url", $config->update_url);
$smarty->assign("any_outdated", $any_outdated);
$smarty->assign("servers", $server_array);
$smarty->assign("reasons", isset($reason_array) ? $reason_array : NULL);
$smarty->assign("version_checking", $config->version_checking);
$smarty->assign("edit", isset($_POST['edit']) ? $_POST['edit'] : NULL);
$smarty->assign("serverdetails", isset($serverdetails_array) ? $serverdetails_array : NULL);
$smarty->assign("list_reasons", isset($_POST['list_reasons']) ? $_POST['list_reasons'] : NULL);
$smarty->assign("action", get_post('action'));
$smarty->assign("id", isset($_POST['id']) ? $_POST['id'] : NULL);
$smarty->assign("gametype", isset($_POST['gametype']) ? $_POST['gametype'] : NULL);
Beispiel #15
0
                $duration = lang("_PERMANENT");
            } else {
                $duration = "{$duration}" . lang("_MINS");
            }
            // Asign variables to the array used in the template
            $unban_info = array("bid" => $bid, "date" => $date, "player_id" => $player_id, "player_ip" => $player_ip, "player" => $player, "admin" => $admin, "reason" => $reason, "duration" => $duration);
            $unban_array[] = $unban_info;
        }
        $history = TRUE;
    }
}
/****************************************************************
* Template parsing						*
****************************************************************/
$title = lang("_BANDETAILS");
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("working_title", "home");
$smarty->assign("dir", $config->document_root);
$smarty->assign("display_search", $config->display_search);
$smarty->assign("display_admin", $config->display_admin);
$smarty->assign("display_reason", $config->display_reason);
$smarty->assign("ban_info", isset($ban_info) ? $ban_info : "");
$smarty->assign("unban_info", isset($unban_info) ? $unban_info : "");
$smarty->assign("history", isset($history) ? $history : "");
$smarty->assign("bhans", isset($unban_array) ? $unban_array : "");
$smarty->assign("parsetime", isset($parsetime) ? $parsetime : "");
$smarty->display('main_header.tpl');
$smarty->display('ban.tpl');
$smarty->display('main_footer.tpl');
Beispiel #16
0
        }
        // Asign variables to the array used in the template
        $exban_info = array("ex_gametype" => $ex_gametype, "bhid" => $bhid, "ex_date" => $ex_date, "ex_player" => $ex_player, "ex_admin" => $ex_admin, "ex_reason" => $ex_reason, "ex_duration" => $ex_duration, "ex_bancount" => $ex_bancount);
        $exban_array[] = $exban_info;
    }
}
/****************************************************************
* Template parsing
****************************************************************/
// Header
$title = lang("_SEARCH");
// Section
$section = "search";
// Parsing
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("dir", $config->document_root);
$smarty->assign("fancy_layers", $config->fancy_layers);
$smarty->assign("display_reason", $config->display_reason);
$smarty->assign("display_search", $config->display_search);
$smarty->assign("display_admin", $config->display_admin);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("section", $section);
$smarty->assign("admins", $admin_array);
$smarty->assign("servers", $server_array);
$smarty->assign("bans", isset($ban_array) ? $ban_array : NULL);
$smarty->assign("exbans", isset($exban_array) ? $exban_array : NULL);
if (isset($_POST['nick'])) {
    $smarty->assign("nick", $_POST['nick']);
} else {
Beispiel #17
0
        $player_info = array("name" => $player[name], "frag" => $player[frag], "time" => $player[time], "ping" => $player[ping], "cc" => $cc, "cn" => $cn);
        $player_array[] = $player_info;
    }
}
/*
 *
 * 		Template parsing
 *
 */
// Header
$title = "Live Server Status";
// Section
$section = "live";
// Parsing
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("browser", $browser);
$smarty->assign("live_player_ban", get_post('live_player_ban'));
$smarty->assign("geoip", $config->geoip);
$smarty->assign("s", $sid);
$smarty->assign("servers", $servers_array);
$smarty->assign("server", $server_array);
$smarty->assign("addons", $addons_array);
$smarty->assign("players", isset($player_array) ? $player_array : NULL);
$smarty->assign("empty_result", isset($empty_result) ? $empty_result : NULL);
$smarty->assign("post", $_POST);
$smarty->display('main_header.tpl');
Beispiel #18
0
            $checked_dirs = 3;
        }
    }
}
/*
 *
 * 		Template parsing
 *
 */
// Header
$title = lang("_AMXBANSCONFIG");
// Section
$section = "config";
// Parsing
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("cfg", $config);
$smarty->assign("post", $_POST);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("dblogin", $dblogin);
$smarty->assign("checked_dirs", isset($checked_dirs) ? $checked_dirs : NULL);
$smarty->assign("doc_root_is_dir", isset($doc_root_is_dir) ? $doc_root_is_dir : NULL);
$smarty->assign("path_root_is_dir", isset($path_root_is_dir) ? $path_root_is_dir : NULL);
$smarty->assign("dir_import_is_dir", isset($dir_import_is_dir) ? $dir_import_is_dir : NULL);
$smarty->assign("dir_template_is_dir", isset($dir_template_is_dir) ? $dir_template_is_dir : NULL);
$smarty->display('main_header.tpl');
$smarty->display('cfg.tpl');
$smarty->display('main_footer.tpl');
Beispiel #19
0
        }
        // Asign variables to the array used in the template
        $exban_info = array('ex_gametype' => $ex_gametype, 'bhid' => $bhid, 'ex_date' => $ex_date, 'ex_player' => $ex_player, 'ex_admin' => $ex_admin, 'ex_reason' => $ex_reason, 'ex_duration' => $ex_duration, 'ex_bancount' => $ex_bancount);
        $exban_array[] = $exban_info;
    }
}
/****************************************************************
* Template parsing
****************************************************************/
// Header
$title = lang('_SEARCH');
// Section
$section = 'search';
// Parsing
$smarty = new dynamicPage();
$smarty->assign('meta', '');
$smarty->assign('title', $title);
$smarty->assign('dir', $config->document_root);
$smarty->assign('fancy_layers', $config->fancy_layers);
$smarty->assign('display_reason', $config->display_reason);
$smarty->assign('display_search', $config->display_search);
$smarty->assign('isplay_admin', $config->display_admin);
$smarty->assign('this', $_SERVER['PHP_SELF']);
$smarty->assign('section', $section);
$smarty->assign('admins', $admin_array);
$smarty->assign('servers', $server_array);
$smarty->assign('bans', isset($ban_array) ? $ban_array : NULL);
$smarty->assign('exbans', isset($exban_array) ? $exban_array : NULL);
if (isset($_GET['q'])) {
    $smarty->assign('nick', $_GET['q']);
}
Beispiel #20
0
    }
    if ($j != 0) {
        $now = date("U");
        $k = $i - $j;
        $add_log = mysql_query("INSERT INTO {$config->logs} (timestamp, ip, username, action, remarks) VALUES ('{$now}', '" . $_SERVER['REMOTE_ADDR'] . "', '" . $_SESSION['uid'] . "', 'prune bans', 'Pruded {$k} bans and made {$j} bans permanent (max offenses reached)')") or die(mysql_error());
    }
}
//echo "Number of bans with $config->autopermban_count or more bans: $j<br>";
//echo "Number of bans moved to ban history table: $i<br>";
// Check how many (if any) bans are up for pruning
$resource = mysql_query("SELECT COUNT(bid) AS prune_bans FROM {$config->bans} WHERE ban_created + ban_length*60 < UNIX_TIMESTAMP() AND ban_length != 0") or die(mysql_error());
$result = mysql_fetch_object($resource);
$res2 = mysql_query("SELECT COUNT(banid) AS prune2 FROM `superban` WHERE unbantime < UNIX_TIMESTAMP()") or die(mysql_error());
$res2 = mysql_fetch_object($res2);
/////////////////////////////////////////////////////////////////
//	Template parsing
/////////////////////////////////////////////////////////////////
$title = lang("_PRUNEDB");
// Section
$section = "prune";
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("bans2prune", $result->prune_bans);
$smarty->assign("bans2prune2", $res2->prune2);
$smarty->display('main_header.tpl');
$smarty->display('prune_db.tpl');
$smarty->display('main_footer.tpl');
Beispiel #21
0
                $add_log = mysql_query("INSERT INTO {$config->logs} (timestamp, ip, username, action, remarks) VALUES ('{$now}', '" . $_SERVER['REMOTE_ADDR'] . "', '" . $_SESSION['uid'] . "', 'edit ban', 'Ban with BanID " . $_POST['bhid'] . " edited')") or die(mysql_error());
                $url = "{$config->document_root}" . "/ban_search.php";
                $delay = "0";
                //echo "Edited bid ".$_POST['bid'].". Redirecting...";
                echo "<meta http-equiv=\"refresh\" content=\"" . $delay . ";url='http://" . $_SERVER["HTTP_HOST"] . "{$url}'\">";
                exit;
            }
        }
    }
}
/*
 *
 *		Template parsing
 *
 */
$title = "Edit bandetails";
// Section
$section = "config";
$smarty = new dynamicPage();
$smarty->assign("section", $section);
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("action", isset($_POST['action']) ? $_POST['action'] : "");
$smarty->assign("bid", isset($_POST['bid']) ? $_POST['bid'] : "");
$smarty->assign("bhid", isset($_POST['bhid']) ? $_POST['bhid'] : "");
$smarty->assign("ban_info", $ban_info);
$smarty->display('main_header.tpl');
$smarty->display('edit_ban_ex.tpl');
$smarty->display('main_footer.tpl');
        }
        if ($config->show_kick_count == "1") {
            $ban_row["kick_count"] = $result->ban_kicks;
            $ban_page["show_kicks"] = 1;
        }
        if ($config->show_demo_count == "1") {
            $ban_row["demo_count"] = sql_get_files_count($result->bid);
            $ban_page["show_demos"] = 1;
        }
        if ($config->show_comment_count == "1") {
            $ban_row["comment_count"] = sql_get_comments_count($result->bid);
            $ban_page["show_comments"] = 1;
        }
        $ban_list[] = $ban_row;
    }
    $smarty->assign("ban_list", $ban_list);
    $smarty->assign("ban_page", $ban_page);
}
//ban delete
if (isset($_POST["del_ban_x"]) && isset($_POST["bid"])) {
    //get all uploaded files for the ban and delete it
    $query = mysql_query("SELECT `id`,`demo_file` FROM `" . $config->db_prefix . "_files` WHERE `bid`=" . $bid) or die(mysql_error());
    while ($result = mysql_fetch_object($query)) {
        if (file_exists("include/files/" . $result->demo_file)) {
            //delete the file(s)
            if (file_exists("include/files/" . $result->demo_file . "_thumb")) {
                unlink("include/files/" . $result->demo_file . "_thumb");
            }
            if (unlink("include/files/" . $result->demo_file)) {
                //if file deleted, remove db entry
                $query2 = mysql_query("DELETE FROM `" . $config->db_prefix . "_files` WHERE `id`=" . $result->id . " LIMIT 1") or die(mysql_error());
Beispiel #23
0
    } else {
        $import_array = ban_file($my_uploader->file['name']);
    }
}
if (isset($acceptable_file_types) && trim($acceptable_file_types)) {
    $submit = "This form only accepts <b>" . str_replace("|", " or ", $acceptable_file_types) . "</b> files &nbsp;&nbsp;<input type='submit' name='importit' value='" . lang("_IMPORT") . "' style='font-family: verdana, tahoma, arial; font-size: 10px;'>";
} else {
    $submit = "No acceptable filetypes set.&nbsp;&nbsp;<input type='submit' name='importit' value='" . lang("_IMPORT") . "' style='font-family: verdana, tahoma, arial; font-size: 10px;' disabled>";
}
/****************************************************************
* Template parsing
****************************************************************/
// Header
$title = lang("_IMPORT");
// Section
$section = "import";
// Parsing
//$config->logs
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("filename", $upload_file_name);
$smarty->assign("submit", $submit);
$smarty->assign("submitted", get_post('submitted'));
$smarty->assign("import", isset($import_array) ? $import_array : "");
$smarty->display('main_header.tpl');
$smarty->display('import_bans.tpl');
$smarty->display('main_footer.tpl');
Beispiel #24
0
            //	$current .= $amxadmins_array;
            //	file_put_contents($file, $current);
        }
    }
}
//echo "<pre>";
//print_r($webadmins_array);
//echo "</pre>";
/*
 *
 * Template parsing
 *
 */
$title = lang("_SERVERADMINS");
$section = "admins_levels";
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("sektion", $sektion);
$smarty->assign("action", isset($action) ? $action : "");
$smarty->assign("level", isset($level_array) ? $level_array : "");
$smarty->assign("existing_levels", isset($existing_levels) ? $existing_levels : "");
$smarty->assign("available_levels", isset($available_levels) ? $available_levels : "");
$smarty->assign("webadmin", isset($webadmins_array) ? $webadmins_array : "");
$smarty->assign("amxadmin", isset($amxadmins_array) ? $amxadmins_array : "");
$smarty->display('main_header.tpl');
$smarty->display('admins_levels.tpl');
$smarty->display('main_footer.tpl');
	If not, see <http://creativecommons.org/licenses/by-nc-sa/2.0/>.
*/
session_start();
require_once "include/config.inc.php";
require_once "include/access.inc.php";
require_once "include/menu.inc.php";
require_once "include/steam.inc.php";
require_once "include/sql.inc.php";
require_once "include/logfunc.inc.php";
require_once "include/functions.inc.php";
// Template generieren
$title = "_TITLEADMINLIST";
$smarty = new dynamicPage();
//get all amxadmins
$admins = sql_get_amxadmins_list();
$smarty->assign("admins", $admins);
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("version_web", $config->v_web);
// amxbans.css available in design? if not, take default one.
if (file_exists("templates/" . $config->design . "/amxbans.css")) {
    $smarty->assign("design", $config->design);
}
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("menu", $menu);
$smarty->assign("banner", $config->banner);
$smarty->assign("banner_url", $config->banner_url);
$smarty->display('main_header.tpl');
$smarty->display('admin_list.tpl');
$smarty->display('main_footer.tpl');
Beispiel #26
0
}
if (isset($_POST['action']) && $_POST['action'] == "edit") {
    $update = mysql_query("UPDATE {$config->amxdemos} SET demo = '" . $_POST['demo'] . "', comment = '" . $_POST['comment'] . "' WHERE id = '" . $_POST['did'] . "'") or die(mysql_error());
    $url = "{$config->document_root}";
    $delay = "2";
    echo lang("_DEMO_UPDATED") . "<br>";
    echo lang("_REDIRECT");
    echo "<meta http-equiv=\"refresh\" content=\"" . $delay . ";url='http://" . $_SERVER["HTTP_HOST"] . "{$url}/admin/demo.php?bid={$did}'\">";
    exit;
}
/*
 *
 * 		Template parsing
 *
 */
// Header
$title = lang("_DEMOCP");
// Section
$section = "demos";
// Parsing
$smarty = new dynamicPage();
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("section", $section);
$smarty->assign("dir", $config->document_root);
$smarty->assign("this", $_SERVER['PHP_SELF']);
$smarty->assign("bid", $did);
$smarty->assign("demos", $demos);
$smarty->display('main_header.tpl');
$smarty->display('demo.tpl');
$smarty->display('main_footer.tpl');
                $result = $result2;
            }
            //make array
            $ban_row = array("bid" => $result->bid, "player_ip" => $result->player_ip, "player_id" => $result->player_id, "player_comid" => $steamcomid, "player_nick" => html_safe($result->player_nick), "admin_ip" => $result->admin_ip, "admin_id" => $result->admin_id, "admin_nick" => html_safe($result->admin_nick), "ban_type" => $result->ban_type, "ban_reason" => html_safe($result->ban_reason), "ban_created" => $result->ban_created, "ban_length" => $result->ban_length, "ban_end" => $result->ban_created + $result->ban_length * 60, "server_ip" => $result->server_ip, "server_name" => html_safe($result->server_name), "bancount" => $result->bancount);
            $count++;
            if ($result->expired == 0) {
                $ban_list_aktiv[] = $ban_row;
                $count_aktiv++;
            } else {
                $ban_list_exp[] = $ban_row;
                $count_exp++;
            }
        }
    }
    //echo "DEBUG: ".$count_aktiv."/".$count_exp.":".$search_query;
    $smarty->assign("ban_list_aktiv", $ban_list_aktiv);
    $smarty->assign("ban_list_aktiv_count", $count_aktiv);
    $smarty->assign("ban_list_exp", $ban_list_exp);
    $smarty->assign("ban_list_exp_count", $count_exp);
    $smarty->assign("search_done", 1);
}
$smarty->assign("amxadmins", $amxadmins);
$smarty->assign("admins", $admins);
$smarty->assign("servers", $servers);
//$smarty->assign("reasons",$reasons);
$smarty->assign("meta", "");
$smarty->assign("title", $title);
$smarty->assign("version_web", $config->v_web);
// amxbans.css available in design? if not, take default one.
if (file_exists("templates/" . $config->design . "/amxbans.css")) {
    $smarty->assign("design", $config->design);