本文整理汇总了PHP中Surfer::track方法的典型用法代码示例。如果您正苦于以下问题:PHP Surfer::track方法的具体用法?PHP Surfer::track怎么用?PHP Surfer::track使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Surfer
的用法示例。
在下文中一共展示了Surfer::track方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
Logger::error(i18n::s('You are not allowed to perform this operation.'));
// an anchor is mandatory
} elseif (!is_object($anchor)) {
Safe::header('Status: 404 Not Found', TRUE, 404);
Logger::error(i18n::s('No anchor has been found.'));
// post a new query
} elseif (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
// protect from hackers
if (isset($_REQUEST['edit_name'])) {
$_REQUEST['edit_name'] = preg_replace(FORBIDDEN_IN_NAMES, '_', $_REQUEST['edit_name']);
}
if (isset($_REQUEST['edit_address'])) {
$_REQUEST['edit_address'] = encode_link($_REQUEST['edit_address']);
}
// track anonymous surfers
Surfer::track($_REQUEST);
// this is the exact copy of what end users has typed
$item = $_REQUEST;
// from form fields to record columns
if (!isset($_REQUEST['edit_id'])) {
$_REQUEST['edit_id'] = Surfer::get_id();
}
$_REQUEST['create_address'] = $_REQUEST['edit_address'];
$_REQUEST['create_name'] = $_REQUEST['edit_name'];
if (!$_REQUEST['create_name']) {
$_REQUEST['create_name'] = $_REQUEST['create_address'];
}
if (!$_REQUEST['create_name']) {
$_REQUEST['create_name'] =& i18n::c('(anonymous)');
}
// always auto-publish queries