View Full Version : Restrict Admins to...
crocket
12-22-2002, 07:30 PM
Ive seen Admins be restricted to things like styles. and that
But what im after is to restrict other admins.. IE other then userID1
to the email.php page..
To stop generating Email lists..
To stop downloading of my style.. but can modify.
To stop the backing up of the database.
Thats it!
Thank You
Crocket
where did you see to styles only? is there a link to the thread?
sorry i can't help you with your hack
crocket
12-22-2002, 07:34 PM
here!
https://vborg.vbsupport.ru/showthread.php?s=&threadid=44764
thats more of a protection, so other admins can't...
Xenon
12-22-2002, 08:27 PM
crocet please change your sig image, you are way beyon the 300x75 pixels with max of 20k Byte
Chris M
12-23-2002, 04:30 PM
@mx3 - What do you want to do? I can post the code in here for you:)
Satan
crocket
12-23-2002, 04:58 PM
hellsatan can you help me your the "ultimate hacker"
I just want it so the
email page
style download/upload page
database backup page..
Cannot be accessed by the other admins.. Only the admin ID 1 can access them!
Chris M
12-23-2002, 05:21 PM
Ok:)
Remember to backup ALL the files you are editing before changing anything in them;)
Open admin/style.php
Find:
if ($action=="download") {
Replace with:
if (($action=="download") and ($bbuserinfo[userid]!="1")) {
echo"<p>You cannot perform this function</p>";
exit;
}
Save and upload...
Open admin/email.php
Find:
require("./global.php");
Add below:
if ($bbuserinfo[userid]!="1") {
echo"<p>You cannot perform this function</p>";
exit;
}
Save and upload...
Open admin/backup.php
Find:
require("./global.php");
Add below:
if ($bbuserinfo[userid]!="1") {
echo"<p>You cannot perform this function</p>";
exit;
}
Save and upload...
:)
Satan
crocket
12-23-2002, 05:23 PM
~Thank You so much!
/me goes to impliment the code!
Chris M
12-23-2002, 05:39 PM
No problem:)
Satan
crocket
12-23-2002, 06:01 PM
Parse error: parse error, unexpected '}' in /home/crocket/public_html/forums/admin/style.php on line 210
I get this error for the first.. therefore the code maybe wrong?!
"</p></td></tr>\n";
}
echo "</table></td></tr></table>";
}
// ###################### Start download/upload #######################
if (($action=="download") and ($bbuserinfo[userid]!="1")) {
echo"<p>You cannot perform this function</p>";
exit;
}
// get styleid
doformheader("style","dodownload");
maketableheader("Download one of your style sets");
makechoosercode("Style","styleid","style",-1,iif($debug,"Global (base) style set",""));
doformfooter("Download");
*****************
For email...
<?php
error_reporting(7);
require("./global.php");
if ($bbuserinfo[userid]!="1") {
echo"<p>You cannot perform this function</p>";
exit;
}
adminlog();
cpheader();
if ($action=="" && checklogperms($caneditadmin,1,"<p>You are not allowed to modify the templates</p>")) {
$action = "start";
}
It doesn't work.. just goes thru as normal!
***************
Admin Log
Just goes thru as normal!
<?php
error_reporting(7);
if ($HTTP_POST_VARS['action']) {
$action = $HTTP_POST_VARS['action'];
} else if ($HTTP_GET_VARS['action']) {
$action = $HTTP_GET_VARS['action'];
}
if (function_exists("set_time_limit")==1 and get_cfg_var("safe_mode")==0) {
@set_time_limit(0);
}
if (isset($action) and ($action=="csvtable" or $action=="sqltable")) {
$noheader=1;
}
//suppress gzipping
$nozip=1;
require("./global.php");
if ($bbuserinfo[userid]!="1") {
echo"<p>You cannot perform this function</p>";
exit;
}
adminlog(iif($table!="","Table = $table",""));
Sorry for the hassle! But i would like some help into why this isnt working?!
Chris M
12-23-2002, 06:20 PM
The last 2 is because you are probably using your admin account to view those files;) Try creating a new admin account, logging in, and testing those files;)
The first one, I forgot, would cancel the action;)
Open admin/style.php
Find:
if ($action=="download") {
Add below:
if ($bbuserinfo[userid]!="1") {
echo"<p>You cannot perform this function</p>";
exit;
}
:)
Should work;)
Satan
crocket
12-23-2002, 06:43 PM
i now get this error!
Parse error: parse error, unexpected '}' in /home/crocket/public_html/forums/admin/style.php on line 209
using code...
echo "</table></td></tr></table>";
}
// ###################### Start download/upload #######################
if ($bbuserinfo[userid]!="1") {
echo"<p>You cannot perform this function</p>";
exit;
}
// get styleid
doformheader("style","dodownload");
maketableheader("Download one of your style sets");
The last 2 is because you are probably using your admin account to view those files Try creating a new admin account, logging in, and testing those files
As for that.. i did do that.. ID was 139 ... Admin test account! Any possiblities that you can try the code and see if it acually works?!
Thank You for your help up to now!
Crocket
Chris M
12-23-2002, 07:17 PM
You misread my update for admin/style.php;)
I said "Add below" not "Replace" as before;)
As for the other two - There is only one other thing I can suggest (that code should work - there are no errors with it)...
Open admin/index.php
Find where the option for email.php and backup.php are, and add this around them:
if ($bbuserinfo[userid]==1) {
option
}
Satan
satan i just wanted it so anyone could make a style but i reduced my boards to 1 style so i don't need it anymore
Chris M
12-24-2002, 04:46 PM
Ah ok:)
I guess you wanted the code to stop them from deleting styles?
Its in one of my hacks;)
Satan
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.