Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
Thread Tools
  #1  
Old 31st July 2008, 18:35
AboudMokh AboudMokh is offline
Member
 
Join Date: Jul 2008
Posts: 6
Default Delete account problem
I have delacctadmin mode (delete any account by its name) but when I type the account name and press delete nothing happens , the page just refresh

I tried this mod in another tracker (test tracker) and it worked well.


delacctadmin code in attachments
Attached Files
File Type: zip delacctadmin.zip (791 Bytes, 5 views)

Last edited by AboudMokh; 31st July 2008 at 18:38.
Reply With Quote
  #2  
Old 31st July 2008, 21:08
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default
Verify that it works on that other tracker???
Does the other tracker use this exact same php file with nothing edited???
It the other tracker on same server???
Do both trackers use the same source???

i Cant see any reason for this working on one tracker and not on another.. id even say this php file would work on 90% of the sources ever developed.

the only thing i can really do without messing with it myself on your tracker is suggest you use a simple debug trick .. in the part where it is supposed to delete the user put in
Code:
die("error");
near the top.

If you see this message then you kno the page is executing to the die command .. so move the die command down a few lines and refresh it in your web browser after saving ofcourse.. if you see the error text again then you once again know its executing all the way to the die command and everything before the die command is fine. However if at any point you dont see the error text and just a white screen you know something is messed up before the die() command. by moving it about you should be able to figure out wats causing the problem.

Also change all your
Code:
or sqlerr();
on the end of the querys to
Code:
or sqlerr(__FILE__,__LINE__);
and if its one of the queries thats messing up the script that should show you exactly where in the query its borking
Reply With Quote
  #3  
Old 31st July 2008, 22:09
AboudMokh AboudMokh is offline
Member
 
Join Date: Jul 2008
Posts: 6
Default
Quote:
Originally Posted by djlee View Post
Verify that it works on that other tracker???
Yes it is working well on other tracker

Quote:
Originally Posted by djlee View Post
Does the other tracker use this exact same php file with nothing edited???
Yes It is exactly the same

Quote:
Originally Posted by djlee View Post
It the other tracker on same server???
No

Quote:
Originally Posted by djlee View Post
Do both trackers use the same source???
Yes


I did what you told me and nothing happened it still refresh the page

That is the code with changes

PHP Code:
<?
require "include/bittorrent.php";
dbconn();

if (
get_user_class() < UC_ADMINISTRATOR)
stderr("Sorry""Permission denied.");

if (
$HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST")
{
$username trim($_POST["username"]);

if (!
$username)
  
stderr("Error""Please fill out the form correctly.");

$res mysql_query(

"SELECT * FROM users WHERE username=" sqlesc($username)   ) or sqlerr(__FILE__,__LINE__);

if (
$username == 'ADMINISTRATOR')
  
stderr("Error""You can't Delete ADMINISTRATOR.");
if (
mysql_num_rows($res) != 1)
  
stderr("Error""Bad user name or password. Please verify that all entered information is correct.");
$arr mysql_fetch_assoc($res);
die(
"error");
$id $arr['id'];
$res mysql_query("DELETE FROM users WHERE id=$id") or sqlerr(__FILE__,__LINE__);
if (
mysql_affected_rows() != 1)
  
stderr("Error""Unable to delete the account.");
stderr("Success""The account <b>$username</b> was deleted.");
}
stdhead("Delete account");
?>
<h1>Delete account</h1>
<table border=1 cellspacing=0 cellpadding=5>
<form method=post action=delacctadmin.php>
<tr><td class=rowhead>User name</td><td><input size=40 name=username></td></tr>

<tr><td colspan=2><input type=submit class=btn value='Delete'></td></tr>
</form>
</table>
<?
stdfoot
();
?>
Reply With Quote
  #4  
Old 3rd August 2008, 13:47
johnake's Avatar
johnake johnake is offline
Senior Member
 
Join Date: Dec 2007
Posts: 52
Default
Try this one:
PHP Code:
<?
require "include/bittorrent.php";
dbconn();

if (
get_user_class() < UC_ADMINISTRATOR)
stderr("Sorry""Permission denied.");

if (
$HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST")
{
 
$username trim($_POST["username"]);

if (!
$username)
   
stderr("Error""Please fill out the form correctly.");

 
$res mysql_query(

 
"SELECT * FROM users WHERE username=" sqlesc($username)   ) or sqlerr();
 if (
mysql_num_rows($res) != 1)
   
stderr("Error""Bad user name or password. Please verify that all entered information is correct.");
 
$arr mysql_fetch_assoc($res);

 
$id $arr['id'];
 
$res mysql_query("DELETE FROM users WHERE id=$id") or sqlerr();
 if (
mysql_affected_rows() != 1)
   
stderr("Error""Unable to delete the account.");
 
stderr("Success""The account <b>$username</b> was deleted.");
}
stdhead("Delete account");
?>
<h1>Delete account</h1>
<table border=1 cellspacing=0 cellpadding=5>
<form method=post action=delacctadmin.php>
<tr><td class=rowhead>User name</td><td><input size=40 name=username></td></tr>

<tr><td colspan=2><input type=submit class=btn value='Delete'></td></tr>
</form>
</table>
<?
stdfoot
();
?>
__________________
PHP Code:
class mySelf extends World
   
{
       public 
$health;
       private 
$friends;
       protected 
$love;
  
   public function 
__construct()
  {
       
$this->health 100;
       
$this->friends 2;
       
$this->love true;
  }
  protected function 
__love()
  { 
      
//has a bug... for the moment...
      //will fix it later.. until then:
      
sleep(15*365*24*3600);
  }

Reply With Quote
  #5  
Old 4th August 2008, 03:15
AboudMokh AboudMokh is offline
Member
 
Join Date: Jul 2008
Posts: 6
Default
Just the same it refresh the page
Reply With Quote
  #6  
Old 4th August 2008, 18:51
johnake's Avatar
johnake johnake is offline
Senior Member
 
Join Date: Dec 2007
Posts: 52
Default
What version of Yuna Scatari do you have?
__________________
PHP Code:
class mySelf extends World
   
{
       public 
$health;
       private 
$friends;
       protected 
$love;
  
   public function 
__construct()
  {
       
$this->health 100;
       
$this->friends 2;
       
$this->love true;
  }
  protected function 
__love()
  { 
      
//has a bug... for the moment...
      //will fix it later.. until then:
      
sleep(15*365*24*3600);
  }

Reply With Quote
  #7  
Old 5th August 2008, 06:30
AboudMokh AboudMokh is offline
Member
 
Join Date: Jul 2008
Posts: 6
Default
'tbversion','tbdev.net-12-09-05'
Reply With Quote
Reply

Tags
account , delete , problem


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
fake account problem TSSE v5.6 DECODED (NULLED BY Nightcrawler) lovebeer Template Shares 8 27th November 2012 03:48
Message before delete please can someone help stall20080 Torrent Strike 2 4th February 2010 18:29
Delete your own account in TS 5.6 script ? crztz Template Shares 2 4th December 2009 06:57
not delete torrents mapb_1990 Torrent Strike 3 2nd December 2008 12:39
How to delete torrents Mredin Free Torrent Source 2 17th November 2008 20:21



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