• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP generate_pagination函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: printPageList

function printPageList($start, $numItems, $url)
{
    global $cfg_ServersPerPage;
    $page = floor(($start + 1) / $cfg_ServersPerPage);
    $str = generate_pagination($url, $numItems, $cfg_ServersPerPage, $page * $cfg_ServersPerPage);
    echo "{$str}<P>";
}
开发者ID:andrewroth,项目名称:winbolo,代码行数:7,代码来源:inc_archive.php


示例2: display

 public function display()
 {
     //Sort
     $sort = $this->in->get('sort');
     $sort_suffix = '&amp;sort=' . $sort;
     //redirect on event management
     if ($this->in->exists('manage_b') && $this->in->get('manage_b') == $this->user->lang('manage_events')) {
         $manage_link = './admin/listevents.php';
         redirect($manage_link);
     }
     $start = 0;
     $pagination_suffix = '';
     if ($this->in->exists('start')) {
         $start = $this->in->get('start', 0);
         $pagination_suffix = '&amp;start=' . $start;
     }
     //Output
     $view_list = $this->pdh->get('event', 'id_list');
     //footer
     $event_count = count($view_list);
     $footer_text = sprintf($this->user->lang('listevents_footcount'), $event_count, $this->user->data['user_elimit']);
     $hptt_page_settings = $this->pdh->get_page_settings('listevents', 'hptt_listevents_eventlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => 'viewevent.php', '%link_url_suffix%' => ''));
     $this->tpl->assign_vars(array('EVENT_OUT' => $hptt->get_html_table($sort, $pagination_suffix, $start, $this->user->data['user_elimit'], $footer_text), 'MANAGE_LINK' => $this->user->check_auth('a_event_', false) ? '<a href="admin/manage_events.php' . $this->SID . '" title="' . $this->user->lang('manevents_title') . '"><img src="' . $this->root_path . 'images/glyphs/edit.png" alt="' . $this->user->lang('manevents_title') . '" /></a>' : '', 'EVENT_PAGINATION' => generate_pagination('listevents.php' . $this->SID . $sort_suffix, $event_count, $this->user->data['user_elimit'], $start)));
     $this->core->set_vars(array('page_title' => $this->user->lang('events'), 'template_file' => 'listevents.html', 'display' => true));
 }
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:26,代码来源:listevents.php


示例3: main

    function main($id, $mode)
    {
        global $db, $user, $auth, $template;
        global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
        $error = $notify = array();
        $user->add_lang(array('mods/info_acp_emails_users_list'));
        $mode = request_var('mode', '');
        $start = request_var('start', 0);
        if ($mode == 'list') {
            // How many Users do we have?
            $sql = 'SELECT COUNT(user_id) AS total_users
	FROM ' . USERS_TABLE . '
	WHERE user_type <> ' . USER_IGNORE;
            $result = $db->sql_query($sql);
            $total_users = (int) $db->sql_fetchfield('total_users');
            $db->sql_freeresult($result);
            // want more to display...change the 20 to a higher number
            $tf = 20;
            //Pull Users from the database
            $sql = 'SELECT *
	FROM ' . USERS_TABLE . '
	WHERE user_type <> ' . USER_IGNORE . '
	ORDER BY user_id';
            $result = $db->sql_query_limit($sql, $tf, $start);
            // Assign specific vars
            while ($row = $db->sql_fetchrow($result)) {
                $template->assign_block_vars('list', array('ID' => $row['user_id'], 'EMAIL' => $row['user_email'], 'REGDATE' => $user->format_date($row['user_regdate']), 'LASTVISIT' => $user->format_date($row['user_lastvisit']), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), 'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), 'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), 'U_VIEW_PROFILE' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour'])));
            }
            $this->tpl_name = 'acp_emails_users_list';
            $this->page_title = 'EMAILS_USERS_LIST';
            $template->assign_vars(array('PAGINATION' => generate_pagination($this->u_action, $total_users, $tf, $start), 'PAGE_NUMBER' => on_page($total_users, $tf, $start), 'U_CSV_LIST' => append_sid("{$phpbb_root_path}list.{$phpEx}", 'mode=list'), 'U_ACTION' => $this->u_action, 'TOTAL_USERS' => $total_users == 1 ? $user->lang['USER_COUNT'] : sprintf($user->lang['USER_COUNTS'], $total_users)));
            $db->sql_freeresult($result);
        }
    }
开发者ID:harsha-sira,项目名称:Online-Forum,代码行数:34,代码来源:acp_emails_users_list.php


示例4: display

 public function display()
 {
     //Sort
     $sort = $this->in->get('sort');
     $sort_suffix = '&amp;sort=' . $sort;
     //redirect on member management
     if ($this->in->exists('manage_b') && $this->in->get('manage_b') == $this->user->lang('manage_items')) {
         $manage_link = './admin/listitems.php';
         redirect($manage_link);
     }
     $start = $this->in->get('start', 0);
     $pagination_suffix = $start ? '&amp;start=' . $start : '';
     //Output
     $view_list = $filtered_list = $this->pdh->get('item', 'id_list');
     if ($this->in->exists('search')) {
         $mySearch = $this->in->get('search');
         $searchType = $this->in->get('search_type') ? $this->in->get('search_type') : 'itemname';
         $filtered_list = $this->filter($view_list, $searchType, $mySearch);
     }
     $item_count = count($filtered_list) > 0 ? count($filtered_list) : count($view_list);
     $footer_text = sprintf($this->user->lang('listitems_footcount'), $item_count, $this->user->data['user_ilimit']);
     //init infotooltip
     infotooltip_js();
     $hptt_page_settings = $this->pdh->get_page_settings('listitems', 'hptt_listitems_itemlist');
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $filtered_list, array('%link_url%' => 'viewitem.php', '%link_url_suffix%' => '', '%raid_link_url%' => 'viewraid.php', '%raid_link_url_suffix%' => '', '%itt_lang%' => false, '%itt_direct%' => 0, '%onlyicon%' => 0, '%noicon%' => 0));
     $this->tpl->assign_vars(array('SEARCH_LINK' => '<input type="image" src="' . $this->root_path . 'images/glyphs/view.png" name="search_b" value="1" alt="' . $this->user->lang('Itemsearch_searchby') . '" title="' . $this->user->lang('Itemsearch_searchby') . '" class="absmiddle" />', 'MANAGE_LINK' => $this->user->check_auth('a_item_', false) ? '<a href="admin/manage_items.php' . $this->SID . '" title="' . $this->user->lang('manage_items') . '"><img src="' . $this->root_path . 'images/glyphs/edit.png" alt="' . $this->user->lang('manage_items') . '" /></a>' : '', 'PAGE_OUT' => $hptt->get_html_table($sort, $pagination_suffix, $start, $this->user->data['user_ilimit'], $footer_text), 'ITEM_PAGINATION' => generate_pagination('listitems.php' . $this->SID . $sort_suffix, $item_count, $this->user->data['user_ilimit'], $start)));
     $this->core->set_vars(array('page_title' => $this->user->lang('listitems_title'), 'template_file' => 'listitems.html', 'display' => true));
 }
开发者ID:ubick,项目名称:lorekeepers.org,代码行数:28,代码来源:listitems.php


示例5: display

 public function display()
 {
     //Output
     $hptt_page_settings = array('name' => 'hptt_guildrequest', 'table_main_sub' => '%request_id%', 'table_subs' => array('%request_id%', '%field_id%'), 'page_ref' => 'myapplications.php', 'show_numbers' => false, 'show_select_boxes' => false, 'show_detail_twink' => false, 'table_sort_col' => 0, 'table_sort_dir' => 'asc', 'table_presets' => array(0 => array('name' => 'gr_date', 'sort' => true, 'th_add' => '', 'td_add' => 'nowrap="nowrap"'), 1 => array('name' => 'gr_name', 'sort' => true, 'th_add' => 'width="50%"', 'td_add' => 'nowrap="nowrap"')));
     $arrCombinedFields = $this->pdh->get('guildrequest_fields', 'combined_fields', array());
     foreach ($arrCombinedFields as $key => $val) {
         if (count($val) == 1) {
             $hptt_page_settings['table_presets'][] = array('name' => 'gr_field_' . $val[0], 'sort' => true, 'th_add' => '', 'td_add' => '');
         } else {
             $hptt_page_settings['table_presets'][] = array('name' => 'gr_combined_field_' . $key, 'sort' => true, 'th_add' => '', 'td_add' => '');
         }
     }
     $hptt_page_settings['table_presets'][] = array('name' => 'gr_status', 'sort' => true, 'th_add' => '', 'td_add' => '');
     $hptt_page_settings['table_presets'][] = array('name' => 'gr_closed', 'sort' => true, 'th_add' => '', 'td_add' => 'align="center"');
     //Sort
     $sort = $this->in->get('sort');
     $sort_suffix = '&amp;sort=' . $sort;
     $start = $this->in->get('start', 0);
     $pagination_suffix = $start ? '&amp;start=' . $start : '';
     $view_list = $this->pdh->get('guildrequest_requests', 'id_list', array($this->user->id, !$this->user->check_auth('u_guildrequest_view_closed', false)));
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => 'viewraid.php', '%link_url_suffix%' => ''), $this->user->id);
     $hptt->setPageRef($this->strPath);
     //footer
     $raid_count = count($view_list);
     $footer_text = sprintf($this->user->lang('gr_footer'), $raid_count, $this->user->data['user_rlimit']);
     $this->tpl->assign_vars(array('PAGE_OUT' => $hptt->get_html_table($sort, $pagination_suffix, $start, $this->user->data['user_rlimit'], $footer_text), 'GR_PAGINATION' => generate_pagination($this->strPath . $this->SID . $sort_suffix, $raid_count, $this->user->data['user_rlimit'], $start)));
     $this->core->set_vars(array('page_title' => $this->user->lang('gr_myapplications'), 'template_path' => $this->pm->get_data('guildrequest', 'template_path'), 'template_file' => 'myapplications.html', 'display' => true));
 }
开发者ID:Bloodsoul,项目名称:plugin-guildrequest,代码行数:28,代码来源:myapplications_pageobject.class.php


示例6: buildpage

 public function buildpage(viewNavigation $Navigation)
 {
     global $db, $config, $phpbb_root_path, $phpEx, $user, $template;
     $raids = new \bbdkp\controller\raids\Raids();
     $start = request_var('start', 0);
     // get sort order
     $sort_order = array(0 => array('raid_start desc', 'raid_start'), 1 => array('dkpsys_name', 'dkpsys_name desc'), 2 => array('event_name', 'event_name desc'), 3 => array('raid_note', 'raid_note desc'), 4 => array('raid_value desc', 'raid_value'));
     $current_order = $Navigation->switch_order($sort_order);
     //total raids in the last year
     $total_raids = $raids->raidcount($Navigation->getDkpsysId(), 365, 0, 1, true, $Navigation->getGuildId());
     if ($Navigation->getQueryByPool()) {
         $pagination = generate_pagination(append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=listraids&amp;' . URI_DKPSYS . '=' . $Navigation->getDkpsysId() . '&amp;o=' . $current_order['uri']['current']), $total_raids, $config['bbdkp_user_rlimit'], $start, true);
         $u_list_raids = append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=listraids&amp;' . URI_DKPSYS . '=' . $Navigation->getDkpsysId() . '&amp;guild_id=' . $Navigation->getGuildId());
     } else {
         $pagination = generate_pagination(append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=listraids&amp;' . URI_DKPSYS . '=All&amp;o=' . $current_order['uri']['current']), $total_raids, $config['bbdkp_user_rlimit'], $start, true);
         $u_list_raids = append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=listraids&amp;guild_id=' . $Navigation->getGuildId());
     }
     $raids_result = $raids->getRaids('r.raid_start DESC', $Navigation->getDkpsysId(), 0, $start, 0, $Navigation->getGuildId());
     while ($raid = $db->sql_fetchrow($raids_result)) {
         $template->assign_block_vars('raids_row', array('DATE' => !empty($raid['raid_start']) ? date($config['bbdkp_date_format'], $raid['raid_start']) : '&nbsp;', 'NAME' => $raid['event_name'], 'U_VIEW_RAID' => append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=raid&amp;' . URI_RAID . '=' . $raid['raid_id'] . '&amp;guild_id=' . $Navigation->getGuildId()), 'U_VIEW_EVENT' => append_sid("{$phpbb_root_path}dkp.{$phpEx}", 'page=event&amp;' . URI_EVENT . '=' . $raid['event_id'] . '&amp;' . URI_DKPSYS . '=' . $raid['event_dkpid'] . '&amp;guild_id=' . $Navigation->getGuildId()), 'POOL' => $Navigation->getDkpsysName(), 'EVENTCOLOR' => !empty($raid['event_color']) ? $raid['event_color'] : '#254689', 'NOTE' => !empty($raid['raid_note']) ? $raid['raid_note'] : '&nbsp;', 'ATTENDEES' => $raid['attendees'], 'RAIDVALUE' => $raid['raid_value'], 'TIMEBONUS' => $raid['time_value'], 'ZSBONUS' => $raid['zs_value'], 'DECAYVALUE' => $raid['raiddecay'], 'TOTAL' => $raid['net_earned']));
     }
     $sortlink = array();
     for ($i = 0; $i <= 4; $i++) {
         if ($Navigation->getQueryByPool()) {
             $sortlink[$i] = append_sid($phpbb_root_path . 'dkp.' . $phpEx, 'page=listraids&amp;o=' . $current_order['uri'][$i] . '&amp;start=' . $start . '&amp;' . URI_DKPSYS . '=' . $Navigation->getDkpsysId());
         } else {
             $sortlink[$i] = append_sid($phpbb_root_path . 'dkp.' . $phpEx, 'page=listraids&amp;o=' . $current_order['uri'][$i] . '&amp;start=' . $start . '&amp;' . URI_DKPSYS . '=All');
         }
     }
     // breadcrumbs
     $template->assign_block_vars('dkpnavlinks', array('DKPPAGE' => $user->lang['MENU_RAIDS'], 'U_DKPPAGE' => $u_list_raids));
     $template->assign_vars(array('S_SHOWZS' => $config['bbdkp_zerosum'] == '1' ? true : false, 'S_SHOWTIME' => $config['bbdkp_timebased'] == '1' ? true : false, 'S_SHOWDECAY' => $config['bbdkp_decay'] == '1' ? true : false, 'S_EPGP' => $config['bbdkp_epgp'] == '1' ? true : false, 'O_DATE' => $sortlink[0], 'O_POOL' => $sortlink[1], 'O_NAME' => $sortlink[2], 'O_NOTE' => $sortlink[3], 'O_VALUE' => $sortlink[4], 'U_LIST_RAIDS' => $u_list_raids, 'LISTRAIDS_FOOTCOUNT' => sprintf($user->lang['LISTRAIDS_FOOTCOUNT'], $total_raids, $config['bbdkp_user_rlimit']), 'START' => $start, 'RAID_PAGINATION' => $pagination, 'S_DISPLAY_RAIDS' => true));
     // Output page
     page_header($user->lang['RAIDS']);
 }
开发者ID:ZerGabriel,项目名称:bbDKP,代码行数:35,代码来源:viewListraids.php


示例7: browse_tickets

function browse_tickets(&$sqlc)
{
    global $output, $lang_global, $lang_ticket, $characters_db, $realm_id, $action_permission, $user_lvl, $itemperpage;
    //==========================$_GET and SECURE=================================
    $start = isset($_GET['start']) ? $sqlc->quote_smart($_GET['start']) : 0;
    if (is_numeric($start)) {
    } else {
        $start = 0;
    }
    $order_by = isset($_GET['order_by']) ? $sqlc->quote_smart($_GET['order_by']) : 'guid';
    if (preg_match('/^[_[:lower:]]{1,10}$/', $order_by)) {
    } else {
        $order_by = 'guid';
    }
    $dir = isset($_GET['dir']) ? $sqlc->quote_smart($_GET['dir']) : 1;
    if (preg_match('/^[01]{1}$/', $dir)) {
    } else {
        $dir = 1;
    }
    $order_dir = $dir ? 'ASC' : 'DESC';
    $dir = $dir ? 0 : 1;
    //==========================$_GET and SECURE end=============================
    //get total number of items
    $query_1 = $sqlc->query('SELECT count(*) FROM gm_tickets');
    $all_record = $sqlc->result($query_1, 0);
    unset($query_1);
    $query = $sqlc->query("SELECT gm_tickets.guid, gm_tickets.guid, SUBSTRING_INDEX(gm_tickets.message,' ',6), characters.name, characters.online\r\n                            FROM gm_tickets,characters\r\n                                WHERE gm_tickets.guid = characters.guid\r\n                                  ORDER BY {$order_by} {$order_dir} LIMIT {$start}, {$itemperpage}");
    $output .= "\r\n                <script type=\"text/javascript\" src=\"libs/js/check.js\"></script>\r\n                <center>\r\n                    <table class=\"top_hidden\">\r\n                        <tr>\r\n                            <td width=\"25%\" align=\"right\">";
    $output .= generate_pagination("ticket.php?action=browse_tickets&amp;order_by={$order_by}&amp;dir=" . !$dir, $all_record, $itemperpage, $start);
    $output .= "\r\n                            </td>\r\n                        </tr>\r\n                    </table>";
    $output .= "\r\n                <form method=\"get\" action=\"ticket.php\" name=\"form\">\r\n                    <input type=\"hidden\" name=\"action\" value=\"delete_tickets\" />\r\n                    <input type=\"hidden\" name=\"start\" value=\"{$start}\" />\r\n                    <table class=\"lined\">\r\n                        <tr>";
    if ($user_lvl >= $action_permission['delete']) {
        $output .= "\r\n                            <th width=\"7%\"><input name=\"allbox\" type=\"checkbox\" value=\"Check All\" onclick=\"CheckAll(document.form);\" /></th>";
    }
    if ($user_lvl >= $action_permission['update']) {
        $output .= "\r\n                            <th width=\"7%\">{$lang_global['edit']}</th>";
    }
    $output .= "\r\n                            <th width=\"10%\"><a href=\"ticket.php?order_by=guid&amp;start={$start}&amp;dir={$dir}\">" . ($order_by == 'guid' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_ticket['id']}</a></th>\r\n                            <th width=\"16%\"><a href=\"ticket.php?order_by=online&amp;start={$start}&amp;dir={$dir}\">" . ($order_by == 'online' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "Online?</a></th>\r\n                            <th width=\"16%\"><a href=\"ticket.php?order_by=playerGuid&amp;start={$start}&amp;dir={$dir}\">" . ($order_by == 'playerGuid' ? "<img src=\"img/arr_" . ($dir ? "up" : "dw") . ".gif\" alt=\"\" /> " : "") . "{$lang_ticket['sender']}</a></th>";
    $output .= "\r\n                            <th width=\"60%\">{$lang_ticket['ticket_text']}</th>\r\n                        </tr>";
    while ($ticket = $sqlc->fetch_row($query)) {
        $output .= "\r\n                        <tr>";
        if ($user_lvl >= $action_permission['delete']) {
            $output .= "\r\n                            <td><input type=\"checkbox\" name=\"check[]\" value=\"{$ticket['0']}\" onclick=\"CheckCheckAll(document.form);\" /></td>";
        }
        if ($user_lvl >= $action_permission['update']) {
            $output .= "\r\n                            <td><a href=\"ticket.php?action=edit_ticket&amp;error=4&amp;id={$ticket['0']}\">{$lang_global['edit']}</a></td>";
        }
        $output .= "\r\n                            <td>{$ticket['0']}</td>\r\n                            <td>" . ($ticket[4] ? "<img src=\"img/up.gif\" alt=\"online\">" : "<img src=\"img/down.gif\" alt=\"offline\">") . "</td>\r\n                            <td><a href=\"char.php?id={$ticket['1']}\">" . htmlentities($ticket[3]) . "</a></td>\r\n                            <td>" . htmlentities($ticket[2]) . " ...</td>\r\n                        </tr>";
    }
    unset($query);
    unset($ticket);
    $output .= "\r\n                        <tr>\r\n                            <td colspan=\"5\" align=\"right\" class=\"hidden\" width=\"25%\">";
    $output .= generate_pagination("ticket.php?action=browse_tickets&amp;order_by={$order_by}&amp;dir=" . !$dir, $all_record, $itemperpage, $start);
    $output .= "\r\n                            </td>\r\n                        </tr>\r\n                        <tr>\r\n                            <td colspan=\"3\" align=\"left\" class=\"hidden\">";
    if ($user_lvl >= $action_permission['delete']) {
        makebutton($lang_ticket['del_selected_tickets'], "javascript:do_submit()\" type=\"wrn", 230);
    }
    $output .= "\r\n                            </td>\r\n                            <td colspan=\"2\" align=\"right\" class=\"hidden\">{$lang_ticket['tot_tickets']}: {$all_record}</td>\r\n                        </tr>\r\n                    </table>\r\n                </form>\r\n                <br />\r\n            </center>";
}
开发者ID:BACKUPLIB,项目名称:minimanager,代码行数:59,代码来源:ticket.php


示例8: printPageList

function printPageList($start, $numItems, $url, $username)
{
    global $cfg_ServersPerPage;
    $page = floor(($start + 1) / $cfg_ServersPerPage);
    $url .= "?player=" . urlencode($username);
    $str = generate_pagination($url, $numItems, $cfg_ServersPerPage, $page * $cfg_ServersPerPage);
    echo "{$str}<P>";
}
开发者ID:andrewroth,项目名称:winbolo,代码行数:8,代码来源:inc_diarylist.php


示例9: show_list

function show_list()
{
    global $lang_global, $lang_banned, $output, $realm_db, $itemperpage, $action_permission, $user_lvl;
    valid_login($action_permission['read']);
    $sqlr = new SQL();
    $sqlr->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);
    $ban_type = isset($_GET['ban_type']) ? $sqlr->quote_smart($_GET['ban_type']) : "account_banned";
    $key_field = $ban_type == 'account_banned' ? 'id' : 'ip';
    //==========================$_GET and SECURE=================================
    $start = isset($_GET['start']) ? $sqlr->quote_smart($_GET['start']) : 0;
    if (is_numeric($start)) {
    } else {
        $start = 0;
    }
    $order_by = isset($_GET['order_by']) ? $sqlr->quote_smart($_GET['order_by']) : "{$key_field}";
    if (!preg_match("/^[_[:lower:]]{1,12}\$/", $order_by)) {
        $order_by = "{$key_field}";
    }
    $dir = isset($_GET['dir']) ? $sqlr->quote_smart($_GET['dir']) : 1;
    if (!preg_match("/^[01]{1}\$/", $dir)) {
        $dir = 1;
    }
    $order_dir = $dir ? "ASC" : "DESC";
    $dir = $dir ? 0 : 1;
    //==========================$_GET and SECURE end=============================
    $fromwhere = $ban_type == 'account_banned' ? $ban_type . " WHERE active = '1'" : $ban_type;
    $query_1 = $sqlr->query("SELECT count(*) FROM {$fromwhere}");
    $all_record = $sqlr->result($query_1, 0);
    $result = $sqlr->query("SELECT {$key_field}, bandate, unbandate, bannedby, SUBSTRING_INDEX(banreason,' ',3) FROM {$fromwhere} ORDER BY {$order_by} {$order_dir} LIMIT {$start}, {$itemperpage}");
    $this_page = $sqlr->num_rows($result);
    $output .= "\r\n        <center>\r\n            <table class=\"top_hidden\">\r\n                <tr>\r\n                    <td>";
    if ($user_lvl >= $action_permission['insert']) {
        makebutton($lang_banned['add_to_banned'], "banned.php?action=add_entry\" type=\"wrn", 180);
    }
    if ($ban_type === "account_banned") {
        makebutton($lang_banned['banned_ips'], "banned.php?ban_type=ip_banned", 130);
    } else {
        makebutton($lang_banned['banned_accounts'], "banned.php?ban_type=account_banned", 130);
    }
    makebutton($lang_global['back'], "javascript:window.history.back()\" type=\"def", 130);
    $output .= "\r\n                    </td>\r\n                    <td align=\"right\">" . generate_pagination("banned.php?action=show_list&amp;order_by={$order_by}&amp;ban_type={$ban_type}&amp;dir=" . !$dir, $all_record, $itemperpage, $start) . "</td>\r\n                </tr>\r\n            </table>\r\n            <script type=\"text/javascript\">\r\n                answerbox.btn_ok='{$lang_global['yes_low']}';\r\n                answerbox.btn_cancel='{$lang_global['no']}';\r\n                var del_banned = 'banned.php?action=do_delete_entry&amp;ban_type={$ban_type}&amp;{$key_field}=';\r\n            </script>\r\n            <table class=\"lined\">\r\n                <tr>\r\n                    <th width=\"5%\">{$lang_global['delete_short']}</th>\r\n                    <th width=\"19%\"><a href=\"banned.php?order_by={$key_field}&amp;ban_type={$ban_type}&amp;dir={$dir}\"" . ($order_by == $key_field ? " class=\"{$order_dir}\"" : "") . ">{$lang_banned['ip_acc']}</a></th>\r\n                    <th width=\"18%\"><a href=\"banned.php?order_by=bandate&amp;ban_type={$ban_type}&amp;dir={$dir}\"" . ($order_by == 'bandate' ? " class=\"{$order_dir}\"" : "") . ">{$lang_banned['bandate']}</a></th>\r\n                    <th width=\"18%\"><a href=\"banned.php?order_by=unbandate&amp;ban_type={$ban_type}&amp;dir={$dir}\"" . ($order_by == 'unbandate' ? " class=\"{$order_dir}\"" : "") . ">{$lang_banned['unbandate']}</a></th>\r\n                    <th width=\"15%\"><a href=\"banned.php?order_by=bannedby&amp;ban_type={$ban_type}&amp;dir={$dir}\"" . ($order_by == 'bannedby' ? " class=\"{$order_dir}\"" : "") . ">{$lang_banned['bannedby']}</a></th>\r\n                    <th width=\"25%\"><a href=\"banned.php?order_by=banreason&amp;ban_type={$ban_type}&amp;dir={$dir}\"" . ($order_by == 'banreason' ? " class=\"{$order_dir}\"" : "") . ">{$lang_banned['banreason']}</a></th>\r\n                </tr>";
    while ($ban = $sqlr->fetch_row($result)) {
        if ($ban_type === "account_banned") {
            $result1 = $sqlr->query("SELECT username FROM account WHERE id ='{$ban['0']}'");
            $owner_acc_name = $sqlr->result($result1, 0, 'username');
            $name_out = "<a href=\"user.php?action=edit_user&amp;error=11&amp;id={$ban['0']}\">{$owner_acc_name}</a>";
        } else {
            $name_out = $ban[0];
            $owner_acc_name = $ban[0];
        }
        $output .= "\r\n                <tr>\r\n                    <td>";
        if ($user_lvl >= $action_permission['delete']) {
            $output .= "\r\n                        <img src=\"img/aff_cross.png\" alt=\"\" onclick=\"answerBox('{$lang_global['delete']}: <font color=white>{$owner_acc_name}</font><br />{$lang_global['are_you_sure']}', del_banned + '{$ban['0']}');\" style=\"cursor:pointer;\" alt=\"\" />";
        }
        $output .= "\r\n                    </td>\r\n                    <td>{$name_out}</td>\r\n                    <td>" . date('d-m-Y G:i', $ban[1]) . "</td>\r\n                    <td>" . date('d-m-Y G:i', $ban[2]) . "</td>\r\n                    <td>{$ban['3']}</td>\r\n                    <td>{$ban['4']}</td>\r\n                </tr>";
    }
    $output .= "\r\n                <tr>\r\n                    <td colspan=\"6\" align=\"right\" class=\"hidden\">{$lang_banned['tot_banned']} : {$all_record}</td>\r\n                </tr>\r\n            </table>\r\n            <br/>\r\n        </center>";
}
开发者ID:BACKUPLIB,项目名称:minimanager,代码行数:58,代码来源:banned.php


示例10: search

function search()
{
    global $lang_global, $output, $itemperpage, $item_datasite, $mangos_db, $characters_db, $realm_id, $sql_search_limit;
    wowhead_tt();
    if (!isset($_GET['search_value']) || !isset($_GET['search_by'])) {
        redirect("mail_on.php?error=2");
    }
    $sql = new SQL();
    $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
    $search_value = $sql->quote_smart($_GET['search_value']);
    $search_by = $sql->quote_smart($_GET['search_by']);
    $search_menu = array('sender', 'receiver');
    // if (!array_key_exists($search_by, $search_menu)) $search_by = 'sender';
    $start = isset($_GET['start']) ? $sql->quote_smart($_GET['start']) : 0;
    $order_by = isset($_GET['order_by']) ? $sql->quote_smart($_GET['order_by']) : "id";
    $dir = isset($_GET['dir']) ? $sql->quote_smart($_GET['dir']) : 1;
    $order_dir = $dir ? "ASC" : "DESC";
    $dir = $dir ? 0 : 1;
    $temp = $sql->query("SELECT guid FROM `characters` WHERE name like '%{$search_value}%'");
    $search_value = $sql->result($temp, 0, 'guid');
    $query_1 = $sql->query("SELECT count(*) FROM `mail`");
    $query = $sql->query("SELECT a.id, a.messageType, a.sender, a.receiver, a.subject, a.itemTextId, a.has_items, a.money, a.cod, a.checked, b.item_template\r\n            FROM mail a\r\n            INNER JOIN mail_items b ON a.id = b.mail_id\r\n            WHERE {$search_by} = {$search_value}\r\n            ORDER BY {$order_by} {$order_dir} LIMIT {$start}, {$itemperpage}");
    $this_page = $sql->num_rows($query);
    $all_record = $sql->result($query_1, 0);
    $total_found = $sql->num_rows($query);
    //==========================top page navigation starts here========================
    $output .= "<center><table class=\"top_hidden\">\r\n    <tr><td>\r\n            <table class=\"hidden\">\r\n                <tr><td>\r\n            <form action=\"mail_on.php\" method=\"get\" name=\"form\">\r\n            <input type=\"hidden\" name=\"action\" value=\"search\" />\r\n            <input type=\"hidden\" name=\"error\" value=\"4\" />\r\n            <input type=\"text\" size=\"45\" name=\"search_value\" />\r\n            <select name=\"search_by\">\r\n                <option value=\"sender\">Sender</option>\r\n                <option value=\"receiver\">Receiver</option>\r\n            </select></form></td><td>";
    makebutton($lang_global['search'], "javascript:do_submit()", 80);
    $output .= "</td></tr></table>\r\n            <td align=\"right\">";
    $output .= generate_pagination("mail_on.php?action=search&amp;order_by={$order_by}&amp;dir=" . !$dir, $all_record, $itemperpage, $start);
    $output .= "</td></tr></table>";
    //==========================top page navigation ENDS here ========================
    $output .= "<table class=\"lined\">\r\n  <tr>\r\n    <th width=\"5%\">ID</th>\r\n    <th width=\"5%\">Source</th>\r\n    <th width=\"10%\">Sender</th>\r\n    <th width=\"10%\">Receiver</th>\r\n    <th width=\"15%\">Subject</th>\r\n    <th width=\"5%\">Has Items</th>\r\n    <th width=\"25%\">Text</th>\r\n    <th width=\"15%\">Money</th>\r\n    <th width=\"5%\">Checked</th>\r\n  </tr>";
    while ($mail = $sql->fetch_array($query)) {
        $g = floor($mail[7] / 10000);
        $mail[7] -= $g * 10000;
        $s = floor($mail[7] / 100);
        $mail[7] -= $s * 100;
        $c = $mail[7];
        $money = "";
        if ($mail[7] > 0) {
            $money = $g . "<img src=\"./img/gold.gif\" /> " . $s . "<img src=\"./img/silver.gif\" /> " . $c . "<img src=\"./img/copper.gif\" /> ";
        }
        $output .= "<tr valign=top>\r\n                    <td>{$mail['0']}</td>\r\n                    <td>" . get_mail_source($mail[1]) . "</td>\r\n                    <td><a href=\"char.php?id={$mail['2']}\">" . get_char_name($mail[2]) . "</a></td>\r\n                    <td><a href=\"char.php?id={$mail['3']}\">" . get_char_name($mail[3]) . "</a></td>\r\n                    <td>{$mail['4']}</td>\r\n            ";
        $output .= "<td>";
        $output .= "\r\n                    <a style=\"padding:2px;\" href=\"{$item_datasite}{$mail[10]}\" target=\"_blank\">\r\n                      <img class=\"bag_icon\" src=\"" . get_item_icon($mail[10]) . "\" alt=\"\" />\r\n                  </a>";
        //maketooltip("<img src=\"./img/up.gif\" alt=\"\">", $item_datasite{$mail[10]}, $mail[10], "item_tooltip", "target=\"_blank\"");
        $output .= "</td>";
        $output .= "<td>" . get_mail_text($mail[5]) . "</td>\r\n                        <td>{$money}</td>\r\n        <td>" . get_check_state($mail[9]) . "</td>\r\n                   </tr>";
    }
    /*--------------------------------------------------*/
    $output .= "<tr><td colspan=\"6\" class=\"hidden\" align=\"right\">All Mails: {$all_record}</td></tr>\r\n </table></center>";
    $sql->close();
}
开发者ID:TheProjecter,项目名称:mmfm,代码行数:54,代码来源:mail_on.php


示例11: execute

 /**
  * {@inheritdoc}
  */
 public function execute(Template $template, Context $context, $args, $source)
 {
     $parsed_args = $template->parseArguments($args);
     if (count($parsed_args) < 1 || count($parsed_args) > 2) {
         throw new \InvalidArgumentException('"generatePagination" helper expects one or two arguments.');
     }
     $pagination_info = $context->get($parsed_args[0]);
     $bottom = empty($parsed_args[1]) ? true : $context->get($parsed_args[1]);
     $pagination = generate_pagination($pagination_info, $bottom === "false" ? false : true);
     return new SafeString($pagination);
 }
开发者ID:abhijitroy07,项目名称:mibew,代码行数:14,代码来源:GeneratePaginationHelper.php


示例12: display

 /**
  * Display
  * display abbreviations
  */
 public function display()
 {
     $this->tpl->add_js("\n                        \$(\"#article_categories-table tbody\").sortable({\n                                cancel: '.not-sortable, input, tr th.footer, th',\n                                cursor: 'pointer',\n                        });\n                ", "docready");
     $view_list = $this->pdh->get('abbreviations_mappings', 'id_list', array());
     $hptt_page_settings = array('name' => 'hptt_abbreviations_admin_manage_abbreviations', 'table_main_sub' => '%abbreviationId%', 'table_subs' => array('%abbreviationId%', '%link_url%', '%link_url_suffix%'), 'page_ref' => 'manage_abbreviations.php', 'show_numbers' => false, 'show_select_boxes' => true, 'selectboxes_checkall' => true, 'show_detail_twink' => false, 'table_sort_dir' => 'asc', 'table_sort_col' => 0, 'table_presets' => array(array('name' => 'abbreviations_mappings_id', 'sort' => true, 'th_add' => 'width="20"', 'td_add' => ''), array('name' => 'abbreviations_mappings_abbreviation', 'sort' => true, 'th_add' => '', 'td_add' => ''), array('name' => 'abbreviations_mappings_full_text', 'sort' => true, 'th_add' => 'width="20"', 'td_add' => 'style="text-align:right"')));
     $hptt = $this->get_hptt($hptt_page_settings, $view_list, $view_list, array('%link_url%' => $this->root_path . 'plugins/abbreviations/admin/manage_abbreviations.php', '%link_url_suffix%' => ''));
     $page_suffix = '&amp;start=' . $this->in->get('start', 0);
     $sort_suffix = '?sort=' . $this->in->get('sort');
     $item_count = count($view_list);
     $this->tpl->assign_vars(array('ABBREVIATIONS_LIST' => $hptt->get_html_table($this->in->get('sort'), $page_suffix, $this->in->get('start', 0), 20, $strfootertext), 'PAGINATION' => generate_pagination('manage_abbreviations.php' . $sort_suffix, $item_count, 20, $this->in->get('start', 0)), 'HPTT_COLUMN_COUNT' => $hptt->get_column_count()));
     // -- EQDKP ---------------------------------------------------------------
     $this->core->set_vars(array('page_title' => $this->user->lang('abbreviations_manage_abbreviations'), 'template_path' => $this->pm->get_data('abbreviations', 'template_path'), 'template_file' => 'admin/manage_abbreviations.html', 'display' => true));
 }
开发者ID:ZerGabriel,项目名称:plugin-abbreviations,代码行数:17,代码来源:manage_abbreviations.php


示例13: display_logs

 public function display_logs()
 {
     if ($this->user->check_auth('a_cal_revent_conf', false) || $this->check_permission() || $this->user->check_auth('a_logs_view', false)) {
     } else {
         $this->user->check_auth('a_something');
     }
     //Show Logs
     $view_list = $this->pdh->get('logs', 'filtered_id_list', array('calendar', false, false, false, false, false, false, false, false, $this->url_id));
     $hptt_psettings = array('name' => 'hptt_managelogs_actions', 'table_main_sub' => '%log_id%', 'table_subs' => array('%log_id%', '%link_url%', '%link_url_suffix%'), 'page_ref' => $this->strPath, 'show_numbers' => false, 'show_select_boxes' => false, 'selectboxes_checkall' => false, 'show_detail_twink' => false, 'table_sort_dir' => 'desc', 'table_sort_col' => 0, 'table_presets' => array(array('name' => 'logdatetime', 'sort' => true, 'th_add' => '', 'td_add' => 'class="nowrap desktopOnly"'), array('name' => 'logtype', 'sort' => true, 'th_add' => 'width="10%"', 'td_add' => 'class="nowrap desktopOnly"'), array('name' => 'logvalue', 'sort' => true, 'th_add' => 'width="80%"', 'td_add' => ''), array('name' => 'loguser', 'sort' => true, 'th_add' => 'width="100" class="hiddenSmartphone"', 'td_add' => 'class="hiddenSmartphone"')));
     $hptt = $this->get_hptt($hptt_psettings, $view_list, $view_list, array('%link_url%' => 'manage_logs.php', '%link_url_suffix%' => '', md5($strFilterSuffix)));
     $page_suffix = '&amp;start=' . $this->in->get('start', 0) . '&logs&eventid=' . $this->url_id . '&simple_head=true';
     $sort_suffix = $this->SID . '&amp;sort=' . $this->in->get('sort');
     $logs_list = $hptt->get_html_table($this->in->get('sort', ''), $page_suffix);
     $this->tpl->assign_vars(array('LOGS_LIST' => $logs_list, 'LOGS_PAGINATION' => generate_pagination('manage_logs.php' . $sort_suffix . $strFilterSuffix, $actionlog_count, 100, $this->in->get('start', 0)), 'HPTT_LOGS_COUNT' => $hptt->get_column_count(), 'S_COMMENTS' => false));
     $this->core->set_vars(array('page_title' => sprintf($this->pdh->get('event', 'name', array($eventdata['extension']['raid_eventid'])), $this->user->lang('raidevent_raid_show_title')) . ', ' . $this->time->user_date($eventdata['timestamp_start']) . ' ' . $this->time->user_date($eventdata['timestamp_start'], false, true), 'template_file' => 'calendar/viewlogs.html', 'header_format' => $this->simple_head, 'display' => true));
 }
开发者ID:rswiders,项目名称:core,代码行数:16,代码来源:calendarevent_pageobject.class.php


示例14: display

 public function display()
 {
     // The jQuery stuff
     $this->confirm_delete($this->user->lang('confirm_delete_calevents'));
     $this->jquery->Dialog('newCalevent', $this->user->lang('calendar_win_add'), array('url' => $this->routing->build('editcalendarevent') . "&simple_head=true", 'width' => '920', 'height' => '730', 'onclose' => $this->env->link . 'admin/manage_calevents.php' . $this->SID));
     $this->jquery->Dialog('editEvent', $this->user->lang('calendar_win_edit'), array('url' => $this->routing->build('editcalendarevent') . "&eventid='+editid+'&simple_head=true", 'width' => '920', 'height' => '730', 'withid' => 'editid', 'onclose' => $this->env->link . 'admin/manage_calevents.php' . $this->SID));
     // Build the HPTT Table
     $view_list = $this->pdh->get('calendar_events', 'id_list');
     $hptt_psettings = $this->pdh->get_page_settings('admin_manage_calevents', 'hptt_managecalevents_actions');
     $hptt = $this->get_hptt($hptt_psettings, $view_list, $view_list, array('%link_url%' => 'manage_calevents.php'));
     $footer_text = sprintf($this->user->lang('calevents_footcount'), count($view_list));
     $page_suffix = '&amp;start=' . $this->in->get('start', 0);
     $sort_suffix = '?sort=' . $this->in->get('sort');
     $this->tpl->assign_vars(array('CALEVENTS' => $hptt->get_html_table($this->in->get('sort', ''), $page_suffix, $this->in->get('start', 0), 40, $footer_text), 'HPTT_COLUMN_COUNT' => $hptt->get_column_count(), 'PAGINATION' => generate_pagination('manage_calevents.php' . $sort_suffix, count($view_list), 40, $this->in->get('start', 0))));
     $this->core->set_vars(array('page_title' => $this->user->lang('manage_calevents'), 'template_file' => 'admin/manage_calevents.html', 'display' => true));
 }
开发者ID:rswiders,项目名称:core,代码行数:16,代码来源:manage_calevents.php


示例15: buildpage


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP generate_password函数代码示例发布时间:2022-05-15
下一篇:
PHP generate_page_type_patterns函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap