View Single Post
  #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