本文整理汇总了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;
}