本文整理匯總了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);