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


PHP ilTemplate::setAddFooter方法代码示例

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


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

示例1: showClientList

 /**
  * show client list
  */
 function showClientList()
 {
     global $tpl, $ilIliasIniFile, $ilCtrl;
     //echo "1";
     if (!$ilIliasIniFile->readVariable("clients", "list")) {
         $this->processIndexPHP();
         return;
     }
     //echo "2";
     $tpl = new ilTemplate("tpl.main.html", true, true);
     $tpl->setAddFooter(false);
     // no client yet
     // to do: get standard style
     $tpl->setVariable("PAGETITLE", "Client List");
     $tpl->setVariable("LOCATION_STYLESHEET", "./templates/default/delos.css");
     // load client list template
     self::initStartUpTemplate("tpl.client_list.html");
     // load template for table
     $tpl->addBlockfile("CLIENT_LIST", "client_list", "tpl.table.html");
     // load template for table content data
     $tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.obj_tbl_rows.html");
     // load table content data
     require_once "setup/classes/class.ilClientList.php";
     require_once "setup/classes/class.ilClient.php";
     require_once "setup/classes/class.ilDBConnections.php";
     require_once "./Services/Table/classes/class.ilTableGUI.php";
     $this->db_connections = new ilDBConnections();
     $clientlist = new ilClientList($this->db_connections);
     $list = $clientlist->getClients();
     if (count($list) == 0) {
         header("Location: ./setup/setup.php");
         exit;
     }
     $hasPublicSection = false;
     foreach ($list as $key => $client) {
         $client->setDSN();
         if ($client->checkDatabaseExists(true) and $client->ini->readVariable("client", "access") and $client->getSetting("setup_ok")) {
             $this->ctrl->setParameter($this, "client_id", $key);
             $tmp = array();
             $tmp[] = $client->getName();
             $tmp[] = "<a href=\"" . "login.php?cmd=force_login&client_id=" . urlencode($key) . "\">Login page</a>";
             if ($client->getSetting('pub_section')) {
                 $hasPublicSection = true;
                 $tmp[] = "<a href=\"" . "ilias.php?baseClass=ilRepositoryGUI&client_id=" . urlencode($key) . "\">Start page</a>";
             } else {
                 $tmp[] = '';
             }
             $data[] = $tmp;
         }
     }
     // create table
     $tbl = new ilTableGUI();
     // title & header columns
     if ($hasPublicSection) {
         $tbl->setTitle("Available Clients");
         $tbl->setHeaderNames(array("Installation Name", "Login", "Public Access"));
         $tbl->setHeaderVars(array("name", "index", "login"));
         $tbl->setColumnWidth(array("50%", "25%", "25%"));
     } else {
         $tbl->setTitle("Available Clients");
         $tbl->setHeaderNames(array("Installation Name", "Login", ''));
         $tbl->setHeaderVars(array("name", "login", ''));
         $tbl->setColumnWidth(array("70%", "25%", '1px'));
     }
     // control
     $tbl->setOrderColumn($_GET["sort_by"], "name");
     $tbl->setOrderDirection($_GET["sort_order"]);
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     // content
     $tbl->setData($data);
     $tbl->disable("icon");
     $tbl->disable("numinfo");
     $tbl->disable("sort");
     $tbl->disable("footer");
     // render table
     $tbl->render();
     $tpl->show("DEFAULT", true, true);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:82,代码来源:class.ilStartUpGUI.php


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