本文整理汇总了PHP中dcPage::helpBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP dcPage::helpBlock方法的具体用法?PHP dcPage::helpBlock怎么用?PHP dcPage::helpBlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dcPage
的用法示例。
在下文中一共展示了dcPage::helpBlock方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$last_letter = null;
$cols = array('', '');
$col = 0;
while ($tags->fetch()) {
$letter = mb_strtoupper(mb_substr($tags->meta_id_lower, 0, 1));
if ($last_letter != $letter) {
if ($tags->index() >= round($tags->count() / 2)) {
$col = 1;
}
$cols[$col] .= '<tr class="tagLetter"><td colspan="2"><span>' . $letter . '</span></td></tr>';
}
$cols[$col] .= '<tr class="line">' . '<td class="maximal"><a href="' . $p_url . '&m=tag_posts&tag=' . rawurlencode($tags->meta_id) . '">' . $tags->meta_id . '</a></td>' . '<td class="nowrap"><strong>' . $tags->count . '</strong> ' . ($tags->count == 1 ? __('entry') : __('entries')) . '</td>' . '</tr>';
$last_letter = $letter;
}
$table = '<div class="col"><table class="tags">%s</table></div>';
if ($cols[0]) {
echo '<div class="two-cols">';
printf($table, $cols[0]);
if ($cols[1]) {
printf($table, $cols[1]);
}
echo '</div>';
} else {
echo '<p>' . __('No tags on this blog.') . '</p>';
}
dcPage::helpBlock('tags');
?>
</body>
</html>
示例2: __
}
}
$res_task .= '</p>';
}
if (!empty($res_task)) {
$res_group .= '<div class="fieldset">' . '<h4 id="' . $group_obj->id() . '">' . $group_obj->name() . '</h4>' . $res_task . '</div>';
}
}
if (!empty($res_group)) {
echo '<div id="' . $tab_obj->id() . '" class="multi-part" title="' . $tab_obj->name() . '">' . '<h3>' . $tab_obj->name() . '</h3>' . '<form action="' . $p_url . '" method="post">' . $res_group . '<p><input type="submit" value="' . __('Execute task') . '" /> ' . form::hidden(array('tab'), $tab_obj->id()) . $core->formNonce() . '</p>' . '<p class="form-note info">' . __('This may take a very long time.') . '</p>' . '</form>' . '</div>';
}
}
// Advanced tasks (that required a tab)
foreach ($tasks as $t) {
if (!$t->id() || $t->group() !== null) {
continue;
}
echo '<div id="' . $t->id() . '" class="multi-part" title="' . $t->name() . '">' . '<h3>' . $t->name() . '</h3>' . '<form action="' . $p_url . '" method="post">' . $t->content() . '<p><input type="submit" value="' . __('Execute task') . '" /> ' . form::hidden(array('task'), $t->id()) . form::hidden(array('tab'), $t->id()) . $core->formNonce() . '</p>' . '</form>' . '</div>';
}
// Settings
echo '<div id="settings" class="multi-part" title="' . __('Alert settings') . '">' . '<h3>' . __('Alert settings') . '</h3>' . '<form action="' . $p_url . '" method="post">' . '<h4 class="pretty-title">' . __('Activation') . '</h4>' . '<p><label for="settings_plugin_message" class="classic">' . form::checkbox('settings_plugin_message', 1, $core->blog->settings->maintenance->plugin_message) . __('Display alert messages on late tasks') . '</label></p>' . '<p class="info">' . sprintf(__('You can place list of late tasks on your %s.'), '<a href="' . $core->adminurl->get('admin.user.preferences') . '#user-favorites">' . __('Dashboard') . '</a>') . '</p>' . '<h4 class="pretty-title vertical-separator">' . __('Frequency') . '</h4>' . '<p class="vertical-separator">' . form::radio(array('settings_recall_type', 'settings_recall_all'), 'all') . ' ' . '<label class="classic" for="settings_recall_all">' . '<strong>' . __('Use one recall time for all tasks') . '</strong></label></p>' . '<p class="field wide vertical-separator"><label for="settings_recall_time">' . __('Recall time for all tasks:') . '</label>' . form::combo('settings_recall_time', $combo_ts, 'seperate', 'recall-for-all') . '</p>' . '<p class="vertical-separator">' . form::radio(array('settings_recall_type', 'settings_recall_separate'), 'separate', 1) . ' ' . '<label class="classic" for="settings_recall_separate">' . '<strong>' . __('Use one recall time per task') . '</strong></label></p>';
foreach ($tasks as $t) {
if (!$t->id()) {
continue;
}
echo '<div class="two-boxes">' . '<p class="field wide"><label for="settings_ts_' . $t->id() . '">' . $t->task() . '</label>' . form::combo('settings_ts_' . $t->id(), $combo_ts, $t->ts(), 'recall-per-task') . '</p>' . '</div>';
}
echo '<p class="field wide"><input type="submit" value="' . __('Save') . '" /> ' . form::hidden(array('tab'), 'settings') . form::hidden(array('save_settings'), 1) . $core->formNonce() . '</p>' . '</form>' . '</div>';
}
dcPage::helpBlock('maintenance', 'maintenancetasks');
echo '</body></html>';
示例3: adminPostList
} else {
$sortby = 'post_dt';
$order = 'desc';
}
# Get posts
try {
$posts = $core->blog->getPosts($params);
$counter = $core->blog->getPosts($params, true);
$post_list = new adminPostList($core, $posts, $counter->f(0));
} catch (Exception $e) {
$core->error->add($e->getMessage());
}
/* DISPLAY
-------------------------------------------------------- */
$form_filter_title = __('Show filters and display options');
$starting_script = dcPage::jsLoad('js/_posts_list.js');
$starting_script .= dcPage::jsLoad('js/filter-controls.js');
$starting_script .= '<script type="text/javascript">' . "\n" . "//<![CDATA[" . "\n" . dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true' : 'false') . "\n" . dcPage::jsVar('dotclear.msg.filter_posts_list', $form_filter_title) . "\n" . dcPage::jsVar('dotclear.msg.cancel_the_filter', __('Cancel filters and display options')) . "\n" . "//]]>" . "</script>";
dcPage::open(__('Entries'), $starting_script, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Entries') => '')));
if (!empty($_GET['upd'])) {
dcPage::success(__('Selected entries have been successfully updated.'));
} elseif (!empty($_GET['del'])) {
dcPage::success(__('Selected entries have been successfully deleted.'));
}
if (!$core->error->flag()) {
echo '<p class="top-add"><a class="button add" href="' . $core->adminurl->get("admin.post") . '">' . __('New entry') . '</a></p>' . '<form action="' . $core->adminurl->get("admin.posts") . '" method="get" id="filters-form">' . '<h3 class="out-of-screen-if-js">' . $form_filter_title . '</h3>' . '<div class="table">' . '<div class="cell">' . '<h4>' . __('Filters') . '</h4>' . '<p><label for="user_id" class="ib">' . __('Author:') . '</label> ' . form::combo('user_id', $users_combo, $user_id) . '</p>' . '<p><label for="cat_id" class="ib">' . __('Category:') . '</label> ' . form::combo('cat_id', $categories_combo, $cat_id) . '</p>' . '<p><label for="status" class="ib">' . __('Status:') . '</label> ' . form::combo('status', $status_combo, $status) . '</p> ' . '<p><label for="format" class="ib">' . __('Format:') . '</label> ' . form::combo('format', $format_combo, $format) . '</p>' . '<p><label for="password" class="ib">' . __('Password:') . '</label> ' . form::combo('password', $password_combo, $password) . '</p>' . '</div>' . '<div class="cell filters-sibling-cell">' . '<p><label for="selected" class="ib">' . __('Selected:') . '</label> ' . form::combo('selected', $selected_combo, $selected) . '</p>' . '<p><label for="attachment" class="ib">' . __('Attachments:') . '</label> ' . form::combo('attachment', $attachment_combo, $attachment) . '</p>' . '<p><label for="month" class="ib">' . __('Month:') . '</label> ' . form::combo('month', $dt_m_combo, $month) . '</p>' . '<p><label for="lang" class="ib">' . __('Lang:') . '</label> ' . form::combo('lang', $lang_combo, $lang) . '</p> ' . '<p><label for="comment" class="ib">' . __('Comments:') . '</label> ' . form::combo('comment', $comment_combo, $comment) . '</p>' . '<p><label for="trackback" class="ib">' . __('Trackbacks:') . '</label> ' . form::combo('trackback', $trackback_combo, $trackback) . '</p>' . '</div>' . '<div class="cell filters-options">' . '<h4>' . __('Display options') . '</h4>' . '<p><label for="sortby" class="ib">' . __('Order by:') . '</label> ' . form::combo('sortby', $sortby_combo, $sortby) . '</p>' . '<p><label for="order" class="ib">' . __('Sort:') . '</label> ' . form::combo('order', $order_combo, $order) . '</p>' . '<p><span class="label ib">' . __('Show') . '</span> <label for="nb" class="classic">' . form::field('nb', 3, 3, $nb_per_page) . ' ' . __('entries per page') . '</label></p>' . '</div>' . '</div>' . '<p><input type="submit" value="' . __('Apply filters and display options') . '" />' . '<br class="clear" /></p>' . '</form>';
# Show posts
$post_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.posts") . '" method="post" id="form-entries">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action" class="classic">' . __('Selected entries action:') . '</label> ' . form::combo('action', $posts_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" /></p>' . form::hidden(array('user_id'), $user_id) . form::hidden(array('cat_id'), $cat_id) . form::hidden(array('status'), $status) . form::hidden(array('password'), $password) . form::hidden(array('selected'), $selected) . form::hidden(array('comment'), $comment) . form::hidden(array('trackback'), $trackback) . form::hidden(array('attachment'), $attachment) . form::hidden(array('month'), $month) . form::hidden(array('lang'), $lang) . form::hidden(array('sortby'), $sortby) . form::hidden(array('order'), $order) . form::hidden(array('page'), $page) . form::hidden(array('nb'), $nb_per_page) . $core->formNonce() . '</div>' . '</form>', $show_filters);
}
dcPage::helpBlock('core_posts');
dcPage::close();
示例4: __
echo '</div>';
echo '<h4 class="clear border-top pretty-title">' . __('Titles') . '</h4>';
echo '<div class="two-cols">';
echo '<div class="col">';
echo '<h5>' . __('Blog title') . '</h5>' . '<p class="field"><label for="blog_title_w">' . __('In bold:') . '</label> ' . form::checkbox('blog_title_w', 1, $ductile_user['blog_title_w']) . '</p>' . '<p class="field"><label for="blog_title_s">' . __('Font size (in em by default):') . '</label> ' . form::field('blog_title_s', 7, 7, $ductile_user['blog_title_s']) . '</p>' . '<p class="field picker"><label for="blog_title_c">' . __('Color:') . '</label> ' . form::field('blog_title_c', 7, 7, $ductile_user['blog_title_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['blog_title_c'], '#ffffff', !empty($ductile_user['blog_title_s']) ? $ductile_user['blog_title_s'] : '2em', $ductile_user['blog_title_w']) . '</p>';
echo '</div>';
echo '<div class="col">';
echo '<h5>' . __('Post title') . '</h5>' . '<p class="field"><label for="post_title_w">' . __('In bold:') . '</label> ' . form::checkbox('post_title_w', 1, $ductile_user['post_title_w']) . '</p>' . '<p class="field"><label for="post_title_s">' . __('Font size (in em by default):') . '</label> ' . form::field('post_title_s', 7, 7, $ductile_user['post_title_s']) . '</p>' . '<p class="field picker"><label for="post_title_c">' . __('Color:') . '</label> ' . form::field('post_title_c', 7, 7, $ductile_user['post_title_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_title_c'], '#ffffff', !empty($ductile_user['post_title_s']) ? $ductile_user['post_title_s'] : '2.5em', $ductile_user['post_title_w']) . '</p>';
echo '</div>';
echo '</div>';
echo '<h5>' . __('Titles without link') . '</h5>' . '<p class="field picker"><label for="post_simple_title_c">' . __('Color:') . '</label> ' . form::field('post_simple_title_c', 7, 7, $ductile_user['post_simple_title_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_simple_title_c'], '#ffffff', '1.1em', false) . '</p>';
echo '<h4 class="border-top pretty-title">' . __('Inside posts links') . '</h4>' . '<p class="field"><label for="post_link_w">' . __('In bold:') . '</label> ' . form::checkbox('post_link_w', 1, $ductile_user['post_link_w']) . '</p>' . '<p class="field picker"><label for="post_link_v_c">' . __('Normal and visited links color:') . '</label> ' . form::field('post_link_v_c', 7, 7, $ductile_user['post_link_v_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_link_v_c'], '#ffffff', '1em', $ductile_user['post_link_w']) . '</p>' . '<p class="field picker"><label for="post_link_f_c">' . __('Active, hover and focus links color:') . '</label> ' . form::field('post_link_f_c', 7, 7, $ductile_user['post_link_f_c'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_link_f_c'], '#ebebee', '1em', $ductile_user['post_link_w']) . '</p>';
echo '<h3 class="border-top">' . __('Mobile specific settings') . '</h3>';
echo '<div class="two-cols">';
echo '<div class="col">';
echo '<h4 class="pretty-title">' . __('Blog title') . '</h4>' . '<p class="field"><label for="blog_title_w_m">' . __('In bold:') . '</label> ' . form::checkbox('blog_title_w_m', 1, $ductile_user['blog_title_w_m']) . '</p>' . '<p class="field"><label for="blog_title_s_m">' . __('Font size (in em by default):') . '</label> ' . form::field('blog_title_s_m', 7, 7, $ductile_user['blog_title_s_m']) . '</p>' . '<p class="field picker"><label for="blog_title_c_m">' . __('Color:') . '</label> ' . form::field('blog_title_c_m', 7, 7, $ductile_user['blog_title_c_m'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['blog_title_c_m'], '#d7d7dc', !empty($ductile_user['blog_title_s_m']) ? $ductile_user['blog_title_s_m'] : '1.8em', $ductile_user['blog_title_w_m']) . '</p>';
echo '</div>';
echo '<div class="col">';
echo '<h4 class="pretty-title">' . __('Post title') . '</h4>' . '<p class="field"><label for="post_title_w_m">' . __('In bold:') . '</label> ' . form::checkbox('post_title_w_m', 1, $ductile_user['post_title_w_m']) . '</p>' . '<p class="field"><label for="post_title_s_m">' . __('Font size (in em by default):') . '</label> ' . form::field('post_title_s_m', 7, 7, $ductile_user['post_title_s_m']) . '</p>' . '<p class="field picker"><label for="post_title_c_m">' . __('Color:') . '</label> ' . form::field('post_title_c_m', 7, 7, $ductile_user['post_title_c_m'], 'colorpicker') . dcThemeConfig::contrastRatio($ductile_user['post_title_c_m'], '#ffffff', !empty($ductile_user['post_title_s_m']) ? $ductile_user['post_title_s_m'] : '1.5em', $ductile_user['post_title_w_m']) . '</p>';
echo '</div>';
echo '</div>';
echo '<p><input type="hidden" name="conf_tab" value="css" /></p>';
echo '<p class="clear border-top"><input type="submit" value="' . __('Save') . '" />' . $core->formNonce() . '</p>';
echo '</form>';
echo '</div>';
// Close tab
dcPage::helpBlock('ductile');
// Legacy mode
if (!$standalone_config) {
echo '<form style="display:none">';
}
示例5: __
echo '</div>' . '</div>';
echo '<p class="clear vertical-separator"><label for="your_pwd" class="required">' . '<abbr title="' . __('Required field') . '">*</abbr> ' . __('Your password:') . '</label>' . form::password('your_pwd', 20, 255) . '</p>' . '<p class="clear"><input type="submit" name="save" accesskey="s" value="' . __('Save') . '" />' . ($user_id != '' ? '' : ' <input type="submit" name="saveplus" value="' . __('Save and create another') . '" />') . ($user_id != '' ? form::hidden('id', $user_id) : '') . $core->formNonce() . '</p>' . '</form>';
if ($user_id) {
echo '<div class="clear fieldset">' . '<h3>' . __('Permissions') . '</h3>';
if (!$user_super) {
echo '<form action="' . $core->adminurl->get("admin.user.actions") . '" method="post">' . '<p><input type="submit" value="' . __('Add new permissions') . '" />' . form::hidden(array('redir'), $core->adminurl->get("admin.user", array('id' => $user_id))) . form::hidden(array('action'), 'blogs') . form::hidden(array('users[]'), $user_id) . $core->formNonce() . '</p>' . '</form>';
$permissions = $core->getUserPermissions($user_id);
$perm_types = $core->auth->getPermissionsTypes();
if (count($permissions) == 0) {
echo '<p>' . __('No permissions so far.') . '</p>';
} else {
foreach ($permissions as $k => $v) {
if (count($v['p']) > 0) {
echo '<form action="' . $core->adminurl->get("admin.user.actions") . '" method="post" class="perm-block">' . '<p class="blog-perm">' . __('Blog:') . ' <a href="' . $core->adminurl->get("admin.blog", array('id' => html::escapeHTML($k))) . '">' . html::escapeHTML($v['name']) . '</a> (' . html::escapeHTML($k) . ')</p>';
echo '<ul class="ul-perm">';
foreach ($v['p'] as $p => $V) {
if (isset($perm_types[$p])) {
echo '<li>' . __($perm_types[$p]) . '</li>';
}
}
echo '</ul>' . '<p class="add-perm"><input type="submit" class="reset" value="' . __('Change permissions') . '" />' . form::hidden(array('redir'), $core->adminurl->get("admin.user", array('id' => $user_id))) . form::hidden(array('action'), 'perms') . form::hidden(array('users[]'), $user_id) . form::hidden(array('blogs[]'), $k) . $core->formNonce() . '</p>' . '</form>';
}
}
}
} else {
echo '<p>' . sprintf(__('%s is super admin (all rights on all blogs).'), '<strong>' . $user_id . '</strong>') . '</p>';
}
echo '</div>';
}
dcPage::helpBlock('core_user');
dcPage::close();
示例6: dcPostsActionsPage
if ($qtype == 'p') {
$posts_actions_page = new dcPostsActionsPage($core, $core->adminurl->get("admin.search"), array('q' => $q, 'qtype' => $qtype));
if ($posts_actions_page->process()) {
return;
}
} else {
$comments_actions_page = new dcCommentsActionsPage($core, $core->adminurl->get("admin.search"), array('q' => $q, 'qtype' => $qtype));
if ($comments_actions_page->process()) {
return;
}
}
dcPage::open(__('Search'), $starting_scripts, dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Search') => '')));
echo '<form action="' . $core->adminurl->get("admin.search") . '" method="get" role="search">' . '<div class="fieldset"><h3>' . __('Search options') . '</h3>' . '<p><label for="q">' . __('Query:') . ' </label>' . form::field('q', 30, 255, $q) . '</p>' . '<p><label for="qtype1" class="classic">' . form::radio(array('qtype', 'qtype1'), 'p', $qtype == 'p') . ' ' . __('Search in entries') . '</label> ' . '<label for="qtype2" class="classic">' . form::radio(array('qtype', 'qtype2'), 'c', $qtype == 'c') . ' ' . __('Search in comments') . '</label></p>' . '<p><input type="submit" value="' . __('Search') . '" /></p>' . '</div>' . '</form>';
if ($q && !$core->error->flag()) {
$redir = html::escapeHTML($_SERVER['REQUEST_URI']);
# Show posts
if ($qtype == 'p') {
if ($counter->f(0) > 0) {
printf('<h3>' . ($counter->f(0) == 1 ? __('%d entry found') : __('%d entries found')) . '</h3>', $counter->f(0));
}
$post_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.search") . '" method="post" id="form-entries">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action1" class="classic">' . __('Selected entries action:') . '</label> ' . form::combo(array('action', 'action1'), $posts_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" /></p>' . $core->formNonce() . $posts_actions_page->getHiddenFields() . '</div>' . '</form>');
} elseif ($qtype == 'c') {
# Actions combo box
if ($counter->f(0) > 0) {
printf('<h3>' . ($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')) . '</h3>', $counter->f(0));
}
$comment_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get("admin.search") . '" method="post" id="form-comments">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action2" class="classic">' . __('Selected comments action:') . '</label> ' . form::combo(array('action', 'action2'), $comments_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" /></p>' . $core->formNonce() . $comments_actions_page->getHiddenFields() . '</div>' . '</form>');
}
}
dcPage::helpBlock('core_search');
dcPage::close();
示例7: while
if ($cat_id) {
while ($parents->fetch()) {
$elements[html::escapeHTML($parents->cat_title)] = $core->adminurl->get("admin.category", array('id' => $parents->cat_id));
}
}
$elements[$title] = '';
$category_editor = $core->auth->getOption('editor');
dcPage::open($title, dcPage::jsConfirmClose('category-form') . dcPage::jsLoad('js/_category.js') . $core->callBehavior('adminPostEditor', $category_editor['xhtml'], 'category', array('#cat_desc'), 'xhtml'), dcPage::breadcrumb($elements));
if (!empty($_GET['upd'])) {
dcPage::success(__('Category has been successfully updated.'));
}
echo '<form action="' . $core->adminurl->get("admin.category") . '" method="post" id="category-form">' . '<h3>' . __('Category information') . '</h3>' . '<p><label class="required" for="cat_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Name:') . '</label> ' . form::field('cat_title', 40, 255, html::escapeHTML($cat_title)) . '</p>';
if (!$cat_id) {
$rs = $core->blog->getCategories(array('post_type' => 'post'));
echo '<p><label for="new_cat_parent">' . __('Parent:') . ' ' . '<select id="new_cat_parent" name="new_cat_parent" >' . '<option value="0">' . __('(none)') . '</option>';
while ($rs->fetch()) {
echo '<option value="' . $rs->cat_id . '" ' . (!empty($_POST['new_cat_parent']) && $_POST['new_cat_parent'] == $rs->cat_id ? 'selected="selected"' : '') . '>' . str_repeat(' ', $rs->level - 1) . ($rs->level - 1 == 0 ? '' : '• ') . html::escapeHTML($rs->cat_title) . '</option>';
}
echo '</select></label></p>';
unset($rs);
}
echo '<div class="lockable">' . '<p><label for="cat_url">' . __('URL:') . '</label> ' . form::field('cat_url', 40, 255, html::escapeHTML($cat_url)) . '</p>' . '<p class="form-note warn" id="note-cat-url">' . __('Warning: If you set the URL manually, it may conflict with another category.') . '</p>' . '</div>' . '<p class="area"><label for="cat_desc">' . __('Description:') . '</label> ' . form::textarea('cat_desc', 50, 8, html::escapeHTML($cat_desc)) . '</p>' . '<p><input type="submit" accesskey="s" value="' . __('Save') . '" />' . ($cat_id ? form::hidden('id', $cat_id) : '') . $core->formNonce() . '</p>' . '</form>';
if ($cat_id) {
echo '<h3 class="border-top">' . __('Move this category') . '</h3>' . '<div class="two-cols">' . '<div class="col">' . '<form action="' . $core->adminurl->get("admin.category") . '" method="post" class="fieldset">' . '<h4>' . __('Category parent') . '</h4>' . '<p><label for="cat_parent" class="classic">' . __('Parent:') . '</label> ' . form::combo('cat_parent', $allowed_parents, $cat_parent) . '</p>' . '<p><input type="submit" accesskey="s" value="' . __('Save') . '" />' . form::hidden(array('id'), $cat_id) . $core->formNonce() . '</p>' . '</form>' . '</div>';
if (count($siblings) > 0) {
echo '<div class="col">' . '<form action="' . $core->adminurl->get("admin.category") . '" method="post" class="fieldset">' . '<h4>' . __('Category sibling') . '</h4>' . '<p><label class="classic" for="cat_sibling">' . __('Move current category') . '</label> ' . form::combo('cat_move', array(__('before') => 'before', __('after') => 'after'), '', '', '', false, 'title="' . __('position: ') . '"') . ' ' . form::combo('cat_sibling', $siblings) . '</p>' . '<p><input type="submit" accesskey="s" value="' . __('Save') . '" />' . form::hidden(array('id'), $cat_id) . $core->formNonce() . '</p>' . '</form>' . '</div>';
}
echo '</div>';
}
dcPage::helpBlock('core_category');
dcPage::close();
示例8: __
<head>
<title><?php
echo __('Pages');
?>
</title>
<?php
echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . dcPage::jsLoad(dcPage::getPF('pages/list.js')) . '<script type="text/javascript">' . "\n" . '//<![CDATA[' . "\n" . dcPage::jsVar('dotclear.msg.confirm_delete_posts', __("Are you sure you want to delete selected pages?")) . "\n" . '//]]>' . "\n" . '</script>';
?>
</head>
<body>
<?php
echo dcPage::breadcrumb(array(html::escapeHTML($core->blog->name) => '', __('Pages') => '')) . dcPage::notices();
if (!empty($_GET['upd'])) {
dcPage::success(__('Selected pages have been successfully updated.'));
} elseif (!empty($_GET['del'])) {
dcPage::success(__('Selected pages have been successfully deleted.'));
} elseif (!empty($_GET['reo'])) {
dcPage::success(__('Selected pages have been successfully reordered.'));
}
echo '<p class="top-add"><a class="button add" href="' . $p_url . '&act=page">' . __('New page') . '</a></p>';
if (!$core->error->flag()) {
# Show pages
$post_list->display($page, $nb_per_page, '<form action="' . $core->adminurl->get('admin.plugin') . '" method="post" id="form-entries">' . '%s' . '<div class="two-cols">' . '<p class="col checkboxes-helpers"></p>' . '<p class="col right"><label for="action" class="classic">' . __('Selected pages action:') . '</label> ' . form::combo('action', $pages_actions_page->getCombo()) . '<input type="submit" value="' . __('ok') . '" />' . form::hidden(array('post_type'), 'page') . form::hidden(array('p'), 'pages') . form::hidden(array('act'), 'list') . $core->formNonce() . '</p></div>' . '<p class="clear form-note hidden-if-js">' . __('To rearrange pages order, change number at the begining of the line, then click on “Save pages order” button.') . '</p>' . '<p class="clear form-note hidden-if-no-js">' . __('To rearrange pages order, move items by drag and drop, then click on “Save pages order” button.') . '</p>' . '<p><input type="submit" value="' . __('Save pages order') . '" name="reorder" class="clear" /></p>' . '</form>');
}
dcPage::helpBlock('pages');
?>
</body>
</html>
<?php
}
示例9: showComments
# Show comments or trackbacks
function showComments($rs, $has_action)
{
global $core;
echo '<table class="comments-list"><tr>' . '<th colspan="2" class="nowrap first">' . __('Author') . '</th>' . '<th>' . __('Date') . '</th>' . '<th class="nowrap">' . __('IP address') . '</th>' . '<th>' . __('Status') . '</th>' . '<th>' . __('Edit') . '</th>' . '</tr>';
while ($rs->fetch()) {
$comment_url = $core->adminurl->get('admin.comment', array('id' => $rs->comment_id));
$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
switch ($rs->comment_status) {
case 1:
$img_status = sprintf($img, __('Published'), 'check-on.png');
break;
case 0:
$img_status = sprintf($img, __('Unpublished'), 'check-off.png');
break;
case -1:
$img_status = sprintf($img, __('Pending'), 'check-wrn.png');
break;
case -2:
$img_status = sprintf($img, __('Junk'), 'junk.png');
break;
}
echo '<tr class="line' . ($rs->comment_status != 1 ? ' offline' : '') . '"' . ' id="c' . $rs->comment_id . '">' . '<td class="nowrap">' . ($has_action ? form::checkbox(array('comments[]'), $rs->comment_id, '', '', '', 0, 'title="' . __('Select this comment') . '"') : '') . '</td>' . '<td class="maximal">' . $rs->comment_author . '</td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $rs->comment_dt) . '</td>' . '<td class="nowrap"><a href="' . $core->adminurl->get('admin.comment', array('ip' => $rs->comment_ip)) . '">' . $rs->comment_ip . '</a></td>' . '<td class="nowrap status">' . $img_status . '</td>' . '<td class="nowrap status"><a href="' . $comment_url . '">' . '<img src="images/edit-mini.png" alt="" title="' . __('Edit this comment') . '" /> ' . __('Edit') . '</a></td>' . '</tr>';
}
echo '</table>';
}
dcPage::helpBlock('page', 'core_wiki');
?>
</body>
</html>
示例10: __
if ($core->auth->isSuperAdmin()) {
$modules = $list->modules->getDisabledModules();
if (!empty($modules)) {
echo '<h3>' . __('Deactivated plugins') . '</h3>' . '<p>' . __('Deactivated plugins are installed but not usable. You can activate them from here.') . '</p>';
$list->setList('plugin-deactivate')->setTab('plugins')->setModules($modules)->displayModules(array('expander', 'icon', 'name', 'version', 'desc', 'distrib'), array('activate', 'delete'));
}
}
echo '</div>';
if ($core->auth->isSuperAdmin() && $list->isWritablePath()) {
# New modules from repo
$search = $list->getSearch();
$modules = $search ? $list->store->search($search) : $list->store->get();
if (!empty($search) || !empty($modules)) {
echo '<div class="multi-part" id="new" title="' . __('Add plugins') . '">' . '<h3>' . __('Add plugins from repository') . '</h3>';
// '<p>'.__('Search and install plugins directly from repository.').'</p>';
$list->setList('plugin-new')->setTab('new')->setModules($modules)->displaySearch()->displayIndex()->displayModules(array('expander', 'name', 'score', 'version', 'desc', 'deps'), array('install'), true);
echo '<p class="info vertical-separator">' . sprintf(__("Visit %s repository, the resources center for Dotclear."), '<a href="http://plugins.dotaddict.org/dc2/">Dotaddict</a>') . '</p>' . '</div>';
}
# Add a new plugin
echo '<div class="multi-part" id="addplugin" title="' . __('Install or upgrade manually') . '">' . '<h3>' . __('Add plugins from a package') . '</h3>' . '<p>' . __('You can install plugins by uploading or downloading zip files.') . '</p>';
$list->displayManualForm();
echo '</div>';
}
# --BEHAVIOR-- pluginsToolsTabs
$core->callBehavior('pluginsToolsTabs', $core);
# -- Notice for super admin --
if ($core->auth->isSuperAdmin() && !$list->isWritablePath()) {
echo '<p class="warning">' . __('Some functions are disabled, please give write access to your plugins directory to enable them.') . '</p>';
}
dcPage::helpBlock('core_plugins');
dcPage::close();
示例11: foreach
<?php
foreach ($settings as $ns => $s) {
ksort($s);
echo sprintf($table_header, 'g_' . $ns, $ns);
foreach ($s as $k => $v) {
echo settingLine($k, $v, $ns, 'gs', false);
}
echo $table_footer;
}
?>
<p><input type="submit" value="<?php
echo __('Save');
?>
" />
<input type="hidden" name="p" value="aboutConfig" />
<?php
echo $core->formNonce();
?>
</p>
</form>
</div>
<?php
dcPage::helpBlock('aboutConfig');
?>
</body>
</html>
示例12: __
-------------------------------------------------------- */
if ($post_id) {
echo '<div class="multi-part" id="add-comment" title="' . __('Add a comment') . '">' . '<h3>' . __('Add a comment') . '</h3>' . '<form action="comment.php" method="post" id="comment-form">' . '<fieldset class="constrained">' . '<p><label class="required" title="' . __('Required field') . '">' . __('Name:') . form::field('comment_author', 30, 255, html::escapeHTML($core->auth->getInfo('user_cn'))) . '</label></p>' . '<p><label>' . __('Email:') . form::field('comment_email', 30, 255, html::escapeHTML($core->auth->getInfo('user_email'))) . '</label></p>' . '<p><label>' . __('Web site:') . form::field('comment_site', 30, 255, html::escapeHTML($core->auth->getInfo('user_url'))) . '</label></p>' . '<p class="area"><label for="comment_content" class="required" title="' . __('Required field') . '">' . __('Comment:') . '</label> ' . form::textarea('comment_content', 50, 8, html::escapeHTML('')) . '</p>' . '<p>' . form::hidden('post_id', $post_id) . $core->formNonce() . '<input type="submit" name="add" value="' . __('save') . '" /></p>' . '</fieldset>' . '</form>' . '</div>';
}
# Show comments or trackbacks
function showComments(&$rs, $has_action)
{
echo '<table class="comments-list"><tr>' . '<th colspan="2">' . __('Author') . '</th>' . '<th>' . __('Date') . '</th>' . '<th class="nowrap">' . __('IP address') . '</th>' . '<th>' . __('Status') . '</th>' . '<th> </th>' . '</tr>';
while ($rs->fetch()) {
$comment_url = 'comment.php?id=' . $rs->comment_id;
$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
switch ($rs->comment_status) {
case 1:
$img_status = sprintf($img, __('published'), 'check-on.png');
break;
case 0:
$img_status = sprintf($img, __('unpublished'), 'check-off.png');
break;
case -1:
$img_status = sprintf($img, __('pending'), 'check-wrn.png');
break;
case -2:
$img_status = sprintf($img, __('junk'), 'junk.png');
break;
}
echo '<tr class="line' . ($rs->comment_status != 1 ? ' offline' : '') . '"' . ' id="c' . $rs->comment_id . '">' . '<td class="nowrap">' . ($has_action ? form::checkbox(array('comments[]'), $rs->comment_id, '', '', '', 0) : '') . '</td>' . '<td class="maximal">' . html::escapeHTML($rs->comment_author) . '</td>' . '<td class="nowrap">' . dt::dt2str(__('%Y-%m-%d %H:%M'), $rs->comment_dt) . '</td>' . '<td class="nowrap"><a href="comments.php?ip=' . $rs->comment_ip . '">' . $rs->comment_ip . '</a></td>' . '<td class="nowrap status">' . $img_status . '</td>' . '<td class="nowrap status"><a href="' . $comment_url . '">' . '<img src="images/edit-mini.png" alt="" title="' . __('Edit this comment') . '" /></a></td>' . '</tr>';
}
echo '</table>';
}
dcPage::helpBlock('core_post', 'core_wiki');
dcPage::close();
示例13: __
<p class="col"><?php
echo form::hidden('links_order', '');
echo form::hidden('links_levels', '');
echo form::hidden(array('p'), 'menu');
echo $core->formNonce();
?>
<input type="submit" name="updateitems" value="<?php
echo __('Update menu');
?>
" /></p>
<p class="col right"><input class="delete" type="submit" name="removeaction"
value="<?php
echo __('Delete selected menu items');
?>
"
onclick="return window.confirm('<?php
echo html::escapeJS(__('Are you sure you want to remove selected menu items?'));
?>
');" /></p>
</div>
</form>
</div>
<?php
echo '<div class="multi-part" id="add-link" title="' . __('Add an item') . '">' . '<form action="plugin.php" method="post" id="add-link-form">' . '<div class="fieldset two-cols"><h4>' . __('New item') . '</h4>' . '<p class="field"><label class="classic required" for="link_title"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Label of item menu:') . ' </label>' . form::field('link_title', 50, 255, $link_title, '', 1) . '</p>' . '<p class="field"><label class="classic required" for="link_href"><abbr title="' . __('Required field') . '">*</abbr> ' . __('URL of item menu:') . ' </label>' . form::field('link_href', 50, 255, $link_href, '', 2) . '</p>' . '<p class="field"><label class="classic" for="link_desc">' . __('Description:') . ' </label>' . form::field('link_desc', 50, 255, $link_desc, '', 3) . '</p>' . '<p class="field"><label class="classic" for="link_level">' . __('Level:') . ' </label>' . form::field('link_level', 5, 255, $link_level, '', 5) . '</p>' . '<p class="info">' . __('Note: 0 = hide menu item; 1 = level of item 1; 2 = item level 2; etc.') . '</p>' . '<p class="field"><label class="classic" for="link_lang">' . __('Language:') . ' </label>' . form::field('link_lang', 5, 5, $link_lang, '', 4) . '</p>' . '<p class="field"><label class="classic" for="link_class">' . __('Class:') . ' </label>' . form::field('link_class', 50, 32, $link_class, '', 6) . '</p>' . '</div>' . '<p>' . form::hidden(array('p'), 'menu') . $core->formNonce() . '<input type="submit" name="add_link" value="' . __('Save') . '" tabindex="7" /></p>' . '</form>' . '</div>';
dcPage::helpBlock('menu');
?>
</body>
</html>
示例14: __
<div id="file-chooser">
<h3><?php
echo __('Templates files');
?>
</h3>
<?php
echo $o->filesList('tpl', '<a href="' . $p_url . '&tpl=%2$s" class="tpl-link">%1$s</a>');
?>
<h3><?php
echo __('CSS files');
?>
</h3>
<?php
echo $o->filesList('css', '<a href="' . $p_url . '&css=%2$s" class="css-link">%1$s</a>');
?>
<h3><?php
echo __('JavaScript files');
?>
</h3>
<?php
echo $o->filesList('js', '<a href="' . $p_url . '&js=%2$s" class="js-link">%1$s</a>');
?>
</div>
<?php
dcPage::helpBlock('themeEditor');
?>
</body>
</html>
示例15: foreach
# Dashboard elements
echo '<div id="dashboard-main">';
# Dashboard icons
echo '<div id="icons">';
foreach ($__dashboard_icons as $i) {
echo '<p><a href="' . $i[1] . '"><img src="' . dc_admin_icon_url($i[2]) . '" alt="" />' . '<br /><span>' . $i[0] . '</span></a></p>';
}
echo '</div>';
if ($core->auth->user_prefs->dashboard->quickentry) {
if ($core->auth->check('usage,contentadmin', $core->blog->id)) {
# Getting categories
$categories_combo = dcAdminCombos::getCategoriesCombo($core->blog->getCategories(array('post_type' => 'post')));
echo '<div id="quick">' . '<h3>' . __('Quick entry') . sprintf(' › %s', $core->auth->getOption('post_format')) . '</h3>' . '<form id="quick-entry" action="' . $core->adminurl->get('admin.post') . '" method="post" class="fieldset">' . '<h4>' . __('New entry') . '</h4>' . '<p class="col"><label for="post_title" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Title:') . '</label>' . form::field('post_title', 20, 255, '', 'maximal') . '</p>' . '<p class="area"><label class="required" ' . 'for="post_content"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Content:') . '</label> ' . form::textarea('post_content', 50, 10) . '</p>' . '<p><label for="cat_id" class="classic">' . __('Category:') . '</label> ' . form::combo('cat_id', $categories_combo) . '</p>' . ($core->auth->check('categories', $core->blog->id) ? '<div>' . '<p id="new_cat" class="q-cat">' . __('Add a new category') . '</p>' . '<p class="q-cat"><label for="new_cat_title">' . __('Title:') . '</label> ' . form::field('new_cat_title', 30, 255, '', '') . '</p>' . '<p class="q-cat"><label for="new_cat_parent">' . __('Parent:') . '</label> ' . form::combo('new_cat_parent', $categories_combo, '', '') . '</p>' . '<p class="form-note info clear">' . __('This category will be created when you will save your post.') . '</p>' . '</div>' : '') . '<p><input type="submit" value="' . __('Save') . '" name="save" /> ' . ($core->auth->check('publish', $core->blog->id) ? '<input type="hidden" value="' . __('Save and publish') . '" name="save-publish" />' : '') . $core->formNonce() . form::hidden('post_status', -2) . form::hidden('post_format', $core->auth->getOption('post_format')) . form::hidden('post_excerpt', '') . form::hidden('post_lang', $core->auth->getInfo('user_lang')) . form::hidden('post_notes', '') . '</p>' . '</form>' . '</div>';
}
}
foreach ($__dashboard_contents as $i) {
if ($i->count() > 0) {
$dashboardContents .= '';
foreach ($i as $v) {
$dashboardContents .= $v;
}
$dashboardContents .= '';
}
}
if ($dashboardContents != '' || $dashboardItems != '') {
echo '<div id="dashboard-boxes">' . '<div class="db-items">' . $dashboardItems . $dashboardContents . '</div>' . '</div>';
}
echo '</div>';
#end dashboard-main
dcPage::helpBlock('core_dashboard');
dcPage::close();