[ Index ]
 

Code source de Phorum 5.1.25

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/include/admin/ -> PhorumAdminMenu.php (source)

   1  <?php
   2  
   3  ////////////////////////////////////////////////////////////////////////////////
   4  //                                                                            //
   5  //   Copyright (C) 2006  Phorum Development Team                              //
   6  //   http://www.phorum.org                                                    //
   7  //                                                                            //
   8  //   This program is free software. You can redistribute it and/or modify     //
   9  //   it under the terms of either the current Phorum License (viewable at     //
  10  //   phorum.org) or the Phorum License that was distributed with this file    //
  11  //                                                                            //
  12  //   This program is distributed in the hope that it will be useful,          //
  13  //   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
  14  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
  15  //                                                                            //
  16  //   You should have received a copy of the Phorum License                    //
  17  //   along with this program.                                                 //
  18  ////////////////////////////////////////////////////////////////////////////////
  19  
  20      if(!defined("PHORUM_ADMIN")) return;
  21  
  22      class PhorumAdminMenu
  23      {
  24          var $_title;
  25          var $_id;
  26          var $_links;
  27  
  28          function PhorumAdminMenu ($title="", $id="")
  29          {
  30              $this->reset($title, $id);
  31          }
  32  
  33          function reset($title="", $id="")
  34          {
  35              $this->_title = $title;
  36              $this->_id = $id;
  37              $this->_links=array();
  38          }
  39  
  40          function add($title, $module, $description)
  41          {
  42              $this->_links[]=array("title"=>$title, "module"=>$module, "description"=>$description);
  43          }
  44  
  45  
  46          function show()
  47          {
  48              if($this->_title){
  49                  echo "<div class=\"PhorumAdminMenuTitle\">$this->_title</div>\n";
  50              }
  51              echo "<div class=\"PhorumAdminMenu\"";
  52              if($this->_id) echo " id=\"$this->_id\"";
  53              echo ">";
  54  
  55              foreach($this->_links as $link){
  56                  $desc = htmlspecialchars($link["description"]);
  57                  $href = htmlspecialchars($_SERVER["PHP_SELF"]);
  58                  $title = htmlspecialchars($link["title"]);
  59                  $html ="<a title=\"$desc\" href=\"$href";
  60                  if(!empty($link["module"])) $html.="?module=$link[module]";
  61                  $html.="\">$title</a><br />";
  62                  echo $html;
  63              }
  64  
  65              echo "</div>\n";
  66  
  67  
  68          }
  69  
  70      }
  71  
  72  ?>


Généré le : Thu Nov 29 12:22:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics