A few more tweaks and features to go...
need a bit more help though Pretty please!!!
I'm looking to create a URL, that will, with a single click, turn off the chat system....
So in member.php I created a new action statment..
PHP Code:
// ############################### start phpchat off ###############################
if ($action=="phpchatsysoff") {
$templatesused = "redirect_updatethanks";
include("./global.php");
// check permissions, then disable the php chat system
if ($bbuserinfo[userid]==0 or $permissions['canmodifyprofile']==0) {
show_nopermission();
} else {
$DB_site->query("UPDATE user SET phpchatsys = 0 WHERE userid='$bbuserinfo[userid]'");
eval("standardredirect(\"".gettemplate("redirect_updatethanks")."\",\"usercp.php?s=$session[sessionhash]\");");
}
}
and I put it right before the Modify Profile code....
By all rights, it should update the database for your user account, and set the flag off, (just like doing it via the UserCP, and saving)..
When I do it via the UserCP, it works great.
and during the standard redirect , it does disable the system...
But for some reason,.... when I do
http://myurlhere/member.php&action=phpchatsysoff
It says Thanks! and does the redirect..., but does NOT do the DB set command and change the phpchatsys field in the users profile 8(...
Please help!