This code should be able to allow staff to add a msg in the users profile havnt test it yet just mod the code so anyone up for testing it and let me know if it works
index.php?action=viewuser
anywhere u want to add it
SQL
index.php?action=viewuser
Code:
* * * *if(isowner(getuid_sid($sid))) * { * *echo "<form action=\"index.php?action=userstats&sid=$sid\" method=\"post\">"; * *echo "Text:<input name=\"text\" maxlength=\"100\" value=\"$dmsg\"/><br/>"; echo "<input type=\"submit\" value=\"Save\"/>"; * *echo "</form><br/></div>"; * * *} * * * *$userstats = mysql_fetch_array(mysql_query("SELECT userstats FROM ibwf_users WHERE id='".$who."'")); *echo "<b>$userstats[0]</b><br/>";
Code:
//////////////////////////////////////////Update User Stats message else if($action=="userstats") { * *addonline(getuid_sid($sid),"Updating User Stats message","index.php?action=$action"); * *$text = $_POST["text"]; * *if(isowner(getuid_sid($sid))) * { * * *echo "<body>"; * * * * * echo "<div class=\"box_cen\" align=\"center\">"; *echo "<b>Update User Stats Msg</b>"; echo "<div class=\"box_sub\" align=\"left\">"; *echo "<div align=\"center\">"; *//$uid = getuid_sid($sid); *$tex = parsepm($text, $sid); *$nos = substr_count($tex,"<img src="); *if($nos>1) { *echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>Error <br/>"; echo "<a href=\"index.php?action=viewuser&sid=$sid\">Users Profile</a><br/>"; *echo "<small>-- -- --</small><br/>"; *echo "<a href=\"index.php?action=main&sid=$sid\">Main Menu</a><br/>"; * echo "<a href=\"index.php?action=main&sid=$sid\">© $stitle</a>"; * * echo "</div>"; * * echo "</body>";; * * *echo "</html>"; * * *exit(); * } *$res = mysql_query("UPDATE ibwf_users SET userstats='".$text."' WHERE id='".$uid."'"); *if($res) * * * *{ * * * * * *echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Users Stats message updated successfully<br/>"; * * * *}else{ * * * * *echo "<img src=\"../images/notok.gif\" alt=\"x\"/>can't update your Users Stats message<br/>"; * * * *} } * * * *echo "<br/>"; echo "<a href=\"index.php?action=viewuser&sid=$sid\">User Profile</a><br/>"; echo "<small>-- -- --</small><br/>"; *echo "<br/><a href=\"index.php?action=main&sid=$sid\">Main Menu</a><br/>"; * echo "<a href=\"index.php?action=main&sid=$sid\">© $stitle</a>"; * * echo "</div>"; echo "</body>"; exit(); }
Code:
ibwf_users userstats *varchar 255
Comment