News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1182381753:v:use_geshi-1:v:type-php

Started by SleePy, Jun 20, 2007, 11:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SleePy

function CanDoAction($act)
{
   global $context;

   if(!isset($act))
      return false;
   elseif(empty($context['a'][$cur_act][1]))
      return false;
   elseif($context['a'][$cur_act][4] == 3)
      return false;
   elseif($context['a'][$cur_act][4] == 2 && !$context['l']['is_admin'])
      return false;
   elseif($context['a'][$cur_act][4] == 1 && !$context['l']['is_logged'])
      return false;
   elseif(!file_exists($context['t']['sourcedir'] . '/Page-' . $context['a'][$cur_act][1] . '.php'))
      return false;
   else
      return true;
}
No siggy! :D