[ Index ]
 

Code source de CMS made simple 1.0.5

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

title

Body

[fermer]

/admin/ -> listtags.php (source)

   1  <?php
   2  #CMS - CMS Made Simple
   3  #(c)2004 by Ted Kulp (wishy@users.sf.net)
   4  #This project's homepage is: http://cmsmadesimple.sf.net
   5  #
   6  #This program is free software; you can redistribute it and/or modify
   7  #it under the terms of the GNU General Public License as published by
   8  #the Free Software Foundation; either version 2 of the License, or
   9  #(at your option) any later version.
  10  #
  11  #This program is distributed in the hope that it will be useful,
  12  #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13  #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14  #GNU General Public License for more details.
  15  #You should have received a copy of the GNU General Public License
  16  #along with this program; if not, write to the Free Software
  17  #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18  #
  19  #$Id: listtags.php 3452 2006-09-20 11:12:41Z dittmann $
  20  
  21  $CMS_ADMIN_PAGE=1;
  22  $CMS_LOAD_ALL_PLUGINS=1;
  23  
  24  require_once ("../include.php");
  25  
  26  check_login();
  27  
  28  $plugin = "";
  29  if (isset($_GET["plugin"])) $plugin = $_GET["plugin"];
  30  
  31  $action = "";
  32  if (isset($_GET["action"])) $action = $_GET["action"];
  33  
  34  $userid = get_userid();
  35  $access = check_permission($userid, "Modify Modules");
  36  
  37  #$smarty = new Smarty_CMS($gCms->config);
  38  
  39  include_once ("header.php");
  40  if ($action == "showpluginhelp")
  41  {
  42      if (function_exists('smarty_cms_help_function_'.$plugin))
  43      {
  44          @ob_start();
  45          call_user_func_array('smarty_cms_help_function_'.$plugin, array());
  46          $content = @ob_get_contents();
  47          @ob_end_clean();
  48          echo '<div class="pagecontainer">';
  49          echo '<p class="pageheader">'.lang('pluginhelp', array($plugin)).'</p>';        
  50          echo $content;
  51          echo "</div>";
  52          echo '<p class="pageback"><a class="pageback" href="listtags.php">&#171; '.lang('back').'</a></p>';
  53          exit;    
  54      }
  55      else
  56      {
  57          echo '<div class="pagecontainer">';
  58          echo '<p class="pageheader">'.lang('pluginhelp', array($plugin)).'</p>';
  59          echo '<P>No help text available for this plugin.</P>';
  60          echo "</div>";
  61          echo '<p class="pageback"><a class="pageback" href="listtags.php">&#171; '.lang('back').'</a></p>';
  62          exit;    
  63      }
  64  }
  65  else if ($action == "showpluginabout")
  66  {
  67      if (function_exists('smarty_cms_about_function_'.$plugin))
  68      {
  69          @ob_start();
  70          call_user_func_array('smarty_cms_about_function_'.$plugin, array());
  71          $content = @ob_get_contents();
  72          @ob_end_clean();
  73          echo '<div class="pagecontainer">';
  74          echo '<p class="pageheader">'.lang('pluginabout', array($plugin)).'</p>';
  75          echo $content;
  76          echo "</div>";
  77          echo '<p class="pageback"><a class="pageback" href="listtags.php">&#171; '.lang('back').'</a></p>';
  78          exit;    
  79      }
  80      else
  81      {
  82          echo '<div class="pagecontainer">';
  83          echo '<p class="pageheader">'.lang('pluginhelp', array($plugin)).'</p>';
  84          echo '<P>No help text available for this plugin.</P>';
  85          echo "</div>";
  86          echo '<p class="pageback"><a class="pageback" href="listtags.php">&#171; '.lang('back').'</a></p>';
  87          exit;    
  88      }
  89  }
  90  else
  91  {
  92  
  93      echo '<div class="pagecontainer">';
  94      echo '<div class="pageoverflow">';
  95      echo $themeObject->ShowHeader('tags').'</div>';
  96      echo "<table cellspacing=\"0\" class=\"pagetable\">\n";
  97      echo '<thead>';
  98      echo "<tr>\n";
  99      echo "<th>".lang('name')."</th>\n";
 100      echo "<th class=\"pagew10\">".lang('help')."</th>\n";
 101      echo "<th class=\"pagew10\">".lang('about')."</th>\n";
 102      echo "</tr>\n";
 103      echo '</thead>';
 104      echo '<tbody>';
 105  
 106          $curclass = "row1";
 107          
 108          foreach($gCms->cmsplugins as $oneplugin)
 109          {
 110              if (!array_key_exists($oneplugin, $gCms->userplugins))
 111              {
 112                  echo "<tr class=\"".$curclass."\" onmouseover=\"this.className='".$curclass.'hover'."';\" onmouseout=\"this.className='".$curclass."';\">\n";
 113  
 114                  if (function_exists('smarty_cms_help_function_'.$oneplugin))
 115                  {
 116                      echo "<td><a href=\"listtags.php?action=showpluginhelp&amp;plugin=".$oneplugin."\">".$oneplugin."</a></td>";
 117                  }
 118                  else
 119                  {
 120                      echo "<td>$oneplugin</td>\n";
 121                  }
 122                  if (function_exists('smarty_cms_help_function_'.$oneplugin))
 123                  {
 124                      echo "<td><a href=\"listtags.php?action=showpluginhelp&amp;plugin=".$oneplugin."\">".lang('help')."</a></td>";
 125                  }
 126                  else
 127                  {
 128                      echo "<td>&nbsp;</td>";
 129                  }
 130                  if (function_exists('smarty_cms_about_function_'.$oneplugin))
 131                  {
 132                      echo "<td><a href=\"listtags.php?action=showpluginabout&amp;plugin=".$oneplugin."\">".lang('about')."</a></td>";
 133                  }
 134                  else
 135                  {
 136                      echo "<td>&nbsp;</td>";
 137                  }
 138              
 139                  echo "</tr>\n";
 140  
 141                  ($curclass=="row1"?$curclass="row2":$curclass="row1");
 142              }
 143          }
 144  
 145      ?>
 146  
 147      </tbody>
 148  </table>
 149  </div>
 150  
 151  <?php
 152  echo '<p class="pageback"><a class="pageback" href="'.$themeObject->BackUrl().'">&#171; '.lang('back').'</a></p>';
 153  }
 154  
 155  include_once ("footer.php");
 156  
 157  # vim:ts=4 sw=4 noet
 158  ?>


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7