[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_files/shortcode/ -> plugin.sc (source)

   1  global $sql, $tp, $ns;
   2  $menu = $parm;
   3  
   4  $path = $tp -> toDB(dirname($menu));
   5  $name = $tp -> toDB(basename($menu));
   6  if($path == '.')
   7  {
   8      $path = $menu;
   9  }
  10  if($sql->db_Select('menus','menu_id, menu_pages',"menu_name = '$name' AND (menu_path = '".$path."/' OR menu_path = '".$path."') AND menu_class IN (".USERCLASS_LIST.")"))
  11  {
  12      $row = $sql->db_Fetch();
  13      $show_menu = TRUE;
  14      if($row['menu_pages']){
  15          list($listtype,$listpages) = explode("-",$row['menu_pages']);
  16          $pagelist = explode("|",$listpages);
  17          $check_url = e_SELF."?".e_QUERY;
  18          if($listtype == '1')  //show menu
  19          {
  20              $show_menu = FALSE;
  21              foreach($pagelist as $p)
  22              {
  23                  if(strpos($check_url,$p) !== FALSE)
  24                  {
  25                      $show_menu = TRUE;
  26                  }
  27              }
  28          }
  29          elseif($listtype == '2')  //hide menu
  30          {
  31              $show_menu = TRUE;
  32              foreach($pagelist as $p)
  33              {
  34                  if(strpos($check_url,$p) !== FALSE)
  35                  {
  36                      $show_menu = FALSE;
  37                  }
  38              }
  39          }
  40      }
  41  
  42      if($show_menu) {
  43          $sql->db_Mark_Time($name);
  44          if($path != 'custom')
  45          {
  46              if(is_readable(e_PLUGIN.$path."/languages/".e_LANGUAGE.".php")){
  47                  include_once(e_PLUGIN.$path."/languages/".e_LANGUAGE.".php");
  48              }
  49              if(e_LANGUAGE != 'English' && is_readable(e_PLUGIN.$path."/languages/English.php")){
  50                  include_once(e_PLUGIN.$path."/languages/English.php");
  51              }
  52          }
  53          include_once(e_PLUGIN.$path."/".$name.".php");
  54          $sql->db_Mark_Time("(After $name)");
  55      }
  56  }


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7