View Single Post
  #2  
Old 15th September 2012, 04:40
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
try this one
PHP Code:
<?php
/*
*----------------------------phpMyBitTorrent V 2.0-beta4-----------------------*
*--- The Ultimate BitTorrent Tracker and BMS (Bittorrent Management System) ---*
*--------------   Created By Antonio Anzivino (aka DJ Echelon)   --------------*
*-------------               http://www.p2pmania.it               -------------*
*------------ Based on the Bit Torrent Protocol made by Bram Cohen ------------*
*-------------              http://www.bittorrent.com             -------------*
*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*
*--   This program 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 2 of the License, or      --*
*--   (at your option) any later version.                                    --*
*--                                                                          --*
*--   This program 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 this program; if not, write to the Free Software            --*
*-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA --*
*--                                                                          --*
*------------------------------------------------------------------------------*
*------              ©2005 phpMyBitTorrent Development Team              ------*
*-----------               http://phpmybittorrent.com               -----------*
*------------------------------------------------------------------------------*
*-----------------   Sunday, September 14, 2008 9:05 PM   ---------------------*
*/

if (defined('IN_PMBT'))die ("You can't include this file");
define("IN_PMBT",true);
require_once(
"include/config.php");
//require_once("language/english.php");
if (!$user->userloginrequired("user");

if (isset(
$_GET['action']) && $_GET['action'])
            
$action=$_GET['action'];
else 
$action '';;

if (
$action!="find")
   {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="PMBT 3.0.0">
<meta http-equiv="PRAGMA" content="NO-CACHE">
<meta http-equiv="EXPIRES" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">
<form action="userfind_to_pm.php?action=find" name="users" method="post">
<div vlign="bottom">
  <table cellspacing=0 cellpadding=0 border=0 align=left width=100% bgcolor="#dddddd">
  <tr>
     <td class=col1 align=center><?php echo "<b>"._btusername."</b>";?>:</td>
     <td class=col1 align=center><input type="text" name="user" size="30" /></td>
     <td class=col2 align=center><input type="submit" name="confirm" value=<?=_btsearch?> /></td>
  </tr>
  </table>
</div>
</form>
<?php
}
else
{
  
$res=mysql_query("SELECT username FROM torrent_users WHERE username LIKE '%".mysql_escape_string($_POST["user"])."%' ORDER BY username");
  if (!
$res or mysql_num_rows($res)==0)
      {
?>  
<table cellspacing=0 cellpadding=0 border=0 align=left width=100% bgcolor="#dddddd">
<tr><td><p align=center><?=_buserfind_found?> <font color=red><b>0</b></font><?=_buserfind_tryagain?><br />
<a href=userfind_to_pm.php><b><?=_buserfind_retry?></b></a></p></td></tr></table>
<?php    }
  else {
    
$subres mysql_query("SELECT COUNT(*) FROM torrent_users WHERE username LIKE '%".mysql_escape_string($_POST["user"])."%'");
    
$subrow mysql_fetch_array($subres);
    
$count $subrow[0];

if (
$count == "1"){?>
<p align=center><?=_buserfind_found?> <b>1</b><?=_buserfind_member?></p>
<?php
}elseif ($count >= "500")
{
?>
<p align=center><?=_buserfind_found?> <b><?=$count?></b> <?=_buserfind_specific?></p>
<?}else{?>
<p align=center><?=_buserfind_found?> <b><?=$count?></b> <?=_buserfind_recip?></p>
<?php
}
?>
<div align="center">
  <form method="post" name="results" action="userfind_to_pm.php" onsubmit="insert_marked(this.user);return false">
<table bgcolor="dddddd" align=left width=100% cellspacing=0 cellpadding=0 border=0>
  <tr>
     <td align=center>
<?php
print("<b>"._buserfind_Pseudo."</b>");
?>
:</td>
<?php
     
while($result=mysql_fetch_array($res))
     print(
"<td align=\"center\"><input type=\"checkbox\" class=\"radio\" name=\"user\" value=\"" $result["username"]. "\" />" $result["username"] . "</td>");
?>
<script type="text/javascript">
    // <![CDATA[
        function insert_user(user)
        {
            opener.document.forms['postform'].username_list.value = ( opener.document.forms['postform'].username_list.value.length && opener.document.forms['postform'].username_list.type == "textarea" ) ? opener.document.forms['postform'].username_list.value + "\n" + user : user;
        }

        function insert_marked(users)
        {
            if (typeof(users.length) == "undefined")
            {
                if (users.checked)
                {
                    insert_user(users.value);
                }
            }
            else if (users.length > 0)
            {
                for (i = 0; i < users.length; i++)
                {
                    if (users[i].checked)
                    {
                        insert_user(users[i].value);
                    }
                }
            }

            self.close();
        }

        function insert_single(user)
        {
            opener.document.forms['postform'].username_list.value = user;
            self.close();
        }        

        /**
        * Mark/unmark checklist
        * id = ID of parent container, name = name prefix, state = state [true/false]
        */
        function marklist(id, name, state)
        {
            var parent = document.getElementById(id);
            if (!parent)
            {
                eval('parent = document.' + id);
            }

            if (!parent)
            {
                return;
            }

            var rb = parent.getElementsByTagName('input');
            
            for (var r = 0; r < rb.length; r++)
            {
                if (rb[r].name.substr(0, name.length) == name)
                {
                    rb[r].checked = state;
                }
            }
        }
    // ]]>
    </script>

<?php
     
print("<td><input type=\"button\" class=\"btnlite\"  value="._buserfind_recipt."></td>");
?>
  </tr>
</table>
</form>
</div>
</body>
</html>
<?php
   
}
}
?>
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote