本文整理汇总了PHP中Agent::getSearchToken方法的典型用法代码示例。如果您正苦于以下问题:PHP Agent::getSearchToken方法的具体用法?PHP Agent::getSearchToken怎么用?PHP Agent::getSearchToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::getSearchToken方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$html_output .= $agent->transform("./stylesheets/resultA.xslt", $xml_output);
} else {
if ($id == "deactivate") {
//use de-activation stylesheet
$html_output .= $agent->transform("./stylesheets/resultD.xslt", $xml_output);
} else {
if ($id == "edit") {
//use edit stylesheet
$html_output .= $agent->transform("./stylesheets/resultE.xslt", $xml_output);
}
}
}
}
//echo $html_output;
// create the next search page
$tokenNew = $agent->getSearchToken();
if (isset($tokenNew)) {
$htmlFinal .= '<form method="post" action="process.php?id=' . $id . '&token=' . $tokenNew . '">';
} else {
$htmlFinal .= '<form method="post" action="process.php?id=' . $id . '">';
}
$htmlFinal .= '<p align =center>';
if ($id == "activate") {
$htmlFinal .= '<input type="submit" name="Action" value="Activate">';
} else {
if ($id == "deactivate") {
$htmlFinal .= '<input type="submit" name="Action" value="De-Activate">';
} else {
if ($id == "edit") {
$htmlFinal .= '<input type="submit" name="Action" value="Edit">';
}
示例2:
//print_r($xml_output);
if ($xml_output) {
$id = $_GET['id'];
if ($id == "activate") {
$html_output .= $agent->transform("./stylesheets/resultA.xslt", $xml_output);
} else {
if ($id == "deactivate") {
$html_output .= $agent->transform("./stylesheets/resultD.xslt", $xml_output);
} else {
if ($id == "edit") {
$html_output .= $agent->transform("./stylesheets/resultE.xslt", $xml_output);
}
}
}
}
$token = $agent->getSearchToken();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>FABULOUS | Search</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="all" />
<style type="text/css" media="all">@import "./include/layout.css";</style>
</head>
<body>
<div id="document"><a name="top"></a>
<div id="header"></div>