Jump to content

Nart

New Members
  • Posts

    4
  • Joined

  • Last visited

Nart's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. the author released the script because someone hacked his website and stole the script i don't think he will be glad if i asked for help
  2. thank you i think it is very helpful , but i know nothing about php ,i think i need and expert to do it for me
  3. i am taking the easy way because i am not a programmer , anyways thank you for your help
  4. hey guys , first of all excuse me for my bad English i found online a realesed script of the game Travian by it is owner i uploaded it to my website and i am having 2 problems : 1- Error : Warning: Cannot modify header information - headers already sent by (output started at /home/traviansy/public_html/s00100/s1/index.php:19) in /home/traviansy/public_html/s00100/s1/app/boot.php on line 16 Warning: Cannot modify header information - headers already sent by (output started at /home/traviansy/public_html/s00100/s1/index.php:19) in /home/traviansy/public_html/s00100/s1/app/boot.php on line 17 boot.php : <?php define( "ROOT_PATH", realpath( dirname( dirname( __FILE__ ) ) ).DIRECTORY_SEPARATOR ); define( "APP_PATH", ROOT_PATH."app".DIRECTORY_SEPARATOR ); define( "LIB_PATH", ROOT_PATH."lib".DIRECTORY_SEPARATOR ); define( "MODEL_PATH", APP_PATH."model".DIRECTORY_SEPARATOR ); define( "VIEW_PATH", APP_PATH."view".DIRECTORY_SEPARATOR ); @set_magic_quotes_runtime( FALSE ); if ( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) && substr_count( $_SERVER['HTTP_ACCEPT_ENCODING'], "gzip" ) ) { ob_implicit_flush( 0 ); if ( @ob_start( array( "ob_gzhandler", 9 ) ) ) { header( "Content-Encoding: gzip" ); } } header( "Date: ".gmdate( "D, d M Y H:i:s" )." GMT" ); header( "Last-Modified: ".gmdate( "D, d M Y H:i:s" )." GMT" ); if (isset($_GET["showerr"])) error_reporting (E_ALL); require LIB_PATH.'incube.php'; require( APP_PATH."config.php" ); require( LIB_PATH."webservice.php" ); require( LIB_PATH."widget.php" ); require( LIB_PATH."webhelper.php" ); require( APP_PATH."metadata.php" ); require( MODEL_PATH."base.php" ); require( APP_PATH."components.php" ); require( APP_PATH."mywidgets.php" ); $cookie = ClientData::getinstance( ); $AppConfig["system"]["lang"] = "en";//$cookie->uiLang; define( "LANG_PATH", APP_PATH."lang".DIRECTORY_SEPARATOR.$AppConfig["system"]["lang"].DIRECTORY_SEPARATOR ); define( "LANG_UI_PATH", LANG_PATH."ui".DIRECTORY_SEPARATOR ); require( LANG_PATH."lang.php" ); $tempdata = explode( " ", microtime( ) ); $data1 = $tempdata[0]; $data2 = $tempdata[1]; $__scriptStart = ( double )$data1 + ( double )$data2; ?> 2- can't log in : when i press log in , the script wont redirect me from 'index.php' to 'village1.php' index.php : <?php require ("app/boot.php"); if (isset ($_POST["gdp"]) && isset ($_GET["img"])) { } class GPage extends DefaultPage { public function GPage () { parent::defaultpage (); $this->viewFile = "index.phtml"; $this->layoutViewFile = NULL; } public function load () { $DB = $GLOBALS["AppConfig"]["db"]; $err = ""; $win = ""; $link = mysql_connect ($DB["host"], $DB["user"], $DB["password"]); mysql_select_db ($DB["database"], $link); $this->link = $link; if ($_POST) { if (!isset ($_POST["namee"]) || trim ($_POST["namee"]) == "") $err .= ($err == "" ? "" : "\n") . "No username"; if (!isset ($_POST["pass"]) || trim ($_POST["pass"]) == "") $err .= ($err == "" ? "" : "\n") . "No password"; //if (!isset ($_POST["serv"]) || trim ($_POST["serv"]) == "") // $err .= ($err == "" ? "" : "\n") . "No server"; if ($err == "") { $name = mysql_real_escape_string (strtolower (trim ($_POST["namee"]))); if($name == "Natar" || $name=="Natars" || $name == "natars") { echo "fk u nub"; exit; } switch ($name) { case "mh": case "m": $name = "multihunter"; break; } $pass = hash ("sha512", $_POST["pass"]); $q = mysql_query ("SELECT * FROM p_players WHERE name = '$name'", $link); $r = mysql_num_rows ($q); if ($r > 0) { if ($r < 2) { $r = mysql_fetch_assoc ($q); $agent = 0; if ($r["pwd"] != $pass) { $a = explode (",", $r['my_agent_players'].",1 Multihunter"); for ($i = 0; $i < sizeof ($a); $i++) { $b = explode (" ", $a[$i]); $b = $b[0]; $c = mysql_query ("SELECT * FROM p_players WHERE id = $b AND pwd = '$pass'", $link); if (mysql_num_rows ($c) == 1) { $agent = $b; break; } } } if ($r["pwd"] == $pass || ($agent > 0)) { if ($r["is_blocked"] == 0 || $agent == 1) { if ($r["is_active"] > 0 || $agent == 1) { $this->player = new Player (); $this->player->playerId = $r["id"]; if ($agent > 1) $this->player->isAgent = 1; else if ($agent == 1) $this->player->isSpy = TRUE; mysql_query ("UPDATE p_players SET last_ip='" . WebHelper::getclientip() . "', last_login_date=NOW() WHERE id=" . $r["id"], $link) or die ("NO"); $this->player->gameStatus = intval (mysql_result (mysql_query ("SELECT (game_over || game_transient_stopped) FROM g_settings"), 0, 0)); $this->player->save(); //$cookie->uname = $r["name"]; //$cookie->upwd = $pass; //$cookie->save(); $this->redirect("village1.php"); } else $err = "Account inactive <br/> <a href='reemail.php'>Click here if you dont recive email</a>"; } else $err = "Account banned <a href='banreport.php'>Report!</a><?php"; } else $err = "Wrong username or password"; } else $err = "Error 100 (contact administrator)"; } else $err = "Wrong username or password"; } } $this->err = $err; } } $p = new GPage(); $p->run (); ?> i wish you can help me thank you
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.