本文整理汇总了PHP中Lib::setFilter方法的典型用法代码示例。如果您正苦于以下问题:PHP Lib::setFilter方法的具体用法?PHP Lib::setFilter怎么用?PHP Lib::setFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lib
的用法示例。
在下文中一共展示了Lib::setFilter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Settings
include_once "class/template.php";
$getSettings = new Settings($config_setting_file_path);
$cpsub = $getSettings->getSettings();
$getLib = new Lib($cpsub['filter'], $cpsub['stripslashes']);
$getTmp = new Template($config_current_version);
$getId = $_GET['id'];
// set Article
$getArticle = new Article($config_upload_folder, $config_article_file_path, $getLib);
// add view counts
$getArticle->addViewCounts($getId);
// get single article
$getArticleResult = $getArticle->getArticle($getId);
if ($getArticleResult['status'] == true) {
$getArticleData = $getArticleResult['data'];
// get colum values
$article_title = $getLib->setFilter($getArticleData['title']);
$article_author = $getLib->setFilter($getArticleData['author']);
$article_date = $getLib->setFilter($getArticleData['date']);
$article_content = $getLib->setFilter($getArticleData['content']);
$article_counts = $getLib->setFilter($getArticleData['counts']);
$article_files = explode(",", $getArticleData['files']);
$article_files_name = explode(",", $getArticleData['files_name']);
if ($getArticleData['top'] == "1") {
$article_top = " checked";
} else {
$article_top = "";
}
} else {
$return_page = "./index.php";
echo $getLib->showAlertMsg("參數錯誤");
echo $getLib->getRedirect($return_page);
示例2: Settings
include_once "class/page.php";
// include auth file
include_once "class/auth.php";
// include template file
include_once "class/template.php";
session_start();
$getSettings = new Settings($config_setting_file_path);
$cpsub = $getSettings->getSettings();
$getLib = new Lib($cpsub['filter'], $cpsub['stripslashes']);
$getAuth = new Auth($config_account_data, $getLib);
$getTmp = new Template($config_current_version);
// check file status
$getLib->checkFileStatus($config_default_folder);
$getLib->checkFileStatus($config_article_file_path);
// get page val
$p = $getLib->setFilter($_GET['p']);
if (!$getLib->checkVal($p)) {
$p = "about";
}
// check auth
$getAuth->checkAuth($_COOKIE, $_SESSION, $p);
// get page folder
$include_path = $getLib->checkAdminPath($p);
// current page
$website_current_page = "管理";
// get title
$website_title = $getLib->setFilter($cpsub['title']) . "-" . $website_current_page;
?>
<!DOCTYPE html>
<html lang="zh-tw">
示例3: Settings
// include library file
include_once "class/lib.php";
// include article file
include_once "class/article.php";
// include page file
include_once "class/page.php";
// include template file
include_once "class/template.php";
$getData = $_GET;
$getSettings = new Settings($config_setting_file_path);
$cpsub = $getSettings->getSettings();
$getLib = new Lib($cpsub['filter'], $cpsub['stripslashes']);
$getTmp = new Template($config_current_version);
// set keyword
if ($getLib->checkVal($getData['keyword'])) {
$getKeyword = $getLib->setFilter($getData['keyword']);
$getKeywordLink = "?keyword=" . $getKeyword . "&";
} else {
$getKeywordLink = "?";
}
// set Article
$getArticle = new Article($config_upload_folder, $config_article_file_path, $getLib);
$page = $_GET['page'];
// get article list
$getListArray = $getArticle->getAllList("display", "id", "desc", $getKeyword);
$getListSum = count($getListArray);
// set pager
$many = $cpsub['display_num'];
$display = $cpsub['display_page_num'];
$total = $getListSum;
$pagename = "index.php" . $getKeywordLink;