(Requested) [USER=20305]@ambrosia[/USER]
Credits to (original coder Nightmare)
Backup before editing files
Open up admincp.php find
Above add
Add the attached file to website root folder
and put a link to it in admincp.php
add image to images folder
[ATTACH type="full"]5089[/ATTACH]
Credits to (original coder Nightmare)
Backup before editing files
Open up admincp.php find
if ($action=="avatars"){
stdhead("Avatar Log");
navmenu();
Above add
# Nick Name Change
#======================================================================#
if($action == "nick_change")
{
stdhead();
navmenu();
if ($CURUSER["edit_users"]!="yes")
show_error_msg("STOP", "You cannot acces this function");
if (!isset($_GET['what'])) $_GET['what'] = '';
begin_frame("Change Nick Name");
?>
<script type="text/javascript">
<!--
var newwindow;
function popusers(url)
{
newwindow=window.open(url,'popusers','height=70,width=400');
if (window.focus) {newwindow.focus()}
}
// -->
</script>
<form method=post name=edit action=admincp.php>
<input type='hidden' name='sid' value='<?=$sid?>'>
<input type='hidden' name='action' value='sql'>
<input type='hidden' name='do' value='change_username'>
<table border=0 cellspacing=0 cellpadding=5>
<?php
print("<tr><td>Nick:</td>");
print("<td>");
if (!$receiver){
print("<input type=\"text\" name=\"receiver\"
value=\"".($_GET["what"]!="new" ? unesc($result["poster"]):urldecode($_GET["to"]))."\" size=\"40\" ".($_GET["what"]!="new" ? "READONLY" : "")." />
<a href=\"javascript:popusers('userfind_to_nick.php');\">Find a NickName</a>");
}
else{
?>
<input type=text name=receiver value="<?=$receiver?>" READONLY>
<?php
}
?>
<tr>
<td>New Nickname:</td>
<td><input name='new_username' type='text' id="new_username" size='20' maxlength='20'></td>
</tr>
<tr>
<td colspan='2' align='center'><input type='submit' value='Make changes'>
</td>
</tr>
</form>
</table>
<p>
<?php
end_frame();
stdfoot();
}
if ($do == "change_username")
{
stdhead();
navmenu();
if ($CURUSER["edit_users"]!="yes")
show_error_msg("STOP", "you Cannot access this function",1);
begin_frame("Changes have been successful");
$current_username = $_POST['receiver'];
$new_username=$_POST['new_username'];
$q = SQL_Query_exec("UPDATE users SET username = '$new_username' WHERE username = '$current_username'");
if ($q)
echo '<b> Changes have been successful, User: '.$current_username.' is now '.$new_username.'</b>';
else
echo '<b> Changes <font size=1 face=Verdana color=red>Unccessful</font></b>';
end_frame();
stdfoot();
}
///////////////////////////////////////////END CODE//////////////////////////////////////
Add the attached file to website root folder
and put a link to it in admincp.php
<td align="center"><a href=admincp.php?action=nick_change><img src="images/changenick.png " border=0 width=32 height=32><br>Change NickName</a><BR></td>
add image to images folder
[ATTACH type="full"]5089[/ATTACH]