本文整理匯總了PHP中clsTemplate::Parse方法的典型用法代碼示例。如果您正苦於以下問題:PHP clsTemplate::Parse方法的具體用法?PHP clsTemplate::Parse怎麽用?PHP clsTemplate::Parse使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類clsTemplate
的用法示例。
在下文中一共展示了clsTemplate::Parse方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: stripslashes
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);
}
}
elseif($_POST["id"] && $_POST["submit"]){
$db = new clsDBNetConnect;
$query = "select * from feedback where `counter` = '" . $_POST["id"] . "'";
$db->query($query);
if (!$db->next_record()){
$query = "insert into feedback (`counter`, `being_rated`, `comment`, `date`) values ('" . $_POST["id"] . "', '" . CCGetUserID() . "', '" . mysql_escape_string($_POST["comment"]) . "', '" . time() . "')";
示例2: while
$textdesc[$custtxt->f("id")] = $custtxt->f("description");
$textname[$custtxt->f("id")] = $custtxt->f("name");
$count++;
}
$custtxt->seek();
$queryfields .= ") and";
while ($custtxt->next_record()) {
$Tpl->SetVar("ta_name", multiline($textname[$custtxt->f("id")]));
$Tpl->SetVar("ta_description", multiline($textdesc[$custtxt->f("id")]));
$Tpl->SetVar("ta_var", "custtxt_area::" . $textvar[$custtxt->f("id")] . "::" . $custtxt->f("id"));
$Tpl->SetVar("ta_value", stripslashes($fieldvalues[$custtxt->f("id")]));
$Tpl->SetVar("ta_name_" . $custtxt->f("id"), multiline($textname[$custtxt->f("id")]));
$Tpl->SetVar("ta_description_" . $custtxt->f("id"), multiline($textdesc[$custtxt->f("id")]));
$Tpl->SetVar("ta_var_" . $custtxt->f("id"), "custtxt_area::" . $textvar[$custtxt->f("id")] . "::" . $custtxt->f("id"));
$Tpl->SetVar("ta_value_" . $custtxt->f("id"), stripslashes($fieldvalues[$custtxt->f("id")]));
$Tpl->Parse("Row", True);
}
$Tpl->Parse("Custom_TextArea", True);
}
//////////////////////////////
//Custom TextBox
//////////////////////////////
$txtvar = "";
$txtdesc = "";
$txtname = "";
$custtxtvalues = "";
$custtxt = "";
$fieldvalues = "";
$Tpl->SetBlockVar("Custom_TextBox", "");
$custtxt = new clsDBNetConnect();
$query = "select * from custom_textbox where {$cats} and `searchable` = '1'";