1. Соблюдайте Правила форума и проявляйте уважение к другим участникам беседы.

Help =)

Тема в разделе 'Запуск и Поддержка', создана пользователем -FrozenThunder-, 29 июл 2011.

  1. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    Hi all, im new in this forum, im not speak Russian and English, i speak spanish, im know something of English..

    I need this things, to add mi page ( dotastats.com.ar )

    -Colorize Top.php ( i finded, but i losed and no find now! :S )

    -Add "Actually Admins" in bans.php like this ( anurion.com.ar/3dgbans.php )

    and i need to add boton "Restablecer" in Search with captcha (LongMan´s Code)

    thanks all!
    and sorry for mi bad english :p.
  2. ____ROB____ Старожила

    Сообщения:
    1.008
    Спасибы:
    22
    Сборка бота GHost:
    Ghost One 1.5
    top
  3. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    Thanks ___ROB___ ! :D
    and have an idea to do it Currently Admins?

    EDIT: i finded the top.php =), and ___ROB___ give me game.php, thanks again
  4. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    "Actually Admins"
    You sure need this?? Why?? AutoBan dont work correctly?
  5. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    I need it.- thanks for reply!
  6. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    I can give only inquiry in a database
    Have many admins??
  7. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    Yes, i share the database with a friend.., but i only want see mi admins (botid 2)! thanks

    edit: somebody can help me with the botid fix?
    the admins of mi friend, can host with mi bot, and mi admins can host with he bot SS;;SS;S
  8. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    :lol: :lol: :lol:
    How many admins you have???
    5? 10?
  9. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    Ohh... fck I see many)))
    w8
  10. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
  11. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    XD!
    the last thing

    look this code for show Normal Games

    -------- NGAMES.PHP ---------

    Код:
    <?php
    /*********************************************
    <!-- 
    *   	DOTA OPENSTATS
    *   
    *	Developers: Ivan.
    *	Contact: ivan.anta@gmail.com - Ivan
    *
    *	
    *	Please see http://openstats.iz.rs
    *	and post your webpage there, so I know who's using it.
    *
    *	Files downloaded from http://openstats.iz.rs
    *
    *	Copyright (C) 2010  Ivan
    *
    *
    *	This file is part of DOTA OPENSTATS.
    *
    * 
    *	 DOTA OPENSTATS is free software: you can redistribute it and/or modify
    *    it under the terms of the GNU General Public License as published by
    *    the Free Software Foundation, either version 3 of the License, or
    *    (at your option) any later version.
    *
    *    DOTA OPEN STATS 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.  See the
    *    GNU General Public License for more details.
    *
    *    You should have received a copy of the GNU General Public License
    *    along with DOTA OPENSTATS.  If not, see <http://www.gnu.org/licenses/>
    *
    -->
    **********************************************/
    
      include('header.php');
      
      $pageTitle = "$lang[normal_games]";
      
      if ($FiltersOnGamePage == 1) {
      if (isset($_POST["years"])) {$sql_year = "AND YEAR(datetime) = '".safeEscape($_POST["years"])."'";} 
      else $sql_year = "";
      if (isset($_POST["months"])) {$sql_month = "AND MONTH(datetime) = '".safeEscape($_POST["months"])."'";}
      else   $sql_month = "";
      if (isset($_POST["days"]) AND $_POST["days"]>0) 
      {$sql_day = "AND DAYOFMONTH(datetime) = '".safeEscape($_POST["days"])."'";} 
      else $sql_day = "";
      if (isset($_GET["y"])) {$sql_year = "AND YEAR(datetime) = '".safeEscape($_GET["y"])."'";} 
      if (isset($_GET["m"])) {$sql_month = "AND MONTH(datetime) = '".safeEscape($_GET["m"])."'";}
      if (isset($_GET["d"]) AND $_GET["d"]>0) 
      {$sql_day = "AND DAYOFMONTH(datetime) = '".safeEscape($_GET["d"])."'";} 
      } else {$sql_year =""; $sql_month =""; $sql_day=""; }
      $sql = "SELECT COUNT(*) FROM games 
      WHERE map NOT LIKE '%dota%' 
      $sql_year $sql_month $sql_day
      LIMIT 1";
      
      $result = $db->query($sql);
      $r = $db->fetch_row($result);
      $numrows = $r[0];
      $result_per_page = $games_per_page;
      $order = 'id';
      if (isset($_GET['order']))
      {
      if ($_GET['order'] == 'game') {$order = ' LOWER(gamename) ';}
      if ($_GET['order'] == 'duration') {$order = ' duration ';}
      if ($_GET['order'] == 'type') {$order = ' type ';}
      if ($_GET['order'] == 'date') {$order = ' datetime ';}
      if ($_GET['order'] == 'creator') {$order = ' LOWER(creatorname) ';}
      }
      $sort = 'DESC';
      if (isset($_GET['sort']) AND $_GET['sort'] == 'asc')
      {$sort = 'desc'; $sortdb = 'ASC';} else {$sort = 'asc'; $sortdb = 'DESC';}
    	if ($FiltersOnGamePage == 1) {
    	require_once('./includes/get_games_filter.php');
    	}
        include('pagination.php');
      $sql = "SELECT 
              g.id, map, datetime, gamename, ownername, duration, creatorname, dg.winner, 
    		  CASE WHEN(gamestate = '17') THEN 'PRIV' ELSE 'PUB' end AS type 
    		  FROM games as g 
    		  LEFT JOIN dotagames as dg ON g.id = dg.gameid 
    		  WHERE map NOT LIKE '%dota%' $sql_year $sql_month $sql_day
    		  ORDER BY $order $sortdb 
    		  LIMIT $offset, $rowsperpage";
      
      $result = $db->query($sql);
      
      ?><div align='center'><table class='tableA'> 
      <tr>
      <th class='tableD'><div align='left'>
      <a href='<?=$_SERVER['PHP_SELF']?>?order=game&sort=<?=$sort?>'><?=$lang["game"]?></a></div></th>
      
      <th><div align='left'>
      <a href='<?=$_SERVER['PHP_SELF']?>?order=duration&sort=<?=$sort?>'><?=$lang["duration"]?></a></div></th>
      
      <th><div align='left'>
      <a href='<?=$_SERVER['PHP_SELF']?>?order=type&sort=<?=$sort?>'><?=$lang["map"]?></a></div></th>
      
      <th><div align='left'>
      <a href='<?=$_SERVER['PHP_SELF']?>?order=date&sort=<?=$sort?>'><?=$lang["date"]?></a></div></th>
      
      <th>
      <a href='<?=$_SERVER['PHP_SELF']?>?order=creator&sort=<?=$sort?>'><?=$lang["creator"]?></a></th>
      </tr>
      <?php
      while ($list = $db->fetch_array($result,'assoc')) {
            $gameid=$list["id"]; 
    		$map=convEnt2(substr($list["map"], strripos($list["map"], '\\')+1));
    		$type=$list["type"];
    		$gametime=date($date_format,strtotime($list["datetime"]));
    		$gamename=trim($list["gamename"]);
    		$ownername=$list["ownername"];
    		$duration=secondsToTime($list["duration"]);
    		$creator=trim($list["creatorname"]);
    		$creator2=trim(strtolower($list["creatorname"]));
    	?><tr class='row'>
    	<td title='' class='tableD' width='300'>
    	<div align='left'><a href='ngame.php?gameid=<?=$gameid?>'><?=$gamename?></a></div></td>
    	<td width='160'><div align='left'><?=$duration?></div></td>
    	<td width='100'><div align='left'><?=substr($map, 0, -4);?></div></td>
    	<td width='200'><div align='left'><?=$gametime?></div></td>
    	<td width='200'><div align='left'><a href='user.php?u=<?=$creator2?>'><?=$creator?></a></div></td>
    	</tr>
    	<?php
      }
        ?></table></div><?php
      include('pagination.php');
      ?><br>
      <?php
      $pageContents = ob_get_contents();
      ob_end_clean();
      echo str_replace('<!--TITLE-->', $pageTitle, $pageContents);	
      include('footer.php');
      
      //Cache this page
      if ($cachePages == '1' AND $cacheAllGames == 1)
      file_put_contents($CacheTopPage, str_replace("<!--TITLE-->",$pageTitle,$pageContents));
      ?>

    -------- NGAME.PHP ---------

    Код:
    <?php
    /*********************************************
    <!-- 
    *   	DOTA OPENSTATS
    *   
    *	Developers: Ivan.
    *	Contact: ivan.anta@gmail.com - Ivan
    *
    *	
    *	Please see http://openstats.iz.rs
    *	and post your webpage there, so I know who's using it.
    *
    *	Files downloaded from http://openstats.iz.rs
    *
    *	Copyright (C) 2010  Ivan
    *
    *
    *	This file is part of DOTA OPENSTATS.
    *
    * 
    *	 DOTA OPENSTATS is free software: you can redistribute it and/or modify
    *    it under the terms of the GNU General Public License as published by
    *    the Free Software Foundation, either version 3 of the License, or
    *    (at your option) any later version.
    *
    *    DOTA OPEN STATS 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.  See the
    *    GNU General Public License for more details.
    *
    *    You should have received a copy of the GNU General Public License
    *    along with DOTA OPENSTATS.  If not, see <http://www.gnu.org/licenses/>
    *
    -->
    **********************************************/
    
       include('header.php');
       
       if (isset($_GET["gameid"]) AND is_numeric($_GET["gameid"]))
       {
       $gid=safeEscape($_GET["gameid"]);
    
       $pageTitle = $gamename;
      
      $sql = "
      SELECT creatorname, duration, datetime, gamename 
      FROM games WHERE id = '$gid'";
      $result = $db->query($sql);
      $replayDate = "";
      
       $list = $db->fetch_array($result,'assoc');
       		$creatorname=$list["creatorname"];
    		$duration=secondsToTime($list["duration"]);
    		$gametime=date($date_format,strtotime($list["datetime"]));
    		$gmtime = $list["datetime"];
    		$replayDate = $list["datetime"];
    		$gamename=$list["gamename"];
    		
       $replayDate =  strtotime($replayDate)+($replayTimeOffset*3600)+(0*60);  //3*3600 = +3 HOURS,   +0 minutes.
       $replayDate = date("Y-m-d H:i",$replayDate);
       //echo date("Y-m-d H:i",strtotime($replayDate));
       
       $gametimenew = substr(str_ireplace(":","-",date("Y-m-d H:i",strtotime($replayDate))),0,16);
       require_once('./includes/get_replay.php');
    
     
      //echo $replayloc;
    
     ?>     <table><tr>
            <th>
    	    <div class='padLeft' align='center'><?php echo 'Informacion del game:'." ". $gamename;?></div></th>
    		<th></th> <th></th> <th></th> </tr>
    		
            <tr>
            <td><?php echo $lang["game"]?>: <b><?php echo $gamename; ?></b></td>
    		<td><?php echo $lang["date"]?>: <b><?php echo $gametime; ?></b></td>
    		<td><?php echo $lang["creator"]?>: <b><?php echo $creatorname; ?></b></td>
    		<td><?php echo $lang["duration"]?>: <b><?php echo $duration; ?></b></td>
            </tr>
            </table>
    		
    		<table><tr>
    		            <th class='padLeft' width='150'><div align='center'><?=$lang["player"]?></div></th>
    					<th  width='60'><div align='left'><?=$lang["left_at"]?></div></th>
    					<th  width='100'><?=$lang["reason"]?></th>
    			  </tr>
    	  <?php
           $sql = getGameInfo($gid);
    	   $result = $db->query($sql);
    	   
    	   $scourge = 1;
    	   $sentinel = 1;
    	   while ($list = $db->fetch_array($result,'assoc')) {
    		
    	    $left=secondsToTime($list["left"]);
    		$leftreason=$list["leftreason"];
    		
    		$name=trim($list["name"]);
    		$name2=strtolower(trim($list["name"]));
    		$name3=trim($list["name"]);
    		$newcolour=$list["newcolour"];
    		$gameid=$list["gameid"]; 
    		$banname=$list["banname"];
    
    		//Trim down the leftreason
    		$leftreason = str_ireplace("has", "", $leftreason);
    		$leftreason = str_ireplace("was", "", $leftreason);
    		$leftreason = ucfirst(trim($leftreason));
    		$substring = strchr($leftreason, "(");
    		$leftreason = str_replace($substring, "", $leftreason);
    		
    		if ($win==0) {$_sentinel = $lang["looser"]; $_scourge = $lang["looser"];}
    		if ($win==1) {$_sentinel = "$lang[winner]"; $_scourge = "$lang[looser]";}
    		if ($win==2) {$_sentinel = "$lang[looser]"; $_scourge = "$lang[winner]";}	
    		if ($win==3) {$_sentinel = "$lang[winner]"; $_scourge = "$lang[looser]";}
    		if ($win==4) {$_sentinel = "$lang[winner]"; $_scourge = "$lang[looser]";}
    
    		if ($newcolour<=5) {$sent_kills += $kills;}
    		if($team1 == 1 AND $newcolour<=5){
    			$sentinel=0;
    			?><tr class='sentinelRow'>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td><span class='sentinelCol' ><?=$lang["Sentinel"]?></span></td>
    			<td><div align='left'><span class='sentinelCol'><?=$_sentinel?></span><div></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			</tr>
    			<?php
    			}
    		
    		if ($newcolour>5) {$scour_kills += $kills;}
    		
    		if($scourge == 1 AND $newcolour>5){
    			$scourge=0;
    			?><tr class='sentinelRow'>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td><span class='scourgeCol'><?=$lang["Scourge"]?></span></td>
    			<td><div align='left'><span  class='scourgeCol'><?=$_scourge?></span></div></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			<td></td>
    			</tr>
    			<?php
    			}
    			
    		if (empty($name2)) 
    		{$left="";$leftreason="";}	
    		
    		if (!empty($name2) OR $ShowAllSlotsInGame == 1) {
    		?><tr class='row'>
    		      <td><?=$name?></td>
    			  <td></td>
    			  <td></td>
    			  <td></td>
    			  <td></td>
    			  <td><div align='left'>
    			  </div>
    			  </td>
    			  
    			  <td><div align='left'><?=$left?></div></td>
    			  <td><div align='left'><span class='leftReason'><?=$leftreason?></span></div></td>
    			  
    			  </tr>
    			  <?php 
    			  }
    	   }
      ?></table>
      <table><tr>
       </tr></table><br>
      <?php
      } 
      $pageContents = ob_get_contents();
      ob_end_clean();
      echo str_replace('<!--TITLE-->', $pageTitle, $pageContents);		  
      include('footer.php');
      
      //Cache this page
      if ($cachePages == '1' AND $cacheAllGames == 1)
      file_put_contents($CacheTopPage, str_replace("<!--TITLE-->",$pageTitle,$pageContents));
      ?>
    I cant show any data games :S
  12. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
  13. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    $sql2 = "SELECT COUNT(id) as banbyadm FROM bans WHERE admin = '$name'";
    $result2 = $db->query($sql2);
    $list2 = $db->fetch_array($result2,'assoc');
    $bba = $list2['banbyadm'];


    U know php? You can make the small tablet what there saw?
    There is no now an access to a site, can't test with the tablet.
    But there you can thrust $name and $bba - that on what I have given you inquiry
  14. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    I Know very little, but can explain best? sorry.. :palevo:
  15. rost Гуру

    Сообщения:
    1.258
    Спасибы:
    150
    Сборка бота GHost:
    LtG
    Дата начала использования бота:
    01.11.2010
    Skype:
    Мой статус
    you sorry :newcry:
    Not have access to my site (for testing) :patsak:
  16. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
  17. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    Somebody can let me how to add "Bot" in games.php?
    i added the code of LongMan, but the page say
    "unkwnow table subnull in field list"
  18. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    Not work Rost, can help me? :newcry:
  19. -FrozenThunder- Ньюфаг

    Сообщения:
    21
    Спасибы:
    0
    Somebody can help me? :stenka: :stenka:
  20. Puwok Знакомый модера

    Сообщения:
    85
    Спасибы:
    0
    Сборка бота GHost:
    brt 1.8.8
    Дата начала использования бота:
    00.00.000
    help )) hi всем, у меня такой вопрос я сделал кто как по гайду appserv i OpenStats все работает вот токо !sd !statsdota и на сайте http://alkar.dyndns-at-home.com не показывает скок вин 1 и 2 клан токо баны и игры чё за ??? o_O