"king08, post: 47101":can you help me please it dont work in my tk [url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2954"]shoutbox.php[/url]add also an power user rank thks and a star with vip and admin rank thx a lot man i hope semeone will help me :rolleyes:
"walker1977, post: 54481":the user should have the default theme and language that the site is set to when you make the account and they log in. to add gigs change the query below.
tomysql_query("INSERT INTO users (added, last_access, secret, username, password, status, email) VALUES(NOW(), NOW(), $secret, $username, $passhash, 'confirmed', $email)") or die(mysql_error());
mysql_query("INSERT INTO users (added, last_access, secret, username, password, status, email,uploaded) VALUES(NOW(), NOW(), $secret, $username, $passhash, 'confirmed', $email, 5368709120)") or die(mysql_error());
"teamfsx, post: 39820":ok take this it's my laste upade works 100% for me, scrolling your last upload image in the same block "not the block divided in 3 spaces" , it's for you torrenttrader, and , say me if it's work.;) :lol: :lol:
"walker1977, post: 44129":here if you want this in admincp.php. note the link may be done different in your admincp.php because i have modified mine.
add to admincp.php:
add to the end of admincp.php:print ("<td align=center><a href=admincp.php?action=adduser><img src=images/admin/users.gif border=0 width=32 height=32><br><center><b>Add User</center></b></a><BR></td>\n");
#======================================================================#
# Add Users
#======================================================================#
if ($action == "adduser") {
if ($CURUSER["class"] < "8"){
show_error_msg("Error","Sorry you do not have the rights to view this page!",1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
if ($_POST["username"] == "" || $_POST["password"] == "" || $_POST["email"] == "")
show_error_msg("Error", "Missing form data.");
if ($_POST["password"] != $_POST["password2"])
show_error_msg("Error", "Passwords mismatch.");
$username = sqlesc($_POST["username"]);
$password = $_POST["password"];
$email = sqlesc($_POST["email"]);
$secret = mksecret();
$passhash = sqlesc(md5($password));
$secret = sqlesc($secret);
mysql_query("INSERT INTO users (added, last_access, secret, username, password, status, email) VALUES(NOW(), NOW(), $secret, $username, $passhash, 'confirmed', $email)") or die(mysql_error());
$res = mysql_query("SELECT id FROM users WHERE username=$username");
$arr = mysql_fetch_row($res);
if (!$arr)
show_error_msg("Erro", "Unable to create the account. The user name is possibly already taken.");
header("Location: /account-details.php?id=$arr[0]");
die;
}
stdhead("Add user");
navmenu();
begin_frame();
?>
<div align=center>
<h1>Add user</h1>
<form method=post action=admincp.php?action=adduser>
<table border=1 cellspacing=0 cellpadding=5>
<tr><td class=rowhead>Username</td><td><input type=text name=username size=40></td></tr>
<tr><td class=rowhead>Password</td><td><input type=password name=password size=40></td></tr>
<tr><td class=rowhead>Re-type password</td><td><input type=password name=password2 size=40></td></tr>
<tr><td class=rowhead>E-mail</td><td><input type=text name=email size=40></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Okay" class=btn></td></tr>
</table>
</form>
</div>
<?
end_frame();
stdfoot();
}
#======================================================================#
# END Add Users
#======================================================================#