本文整理汇总了PHP中utility::filterData方法的典型用法代码示例。如果您正苦于以下问题:PHP utility::filterData方法的具体用法?PHP utility::filterData怎么用?PHP utility::filterData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utility
的用法示例。
在下文中一共展示了utility::filterData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __
$info = __('Web Online Public Access Catalog - Use the search options to find documents quickly');
// total opac result page
$total_pages = 1;
// default header info
$header_info = '';
// HTML metadata
$metadata = '';
// member login information
if (utility::isMemberLogin()) {
$header_info .= '<div id="memberLoginInfo">' . __('You are currently Logged on as member') . ': <strong>' . $_SESSION['m_name'] . ' (<em>' . $_SESSION['m_email'] . '</em>)</strong> <a id="memberLogout" href="index.php?p=member&logout=1">' . __('LOGOUT') . '</a></div>';
}
// start the output buffering for main content
ob_start();
require LIB_DIR . 'contents/common.inc.php';
if (isset($_GET['p'])) {
$path = utility::filterData('p', 'get', false, true, true);
// some extra checking
$path = preg_replace('@^(http|https|ftp|sftp|file|smb):@i', '', $path);
$path = preg_replace('@\\/@i', '', $path);
// check if the file exists
if (file_exists(LIB_DIR . 'contents/' . $path . '.inc.php')) {
include LIB_DIR . 'contents/' . $path . '.inc.php';
if ($path != 'show_detail') {
$metadata = '<meta name="robots" content="noindex, follow">';
}
} else {
// get content data from database
$metadata = '<meta name="robots" content="index, follow">';
include LIB_DIR . 'content.inc.php';
$content = new content();
$content_data = $content->get($dbs, $path);