本文整理汇总了PHP中HTML_Template_IT::show方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Template_IT::show方法的具体用法?PHP HTML_Template_IT::show怎么用?PHP HTML_Template_IT::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_Template_IT
的用法示例。
在下文中一共展示了HTML_Template_IT::show方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showLoginForm
function showLoginForm(&$liveUserObj)
{
$tpl = new HTML_Template_IT();
$tpl->loadTemplatefile('loginform.tpl.php');
$tpl->setVariable('form_action', $_SERVER['SCRIPT_NAME']);
if (is_object($liveUserObj)) {
if ($liveUserObj->getStatus()) {
switch ($liveUserObj->getStatus()) {
case LIVEUSER_STATUS_ISINACTIVE:
$tpl->touchBlock('inactive');
break;
case LIVEUSER_STATUS_IDLED:
$tpl->touchBlock('idled');
break;
case LIVEUSER_STATUS_EXPIRED:
$tpl->touchBlock('expired');
break;
default:
$tpl->touchBlock('failure');
break;
}
}
}
$tpl->show();
exit;
}
示例2: showLoginForm
function showLoginForm($liveUserObj = false)
{
include_once 'HTML/Template/IT.php';
$tpl = new HTML_Template_IT();
$tpl->loadTemplatefile('loginform.tpl.php');
$tpl->setVariable('form_action', $_SERVER['PHP_SELF']);
if (is_object($liveUserObj)) {
if ($liveUserObj->status) {
switch ($liveUserObj->status) {
case LIVEUSER_STATUS_ISINACTIVE:
$tpl->touchBlock('inactive');
break;
case LIVEUSER_STATUS_IDLED:
$tpl->touchBlock('idled');
break;
case LIVEUSER_STATUS_EXPIRED:
$tpl->touchBlock('expired');
break;
default:
$tpl->touchBlock('failure');
break;
}
}
}
$tpl->show();
exit;
}
示例3: buildView
/**
* Function to build view
*
* @access public
* @author Kristine <Kristinesepp@gmail.com>
* @param number $parameters['a'] first summand
* @param number $parameters['b'] second summand
* @param number $parameters['sum'] sum
*/
public static function buildView($parameters)
{
require_once "HTML/Template/IT.php";
$tpl = new \HTML_Template_IT(dirname(__FILE__) . "/");
$tpl->loadTemplatefile("HArjutus.html", true, true);
$tpl->setCurrentBlock("form");
$tpl->setVariable(array('URL-BEGIN' => BEGINNING_OF_URL, 'SUMMAND' => $parameters['a'], 'SUMMAND2' => $parameters['b'], 'SUM' => $parameters['sum']));
$tpl->parseCurrentBlock("form");
$tpl->show();
}
示例4: joonistaVormSiia
/**
* loob htmli vaate
* @author kristen <seppkristen@gmail.com>
* @access public
*/
public static function joonistaVormSiia($value1, $value2, $summa)
{
require_once "HTML/Template/IT.php";
$tpl = new \HTML_Template_IT(dirname(__FILE__));
$tpl->loadTemplatefile("sum.html", true, true);
$tpl->setCurrentBlock("form");
$tpl->setVariable(array('URLI-ALGUS' => BEGINNING_OF_URL, 'VALUE1' => $value1, 'VALUE2' => $value2, 'SUMMA' => $summa));
// parse outter block
$tpl->parse("form");
// print the output
$tpl->show();
}
示例5: VALUES
$tpl->setVariable("EMBED_TAG",
"<script type='text/javascript'>".chr(13).
"//<![CDATA[".chr(13).
"swf(800,655,'$row[3]','Player');".chr(13).
"//]]>".chr(13).
"</script>".chr(13).
"<INPUT type='image' src='/images/movie_play.gif' NAME='BtnPlay' VALUE='Play' OnClick='Player.play()'>".chr(13).
"<INPUT type='image' src='/images/movie_pause.gif' NAME='BtnPlay' VALUE='Play' OnClick='Player.stop()'>".chr(13).
"<INPUT type='image' src='/images/movie_rewind.gif' NAME='BtnStop' VALUE='Play' OnClick='Player.rewind()'>");
else
$tpl->setVariable("EMBED_TAG",
"<embed src='$row[3]'>".chr(13).
"<INPUT type='image' src='/images/movie_play.gif' NAME='BtnPlay' VALUE='Play' OnClick='Player.controls.play()'>".chr(13).
"<INPUT type='image' src='/images/movie_stop.gif' NAME='BtnStop' VALUE='Play' OnClick='Player.controls.stop()'>");
}
$tpl->setVariable("COMPLETE_URL" , "/index.php?html=movie_view_complete&p_movie_sch_seq=$p_movie_sch_seq&p_user_id=$user_id");
$sth = $db->prepare("INSERT INTO TB_MOVIE_REC (MOVIE_SCH_SEQ, USER_ID, VIEW_START, IP) VALUES (?,?,?,?)");
$data = array($movie_sch_seq, $user_id, date("Y:m:d H:i:s"), $HTTP_SERVER_VARS["REMOTE_ADDR"]);
$db->execute($sth, $data );
$sth = $db->prepare("UPDATE TB_MOVIE_REC SET VIEW_START = ? WHERE MOVIE_SCH_SEQ = ? AND USER_ID = ? AND IP = ?");
$data = array(date("Y:m:d H:i:s"), $movie_sch_seq, $user_id, $HTTP_SERVER_VARS["REMOTE_ADDR"]);
$db->execute($sth, $data );
// print the output
$tpl->show();
?>
示例6:
<?php
require_once "HTML/Template/ITX.php";
// Create a new template, and specify that the template files are
// in the same directory as the as the php files.
$template = new HTML_Template_IT("./templates");
// Load the registration template file
$template->loadTemplatefile("registration.tpl", true, true);
$template->setVariable("ERROR_USERNAME", "");
$template->setVariable("ERROR_EMAIL", "");
$template->setVariable("ERROR_PASSWORD", "");
$template->setVariable("ERROR_CONFIRM", "");
$template->show();
示例7:
<?php
require_once '../settings.php';
//require_once './Classes/OrderPerson.php';
require_once './Classes/Item.php';
//require_once './Classes/ShipTo.php';
//require_once './Classes/Order.php';
//require_once './Classes/OrderRow.php';
require_once 'HTML/Template/IT.php';
$item = new \shiporder\item();
$tpl = new \HTML_Template_IT(ROOT_FOLDER);
$tpl->loadTemplatefile('template.html', true, true);
for ($i = 1; $i - 1 < $item::itemCount(); $i++) {
$item->loadRawElement($i);
$tpl->setCurrentBlock('list');
$tpl->setVariable(array('NAME' => $item->getName(), 'AMOUNT' => $item->getAmount(), 'PRICE' => $item->getPrice()));
$tpl->parse('list');
}
$tpl->setCurrentBlock('html');
$tpl->setVariable(array('HeadTitle' => 'Tellimus', 'BodyTitle' => 'OrderPerson'));
$tpl->parse('html');
$tpl->show('html');
示例8: generateItemFile
function generateItemFile($itemId, $path, $idx, $itemsData)
{
global $db;
$row =& $db->getRow(CMD_SEL_ITEM, array($itemId), DB_FETCHMODE_ASSOC);
if (PEAR::isError($row)) {
print $row->getMessage() . "\n";
return;
}
print "Generate item page... {$itemId} \n";
// Новый объект
if ($row["item_id"] == 0) {
$fields = getViewFields();
$imgUrl = IMAGES_BASE . getNormImagePath("new" . $row["id"]);
} else {
$categId =& $db->getOne("SELECT category_id FROM items WHERE id = ?", array($row["item_id"]));
if (PEAR::isError($categId)) {
$fields = getViewFields();
} else {
$fields = getViewFields($categId);
}
$imgUrl = IMAGES_BASE . getNormImagePath($row["item_id"]);
}
$fields = removeFields($fields[0], $fields[1]);
$fields = array_unique($fields);
ob_start();
$tpl = new HTML_Template_IT("");
$tpl->loadTemplatefile(ITEM_TPL_FILE, true, true);
$params = array("itemData" => $itemsData, "perPage" => 1, "delta" => 3, "append" => false, "expanded" => true, "fileName" => "?popup=[%d]", "mode" => "Sliding", "path" => "", "prevImg" => "<prev", "nextImg" => "next>");
$pager = new ExtendedPager1($params);
$pager->ext = BASE_INDEX_URL_POPUP;
$pager->infoStr = NAV_INFO_STR;
$pager->prev = NAV_PREV;
$pager->prevDis = NAV_PREV_DIS;
$pager->next = NAV_NEXT;
$pager->nextDis = NAV_NEXT_DIS;
$pager->prevPages = NAV_PREV_PAGES;
$pager->prevPagesDis = NAV_PREV_PAGES_DIS;
$pager->nextPages = NAV_NEXT_PAGES;
$pager->nextPagesDis = NAV_NEXT_PAGES_DIS;
$pager->currentPage = $idx + 1;
$navigation = $pager->getLinks();
$navigation = $pager->replaceLinks($navigation);
$navigation = str_replace("/http://", "http://", $navigation);
$navigation = str_replace(".http://", "http://", $navigation);
$tpl->setVariable("NAVIGATION", $navigation);
$row["name"] = stripslashes($row["name"]);
$tpl->setVariable("name1", $row["name"]);
$tpl->setVariable("HTMLTITLE", $row["name"] . START_PATH_TITLE);
foreach ($fields as $field) {
if (!isset($row[$field])) {
continue;
}
if (strlen(trim($row[$field])) == 0) {
continue;
}
$row[$field] = stripslashes($row[$field]);
$tpl->setCurrentBlock($field);
$tpl->setVariable($field, $row[$field]);
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("image");
$tpl->setVariable("image", $imgUrl);
$tpl->parseCurrentBlock();
$tpl->show();
$contents = ob_get_contents();
ob_end_clean();
$fName = str_replace(" ", "-", trim($row['art']));
$fName = str_replace("/", "-", $fName);
FileUtils::saveContents(OUTPUT_DIR . "/popup/" . $fName . ".html", $contents);
}