本文整理匯總了PHP中Posts::title方法的典型用法代碼示例。如果您正苦於以下問題:PHP Posts::title方法的具體用法?PHP Posts::title怎麽用?PHP Posts::title使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Posts
的用法示例。
在下文中一共展示了Posts::title方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
default:
# code...
//System::inc('posts_form', $data);
break;
}
$id = Typo::int($_GET['id']);
$data['post'] = Db::result("SELECT * FROM `posts` AS A \n LEFT JOIN `posts_param` AS B\n ON A.`id` = B.`post_id` \n WHERE A.`id` = '{$id}' ");
Theme::admin('header', $data);
System::inc('pages_form', $data);
Theme::admin('footer');
break;
default:
# code...
if (isset($_GET['act']) && $_GET['act'] == 'del') {
if (isset($_GET['id'])) {
$title = Posts::title(Typo::int($_GET['id']));
if (!isset($_GET['token']) || !Token::isExist($_GET['token'])) {
// VALIDATE ALL
$alertred[] = TOKEN_NOT_EXIST;
}
if (isset($alertred)) {
$data['alertred'] = $alertred;
} else {
$del = Posts::delete($_GET['id']);
}
//echo $title['error'];
if (isset($del['error'])) {
$data['alertred'][] = $del['error'];
} else {
$data['alertgreen'][] = PAGE . " {$title} " . MSG_PAGE_REMOVED;
}
示例2:
System::inc('posts_form', $data);
Theme::admin('footer');
break;
default:
# code...
if (isset($_GET['act']) && $_GET['act'] == 'del') {
if (isset($_GET['id'])) {
if (!isset($_GET['token']) || !Token::isExist($_GET['token'])) {
// VALIDATE ALL
$alertred[] = TOKEN_NOT_EXIST;
}
if (isset($alertred)) {
# code...
$data['alertred'] = $alertred;
} else {
$title = Posts::title($_GET['id']);
$del = Posts::delete($_GET['id']);
//echo $title['error'];
if (isset($del['error'])) {
$data['alertred'][] = $del['error'];
} else {
$data['alertgreen'][] = POST . " {$title} " . MSG_PAGE_REMOVED;
Hooks::run('post_delete_action', $_GET);
}
}
if (isset($_GET['token'])) {
Token::remove($_GET['token']);
}
} else {
$data['alertred'][] = MSG_USER_NO_ID_SELECTED;
}