public function display($page, $nb_per_page, $enclose_block = '') { if ($this->rs->isEmpty()) { echo '<p><strong>' . __('No page') . '</strong></p>'; } else { $pager = new dcPager($page, $this->rs_count, $nb_per_page, 10); $entries = array(); if (isset($_REQUEST['entries'])) { foreach ($_REQUEST['entries'] as $v) { $entries[(int) $v] = true; } } $html_block = '<div class="table-outer">' . '<table class="maximal dragable"><thead><tr>'; $cols = array('title' => '<th colspan="3" scope="col" class="first">' . __('Title') . '</th>', 'date' => '<th scope="col">' . __('Date') . '</th>', 'author' => '<th scope="col">' . __('Author') . '</th>', 'comments' => '<th scope="col"><img src="images/comments.png" alt="" title="' . __('Comments') . '" /><span class="hidden">' . __('Comments') . '</span></th>', 'trackbacks' => '<th scope="col"><img src="images/trackbacks.png" alt="" title="' . __('Trackbacks') . '" /><span class="hidden">' . __('Trackbacks') . '</span></th>', 'status' => '<th scope="col">' . __('Status') . '</th>'); $cols = new ArrayObject($cols); $this->core->callBehavior('adminPagesListHeader', $this->core, $this->rs, $cols); $html_block .= '<tr>' . implode(iterator_to_array($cols)) . '</tr></thead><tbody id="pageslist">%s</tbody></table></div>'; if ($enclose_block) { $html_block = sprintf($enclose_block, $html_block); } echo $pager->getLinks(); $blocks = explode('%s', $html_block); echo $blocks[0]; $count = 0; while ($this->rs->fetch()) { echo $this->postLine($count, isset($entries[$this->rs->post_id])); $count++; } echo $blocks[1]; echo $pager->getLinks(); } }
public function setURL() { parent::setUrl(); $this->page_url .= '#' . $this->anchor; $this->form_action .= '#' . $this->anchor; }
$fmt_form_media .= '<input type="submit" class="select" id="select_medias" name="select_medias" value="' . __('Choose selected medias') . '"/> '; } if (!$popup) { $fmt_form_media .= '<input type="submit" class="delete" id="delete_medias" name="delete_medias" value="' . __('Remove selected medias') . '"/>'; } $fmt_form_media .= '</p>' . '</div>'; } $fmt_form_media .= '</form>'; echo '<div class="media-list">'; echo $last_folders; echo '<form action="' . $core->adminurl->get("admin.media") . '" method="get" id="search-form">' . '<p><label for="search" class="classic">' . __('Search:') . '</label> ' . form::field('q', 20, 255, $q) . ' ' . '<input type="submit" value="' . __('OK') . '" />' . ' ' . '<span class="form-note">' . __('Will search into media filename (including path), title and description') . '</span>' . form::hidden(array('popup'), $popup) . form::hidden(array('select'), $select) . form::hidden(array('plugin_id'), $plugin_id) . form::hidden(array('post_id'), $post_id) . '</p>' . '</form>'; if (count($items) == 0) { echo '<p>' . __('No file.') . '</p>' . sprintf($fmt_form_media, '', ' hide'); // need for jsUpload to append new media } else { $pager = new dcPager($page, count($items), $nb_per_page, 10); echo '<form action="' . $core->adminurl->get("admin.media") . '" method="get" id="filters-form">' . '<span class="media-file-mode">' . '<a href="' . $core->adminurl->get("admin.media", array_merge($page_url_params, array('file_mode' => 'grid'))) . '" title="' . __('Grid display mode') . '">' . '<img src="images/grid-' . ($file_mode == 'grid' ? 'on' : 'off') . '.png" alt="' . __('Grid display mode') . '" />' . '</a>' . '<a href="' . $core->adminurl->get("admin.media", array_merge($page_url_params, array('file_mode' => 'list'))) . '" title="' . __('List display mode') . '">' . '<img src="images/list-' . ($file_mode == 'list' ? 'on' : 'off') . '.png" alt="' . __('List display mode') . '" />' . '</a>' . '</span>' . '<p class="three-boxes"><label for="file_sort" class="classic">' . __('Sort files:') . '</label> ' . form::combo('file_sort', $sort_combo, $file_sort) . '</p>' . '<p class="three-boxes"><label for="nb_per_page" class="classic">' . __('Number of elements displayed per page:') . '</label> ' . form::field('nb_per_page', 5, 3, (int) $nb_per_page) . ' ' . '<input type="submit" value="' . __('OK') . '" />' . form::hidden(array('popup'), $popup) . form::hidden(array('select'), $select) . form::hidden(array('plugin_id'), $plugin_id) . form::hidden(array('post_id'), $post_id) . form::hidden(array('q'), $q) . '</p>' . '</form>' . $pager->getLinks(); if ($file_mode == 'list') { $table = '<div class="table-outer">' . '<table>' . '<caption class="hidden">' . __('Media list') . '</caption>' . '<tr>' . '<th colspan="2" class="first">' . __('Name') . '</th>' . '<th scope="col">' . __('Date') . '</th>' . '<th scope="col">' . __('Size') . '</th>' . '</tr>'; $dlist = ''; $flist = ''; for ($i = $pager->index_start, $j = 0; $i <= $pager->index_end; $i++, $j++) { if ($items[$i]->d) { $dlist .= mediaItemLine($items[$i], $j, $query, true); } else { $flist .= mediaItemLine($items[$i], $j, $query, true); } } $table .= $dlist . $flist; $table .= '</table></div>'; echo sprintf($fmt_form_media, $table, '');
public function display($page, $nb_per_page, $enclose_block = '', $filter = false) { if ($this->rs->isEmpty()) { if ($filter) { echo '<p><strong>' . __('No user matches the filter') . '</strong></p>'; } else { echo '<p><strong>' . __('No user') . '</strong></p>'; } } else { $pager = new dcPager($page, $this->rs_count, $nb_per_page, 10); $html_block = '<div class="table-outer clear">' . '<table>'; if ($filter) { $html_block .= '<caption>' . sprintf(__('List of %s users match the filter.'), $this->rs_count) . '</caption>'; } else { $html_block .= '<caption class="hidden">' . __('Users list') . '</caption>'; } $cols = array('username' => '<th colspan="2" scope="col" class="first">' . __('Username') . '</th>', 'first_name' => '<th scope="col">' . __('First Name') . '</th>', 'last_name' => '<th scope="col">' . __('Last Name') . '</th>', 'display_name' => '<th scope="col">' . __('Display name') . '</th>', 'entries' => '<th scope="col" class="nowrap">' . __('Entries (all types)') . '</th>'); $cols = new ArrayObject($cols); $this->core->callBehavior('adminUserListHeader', $this->core, $this->rs, $cols); $html_block .= '<tr>' . implode(iterator_to_array($cols)) . '</tr>%s</table></div>'; if ($enclose_block) { $html_block = sprintf($enclose_block, $html_block); } echo $pager->getLinks(); $blocks = explode('%s', $html_block); echo $blocks[0]; while ($this->rs->fetch()) { echo $this->userLine(); } echo $blocks[1]; echo $pager->getLinks(); } }
dcPage::success(__('Blog has been successfully deleted.')); } if (!$core->error->flag()) { if ($core->auth->isSuperAdmin()) { echo '<p class="top-add"><a class="button add" href="' . $core->adminurl->get("admin.blog") . '">' . __('Create a new blog') . '</a></p>'; } echo '<form action="' . $core->adminurl->get("admin.blogs") . '" method="get" id="filters-form">' . '<h3 class="hidden">' . __('Filter blogs list') . '</h3>' . '<div class="table">' . '<div class="cell">' . '<h4>' . __('Filters') . '</h4>' . '<p><label for="q" class="ib">' . __('Search:') . '</label> ' . form::field('q', 20, 255, html::escapeHTML($q)) . '</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, html::escapeHTML($sortby)) . '</p>' . '<p><label for="order" class="ib">' . __('Sort:') . '</label> ' . form::combo('order', $order_combo, html::escapeHTML($order)) . '</p>' . '<p><span class="label ib">' . __('Show') . '</span> <label for="nb" class="classic">' . form::field('nb', 3, 3, $nb_per_page) . ' ' . __('blogs per page') . '</label></p>' . '</div>' . '</div>' . '<p><input type="submit" value="' . __('Apply filters and display options') . '" />' . '<br class="clear" /></p>' . '</form>'; # Show blogs if ($nb_blog == 0) { if ($show_filters) { echo '<p><strong>' . __('No blog matches the filter') . '</strong></p>'; } else { echo '<p><strong>' . __('No blog') . '</strong></p>'; } } else { $pager = new dcPager($page, $nb_blog, $nb_per_page, 10); echo $pager->getLinks(); echo '<div class="table-outer">' . '<table class="clear">'; if ($show_filters) { echo '<caption>' . sprintf(__('%d blog matches the filter.', '%d blogs match the filter.', $nb_blog), $nb_blog) . '</caption>'; } else { echo '<caption class="hidden">' . __('Blogs list') . '</caption>'; } echo '<tr>' . '<th scope="col" class="nowrap">' . __('Blog id') . '</th>' . '<th scope="col">' . __('Blog name') . '</th>' . '<th scope="col" class="nowrap">' . __('URL') . '</th>' . '<th scope="col" class="nowrap">' . __('Entries (all types)') . '</th>' . '<th scope="col" class="nowrap">' . __('Last update') . '</th>' . '<th scope="col" class="nowrap">' . __('Status') . '</th>' . '</tr>'; while ($rsStatic->fetch()) { echo blogLine($rsStatic); } echo '</table></div>'; echo $pager->getLinks(); } }