当前位置: 首页>>代码示例>>PHP>>正文


PHP PHPWS_Text::ezTable方法代码示例

本文整理汇总了PHP中PHPWS_Text::ezTable方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Text::ezTable方法的具体用法?PHP PHPWS_Text::ezTable怎么用?PHP PHPWS_Text::ezTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPWS_Text的用法示例。


在下文中一共展示了PHPWS_Text::ezTable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: manageEditors

 function manageEditors()
 {
     if ($_SESSION["OBJ_user"]->allow_access("xwysiwyg", "settings")) {
         $this->content .= "<a href=\"" . $this->linkRef . "&amp;action=admin" . "\">" . $_SESSION['translate']->it("Back to administration") . "</a>";
         if (isset($_GET['updList'])) {
             //to update, simply delete the existing file
             @unlink(PHPWS_HOME_DIR . "files/xwysiwyg/editors/list.txt");
         }
         $editors = array();
         $formTags = array();
         $table = array();
         $this->content .= "<br /><br /><b>" . $_SESSION['translate']->it("Available editors") . "</b>";
         $table[] = array("<b>" . $_SESSION['translate']->it("Location") . "</b>", "<b>" . $_SESSION['translate']->it("Editor") . "</b>", "<b>" . $_SESSION['translate']->it("Status") . "</b>", "<b>" . $_SESSION['translate']->it("Action") . "</b>");
         $dir = PHPWS_File::readDirectory(PHPWS_HOME_DIR . "files/xwysiwyg/editors/", FALSE, TRUE, FALSE, array('conf'));
         if (is_array($dir)) {
             $location = $_SESSION['translate']->it("local");
             foreach ($dir as $file) {
                 include PHPWS_HOME_DIR . "files/xwysiwyg/editors/" . $file;
                 $editors[] = $cfg_editor;
                 $result = $GLOBALS['core']->quickFetch("SELECT editor FROM mod_xw_config WHERE editor = '{$cfg_editor}'", TRUE, TRUE);
                 if ($result) {
                     $status = $_SESSION['translate']->it("installed");
                     $action_link = $this->linkRef . "&amp;action=delEditor&amp;delEditor={$cfg_editor}";
                     $action_label = $_SESSION['translate']->it("Uninstall");
                     $action = "<a href=\"{$action_link}\">{$action_label}</a>";
                     $select = $GLOBALS['core']->quickFetch("SELECT editor FROM mod_xw_editor", TRUE, TRUE);
                     if ($select['editor'] == $cfg_editor) {
                         $editor = "<strong>{$cfg_editor}</strong>";
                     } else {
                         $action_link = $this->linkRef . "&amp;action=toggle&amp;editor={$cfg_editor}";
                         $action_label = $_SESSION['translate']->it("Select");
                         $action .= " || <a href=\"{$action_link}\">{$action_label}</a>";
                         $editor = $cfg_editor;
                     }
                 } else {
                     $status = $_SESSION['translate']->it("not installed");
                     $action_link = $this->linkRef . "&amp;action=addEditor&amp;addEditor={$cfg_editor}&amp;fn={$file}";
                     $action_label = $_SESSION['translate']->it("Install");
                     $action = "<a href=\"{$action_link}\">{$action_label}</a>";
                     $action_link = $this->linkRef . "&amp;action=delFile&amp;delFile={$cfg_editor}&amp;filetyp=ext";
                     $action_label = $_SESSION['translate']->it("Remove");
                     $action .= " || <a href=\"{$action_link}\">{$action_label}</a>";
                     $editor = $cfg_editor;
                 }
                 $table[] = array($location, $editor, $status, $action);
             }
         } else {
             $this->content .= "<br />" . $_SESSION['translate']->it("No local editors found");
         }
         if (!$GLOBALS["core"]->isHub) {
             $table[] = array("<b>" . $_SESSION['translate']->it("Location") . "</b>", "<b>" . $_SESSION['translate']->it("Editor") . "</b>", "<b>" . $_SESSION['translate']->it("Status") . "</b>", "<b>" . $_SESSION['translate']->it("Action") . "</b>");
             if (!is_dir("{$GLOBALS['core']->home_dir}files/xwysiwyg/")) {
                 PHPWS_File::makeDir($GLOBALS['core']->home_dir . "files/xwysiwyg/");
             }
             if (!is_dir("{$GLOBALS['core']->home_dir}files/xwysiwyg/editors/")) {
                 PHPWS_File::makeDir($GLOBALS['core']->home_dir . "files/xwysiwyg/editors/");
             }
             $dir = PHPWS_File::readDirectory(PHPWS_SOURCE_DIR . "files/xwysiwyg/editors/", FALSE, TRUE, FALSE, array('conf'));
             if (is_array($dir)) {
                 $location = $_SESSION['translate']->it("hub");
                 foreach ($dir as $file) {
                     include_once PHPWS_SOURCE_DIR . "files/xwysiwyg/editors/" . $file;
                     if (!in_array($cfg_editor, $editors)) {
                         $status = $_SESSION['translate']->it("not copied");
                         $action_link = $this->linkRef . "&amp;action=cpyEditor&amp;cpyEditor={$cfg_editor}";
                         $action_label = $_SESSION['translate']->it("Copy");
                         $action = "<a href=\"{$action_link}\">{$action_label}</a>";
                         $editor = $cfg_editor;
                     } else {
                         $status = $_SESSION['translate']->it("copied");
                         $action_link = $this->linkRef . "&amp;action=remEditor&amp;remEditor={$cfg_editor}";
                         $action_label = "";
                         $action = "na";
                         $editor = $cfg_editor;
                     }
                     $table[] = array($location, $editor, $status, $action);
                 }
             } else {
                 $this->content .= "<br />" . $_SESSION['translate']->it("No editors found on hub");
             }
         }
         $this->content .= PHPWS_Text::ezTable($table, 2, 2, 1, "", NULL, 1, "top");
         $this->content .= "<br /><br /><b>" . $_SESSION['translate']->it("Available editor-packages") . "</b>";
         $this->content .= "&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"" . $this->linkRef . "&amp;action=manageEditor&amp;updList=1" . "\">" . $_SESSION['translate']->it("Update List") . "</a>";
         $table = array();
         $table[] = array("<b>" . $_SESSION['translate']->it("Location") . "</b>", "<b>" . $_SESSION['translate']->it("Editor") . "</b>", "<b>" . $_SESSION['translate']->it("Description") . "</b>", "<b>" . $_SESSION['translate']->it("Action") . "</b>");
         $dir = PHPWS_File::readDirectory(PHPWS_HOME_DIR . "files/xwysiwyg/editors/", FALSE, TRUE, FALSE, array('tgz'));
         if (is_array($dir)) {
             $location = $_SESSION['translate']->it("local");
             foreach ($dir as $file) {
                 $status = $_SESSION['translate']->it("Archive package");
                 $action_link = $this->linkRef . "&amp;action=tarEditor&amp;tarEditor={$file}&amp;local=1";
                 $action_label = $_SESSION['translate']->it("Extract");
                 $action = "<a href=\"{$action_link}\">{$action_label}</a>";
                 $action_link = $this->linkRef . "&amp;action=delFile&amp;delFile={$file}&amp;filetyp=tgz";
                 $action_label = $_SESSION['translate']->it("Delete");
                 $action .= " || <a href=\"{$action_link}\">{$action_label}</a>";
                 $editor = $file;
                 $table[] = array($location, $editor, $status, $action);
             }
//.........这里部分代码省略.........
开发者ID:CustomerFeedback,项目名称:System-Files-Installable,代码行数:101,代码来源:xw_manager.php


注:本文中的PHPWS_Text::ezTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。