View Full Version : Help Lost
Almax
05-13-2003, 08:11 PM
I implemented a small hack but want to change the code so that super mods and mods can access it
the start of the hack goes like so
======================================
<?
require("global.php");
if ($bbuserinfo[usergroupid] !="6") {
show_nopermission();
exit;
}
======================================
I think it's here i change the code can somebody help me to insert usergroups 5,6,42,44 to access it
thanx 4 any help ;)
Sorry should have posted this in support
filburt1
05-13-2003, 08:42 PM
Here's a cleaned-up (no offense) version that allows those specific ugids:
require("./global.php");
if (in_array($bbuserinfo['usergroupid'], array(5, 6, 7, 42, 44)))
{
show_nopermission();
}
The exit isn't needed because show_nopermission() exits itself.
Almax
05-13-2003, 08:46 PM
Thanx filburt1 for the prompt reply ;)
Almax
05-13-2003, 08:54 PM
no didnt work m8 here is the whole code it will work with 1 but i'd like it to work with all these usergroups
==============
<?
require("./global.php");
if (in_array($bbuserinfo['usergroupid'], array(5, 6, 7, 42, 44)))
{
show_nopermission();
}
if (!isSet($threadid)) {
header("Location: index.php");
exit;
}
if ($action == "change") {
$threadintro = addslashes($threadintro);
if ($changeall) {
$DB_site->query("UPDATE thread SET threadintro = '$threadintro'");
} else {
$DB_site->query("UPDATE thread SET threadintro = '$threadintro' WHERE threadid = '$threadid'");
}
eval("standardredirect(\"".gettemplate("redirect_threadintro")."\",\"showthread. php?s=".$session[sessionhash]."&threadid=\$threadid\");");
exit;
}
$current = $DB_site->fetch_array($DB_site->query("SELECT threadintro FROM thread WHERE threadid = '$threadid'"));
eval("dooutput(\"".gettemplate("threadintro")."\");");
?>
Boofo
05-13-2003, 09:05 PM
It should be:
require("./global.php");
if (!in_array($bbuserinfo['usergroupid'], array(5, 6, 7, 42, 44)))
{
show_nopermission();
}
Almax
05-13-2003, 09:14 PM
That seems to have worked thank you Boofo & thanx
very speedy service :D
Boofo
05-13-2003, 09:18 PM
You're very welcome. ;)
filburt1
05-13-2003, 09:36 PM
What did I do wrong? :confused:
Almax
05-13-2003, 09:40 PM
exclamation mark before in array
;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.