本文整理汇总了PHP中clsTemplate::setVar方法的典型用法代码示例。如果您正苦于以下问题:PHP clsTemplate::setVar方法的具体用法?PHP clsTemplate::setVar怎么用?PHP clsTemplate::setVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clsTemplate
的用法示例。
在下文中一共展示了clsTemplate::setVar方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: round
if ($db->next_record()) {
$neg3 = $db->f("count(rating)");
} else {
$neg3 = 0;
}
$query = "select user_login from users where user_id = '" . $_GET["user_id"] . "'";
$db->query($query);
if ($db->next_record()) {
$username = $db->f("user_login");
} else {
$neg3 = 0;
}
$pospercent = $pos / $total * 100;
$neupercent = $neu / $total * 100;
$negpercent = $neg / $total * 100;
$Tpl->setVar("username", $username);
$Tpl->setVar("pos", $pos);
$Tpl->setVar("neu", $neu);
$Tpl->setVar("neg", $neg);
$Tpl->setVar("pospercent", round($pospercent, 2));
$Tpl->setVar("neupercent", round($neupercent, 2));
$Tpl->setVar("negpercent", round($negpercent, 2));
$Tpl->setVar("pos1", $pos1);
$Tpl->setVar("neu1", $neu1);
$Tpl->setVar("neg1", $neg1);
$Tpl->setVar("pos2", $pos2);
$Tpl->setVar("neu2", $neu2);
$Tpl->setVar("neg2", $neg2);
$Tpl->setVar("pos3", $pos3);
$Tpl->setVar("neu3", $neu3);
$Tpl->setVar("neg3", $neg3);
示例2: CCGetEvent
$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");
unset($Tpl);
//End Unload Page
示例3: 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
if ($_POST["preview"]) {
$name = PreviewTemplate($_GET["page"]);
$JS = "<SCRIPT LANGUAGE=\"JavaScript\">\n<!--\nwindow.open('../" . $phppage . "&prev=" . $name . "','Ad','toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=600');\n-->\n</script>";
$Tpl->setVar("JS", $JS);
}
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->setVar("textareavalue", htmlspecialchars($textareavalue));
if ($_POST["page_temp"]) {
$Tpl->setVar("textareavalue", htmlspecialchars(stripslashes($_POST["page_temp"])));
}
$Tpl->setVar("cat", $_GET["cat"]);
$Tpl->setVar("page", $_GET["page"]);
$Tpl->setVar("error", $error);
$Tpl->setVar("category", $catdata->f("name"));
$Tpl->setVar("active", $useractive);
$Tpl->setVar("ao", $adminactive);
$Tpl->setVar("templatevars", $output);
示例4: 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("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);
$Tpl->setVar("deletebutton", $deletebutton);
if ($_POST["searchable"]) {
$Tpl->setVar("searchablecheck", " checked");
}
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
示例5: CCGetUserID
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";
if ($db->f("rating") == -1)
$ratetext = "Negative";
$Tpl->SetBlockVar("rate", "");
$Tpl->setVar("ItemNum", $db->f("ItemNum"));
$Tpl->setVar("usercomment", stripslashes($db->f("comment")));
$Tpl->setVar("rated_you", $ratetext);
$Tpl->setVar("id", $db->f("id"));
$query = "select * from purchases where id = '" . $db->f("purchase_id") . "'";
$db->query($query);
$db->next_record();
$Tpl->setVar("title", $db->f("title"));
$Tpl->Parse("counter", True);
}
else {
$Tpl->Parse("Error", True);
}
}
else {
$Tpl->Parse("Error", True);
示例6: 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
$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);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例7: 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
示例8: clsDBDBNetConnect
$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;
while ($db->next_record()) {
$i++;
$options .= "<option value=\"" . $db->f("ItemNum") . "\">" . $i . " - " . $db->f("ItemNum") . " - " . $db->f("title") . "</option>\n";
}
$Tpl->setVar("item_Options", $options);
if ($_POST["truncatedone"]) {
$Tpl->setVar("complete", "<br><b>Indexing database deleted, users will not be able to search the site until the index has been recreated</b><br>");
}
if ($_REQUEST["Submit"]) {
if (is_array($_REQUEST["ItemNum"])) {
if (in_array("Alllistings", $_REQUEST["ItemNum"])) {
$_REQUEST["ItemNum"] = "Alllistings";
}
}
if ($_REQUEST["ItemNum"] == "Alllistings") {
$db2 = new clsDBDBNetConnect();
if (!$_REQUEST["itemID"]) {
$itemID = 0;
} else {
$itemID = $_REQUEST["itemID"];