AmxBans

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
Iluminatii
Membru, skill +4
Membru, skill +4
Posts: 1539
Joined: 31 Mar 2014, 02:52
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Has thanked: 13 times
Been thanked: 13 times
Contact:

11 Jul 2015, 14:35

Am instalat amxbans si nu reusesc sa rezolv eroarea..
config.inc.php

Code: Select all

<?php

/*    

   AMXBans v6.0
   
   Copyright 2009, 2010 by SeToY & |PJ|ShOrTy

   This file is part of AMXBans.

    AMXBans is free software, but it's licensed under the
   Creative Commons - Attribution-NonCommercial-ShareAlike 2.0

    AMXBans is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    You should have received a copy of the cc-nC-SA along with AMXBans. 
   If not, see <http://creativecommons.org/licenses/by-nc-sa/2.0/>.

*/

// setting version - DO NOT EDIT THIS
$config->v_web = "6.0.3";

// if necessary - calling install procedure
if(file_exists("setup.php") && !file_exists("include/db.config.inc.php")) {
   header("Location: setup.php");
   exit;
}

//start counter for page load time
$page_starttime=explode(" ",microtime());

// If magic quotes are enabled, strip slashes from all user data
function stripslashes_recursive($var) {
   return (is_array($var) ? array_map('stripslashes_recursive', $var) : stripslashes($var));
}
if (get_magic_quotes_gpc()) {
   $_GET = stripslashes_recursive($_GET);
   $_POST = stripslashes_recursive($_POST);
   $_COOKIE = stripslashes_recursive($_COOKIE);
}

require_once("sql.inc.php");
require_once("db.config.inc.php");

//get ip from hostname
function getipbyhost($ip_host = "") {
   $value = $ip_host;

   $pattern['ipv4'] = '/^((\d|[1-9]\d|2[0-4]\d|25[0-5]|1\d\d)(?:\.(\d|[1-9]\d|2[0-4]\d|25[0-5]|1\d\d)){3})$/';
   $pattern['ipv6'] = '/^( (([0-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((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))| (::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d) |(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))| ([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})| (::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})| (([0-9A-Fa-f]{1,4}:){1,7}:) )$/';

   if( ($value != "") || ($value != "127.0.0.1") || !(preg_match($pattern['ipv4'],$value)) || !(preg_match($pattern['ipv6'],$value)) ) {
      return gethostbyname($value);
   } elseif($value == "localhost") {
      return "127.0.0.1";
   } else {
      return $value;
   }
}

//connect to db
try {
   $mysql      = mysql_connect($config->db_host,$config->db_user,$config->db_pass);

   try {
      $enc = mysql_query("SET CHARACTER SET 'utf-8'");
      $enc = mysql_query("SET NAMES 'utf8'");
   } catch (Exception $e) { }
   
   $resource   = mysql_select_db($config->db_db);
} catch (Exception $e) {
   trigger_error(mysql_error());
}

$config->importdir      = $config->path_root."/tmp";
$config->templatedir   = $config->path_root."/templates";
$config->langfilesdir   = $config->path_root."/language/";


//get websettings
$vars=sql_set_websettings();

//save current language to session
if(!$_SESSION["lang"]) $_SESSION["lang"]=$config->default_lang;

//load smilies to global array
if(empty($smilies)) {
   $sql = mysql_query("SELECT code, url, name FROM ".$config->db_prefix."_smilies ORDER BY id");
   while (list($code, $url, $name) = mysql_fetch_array($sql))
   {
      $name = stripslashes($name);
      $name = htmlentities($name);
      $smilies[]=array($code,$url,$name);
   }
}

//load bbcode tags to global array
if(empty($bbcodes)) {
   $sql = mysql_query("SELECT open_tag, close_tag, url, name FROM ".$config->db_prefix."_bbcode ORDER BY id");
   while (list($open_tag, $close_tag, $url, $name) = mysql_fetch_array($sql))
   {
      $name = stripslashes($name);
      $name = htmlentities($name);
      $bbcodes[]=array($open_tag,$close_tag,$url,$name);
   }
}

/* Smarty settings */
define("SMARTY_DIR", $config->path_root."/include/smarty/");

require_once(SMARTY_DIR."Smarty.class.php");

class dynamicPage extends Smarty {
   function dynamicPage() {

      global $config;

      $this->Smarty();

      $this->template_dir = $config->templatedir;
      $this->compile_dir   = SMARTY_DIR."templates_c/";
      $this->config_dir   = SMARTY_DIR."configs/";
      $this->cache_dir   = SMARTY_DIR."cache/";
      $this->caching      = false;
      
      //for editing templates it´s better "true", but slow down site load
      $this->force_compile = false;
      
      $this->assign("app_name","dynamicPage");
   }
}

Code: Select all

<?php

/*    

   AMXBans v6.0
   
   Copyright 2009, 2010 by SeToY & |PJ|ShOrTy

   This file is part of AMXBans.

    AMXBans is free software, but it's licensed under the
   Creative Commons - Attribution-NonCommercial-ShareAlike 2.0

    AMXBans is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    You should have received a copy of the cc-nC-SA along with AMXBans. 
   If not, see <http://creativecommons.org/licenses/by-nc-sa/2.0/>.

*/


session_start();

//check for existing config file
if(!file_exists("include/db.config.inc.php")) {
   header("Location: setup.php");
}

require_once("include/config.inc.php");
require_once("include/access.inc.php");

//start page loader
if(   $config->start_page == "" || $config->start_page == "index.php" || (!file_exists("$config->start_page"))) {
   header("Location:ban_list.php");
} else {
   header("Location:$config->start_page");
}
?>
si index

Eroarea:

Code: Select all

 Warning: Creating default object from empty value in /home/devilscs/public_html/bans/include/config.inc.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/devilscs/public_html/bans/include/config.inc.php:24) in /home/devilscs/public_html/bans/index.php on line 38
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 125 guests