本文整理汇总了PHP中clsTemplate::SetVar方法的典型用法代码示例。如果您正苦于以下问题:PHP clsTemplate::SetVar方法的具体用法?PHP clsTemplate::SetVar怎么用?PHP clsTemplate::SetVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clsTemplate
的用法示例。
在下文中一共展示了clsTemplate::SetVar方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CCGetEvent
$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
//Go to destination page @1-8CB6BDC2
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
header("Location: " . $Redirect);
$header_outofbound->Class_Terminate();
unset($header_outofbound);
示例2: CCGetEvent
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("GroupOptions", $groupoptions);
$Tpl->SetVar("NotInGroup", $notinoptions);
$Tpl->SetVar("InGroup", $inoptions);
$Tpl->SetVar("selected", $selected);
$Tpl->SetVar("GroupName", $name);
$Tpl->SetVar("GroupDesc", $description);
$Tpl->SetVar("GroupNameTitle", "<font class=\"ItechClsFormHeaderFont\">The \"" . $name . "\" Group Has Access to These Categories</font>");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
?>
示例3: CCGetEvent
$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();
$modal_start->Operations();
$roleForm->Operation();
//End Execute Components
//Go to destination page @1-40700939
if ($Redirect) {
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
示例4: CCGetEvent
$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
$db = new clsDBNetConnect();
@$db->query("show tables like \"phpads_zones\"");
if ($db->next_record()) {
if (file_exists("../phpads/index.php")) {
$Tpl->SetVar("phpadsinstall", "<a class=\"ItechClsDataLink\" href=\"../phpads/\">Continue to the phpAdsNew Installer</a>");
} else {
$Tpl->SetVar("phpadsinstall", "Please Double Check Steps 2 and 3. This will turn to the installation link when the /phpads/ directory has been properly uploaded");
}
} else {
$Tpl->SetVar("phpadsinstall", "Once steps 1-3 above have been properly executed this will turn into a 'Continue with Installation' link");
}
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例5: froogle_process
$error = "Feed Submitted Successfully";
} else {
$error = $count . " Items Started Since Your Last Submitted Feed.";
}
}
} else {
$error = "Awaiting First Submit";
$mostrecentdate = "Never";
$fileurl = "Not Yet Created";
}
} else {
$fileurl = "Never Created";
$error = "You first need to setup your Froogle Merchant Account and enter it's information into the \"Froole Settings\" page";
$mostrecentdate = "Never";
}
$Tpl->SetVar("Error", $error);
$Tpl->SetVar("lastsubmit", $mostrecentdate);
$Tpl->SetVar("fileurl", $fileurl);
}
}
//Show Page @1-7EF9F867
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
function froogle_process($text = "")
{
示例6: CCGetUserID
$db2->query($query);
if ($db2->next_record()) {
$error = "You Have Already Used that Coupon";
}
$query = "select * from used_coupons where user_id = '" . CCGetUserID() . "' and ItemNum = '" . CCGetSession("RecentItemNum") . "'";
$db2->query($query);
if ($db2->next_record()) {
$error = "You Have Already Used a Coupon on this Listing";
}
} else {
$error = "This Is Not a Valid Coupon";
}
if (!$error) {
$error = "Thank You! Coupon Code Entered Successfully! <br><a href=\"StartListing.php\"><< Return to the \"Start Listing\" page to continue creating your listing!</a>";
$query = "INSERT INTO used_coupons (`user_id` , `coupon_id` , `date`, `ItemNum`) VALUES ('" . CCGetUserID() . "', '" . $db->f("id") . "' , '" . time() . "', '" . CCGetSession("RecentItemNum") . "')";
$db->query($query);
}
$Tpl->SetVar("error", $error);
} elseif ($_GET["Cancel"]) {
header("Location: StartListing.php");
exit;
}
//Show Page @1-8D0414C5
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例7: CCGetEvent
//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);
}
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例8: foreach
$cats[$db2->f("cat_id")]["total"] = $cats[$db2->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")];
$cats[$db3->f("cat_id")]["total"] = $cats[$db3->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")];
$cats[$db4->f("cat_id")]["total"] = $cats[$db4->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")];
$cats[$db5->f("cat_id")]["total"] = $cats[$db5->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")];
$cats[$db6->f("cat_id")]["total"] = $cats[$db6->f("cat_id")]["total"] + $itemcats[$db6->f("cat_id")];
}
}
}
}
}
}
$query = "update categories set `count` = '0'";
$db->query($query);
foreach ($cats as $key => $value) {
$query = "update categories set `count` = '" . $cats[$key]["total"] . "' where `cat_id` = '" . $key . "'";
$db->query($query);
}
header("Location: CatCount.php?finished=" . $cats[1]["total"]);
}
if (isset($_GET["finished"])) {
$Tpl->SetVar("complete", "<b>Active Listing Recount Complete -- " . $_GET["finished"] . " Items Counted</b><br>");
}
//Show Page @1-7EF9F867
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例9: CCGetEvent
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
$Header->Show("Header");
$charges1->Show();
$PayPalPay->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例10: while
while ($db2->next_record()) {
$bb = index_listing($ItemNum, $db2->f("option_id"), "dd", $db2->f("field_id"), $db2->f("option_id"));
$b = $b + $bb;
}
$pageterms = $pageterms + $b;
$totalterms = $totalterms + $b;
} elseif ($_POST["fields"] == "Main") {
$a = 0;
$b = 0;
$c = 0;
$d = 0;
$a = index_listing($ItemNum);
$pageterms = $pageterms + $a;
$totalterms = $totalterms + $a;
}
}
}
$Tpl->SetVar("complete", "<br><b>Indexing Complete: " . $totalterms . " Terms added to the Search Index</b><br>");
}
//Show Page @1-7EF9F867
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
?>
示例11: CCGetEvent
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//BEGIN CUSTOM FIELDS BUILD CODE//
if ($_REQUEST["CatID"]) {
$finalcat = $_REQUEST["CatID"];
} else {
$finalcat = "1";
}
$cats = "(";
$db = new clsDBNetConnect();
$query = "select * from categories where cat_id='" . $finalcat . "'";
$db->query($query);
$db->next_record();
$Tpl->SetVar("category", $finalcat);
$Tpl->SetVar("cat_name", $db->f("name"));
$cats .= "cat_id=" . $db->f("cat_id");
if ($db->f("sub_cat_id") > 0) {
$cats .= " or ";
$sub = $db->f("sub_cat_id");
$query = "select * from categories where cat_id={$sub}";
$db->query($query);
$db->next_record();
$cats .= "cat_id=" . $db->f("cat_id");
if ($db->f("sub_cat_id") > 0) {
$cats .= " or ";
$sub = $db->f("sub_cat_id");
$query = "select * from categories where cat_id={$sub}";
$db->query($query);
$db->next_record();