tensh |
|
---|---|
Hi;
I'm developing a plugin which has parts divided by "switch" statement. How can I make one 'switch' disabled for regular users but enabled for admin? What I have by now is:
$IsAdmin = sed_auth('plug', 'myplug', 'A');
(...)
switch($s)
{
case edit:
if ($IsAdmin)
{
(...)
}
}
break; When I go to plug.php?e=myplug&s=edit as a guest, I see blank page, but I'd like to display a message "you're not allowed to do it". How can I call it? |
|
Відредаговано: tensh (27.07.2009 19:58, 15 років тому) |