Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 15th June 2022, 14:16
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Senior Member
 
Join Date: Jul 2013
P2P
Posts: 399
Smile [project] user details.php staff tools?! taken from xbtit
Click the image to open in full size.

Hopefully we can get this done

Code:
do_sqlquery("ALTER TABLE `xbt_users` CHANGE `torrent_pass_version` `torrent_pass_version` INT(11) NOT NULL DEFAULT '0'", true);
<== another mod to look into hope it works :)

Code:
<?
if (!defined('IN_ACP')) {
    die('non direct access!');
}

include load_language('lang_usercp.php');
// get uid
$uid = isset($_GET['uid']) ? (int) $_GET['uid'] : 0;
// test uid
if ($uid == $CURUSER['uid'] || $uid == 1) {

// get uid info
if ($XBTT_USE) {
    $curu = get_result('SELECT u.username, u.cip, ul.level, ul.id_level as base_level, u.email, u.avatar, u.joined, u.lastconnect, u.id_level, u.language, u.style, u.flag, u.time_offset, u.topicsperpage, u.postsperpage, u.torrentsperpage, (u.downloaded+x.downloaded) as downloaded, (u.uploaded+x.uploaded) as uploaded, u.smf_fid, u.ipb_fid FROM '.$TABLE_PREFIX.'users u INNER JOIN '.$TABLE_PREFIX.'users_level ul ON ul.id=u.id_level LEFT JOIN xbt_users x ON x.uid=u.id WHERE u.id='.$uid.' LIMIT 1', true);
} else {
    $curu = get_result('SELECT u.username, u.cip, ul.level, ul.id_level as base_level, u.email, u.avatar, u.joined, u.lastconnect, u.id_level, u.language, u.style, u.flag, u.time_offset, u.topicsperpage, u.postsperpage, u.torrentsperpage, u.downloaded, u.uploaded, u.smf_fid, u.ipb_fid FROM '.$TABLE_PREFIX.'users u INNER JOIN '.$TABLE_PREFIX.'users_level ul ON ul.id=u.id_level WHERE u.id='.$uid.' LIMIT 1', true);
}
githubSource: https://github.com/btiteam/xbtit-3.1...sers.tools.php

Code:
quickQuery('DELETE FROM '.$TABLE_PREFIX.'users WHERE id='.$uid.' LIMIT 1;', true);

$profile['username'] = unesc($curu['username']);
            $profile['last_ip'] = unesc($curu['cip']);
            $profile['level'] = unesc($curu['level']);
            $profile['joined'] = unesc($curu['joined']);
            $profile['lastaccess'] = unesc($curu['lastconnect']);
            $profile['downloaded'] = makesize($curu['downloaded']);
            $profile['uploaded'] = makesize($curu['uploaded']);
            $profile['return'] = 'document.location.href=\''.$ret_decode.'\'';
            $profile['confirm_delete'] = 'document.location.href=\'index.php?page=admin&amp;user='.$CURUSER['uid'].'&amp;code='.$CURUSER['random'].'&amp;do=users&amp;action=delete&amp;uid='.$uid.'&amp;sure=1&amp;returnto='.$ret_url.'\'';
        }
   break;
$profile['username'] = unesc($curu['username']);
        $profile['email'] = unesc($curu['email']);
        $profile['uploaded'] = $curu['uploaded'];
        $profile['downloaded'] = $curu['downloaded'];
        $profile['down'] = makesize($curu['downloaded']);
        $profile['up'] = makesize($curu['uploaded']);
        $profile['ratio'] = ($curu['downloaded'] > 0 ? $curu['uploaded'] / $curu['downloaded'] : '');
        // init options
$profile['topicsperpage'] = $curu['topicsperpage'];
            $profile['postsperpage'] = $curu['postsperpage'];
 // torrents per page 
$profile['torrentsperpage'] = $curu['torrentsperpage'];
        // avatar
        $profile['avatar'] = ($curu['avatar'] != '') ? $curu['avatar'] : $STYLEURL.'/images/default_avatar.gif';
        $profile['avatar_field'] = unesc($curu['avatar']);
        $profile['avatar'] = '<img onload="resize_avatar(this);" src="'.htmlspecialchars($profile['avatar']).'" alt="" />';
        // form stuff
        $profile['frm_action'] = 'index.php?page=admin&amp;user='.$CURUSER['uid'].'&amp;code='.$CURUSER['random'].'&amp;do=users&amp;action=save&amp;uid='.$uid;
        $profile['frm_cancel'] = 'index.php?page=usercp&amp;uid='.$uid;
        // title
        $block_title = $language['ACCOUNT_EDIT'];
        break;

if ($username != $curu['username']) {
                $new_username = $username;
                $sql_name = sqlesc($curu['username']);
                $username = sqlesc($username);
                $dupe = get_result("SELECT `id` FROM `{$TABLE_PREFIX}users` WHERE `username`=".$username.' LIMIT 1', true, $CACHE_DURATION);
                if (!isset($dupe[0])) {
                    $set[] = 'username='.$username;
                    $newname = ' ( now: '.$username;
                    if (substr($FORUMLINK, 0, 3) == 'smf') {
                        $dupe = get_result('SELECT '.(($FORUMLINK == 'smf') ? '`ID_MEMBER`' : '`id_member`')." FROM `{$db_prefix}members` WHERE `member".(($FORUMLINK == 'smf') ? 'N' : '_n').'ame`='.$username.' LIMIT 1', true, $CACHE_DURATION);
                        if (!isset($dupe[0])) {
                            $smfset[] = 'member'.(($FORUMLINK == 'smf') ? 'N' : '_n').'ame='.$username;
                        } else {
                            $newname .= ', dupe name in smf memberName';
                        }
                        $dupe = get_result('SELECT '.(($FORUMLINK == 'smf') ? '`ID_MEMBER`' : '`id_member`')." FROM {$db_prefix}members WHERE `real".(($FORUMLINK == 'smf') ? 'N' : '_n').'ame`='.$username.' LIMIT 1', true, $CACHE_DURATION);
                        if (!isset($dupe[0])) {
                            $smfset[] = 'real'.(($FORUMLINK == 'smf') ? 'N' : '_n').'ame='.$username;
                        } else {
                            $newname .= ', dupe name in smf realName';
                        }
                    } elseif ($FORUMLINK == 'ipb') {
                        $new_username = trim($username, "'");
                        $new_l_username = strtolower($new_username);
                        $new_seoname = IPSText::makeSeoTitle($new_username);
                        IPSMember::save($ipb_fid, ['members' => ['name' => "$new_username", 'members_display_name' => "$new_username", 'members_l_display_name' => "$new_l_username", 'members_l_username' => "$new_l_username", 'members_seo_name' => "$new_seoname"]]);
                    }
                    $newname .= ' )';
                } else {
                    $note .= ' Dupe name in XBTIT.';
                }
            }

$newpassword = pass_the_salt(30);
                if ($lct_count < $pass_min_req[1] || $uct_count < $pass_min_req[2] || $num_count < $pass_min_req[3] || $sym_count < $pass_min_req[4]) {
                    stderr($language['ERROR'], $language['ERR_PASS_TOO_WEAK_1A'].':<br /><br />'.(($pass_min_req[1] > 0) ? "<li><span style='color:blue;font-weight:bold;'>".$pass_min_req[1].'</span> '.(($pass_min_req[1] == 1) ? $language['ERR_PASS_TOO_WEAK_2'] : $language['ERR_PASS_TOO_WEAK_2A']).'</li>' : '').(($pass_min_req[2] > 0) ? "<li><span style='color:blue;font-weight:bold;'>".$pass_min_req[2].'</span> '.(($pass_min_req[2] == 1) ? $language['ERR_PASS_TOO_WEAK_3'] : $language['ERR_PASS_TOO_WEAK_3A']).'</li>' : '').(($pass_min_req[3] > 0) ? "<li><span style='color:blue;font-weight:bold;'>".$pass_min_req[3].'</span> '.(($pass_min_req[3] == 1) ? $language['ERR_PASS_TOO_WEAK_4'] : $language['ERR_PASS_TOO_WEAK_4A']).'</li>' : '').(($pass_min_req[4] > 0) ? "<li><span style='color:blue;font-weight:bold;'>".$pass_min_req[4].'</span> '.(($pass_min_req[4] == 1) ? $language['ERR_PASS_TOO_WEAK_5'] : $language['ERR_PASS_TOO_WEAK_5A']).'</li>' : '').'<br />'.$language['ERR_PASS_TOO_WEAK_6'].":<br /><br /><span style='color:blue;font-weight:bold;'>".$newpassword.'</span><br />');
                }

                $un = ((!empty($new_username) && $new_username != $curu['username']) ? $new_username : $curu['username']);
                $multipass = hash_generate(['salt' => ''], $pass, $un);
                $j = $btit_settings['secsui_pass_type'];
                $set[] = '`password`='.sqlesc($multipass[$j]['rehash']);
                $set[] = '`salt`='.sqlesc($multipass[$j]['salt']);
                $set[] = '`pass_type`='.sqlesc($j);
                $set[] = '`dupe_hash`='.sqlesc($multipass[$j]['dupehash']);
                $passhash = smf_passgen($un, $pass);
                $smfset[] = '`passwd`='.sqlesc($passhash[0]);
                $smfset[] = '`password'.(($FORUMLINK == 'smf') ? 'S' : '_s').'alt`='.sqlesc($passhash[1]);
                if ($FORUMLINK == 'ipb') {
                    $ipbhash = ipb_passgen($pass);
                    IPSMember::save($ipb_fid, ['members' => ['member_login_key' => '', 'member_login_key_expire' => '0', 'members_pass_hash' => "$ipbhash[0]", 'members_pass_salt' => "$ipbhash[1]"]]);
                }
            }
__________________
https://mobile.twitter.com/YourAnonTV
Welcome to Plutonium Support. Kick Ya Feet Up!, rElax

Last edited by Thor; 21st June 2022 at 10:23. Reason: Added Missing [Code Tag’s]
Reply With Quote
  #2  
Old 15th June 2022, 23:13
DND's Avatar
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,162
Default
already have something similar on my development code
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 15:48. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.