Members   Search      Help    Register    Login    Home
Home » Discussion Forums » M0dZ & HaCkZ » Admin add user(Add a new user to your site from admin panel.)
Admin add user [message #3903] Sun, 18 April 2010 03:02 Go to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
you well need to files first is admin/files/add_user.php
<?php
/*
*----------------------------phpMyBitTorrent V 2.0-----------------------------*
*--- 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 27, 2008 8:37 PM   ---------------------*
*/
if (!defined('IN_PMBT')) die ("You can't access this file directly");
$saved = NULL;
if($op =="take_user_add"){
$errmsg = Array();
if (!isset($username) OR $username == "")
        $errmsg[] = _bterrusernamenotset;
if (!isset($password) OR $password == "")
        $errmsg[] = _bterrpasswordnotset;
if (!isset($email) OR $email == "")
        $errmsg[] = _bterremailnotset;
if (count($errmsg) == 0) {
        if ($db->sql_numrows($db->sql_query("SELECT * FROM ".$db_prefix."_users WHERE username ='".addslashes($username)."';")) != 0)
                $errmsg[] = _bterruserexists;
        if (!is_email($email))
                $errmsg[] = _btfakemail;
        if ($db->sql_numrows($db->sql_query("SELECT * FROM ".$db_prefix."_users WHERE email ='".addslashes($email)."';")) != 0)
                $errmsg[] = _bterremailexists;
        if (strlen($password) < 5)
                $errmsg[] = _bttooshortpass;
        if ($password != $cpassword)
                $errmsg[] = _btpasswnotsame;
}
if (count($errmsg) != 0) bterror($errmsg,_btsignuperror);
if($force_passkey){
                do {
                        $passkey = ", '".RandomAlpha(32)."'";
                        //Check whether passkey already exists
                        $sql = "SELECT passkey FROM ".$db_prefix."_users WHERE passkey = '".$passkey."';";
                        $res = $db->sql_query($sql);
                        $cnt = $db->sql_numrows($sql);
                        $db->sql_freeresult($res);
                } while ($cnt > 0);
				$passkeyrow = ', passkey';
				}else{
				$passkeyrow = '';
				$passkey = '';
				}
$act_key = RandomAlpha(32);
$sql = "INSERT INTO ".$db_prefix."_users (username, clean_username, email, password, act_key, uploaded, regdate" . $passkeyrow . ", active) VALUES ('".addslashes($username)."', '".addslashes(strtolower($username))."', '".addslashes($email)."', '".md5($password)."', '".$act_key."', '".$give_sign_up_credit."', NOW() " . $passkey .", 1);";
$db->sql_query($sql) or btsqlerror($sql);
$saved = true;
}
if (isset($saved)) {
        OpenTable2();
        echo "<h3>".$username." Added</h3>";
        CloseTable2();
}
OpenTable("Create New User");
    echo "<h1>"._btsignup."</h1>";
    echo "<br />";
    echo "<form action=\"admin.php\" method=\"POST\">\n";
	echo "<input type=\"hidden\" name=\"op\" value=\"take_user_add\" />\n";
    echo "<table border='1' cellspacing='0' cellpadding='5'>";
    echo "<tr><td class='rowhead'>"._btusername."</td><td><input type='text' name='username' size='40' /></td></tr>";
    echo "<tr><td class='rowhead'>"._btpasswd."</td><td><input type='password' name='password' size='40' /></td></tr>";
    echo "<tr><td class='rowhead'>"._btpasswd2."</td><td><input type='password' name='cpassword' size='40' /></td></tr>";
    echo "<tr><td class='rowhead'>"._btemailaddress."</td><td><input type='text' name='email' size='40' /></td></tr>";
    echo "<tr><td colspan='2' align='center'><input type='submit' value='"._btsubmit."' class='btn' /></td></tr>";
    echo "</table>";
    echo "</form>";
CloseTable();
?>

the second one is admin/items/add_user.php
<?php
/*
*-------------------------------phpMyBitTorrent--------------------------------*
*--- 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               -----------*
*------------------------------------------------------------------------------*
*/

if (!defined('IN_PMBT')) die ("You can't access this file directly");

adminentry("user_add","user_add","user_add","userinfo");
$op_keys = explode(",","user_add,take_user_add");
?>

Now add this image http://guv2.com/pmbt/admin/buttons/admin_user_add.png to admin/buttons/ as admin_user_add.png


http://a.imageshack.us/img831/5562/mybikes.png

[Updated on: Mon, 10 January 2011 05:59]

Report message to a moderator

Re: Admin add user [message #3904 is a reply to message #3903] Sun, 18 April 2010 05:30 Go to previous messageGo to next message
ahmedtm1 is currently offline ahmedtm1  Egypt
Messages: 2
Registered: April 2010
Leecher
Thank You Mr.Joeroberts.

I tried it and worked fine

very thanks again
Re: Admin add user [message #3915 is a reply to message #3903] Tue, 20 April 2010 06:08 Go to previous messageGo to next message
Fantazy is currently offline Fantazy  Sweden
Messages: 69
Registered: April 2010
Seeder
Wonderful!

Thank you so much.

I'm going to donate some money soon and thank you all for the wonderful help.


http://img26.imageshack.us/img26/443/42918339485.jpg

[Updated on: Tue, 20 April 2010 06:09]

Report message to a moderator

Re: Admin add user [message #3916 is a reply to message #3903] Tue, 20 April 2010 17:44 Go to previous messageGo to next message
Daffy is currently offline Daffy  United Kingdom
Messages: 359
Registered: October 2009
Location: uk
Releaser

works well, thanks.

Re: Admin add user [message #5290 is a reply to message #3915] Sun, 23 January 2011 20:08 Go to previous messageGo to next message
claudita is currently offline claudita  Romania
Messages: 37
Registered: December 2009
Location: ROMANIA
Leecher
y haw that error "You can't include this file"wen y troay to add a new user ..anee ydeea??
Re: Admin add user [message #5291 is a reply to message #5290] Sun, 23 January 2011 21:47 Go to previous messageGo to next message
joeroberts is currently offline joeroberts  United States
Messages: 1971
Registered: June 2006
Location: U.S.A
Releaser
Da HacKer
find in both the files
if (!defined('IN_PMBT')) die ("You can't access this file directly");
and remove it


http://a.imageshack.us/img831/5562/mybikes.png
Re: Admin add user [message #5292 is a reply to message #5290] Mon, 24 January 2011 20:07 Go to previous message
claudita is currently offline claudita  Romania
Messages: 37
Registered: December 2009
Location: ROMANIA
Leecher
works naw thanks a lot joe!!
Previous Topic:Modded Torrent table
Next Topic:share with facebook
Goto Forum:
  


Current Time: Thu Feb 09 12:01:47 GMT 2012

Total time taken to generate the page: 0.01079 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software