本文整理汇总了PHP中dcPage::closePopup方法的典型用法代码示例。如果您正苦于以下问题:PHP dcPage::closePopup方法的具体用法?PHP dcPage::closePopup怎么用?PHP dcPage::closePopup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dcPage
的用法示例。
在下文中一共展示了dcPage::closePopup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
#
# -- END LICENSE BLOCK ------------------------------------
require dirname(__FILE__) . '/../inc/admin/prepend.php';
dcPage::check('usage,contentadmin');
$q = !empty($_GET['q']) ? $_GET['q'] : null;
$page = !empty($_GET['page']) ? (int) $_GET['page'] : 1;
$nb_per_page = 10;
$params = array();
$params['limit'] = array(($page - 1) * $nb_per_page, $nb_per_page);
$params['no_content'] = true;
$params['order'] = 'post_dt DESC';
if ($q) {
$params['search'] = $q;
}
dcPage::openPopup(__('Add a link to an entry'), dcPage::jsLoad('js/_posts_list.js') . dcPage::jsLoad('js/jsToolBar/popup_posts.js'));
echo '<h2>' . __('Add a link to an entry') . '</h2>';
echo '<form action="popup_posts.php" method="get">' . '<p><label class="classic">' . __('Search entry:') . ' ' . form::field('q', 30, 255, html::escapeHTML($q)) . '</label> ' . ' <input type="submit" value="' . __('ok') . '" /></p>' . '</form>';
try {
$posts = $core->blog->getPosts($params);
$counter = $core->blog->getPosts($params, true);
$post_list = new adminPostMiniList($core, $posts, $counter->f(0));
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
echo '<div id="form-entries">';
# I know it's not a form but we just need the ID
$post_list->display($page, $nb_per_page);
echo '</div>';
echo '<p><a class="button" href="#" id="link-insert-cancel">' . __('cancel') . '</a></p>';
dcPage::closePopup();