本文整理汇总了PHP中clsTemplate类的典型用法代码示例。如果您正苦于以下问题:PHP clsTemplate类的具体用法?PHP clsTemplate怎么用?PHP clsTemplate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了clsTemplate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clsheader_outofbound
$header_outofbound = new clsheader_outofbound("../../../includes/", "header_outofbound", $MainPage);
$header_outofbound->Initialize();
$footer = new clsfooter("../../../includes/", "footer", $MainPage);
$footer->Initialize();
$MainPage->header_outofbound =& $header_outofbound;
$MainPage->footer =& $footer;
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
if ($Charset) {
header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
header("Content-Type: " . $ContentType);
}
//End Initialize Objects
//Initialize HTML Template @1-50A154CB
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
if (strlen($TemplateSource)) {
$Tpl->LoadTemplateFromStr($TemplateSource, $BlockToParse, "UTF-8");
} else {
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8");
}
$Tpl->SetVar("CCS_PathToRoot", $PathToRoot);
$Tpl->block_path = "/{$BlockToParse}";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "../../../");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-03EC4543
$footer->Operations();
$header_outofbound->Operations();
//End Execute Components
示例2: CCGetEvent
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-332FBF3C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_POST["truncate"]) {
$db = new clsDBDBNetConnect();
$query = "TRUNCATE TABLE `listing_index`";
$db->query($query);
header("Location: ReIndex.php?truncatedone=1");
exit;
}
$options = "";
$db = new clsDBNetConnect();
$query = "Select `ItemNum`, `title`, `itemID` from items where status = 1 order by `title` asc";
$db->query($query);
$i = 0;
示例3: clsUser
if (!isset($_SESSION['objUser'])) {
$objUser = clsUser::getCookie();
} else {
$objUser = $_SESSION['objUser'];
}
/* This re-loads the user object in case it's changed. */
if ($objUser) {
$objUser = new clsUser($objUser->get('id'));
}
if ($objUser && $objUser->isNew()) {
$objUser = null;
}
if (!preg_match('/^[a-zA-Z2-9_-]*$/', $strAction)) {
throw new Exception(ERRORMSG_INVALID);
}
$objTemplate = new clsTemplate('default');
$objTemplate->setText('SCRIPT', clsDB::initializeJS());
$objTemplate->setText('TITLE', "OSPAP2");
/* Inline CSS for advanced. */
$objTemplate->setText('HEAD', clsUser::getAdvancedStyle($objUser));
if (isset($_REQUEST['error']) && isset($arrMessages[$_REQUEST['error']])) {
$objTemplate->setText('ERROR', $arrMessages[$_REQUEST['error']]);
} else {
if (isset($_REQUEST['message']) && isset($arrMessages[$_REQUEST['message']])) {
$objTemplate->setText('MESSAGE', $arrMessages[$_REQUEST['message']]);
}
}
$objTemplate->setScript('MENU', 'menu');
$objTemplate->setScript('LOGO', 'logo');
$objTemplate->setText('COPYRIGHT', "Written by <a href='mailto:ronospap@skullsecurity.org'>Ron</a>. This page and code are public domain. Code is available upon request. No warranty or promises of any kind.");
switch ($strAction) {
示例4: BindEvents
if ($Script != "") {
$ScriptIncludes = $ScriptIncludes . "<script src=\"" . $PathToRoot . $Script . "\" type=\"text/javascript\"></script>\n";
}
}
$Attributes->SetValue("scriptIncludes", $ScriptIncludes);
BindEvents();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
if ($Charset) {
header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
header("Content-Type: " . $ContentType);
}
//End Initialize Objects
//Initialize HTML Template @1-A7427295
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
if (strlen($TemplateSource)) {
$Tpl->LoadTemplateFromStr($TemplateSource, $BlockToParse, "CP1252");
} else {
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "CP1252");
}
$Tpl->SetVar("CCS_PathToRoot", $PathToRoot);
$Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage);
$Tpl->block_path = "/{$BlockToParse}";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "../");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-93DAD1DB
$MasterPage->Operations();
$modal_end->Operations();
示例5: CCGetEvent
//End Initialize Objects
//Execute Components @1-B06FCBC8
$Header->Operations();
$itemsSearch->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
//include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
$Tpl->SetVar("QueryString", CCGetQueryString("QueryString", array()));
//Show Page @1-7E62AA77
$Header->Show("Header");
$itemsSearch->Show();
$categories->Show();
$items->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
if ($file != "templates/ViewCat.html") {
unlink($file);
示例6: CCGetEvent
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-332FBF3C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_GET["generate"]) {
print "Generating...<br>";
$catlist = new clsDBNetConnect();
$catlist->query("select * from categories where sub_cat_id=1");
while ($catlist->next_record()) {
$cats[$catlist->f("cat_id")] = $catlist->f("name");
$catlist2 = new clsDBNetConnect();
$catlist2->query("select * from categories where sub_cat_id=" . $catlist->f("cat_id"));
while ($catlist2->next_record()) {
$cats[$catlist2->f("cat_id")] = $cats[$catlist->f("cat_id")] . " > " . $catlist2->f("name");
$catlist3 = new clsDBNetConnect();
$catlist3->query("select * from categories where sub_cat_id=" . $catlist2->f("cat_id"));
示例7: CCGetEvent
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
if ($_GET["id"] && !$_GET["submit"]){
$db = new clsDBNetConnect;
$query = "select * from feedback where `counter` = '" . $_GET["id"] . "'";
$db->query($query);
if (!$db->next_record()){
$query = "select * from feedback where id = '" . $_GET["id"] . "' and being_rated = '" . CCGetUserID() . "'";
$db->query($query);
if ($db->next_record()){
if ($db->f("rating") == 1)
$ratetext = "Positive";
if ($db->f("rating") == 0)
$ratetext = "Neutral";
示例8: CCGetEvent
//Execute Components @1-12EAE39F
$Header->Operations();
$charges->Operation();
$charges1->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
$Tpl->setVar("ItemNum", CCGetSession("RecentItemNum"));
$Tpl->setVar("finalcat", $finalcat);
//Show Page @1-C99B99CD
$Header->Show("Header");
$charges->Show();
$charges1->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
示例9: CCGetEvent
//Execute Components @1-FC6178F0
$Header->Operations();
$charges1->Operation();
$PayPalPay->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_GET["ItemNum"]) {
$db = new clsDBNetConnect();
$query = "select * from items where ItemNum = '" . mysql_escape_string($_GET["ItemNum"]) . "'";
$db->query($query);
if ($db->next_record()) {
$Tpl->SetVar("ItemNum", $_GET["ItemNum"]);
$Tpl->SetVar("amount", $db->f("amt_due"));
$Tpl->SetVar("charge", $db->f("amt_due"));
}
}
//Show Page @1-39CAA23C
示例10: display
public function display($objUser)
{
$objAlbumOwner = $this->getForeignObject('user');
$intPictureCount = sizeof($this->getPictures());
$intSubAlbumCount = sizeof($this->getSubAlbums($objUser));
if ($intPictureCount == 0 && $intAlbumCount == 0 && $objUser && $objUser->get('show_empty') == 0) {
return '';
}
$objAlbumTemplate = new clsTemplate('album');
$objAlbumTemplate->setText('NAME', "<a href='index.php?action=albums&" . $this->getIDPair() . "' class='albumentrylink'>" . $this->get('name') . "</a> " . $this->getNewIcon($objUser));
$objAlbumTemplate->setText('ID', $this->get('id'));
$objAlbumTemplate->setText('USERNAME', $objAlbumOwner->get('username'));
$objAlbumTemplate->setText('CAPTION', bbcode_format($this->get('caption')));
$objAlbumTemplate->setText('EXPANDCLICK', "toggle_album(\"" . $this->get('id') . "\");");
$objAlbumTemplate->setText('LASTUPDATED', $this->getLastUpdated());
$objAlbumTemplate->setText('PICTURECOUNT', $intPictureCount);
$objAlbumTemplate->setText('ALBUMCOUNT', $intSubAlbumCount);
if ($intPictureCount == 0 && $intSubAlbumCount == 0) {
$objAlbumTemplate->setText('ISEMPTY', '(empty)');
}
$strPreview = "";
$arrPictures = $this->getTopPictures(ALBUM_NUMPREVIEW);
foreach ($arrPictures as $objPicture) {
$objAlbumTemplate->setText('PREVIEW', $objPicture->getHtmlThumbnail(ALBUM_PREVIEWSIZE, ALBUM_PREVIEWSIZE));
}
print $objAlbumTemplate->get();
}
示例11: CCGetEvent
//End Initialize Objects
//Execute Components @1-9D3C7E64
$Header->Operations();
$usercontrol->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
$subscriptions = subscription_membership(CCGetUserID(), "icontext", "<br><br>", "1");
$Tpl->setVar("subscriptions", $subscriptions);
//Show Page @1-BE2A4A0B
$Header->Show("Header");
$usercontrol->Show();
$Logout->Show();
$emails->Show();
$watchlist->Show();
$items->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
示例12: CCGetEvent
$Footer->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->setVar("cattable", $cattable);
$Tpl->setVar("catlinks", $links);
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例13: header
}
/* Make sure that users can only edit their own pictures. */
$objPicture->delete();
$objPicture->save();
header("Location: index.php?action=upload&subaction=preview");
}
if ($strSubAction == 'preview') {
$objTemplate->setText('PAGETITLE', "Pending Pictures");
$objBreadcrumbs->add('Upload', 'index.php?action=upload');
$objBreadcrumbs->add('Pending', 'index.php?action=upload&subaction=preview');
$arrPictures = clsPicture::getPending($objUser);
print "You have <strong>" . sizeof($arrPictures) . "</strong> pictures waiting for attention" . ($objUser ? "" : " (note: unsaved images from all guests will appear here)") . ":<br><br>";
foreach ($arrPictures as $objPicture) {
$objPicture = new clsPicture($objPicture->get('id'));
$objAlbum = new clsAlbum($objPicture->get('album_id'));
$objTemplate = new clsTemplate('preview');
$objTemplate->setText('HIDDEN', $objPicture->getHiddenField('id'));
$objTemplate->setText('ALBUM', $objPicture->getCombo('album_id', clsDB::getOptionsFromList($objAlbum->getPostableAlbums($objUser), 'name', 'id', "Select an album")));
$objTemplate->setText('ID', $objPicture->get('id'));
$objTemplate->setText('IMAGE', $objPicture->getHtmlThumbnail(250, 250));
/* TODO: Customizable? */
$objTemplate->setText('NAME', $objPicture->get('original_name'));
$objTemplate->setText('WIDTH', $objPicture->get('width'));
$objTemplate->setText('HEIGHT', $objPicture->get('height'));
$objTemplate->setText('SAVEDELETE', $objPicture->getCombo('subaction', array('confirm' => 'Keep', 'delete' => 'Don\'t keep'), null, true));
$objTemplate->setText('TITLE', $objPicture->getTextField('title'));
$objTemplate->setText('CAPTION', $objPicture->getTextArea('caption'));
$objTemplate->setText('SUBMIT', $objPicture->getSubmit('Save'));
print $objTemplate->get();
}
}
示例14: CCGetEvent
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
header("Location: " . $Redirect);
exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->setVar("inherited", $inherited);
$Tpl->setVar("thiscat", $thiscat);
$Tpl->setVar("name", stripslashes($_POST["name"]));
$Tpl->setVar("template_var", stripslashes($_POST["template_var"]));
$Tpl->setVar("description", stripslashes($_POST["description"]));
$Tpl->setVar("cat", $_REQUEST["cat"]);
$Tpl->setVar("field", $_REQUEST["field"]);
$Tpl->setVar("catname", stripslashes($catname));
$Tpl->setVar("error", $error);
示例15: header
header("Location: index.php?action=picture&" . $objPrevPicture->getIDPair());
} else {
if ($objNextPicture) {
header("Location: index.php?action=picture&" . $objNextPicture->getIDPair());
} else {
header("Location: index.php?action=albums&" . $objAlbum->getIDPair());
}
}
}
}
if ($strSubAction == 'edit') {
if (!$objPicture->canEdit($objUser)) {
throw new Exception('exception_accessdenied');
}
$objTemplate->setText('PAGETITLE', "Editing " . $objPicture->get('title'));
$objEditTemplate = new clsTemplate('editpicture');
$objEditTemplate->setText('HIDDEN', "<input type='hidden' name='action' value='picture'>");
$objEditTemplate->setText('HIDDEN', "<input type='hidden' name='subaction' value='save'>");
$objEditTemplate->setText('HIDDEN', $objPicture->getHiddenField('id'));
$objEditTemplate->setText('ID', $objPicture->get('id'));
$objEditTemplate->setText('WIDTH', $objPicture->get('width'));
$objEditTemplate->setText('HEIGHT', $objPicture->get('height'));
$objEditTemplate->setText('IMAGE', $objPicture->getHtmlThumbnail(250, 250));
$objEditTemplate->setText('ALBUM', $objAlbum->get('name'));
$objEditTemplate->setText('TITLE', $objPicture->getTextField('title'));
$objEditTemplate->setText('CAPTION', $objPicture->getTextArea('caption', 4, 45));
$objEditTemplate->setText('CONFIRMED', $objPicture->getCheckNoJavascript('confirmed'));
$objEditTemplate->setText('SUBMIT', $objPicture->getSubmit('Save'));
print $objEditTemplate->get();
}
if ($strSubAction == 'save') {