本文整理匯總了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);
}