当前位置: 首页>>代码示例>>PHP>>正文


PHP draw_admin_pagination函数代码示例

本文整理汇总了PHP中draw_admin_pagination函数的典型用法代码示例。如果您正苦于以下问题:PHP draw_admin_pagination函数的具体用法?PHP draw_admin_pagination怎么用?PHP draw_admin_pagination使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了draw_admin_pagination函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: intval

 $ban_count = $db->fetch_field($query, "ban_count");
 $per_page = 20;
 if ($mybb->input['page'] > 0) {
     $current_page = intval($mybb->input['page']);
     $start = ($current_page - 1) * $per_page;
     $pages = $ban_count / $per_page;
     $pages = ceil($pages);
     if ($current_page > $pages) {
         $start = 0;
         $current_page = 1;
     }
 } else {
     $start = 0;
     $current_page = 1;
 }
 $pagination = draw_admin_pagination($current_page, $per_page, $ban_count, "index.php?module=user-banning&page={page}");
 $table = new Table();
 $table->construct_header($lang->user);
 $table->construct_header($lang->ban_lifts_on, array("class" => "align_center", "width" => 150));
 $table->construct_header($lang->time_left, array("class" => "align_center", "width" => 150));
 $table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 2, "width" => 200));
 $table->construct_header($lang->moderation, array("class" => "align_center", "colspan" => 1, "width" => 200));
 // Fetch bans
 $query = $db->query("\n\t\tSELECT b.*, a.username AS adminuser, u.username\n\t\tFROM " . TABLE_PREFIX . "banned b\n\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (b.uid=u.uid) \n\t\tLEFT JOIN " . TABLE_PREFIX . "users a ON (b.admin=a.uid) \n\t\tORDER BY lifted ASC\n\t\tLIMIT {$start}, {$per_page}\n\t");
 // Get the banned users
 while ($ban = $db->fetch_array($query)) {
     $profile_link = build_profile_link($ban['username'], $ban['uid'], "_blank");
     $ban_date = my_date($mybb->settings['dateformat'], $ban['dateline']);
     if ($ban['lifted'] == 'perm' || $ban['lifted'] == '' || $ban['bantime'] == 'perm' || $ban['bantime'] == '---') {
         $ban_period = $lang->permenantly;
         $time_remaining = $lifts_on = $lang->na;
开发者ID:Nidrax,项目名称:ppm-1.6,代码行数:31,代码来源:banning.php

示例2: array

     $table->construct_cell($username_link);
     $table->construct_cell("{$title} ({$points})");
     $table->construct_cell($issued_date, array("class" => "align_center"));
     $table->construct_cell($expire_date . $revoked_text, array("class" => "align_center"));
     $table->construct_cell($mod_username_link);
     $table->construct_cell("<a href=\"index.php?module=tools-warninglog&amp;action=view&amp;wid={$row['wid']}\">{$lang->view}</a>", array("class" => "align_center"));
     $table->construct_row();
 }
 if ($table->num_rows() == 0) {
     $table->construct_cell($lang->no_warning_logs, array("colspan" => "6"));
     $table->construct_row();
 }
 $table->output($lang->warning_logs);
 // Do we need to construct the pagination?
 if ($total_warnings > $per_page) {
     echo draw_admin_pagination($view_page, $per_page, $total_warnings, $url) . "<br />";
 }
 $sort_by = array('expires' => $lang->expiry_date, 'dateline' => $lang->issued_date, 'username' => $lang->warned_user, 'issuedby' => $lang->issued_by);
 $order_array = array('asc' => $lang->asc, 'desc' => $lang->desc);
 $form = new Form("index.php?module=tools-warninglog", "post");
 $form_container = new FormContainer($lang->filter_warning_logs);
 $form_container->output_row($lang->filter_warned_user, "", $form->generate_text_box('filter[username]', $mybb->input['filter']['username'], array('id' => 'filter_username')), 'filter_username');
 $form_container->output_row($lang->filter_issued_by, "", $form->generate_text_box('filter[mod_username]', $mybb->input['filter']['mod_username'], array('id' => 'filter_mod_username')), 'filter_mod_username');
 $form_container->output_row($lang->filter_reason, "", $form->generate_text_box('filter[reason]', $mybb->input['filter']['reason'], array('id' => 'filter_reason')), 'filter_reason');
 $form_container->output_row($lang->sort_by, "", $form->generate_select_box('filter[sortby]', $sort_by, $mybb->input['filter']['sortby'], array('id' => 'filter_sortby')) . " {$lang->in} " . $form->generate_select_box('filter[order]', $order_array, $order, array('id' => 'filter_order')) . " {$lang->order}", 'filter_order');
 $form_container->output_row($lang->results_per_page, "", $form->generate_text_box('filter[per_page]', $per_page, array('id' => 'filter_per_page')), 'filter_per_page');
 $form_container->end();
 $buttons[] = $form->generate_submit_button($lang->filter_warning_logs);
 $form->output_submit_wrapper($buttons);
 $form->end();
 $page->output_footer();
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:warninglog.php

示例3: array

     }
     $table->construct_cell($logitem['profilelink']);
     $table->construct_cell($logitem['dateline'], array("class" => "align_center"));
     $table->construct_cell($logitem['action'], array("class" => "align_center"));
     $table->construct_cell($information);
     $table->construct_cell($logitem['ipaddress'], array("class" => "align_center"));
     $table->construct_row();
 }
 if ($table->num_rows() == 0) {
     $table->construct_cell($lang->no_modlogs, array("colspan" => "5"));
     $table->construct_row();
 }
 $table->output($lang->mod_logs);
 // Do we need to construct the pagination?
 if ($rescount > $perpage) {
     echo draw_admin_pagination($pagecnt, $perpage, $rescount, "index.php?module=tools/modlog&amp;perpage={$perpage}&amp;uid={$mybb->input['uid']}&amp;fid={$mybb->input['fid']}&amp;sortby={$mybb->input['sortby']}&amp;order={$order}") . "<br />";
 }
 // Fetch filter options
 $sortbysel[$mybb->input['sortby']] = "selected=\"selected\"";
 $ordersel[$mybb->input['order']] = "selected=\"selected\"";
 $user_options[''] = $lang->all_moderators;
 $user_options['0'] = '----------';
 $query = $db->query("\n\t\tSELECT DISTINCT l.uid, u.username\n\t\tFROM " . TABLE_PREFIX . "moderatorlog l\n\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (l.uid=u.uid)\n\t\tORDER BY u.username ASC\n\t");
 while ($user = $db->fetch_array($query)) {
     $selected = '';
     if ($mybb->input['uid'] == $user['uid']) {
         $selected = "selected=\"selected\"";
     }
     $user_options[$user['uid']] = $user['username'];
 }
 $sort_by = array('dateline' => $lang->date, 'username' => $lang->username, 'forum' => $lang->forum_name, 'thread' => $lang->thread_subject);
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:modlog.php

示例4: intval

 $log_count = $db->fetch_field($query, "log_count");
 $per_page = 50;
 if ($mybb->input['page'] > 0) {
     $current_page = intval($mybb->input['page']);
     $start = ($current_page - 1) * $per_page;
     $pages = $log_count / $per_page;
     $pages = ceil($pages);
     if ($current_page > $pages) {
         $start = 0;
         $current_page = 1;
     }
 } else {
     $start = 0;
     $current_page = 1;
 }
 $pagination = draw_admin_pagination($current_page, $per_page, $log_count, "index.php?module=tools/tasks&amp;action=logs&amp;page={page}");
 $query = $db->query("\n\t\tSELECT l.*, t.title\n\t\tFROM " . TABLE_PREFIX . "tasklog l\n\t\tLEFT JOIN " . TABLE_PREFIX . "tasks t ON (t.tid=l.tid)\n\t\tORDER BY l.dateline DESC\n\t\tLIMIT {$start}, {$per_page}\n\t");
 while ($log_entry = $db->fetch_array($query)) {
     $log_entry['title'] = htmlspecialchars_uni($log_entry['title']);
     $log_entry['data'] = nl2br(htmlspecialchars_uni($log_entry['data']));
     $date = my_date($mybb->settings['dateformat'], $log_entry['dateline']) . ", " . my_date($mybb->settings['timeformat'], $log_entry['dateline']);
     $table->construct_cell("<a href=\"index.php?module=tools/tasks&amp;action=edit&amp;tid={$log_entry['tid']}\">{$log_entry['title']}</a>");
     $table->construct_cell($date, array("class" => "align_center"));
     $table->construct_cell($log_entry['data']);
     $table->construct_row();
 }
 if ($table->num_rows() == 0) {
     $table->construct_cell($lang->no_task_logs, array("colspan" => "3"));
     $table->construct_row();
 }
 $table->output($lang->task_logs);
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:tasks.php

示例5: ceil

     $current_page = $mybb->get_input('page', MyBB::INPUT_INT);
     $start = ($current_page - 1) * $per_page;
     $pages = $num_requests / $per_page;
     $pages = ceil($pages);
     if ($current_page > $pages) {
         $start = 0;
         $current_page = 1;
     }
 } else {
     $start = 0;
     $current_page = 1;
 }
 // Do we need to construct the pagination?
 $pagination = '';
 if ($num_requests > $per_page) {
     $pagination = draw_admin_pagination($page, $per_page, $num_requests, "index.php?module=user-groups&amp;action=join_requests&gid={$group['gid']}");
     echo $pagination;
 }
 $form = new Form("index.php?module=user-groups&amp;action=join_requests&gid={$group['gid']}", "post");
 $table = new Table();
 $table->construct_header($form->generate_check_box("checkall", 1, "", array('class' => 'checkall')), array('width' => 1));
 $table->construct_header($lang->users);
 $table->construct_header($lang->reason);
 $table->construct_header($lang->date_requested, array("class" => 'align_center', "width" => 200));
 $table->construct_header($lang->controls, array("class" => "align_center", "width" => 200));
 $query = $db->query("\n\t\tSELECT j.*, u.username\n\t\tFROM " . TABLE_PREFIX . "joinrequests j\n\t\tINNER JOIN " . TABLE_PREFIX . "users u ON (u.uid=j.uid)\n\t\tWHERE j.gid='{$group['gid']}'\n\t\tORDER BY dateline ASC\n\t\tLIMIT {$start}, {$per_page}\n\t");
 while ($request = $db->fetch_array($query)) {
     $table->construct_cell($form->generate_check_box("users[]", $request['uid'], ""));
     $table->construct_cell("<strong>" . build_profile_link($request['username'], $request['uid'], "_blank") . "</strong>");
     $table->construct_cell(htmlspecialchars_uni($request['reason']));
     $table->construct_cell(my_date('relative', $request['dateline']), array('class' => 'align_center'));
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:groups.php

示例6: get_admin_log_action

     // Get detailed information from meta
     $information = get_admin_log_action($logitem);
     $table->construct_cell($logitem['profilelink']);
     $table->construct_cell($logitem['dateline'], array('class' => 'align_center'));
     $table->construct_cell($information);
     $table->construct_cell($logitem['ipaddress'], array('class' => 'align_center'));
     $table->construct_row();
 }
 if ($table->num_rows() == 0) {
     $table->construct_cell($lang->no_adminlogs, array('colspan' => '4'));
     $table->construct_row();
 }
 $table->output($lang->admin_logs);
 // Do we need to construct the pagination?
 if ($rescount > $perpage) {
     echo draw_admin_pagination($pagecnt, $perpage, $rescount, "index.php?module=tools-adminlog&amp;perpage={$perpage}&amp;uid={$mybb->input['uid']}&amp;fid={$mybb->input['fid']}&amp;sortby={$mybb->input['sortby']}&amp;order={$order}&amp;filter_module=" . htmlspecialchars_uni($mybb->input['filter_module'])) . "<br />";
 }
 // Fetch filter options
 $sortbysel[$mybb->input['sortby']] = 'selected="selected"';
 $ordersel[$mybb->input['order']] = 'selected="selected"';
 $user_options[''] = $lang->all_administrators;
 $user_options['0'] = '----------';
 $query = $db->query("\n\t\tSELECT DISTINCT l.uid, u.username\n\t\tFROM " . TABLE_PREFIX . "adminlog l\n\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (l.uid=u.uid)\n\t\tORDER BY u.username ASC\n\t");
 while ($user = $db->fetch_array($query)) {
     $user_options[$user['uid']] = $user['username'];
 }
 $module_options = array();
 $module_options[''] = $lang->all_modules;
 $module_options['0'] = '----------';
 $query = $db->query("\n\t\tSELECT DISTINCT l.module\n\t\tFROM " . TABLE_PREFIX . "adminlog l\n\t\tORDER BY l.module ASC\n\t");
 while ($module = $db->fetch_array($query)) {
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:31,代码来源:adminlog.php

示例7: number_format

                $actions .= '<img src="spamalyser_img/action_' . $action . '.gif" title="' . $lang->{$lang_title} . '" alt="' . $lang->{$lang_alt} . '" style="font-size: smaller;" />';
            }
            if ($actions) {
                $actions = '<br />' . $actions;
            }
            $table->construct_cell('<a href="' . SPAMALYSER_URL . '&amp;action=view&amp;lid=' . $logitem['lid'] . '">' . number_format($logitem['score'], 7) . '</a>' . $actions, array('class' => 'align_center'));
            $table->construct_row();
        }
    }
    if ($table->num_rows() == 0) {
        $table->construct_cell($lang->no_spamalyserlogs, array('colspan' => '4'));
        $table->construct_row();
    }
    $table->output($lang->spamalyser_logs);
    if ($pages > 1) {
        echo draw_admin_pagination($pagenum, $perpage, $entries, SPAMALYSER_URL . $urlargs) . '<br />';
    }
    // HTML display
    $sortbysel = array($sortby => ' selected="selected"');
    $ordersel = array($order => ' selected="selected"');
    $scorecmpsel = array($scorecmp => ' selected="selected"');
    $form = new Form('index.php', 'get');
    echo $form->generate_hidden_field('module', 'tools' . ($mybb->version_code >= 1500 ? '-' : '/') . 'spamalyserlog');
    $form_container = new FormContainer($lang->filter_spamalyser_logs);
    $form_container->output_row($lang->sort_by, '', $form->generate_select_box('sortby', array('dateline' => $lang->date, 'username' => $lang->username, 'score' => $lang->weighting), $sortby, array('id' => 'sortby')) . ' ' . $lang->in . ' ' . $form->generate_select_box('order', array('asc' => $lang->asc, 'desc' => $lang->desc), $order, array('id' => 'order')) . ' ' . $lang->order, 'order');
    $form_container->output_row($lang->results_per_page, '', $form->generate_text_box('perpage', $perpage, array('id' => 'perpage')), 'perpage');
    $form_container->end();
    $form->output_submit_wrapper(array($form->generate_submit_button($lang->filter_spamalyser_logs)));
    $form->end();
    $page->output_footer();
}
开发者ID:andarms,项目名称:python-gaming.com,代码行数:31,代码来源:spamalyserlog.php

示例8: array

 if (!$db->num_rows($query)) {
     $table->construct_cell('<div align="center">' . $lang->ougc_awards_view_empty . '</div>', array('colspan' => 6));
     $table->construct_row();
     $table->output($lang->ougc_awards_tab_view_d);
 } else {
     if ($mybb->request_method == 'post' && $mybb->get_input('action') == 'updatedisporder') {
         foreach ($mybb->input['disporder'] as $aid => $disporder) {
             $awards->update_award(array('disporder' => $disporder), $aid);
         }
         $awards->update_cache();
         $awards->admin_redirect();
     }
     $form = new Form($awards->build_url('action=updatedisporder'), 'post');
     $query2 = $db->simple_select('ougc_awards', 'COUNT(aid) AS awards');
     $awardscount = (int) $db->fetch_field($query2, 'awards');
     echo draw_admin_pagination($mybb->input['page'], $limit, $awardscount, 'index.php?module=user-ougc_awards');
     while ($award = $db->fetch_array($query)) {
         $edit_link = "index.php?module=user-ougc_awards&amp;action=edit&amp;aid={$award['aid']}";
         $award['visible'] or $award['name'] = '<i>' . $award['name'] . '</i>';
         $table->construct_cell('<img src="' . $awards->get_award_icon($award['aid']) . '" />', array('class' => 'align_center'));
         $table->construct_cell('<a href="' . $edit_link . '">' . $award['name'] . '</a>');
         $table->construct_cell($award['description']);
         $table->construct_cell($form->generate_text_box('disporder[' . $award['aid'] . ']', (int) $award['disporder'], array('style' => 'text-align: center; width: 30px;')), array('class' => 'align_center'));
         $table->construct_cell('<img src="styles/default/images/icons/bullet_o' . (!$award['visible'] ? 'ff' : 'n') . '.png" alt="" title="' . (!$award['visible'] ? $lang->ougc_awards_form_hidden : $lang->ougc_awards_form_visible) . '" />', array('class' => 'align_center'));
         $popup = new PopupMenu("award_{$award['aid']}", $lang->options);
         $popup->add_item($lang->ougc_awards_tab_give, "index.php?module=user-ougc_awards&amp;action=give&amp;aid={$award['aid']}");
         $popup->add_item($lang->ougc_awards_tab_revoke, "index.php?module=user-ougc_awards&amp;action=revoke&amp;aid={$award['aid']}");
         $popup->add_item($lang->ougc_awards_tab_users, "index.php?module=user-ougc_awards&amp;action=users&amp;aid={$award['aid']}");
         $popup->add_item($lang->ougc_awards_tab_edit, $edit_link);
         $popup->add_item($lang->ougc_awards_tab_delete, "index.php?module=user-ougc_awards&amp;action=delete&amp;aid={$award['aid']}");
         $table->construct_cell($popup->fetch(), array('class' => 'align_center'));
开发者ID:ambsalinas,项目名称:anima,代码行数:31,代码来源:ougc_awards.php

示例9: date

        $log['dateline'] = date($mybb->settings['dateformat'], $log['dateline']) . ", " . date($mybb->settings['timeformat'], $log['dateline']);
        $table->construct_cell($log['username']);
        $table->construct_cell($log['type'], array('style' => 'text-align: center;'));
        $table->construct_cell($log['oldusergroup'], array('style' => 'text-align: center;'));
        $table->construct_cell($log['newusergroup'], array('style' => 'text-align: center;'));
        $table->construct_cell($log['dateline'], array('style' => 'text-align: center;'));
        $table->construct_row();
    }
    if ($table->num_rows() == 0) {
        $table->construct_cell($lang->no_promotion_logs, array("colspan" => "5"));
        $table->construct_row();
    }
    $table->output($lang->promotion_logs);
    $query = $db->simple_select("promotionlogs", "COUNT(plid) as promotionlogs");
    $total_rows = $db->fetch_field($query, "promotionlogs");
    echo "<br />" . draw_admin_pagination($mybb->input['page'], "20", $total_rows, "index.php?module=user-group_promotions&amp;action=logs&amp;page={page}");
    $page->output_footer();
}
if (!$mybb->input['action']) {
    $plugins->run_hooks("admin_user_group_promotions_start");
    $page->output_header($lang->promotion_manager);
    $page->output_nav_tabs($sub_tabs, 'usergroup_promotions');
    $table = new Table();
    $table->construct_header($lang->promotion);
    $table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));
    $query = $db->simple_select("promotions", "*", "", array("order_by" => "title", "order_dir" => "asc"));
    while ($promotion = $db->fetch_array($query)) {
        $promotion['title'] = htmlspecialchars_uni($promotion['title']);
        $promotion['description'] = htmlspecialchars_uni($promotion['description']);
        if ($promotion['enabled'] == 1) {
            $icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.png\" alt=\"({$lang->alt_enabled})\" title=\"{$lang->alt_enabled}\"  style=\"vertical-align: middle;\" /> ";
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:group_promotions.php

示例10: array

         $table->construct_header($lang->date_uploaded, array("class" => "align_center"));
         // Fetch matching attachments
         $query = $db->query("\n\t\t\t\tSELECT a.*, p.tid, p.fid, t.subject, p.uid, p.username, u.username AS user_username\n\t\t\t\tFROM " . TABLE_PREFIX . "attachments a\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "posts p ON (p.pid=a.pid)\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "threads t ON (t.tid=p.tid)\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (u.uid=a.uid)\n\t\t\t\tWHERE {$search_sql}\n\t\t\t\tORDER BY {$sort_field} {$mybb->input['order']}\n\t\t\t\tLIMIT {$start}, {$mybb->input['perpage']}\n\t\t\t");
         while ($attachment = $db->fetch_array($query)) {
             build_attachment_row($attachment, $table, true);
         }
         // Need to draw pagination for this result set
         if ($num_results > $mybb->input['perpage']) {
             $pagination_url = "index.php?module=forum-attachments&amp;results=1";
             $pagination_vars = array('perpage', 'sortby', 'order', 'filename', 'mimetype', 'username', 'fid', 'downloads', 'downloads_dir', 'dateuploaded', 'dateuploaded_dir', 'filesize', 'filesize_dir');
             foreach ($pagination_vars as $var) {
                 if ($mybb->input[$var]) {
                     $pagination_url .= "&{$var}=" . urlencode($mybb->input[$var]);
                 }
             }
             $pagination = draw_admin_pagination($mybb->input['page'], $mybb->input['perpage'], $num_results, $pagination_url);
         }
         echo $pagination;
         $table->output($lang->results);
         echo $pagination;
         $buttons[] = $form->generate_submit_button($lang->button_delete_attachments);
         $form->output_submit_wrapper($buttons);
         $form->end();
         $page->output_footer();
     }
 }
 $page->output_header($lang->find_attachments);
 $page->output_nav_tabs($sub_tabs, 'find_attachments');
 // If we have any error messages, show them
 if ($errors) {
     $page->output_inline_error($errors);
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:attachments.php

示例11: array

    } else {
        $default_class = "search_default";
        $value = $lang->search_for_themes;
    }
    echo $search->generate_text_box('keywords', $value, array('id' => 'search_keywords', 'class' => "{$default_class} field150 field_small")) . "\n";
    echo "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n";
    echo "<script type=\"text/javascript\">\n\t\tvar form = \$(\"#search_form\");\n\t\tform.submit(function()\n\t\t{\n\t\t\tvar search = \$('#search_keywords');\n\t\t\tif(search.val() == '' || search.val() == '{$lang->search_for_themes}')\n\t\t\t{\n\t\t\t\tsearch.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t\tvar search = \$('#search_keywords');\n\t\tsearch.focus(function()\n\t\t{\n\t\t\tvar search_focus = \$(this);\n\t\t\tif(search_focus.val() == '{$lang->search_for_themes}')\n\t\t\t{\n\t\t\t\tsearch_focus.removeClass('search_default');\n\t\t\t\tsearch_focus.val('');\n\t\t\t}\n\t\t});\n\n\t\tsearch.blur(function()\n\t\t{\n\t\t\tvar search_blur = \$(this);\n\t\t\tif(search_blur.val() == '')\n\t\t\t{\n\t\t\t\tsearch_blur.addClass('search_default');\n\t\t\t\tsearch_blur.val('{$lang->search_for_themes}');\n\t\t\t}\n\t\t});\n\n\t\t// fix the styling used if we have a different default value\n\t\tif(search.val() != '{$lang->search_for_themes}')\n\t\t{\n\t\t\tsearch.removeClass('search_default');\n\t\t}\n\t\t</script>\n";
    echo "</div>\n";
    echo $search->end();
    // Recommended themes = Default; Otherwise search results & pagination
    if ($mybb->request_method == "post") {
        $table->output("<span style=\"float: right;\"><small><a href=\"http://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>" . $lang->sprintf($lang->browse_results_for_mybb, $mybb->version));
    } else {
        $table->output("<span style=\"float: right;\"><small><a href=\"http://community.mybb.com/mods.php?action=browse&category=themes\" target=\"_blank\">{$lang->browse_all_themes}</a></small></span>" . $lang->sprintf($lang->recommended_themes_for_mybb, $mybb->version));
    }
    echo "<br />" . draw_admin_pagination($mybb->input['page'], 15, $tree['results']['attributes']['total'], "index.php?module=style-themes&amp;action=browse{$keywords}&amp;page={page}");
    $page->output_footer();
}
if ($mybb->input['action'] == "import") {
    $plugins->run_hooks("admin_style_themes_import");
    if ($mybb->request_method == "post") {
        if (!$_FILES['local_file'] && !$mybb->input['url']) {
            $errors[] = $lang->error_missing_url;
        }
        if (!$errors) {
            // Find out if there was an uploaded file
            if ($_FILES['local_file']['error'] != 4) {
                // Find out if there was an error with the uploaded file
                if ($_FILES['local_file']['error'] != 0) {
                    $errors[] = $lang->error_uploadfailed . $lang->error_uploadfailed_detail;
                    switch ($_FILES['local_file']['error']) {
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:themes.php

示例12: build_multipage

 function build_multipage($count, $url = '', $check = false)
 {
     global $mybb, $multipage;
     if ($check) {
         $input = explode('=', $params);
         if (isset($mybb->input[$input[0]]) && $mybb->input[$input[0]] != $input[1]) {
             $mybb->input['page'] = 0;
         }
     }
     if ($mybb->get_input('page', 1) > 0) {
         $this->query_start = ($mybb->get_input('page', 1) - 1) * $this->query_limit;
         if ($mybb->get_input('page', 1) > ceil($count / $this->query_limit)) {
             $this->query_start = 0;
             $mybb->input['page'] = 1;
         }
     } else {
         $this->query_start = 0;
         $mybb->input['page'] = 1;
     }
     if (defined('IN_ADMINCP')) {
         $multipage = (string) draw_admin_pagination($mybb->get_input('page', 1), $this->query_limit, $count, $url);
     } else {
         $multipage = (string) multipage($count, $this->query_limit, $mybb->get_input('page', 1), $url);
     }
 }
开发者ID:ambsalinas,项目名称:anima,代码行数:25,代码来源:ougc_pages.php

示例13: array

    $table->construct_header($lang->date);
    $table->construct_header($lang->users);
    $table->construct_header($lang->threads);
    $table->construct_header($lang->posts);
    $query = $db->simple_select("stats", "*", "dateline >= '" . (int) $start_dateline . "' AND dateline <= '" . (int) $end_dateline . "'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit_start' => $start, 'limit' => $per_page));
    while ($stat = $db->fetch_array($query)) {
        $table->construct_cell("<strong>" . date($mybb->settings['dateformat'], $stat['dateline']) . "</strong>");
        $table->construct_cell(my_number_format($stat['numusers']) . " <small>" . generate_growth_string($stats[$stat['dateline']]['change_users']) . "</small>");
        $table->construct_cell(my_number_format($stat['numthreads']) . " <small>" . generate_growth_string($stats[$stat['dateline']]['change_threads']) . "</small>");
        $table->construct_cell(my_number_format($stat['numposts']) . " <small>" . generate_growth_string($stats[$stat['dateline']]['change_posts']) . "</small>");
        $table->construct_row();
    }
    $table->output($lang->overall_statistics);
    $url_range = "&amp;from_month=" . $mybb->get_input('from_month', MyBB::INPUT_INT) . "&amp;from_day=" . $mybb->get_input('from_day', MyBB::INPUT_INT) . "&amp;from_year=" . $mybb->get_input('from_year', MyBB::INPUT_INT);
    $url_range .= "&amp;to_month=" . $mybb->get_input('to_month', MyBB::INPUT_INT) . "&amp;to_day=" . $mybb->get_input('to_day', MyBB::INPUT_INT) . "&amp;to_year=" . $mybb->get_input('to_year', MyBB::INPUT_INT);
    echo draw_admin_pagination($mybb->input['page'], $per_page, $total_rows, "index.php?module=tools-statistics{$url_range}&amp;page={page}");
    $page->output_footer();
}
function generate_growth_string($number)
{
    global $lang, $cp_style;
    if ($number === null) {
        return "";
    }
    $number = (int) $number;
    $friendly_number = my_number_format(abs($number));
    if ($number > 0) {
        $growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/increase.png\" alt=\"{$lang->increase}\" title=\"{$lang->increase}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";
    } elseif ($number == 0) {
        $growth_string = "(<img src=\"./styles/{$cp_style}/images/icons/no_change.png\" alt=\"{$lang->no_change}\" title=\"{$lang->no_change}\" style=\"vertical-align: middle; margin-top: -2px;\" /> {$friendly_number})";
    } else {
开发者ID:olada,项目名称:mybbintegrator,代码行数:31,代码来源:statistics.php

示例14: array

        $table->construct_cell($log['error']);
        $table->construct_cell($log['dateline'], array("class" => "align_center"));
        $table->construct_row();
    }
    if ($table->num_rows() == 0) {
        $table->construct_cell($lang->no_logs, array("colspan" => 5));
        $table->construct_row();
        $table->output($lang->system_email_log);
    } else {
        $table->output($lang->system_email_log);
        $buttons[] = $form->generate_submit_button($lang->delete_selected, array('onclick' => "return confirm('{$lang->confirm_delete_logs}');"));
        $buttons[] = $form->generate_submit_button($lang->delete_all, array('name' => 'delete_all', 'onclick' => "return confirm('{$lang->confirm_delete_all_logs}');"));
        $form->output_submit_wrapper($buttons);
    }
    $form->end();
    $query = $db->simple_select("mailerrors l", "COUNT(eid) AS logs", "1=1 {$additional_sql_criteria}");
    $total_rows = $db->fetch_field($query, "logs");
    echo "<br />" . draw_admin_pagination($mybb->input['page'], $per_page, $total_rows, "index.php?module=tools/mailerrors&amp;page={page}{$additional_criteria}");
    $form = new Form("index.php?module=tools/mailerrors", "post");
    $form_container = new FormContainer($lang->filter_system_email_log);
    $form_container->output_row($lang->subject_contains, "", $form->generate_text_box('subject', $mybb->input['subject'], array('id' => 'subject')), 'subject');
    $form_container->output_row($lang->error_message_contains, "", $form->generate_text_box('error', $mybb->input['error'], array('id' => 'error')), 'error');
    $form_container->output_row($lang->to_address_contains, "", $form->generate_text_box('toaddress', $mybb->input['toaddress'], array('id' => 'toaddress')), 'toaddress');
    $form_container->output_row($lang->from_address_contains, "", $form->generate_text_box('fromaddress', $mybb->input['fromaddress'], array('id' => 'fromaddress')), 'fromaddress');
    $form_container->end();
    $buttons = array();
    $buttons[] = $form->generate_submit_button($lang->filter_system_email_log);
    $form->output_submit_wrapper($buttons);
    $form->end();
    $page->output_footer();
}
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:mailerrors.php

示例15: Table

    }
    $table = new Table();
    $table->construct_header($lang->image, array("class" => "align_center", "width" => 1));
    $table->construct_header($lang->name, array("width" => "35%"));
    $table->construct_header($lang->text_replace, array("width" => "35%"));
    $table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 2));
    $query = $db->simple_select("smilies", "*", "", array('limit_start' => $start, 'limit' => 20, 'order_by' => 'disporder'));
    while ($smilie = $db->fetch_array($query)) {
        $smilie['image'] = str_replace("{theme:imgdir}", $theme['imgdir'], $smilie['image']);
        if (my_strpos($smilie['image'], "p://") || substr($smilie['image'], 0, 1) == "/") {
            $image = $smilie['image'];
        } else {
            $image = "../" . $smilie['image'];
        }
        $table->construct_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center"));
        $table->construct_cell(htmlspecialchars_uni($smilie['name']));
        $table->construct_cell(htmlspecialchars_uni($smilie['find']));
        $table->construct_cell("<a href=\"index.php?module=config-smilies&amp;action=edit&amp;sid={$smilie['sid']}\">{$lang->edit}</a>", array("class" => "align_center"));
        $table->construct_cell("<a href=\"index.php?module=config-smilies&amp;action=delete&amp;sid={$smilie['sid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_smilie_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));
        $table->construct_row();
    }
    if ($table->num_rows() == 0) {
        $table->construct_cell($lang->no_smilies, array('colspan' => 5));
        $table->construct_row();
    }
    $table->output($lang->manage_smilies);
    $query = $db->simple_select("smilies", "COUNT(sid) as smilies");
    $total_rows = $db->fetch_field($query, "smilies");
    echo "<br />" . draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config-smilies&amp;page={page}");
    $page->output_footer();
}
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:smilies.php


注:本文中的draw_admin_pagination函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。