Хаки на Xbtit

Тема в разделе "Торрент Трекеры", создана пользователем Glava, 5 янв 2013.

  1. Glava

    Glava

    Регистрация:
    25 авг 2012
    Сообщения:
    45
    Симпатии:
    8
    Юзер аватар в комментариях:
    ==[details.php]==
    Ищем:
    Код:
    $subres = do_sqlquery("SELECT c.id, text, UNIX_TIMESTAMP(added) as data, user, u.id as uid FROM {$TABLE_PREFIX}comments c LEFT JOIN {$TABLE_PREFIX}users u ON c.user=u.username WHERE info_hash = '" . $id . "' ORDER BY added DESC");
    Заменяем на:
    Код:
    $subres = do_sqlquery("SELECT avatar, c.id, text, UNIX_TIMESTAMP(added) as data, user, u.id as uid FROM {$TABLE_PREFIX}comments c LEFT JOIN {$TABLE_PREFIX}users u ON c.user=u.username WHERE info_hash = '" . $id . "' ORDER BY added DESC");
    
    Ищем:
    Код:
    $comments[$count]["user"]="<a href=\"index.php?page=userdetails&amp;id=".$subrow["uid"]."\">" . unesc($subrow["user"]);

    Ниже добавляем:
    Код:
    $comments[$count]["avatar"]="<img width=100 border=0 src=".($subrow["avatar"]).">";


    ==[torrent.details.tpl]==
    Ищем:
    Код:
    <td class="header"><tag:comments[].user />

    Выше добавляем:
    Код:
    <tag:comments[].avatar /></td>


    находим :
    Код:
    <tr>
    		  <td class="header"><tag:comments[].user /></td>
    		  <td class="header"><tag:comments[].date /></td>
    		  <td class="header" align="right"><tag:comments[].delete /></td>
    		</tr>
    		<tr>
    		  <td colspan="3" class="lista" align="center"><tag:comments[].comment /></td>
    		</tr>
    меняем на :
    Код:
    <tr>	   
    <td width="100" class="header"><tag:comments[].user /></td>
    		  <td  class="header"><tag:comments[].date /></td>
    		  <td align="right" class="header"><tag:comments[].delete /></td>
    		</tr>
    		<tr>
    		<td class="lista"><tag:comments[].avatar /></td>
    		  <td colspan="3" align="center" valign="top" class="lista"><tag:comments[].comment /></td>
    		</tr>
    Блок последних комментариев к торрентам:
    Код:
    <?php
    global $db_prefix, $btit_settings;
     
    	block_begin("Last Torrent Comments");
     
    		$mq=mysql_query("SELECT c.added,c.user,c.info_hash, f.filename, u.id FROM xbtit_comments c LEFT JOIN  xbtit_files f ON c.info_hash=f.info_hash LEFT JOIN  xbtit_users u ON u.username=c.user  ORDER BY added DESC LIMIT 5");
     
    		   
    		print("<table class=\"lista\" width=\"100%\" align=\"center\" cellpadding=\"4\" cellspacing=\"4\">");
     
    			while ($rq=mysql_fetch_assoc($mq))
    			{
     
    				print("<tr><td class=\"lista\">");
     
     
    						print(image_or_link("images/multipage.gif","","")."&nbsp;");
     
    print("<b><a href=\"index.php?page=torrent-details&id=".$rq["info_hash"]."#comments\">".$rq["filename"]."</a></b><br />");
    						print("<span>&#1054;&#1090; <a href=index.php?page=userdetails&id=".$rq["id"].">".$rq["user"]."</a> &#1074; ".date("d/m/Y H:i:s", strtotime($rq["added"]))."</span></td>");
     
    				}
     
    		print("</tr></table>");
    	   
    	block_end();
    ?>