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


PHP Pagination::display方法代码示例

本文整理汇总了PHP中Pagination::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Pagination::display方法的具体用法?PHP Pagination::display怎么用?PHP Pagination::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pagination的用法示例。


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

示例1: listAction

 public function listAction()
 {
     if (isset($this->params['searchfor'])) {
         if ($this->params['searchfor'] === 'id') {
             $this->params['id'] = $this->params['seachtext'];
             $this->readAction();
             exit;
         }
     }
     $this->params['page_title'] = $this->params['members_list_text'];
     $str = View::render('depositors_table/sort', $this->params, true);
     $str .= View::render('depositors_table/table_header', $this->params, true);
     $api_params = @array('controller' => 'depositor', 'action' => 'list', 'sortby' => $this->params['sortby'], 'sortorder' => $this->params['sortorder'], 'state' => $this->params['state'], 'page' => $this->params['page'], 'perpage' => $this->params['perpage'], 'search' => $this->params['search'], 'searchfor' => $this->params['searchfor'], 'seachtext' => $this->params['seachtext']);
     try {
         $data = $this->_API->sendRequest($api_params);
     } catch (Exception $e) {
         #catch any exceptions and report the problem
         @ErrorHandling::APIException('depo:list', $data, $api_params, $e, $this->params);
     }
     if (!empty($data['result'])) {
         foreach ($data['result'] as $d) {
             $col = function (&$str, $params, $field) {
                 $str .= View::render('depositors_table/column', $params, true);
                 $str .= $field;
                 $str .= View::render('depositors_table/column_end', $params, true);
             };
             $str .= View::render('depositors_table/row', $this->params, true);
             $col($str, $this->params, urldecode($d['depositor no.']));
             $col($str, $this->params, urldecode($d['name']));
             $col($str, $this->params, urldecode($d['surname']));
             $col($str, $this->params, urldecode($d['mobile']));
             $col($str, $this->params, urldecode($d['email']));
             $col($str, $this->params, urldecode($d['hours no.']));
             $col($str, $this->params, urldecode($d['state']));
             $this->params['depositor_id'] = $d['depositor no.'];
             $col($str, $this->params, View::render('depositors_table/button', $this->params, true));
             #details button
             $str .= View::render('depositors_table/row_end', $this->params, true);
         }
     } else {
         $str .= View::render('depositors_table/nodata', $this->params, true);
     }
     $str .= View::render('depositors_table/table_footer', $this->params, true);
     if ($data['pages'] > 1) {
         $url = 'index.php?' . $_SERVER['QUERY_STRING'] . '&page=1';
         $page_url = 'index.php?' . $_SERVER['QUERY_STRING'] . '&page=';
         if (empty($this->params['perpage'])) {
             $this->params['perpage'] = 20;
         }
         Pagination::set($this->params, $data['page'], $data['pages'], $this->params['perpage'], $url, $page_url);
         $str .= Pagination::display();
     }
     $this->render($str);
 }
开发者ID:Zhigalin,项目名称:hbank,代码行数:54,代码来源:DepositorController.php

示例2: retrieve

            break;
        case 'last':
            $sort = 'last_connect';
            break;
        case 'msg':
            $sort = 'user_msg';
            break;
        case 'alph':
            $sort = 'login';
            break;
        default:
            $sort = 'timestamp';
    }
    $get_mode = retrieve(GET, 'mode', '', TSTRING_UNCHANGE);
    $mode = $get_mode == 'asc' ? 'ASC' : 'DESC';
    $unget = !empty($sort) && !empty($mode) ? '?sort=' . $get_sort . '&mode=' . $get_mode : '';
    import('util/pagination');
    $Pagination = new Pagination();
    $Template->assign_vars(array('PAGINATION' => '&nbsp;<strong>' . $LANG['page'] . ' :</strong> ' . $Pagination->display('member' . url('.php' . (!empty($unget) ? $unget . '&amp;' : '?') . 'p=%d', '-0-%d.php' . $unget), $nbr_member, 'p', 25, 3)));
    $result = $Sql->query_while("SELECT user_id, login, user_mail, user_show_mail, timestamp, user_msg, user_local, user_web, last_connect\n\tFROM " . PREFIX . "member\n\tWHERE user_aprob = 1\n\tORDER BY " . $sort . " " . $mode . $Sql->limit($Pagination->get_first_msg(25, 'p'), 25), __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $user_web = !empty($row['user_web']) ? '<a href="' . $row['user_web'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/user_web.png" alt="' . $row['user_web'] . '" title="' . $row['user_web'] . '" /></a>' : '&nbsp;';
        $user_msg = !empty($row['user_msg']) ? $row['user_msg'] : '0';
        $user_mail = $row['user_show_mail'] == 1 ? '<a href="mailto:' . $row['user_mail'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/email.png" alt="' . $row['user_mail'] . '" /></a>' : '&nbsp;';
        $row['last_connect'] = !empty($row['last_connect']) ? $row['last_connect'] : $row['timestamp'];
        $Template->assign_block_vars('member_list', array('PSEUDO' => $row['login'], 'MAIL' => $user_mail, 'MSG' => $user_msg, 'LOCAL' => !empty($row['user_local']) ? $row['user_local'] : '&nbsp;', 'LAST_CONNECT' => gmdate_format('date_format_short', $row['last_connect']), 'WEB' => $user_web, 'DATE' => gmdate_format('date_format_short', $row['timestamp']), 'U_USER_ID' => url('.php?id=' . $row['user_id'], '-' . $row['user_id'] . '.php'), 'U_USER_PM' => url('.php?pm=' . $row['user_id'], '-' . $row['user_id'] . '.php')));
    }
    $Sql->query_close($result);
    $Template->pparse('member');
}
require_once '../kernel/footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:member.php

示例3: ceil

        $img_announce .= $row['type'] == '1' ? '_post' : '';
        $img_announce .= $row['type'] == '2' ? '_top' : '';
        $img_announce .= $row['status'] == '0' && $row['type'] == '0' ? '_lock' : '';
        if (!empty($row['last_view_id'])) {
            $last_msg_id = $row['last_view_id'];
            $last_page = 'idm=' . $row['last_view_id'] . '&amp;';
            $last_page_rewrite = '-0-' . $row['last_view_id'];
        } else {
            $last_msg_id = $row['last_msg_id'];
            $last_page = ceil($row['nbr_msg'] / $CONFIG_FORUM['pagination_msg']);
            $last_page_rewrite = $last_page > 1 ? '-' . $last_page : '';
            $last_page = $last_page > 1 ? 'pt=' . $last_page . '&amp;' : '';
        }
        $rewrited_title = $CONFIG['rewrite'] == 1 ? '+' . url_encode_rewrite($row['title']) : '';
        $last_msg = '<a href="topic' . url('.php?' . $last_page . 'id=' . $row['id'], '-' . $row['id'] . $last_page_rewrite . $rewrited_title . '.php') . '#m' . $last_msg_id . '" title=""><img src="../templates/' . get_utheme() . '/images/ancre.png" alt="" /></a>' . ' ' . $LANG['on'] . ' ' . gmdate_format('date_format', $row['last_timestamp']) . '<br /> ' . $LANG['by'] . ' ' . (!empty($row['last_login']) ? '<a class="small_link" href="../member/member' . url('.php?id=' . $row['last_user_id'], '-' . $row['last_user_id'] . '.php') . '">' . wordwrap_html($row['last_login'], 13) . '</a>' : '<em>' . $LANG['guest'] . '</em>');
        $new_ancre = '<a href="topic' . url('.php?' . $last_page . 'id=' . $row['id'], '-' . $row['id'] . $last_page_rewrite . $rewrited_title . '.php') . '#m' . $last_msg_id . '" title=""><img src="../templates/' . get_utheme() . '/images/ancre.png" alt="" /></a>';
        $Template->assign_block_vars('topics', array('C_IMG_POLL' => !empty($row['question']), 'C_IMG_TRACK' => !empty($row['idtrack']), 'C_DISPLAY_MSG' => $CONFIG_FORUM['activ_display_msg'] && $CONFIG_FORUM['icon_activ_display_msg'] && $row['display_msg'], 'C_HOT_TOPIC' => $row['type'] == '0' && $row['status'] != '0' && $row['nbr_msg'] > $CONFIG_FORUM['pagination_msg'], 'IMG_ANNOUNCE' => $img_announce, 'ANCRE' => $new_ancre, 'TYPE' => $type[$row['type']], 'TITLE' => ucfirst($row['title']), 'AUTHOR' => !empty($row['login']) ? '<a href="../member/member' . url('.php?id=' . $row['user_id'], '-' . $row['user_id'] . '.php') . '" class="small_link">' . $row['login'] . '</a>' : '<em>' . $LANG['guest'] . '</em>', 'DESC' => $row['subtitle'], 'PAGINATION_TOPICS' => $Pagination->display('topic' . url('.php?id=' . $row['id'] . '&amp;pt=%d', '-' . $row['id'] . '-%d.php'), $row['nbr_msg'], 'pt', $CONFIG_FORUM['pagination_msg'], 2, 10, false), 'MSG' => $row['nbr_msg'] - 1, 'VUS' => $row['nbr_views'], 'U_TOPIC_VARS' => url('.php?id=' . $row['id'], '-' . $row['id'] . $rewrited_title . '.php'), 'U_LAST_MSG' => $last_msg, 'L_DISPLAY_MSG' => $CONFIG_FORUM['activ_display_msg'] && $row['display_msg'] ? $CONFIG_FORUM['display_msg'] : ''));
    }
    $Sql->query_close($result);
    $nbr_topics = $Sql->query("SELECT COUNT(*)\n\tFROM " . PREFIX . "forum_view v\n\tLEFT JOIN " . PREFIX . "forum_topics t ON t.id = v.idtopic\n\tWHERE t.last_timestamp >= '" . $max_time . "' AND v.user_id = '" . $User->get_attribute('user_id') . "'", __LINE__, __FILE__);
    if ($nbr_topics == 0) {
        $Template->assign_vars(array('C_NO_TOPICS' => true, 'L_NO_TOPICS' => '0 ' . $LANG['no_last_read']));
    }
    $Template->assign_vars(array('FORUM_NAME' => $CONFIG_FORUM['forum_name'], 'SID' => SID, 'MODULE_DATA_PATH' => $Template->get_module_data_path('forum'), 'PAGINATION' => $Pagination->display('lastread' . url('.php?p=%d'), $nbr_topics, 'p', $CONFIG_FORUM['pagination_topic'], 3), 'LANG' => get_ulang(), 'U_CHANGE_CAT' => 'unread.php' . SID . '&amp;token=' . $Session->get_token(), 'U_ONCHANGE' => url(".php?id=' + this.options[this.selectedIndex].value + '", "-' + this.options[this.selectedIndex].value + '.php"), 'U_ONCHANGE_CAT' => url("index.php?id=' + this.options[this.selectedIndex].value + '", "cat-' + this.options[this.selectedIndex].value + '.php"), 'U_FORUM_CAT' => '<a href="../forum/lastread.php' . SID . '">' . $LANG['show_last_read'] . '</a>', 'U_POST_NEW_SUBJECT' => '', 'L_FORUM_INDEX' => $LANG['forum_index'], 'L_FORUM' => $LANG['forum'], 'L_AUTHOR' => $LANG['author'], 'L_TOPIC' => $nbr_topics > 1 ? $LANG['topic_s'] : $LANG['topic'], 'L_MESSAGE' => $LANG['replies'], 'L_ANSWERS' => $LANG['answers'], 'L_VIEW' => $LANG['views'], 'L_LAST_MESSAGE' => $LANG['last_message']));
    list($users_list, $total_admin, $total_modo, $total_member, $total_visit, $total_online) = forum_list_user_online("AND s.session_script = '/forum/lastread.php'");
    $Template->assign_vars(array('TOTAL_ONLINE' => $total_online, 'USERS_ONLINE' => $total_online - $total_visit == 0 ? '<em>' . $LANG['no_member_online'] . '</em>' : $users_list, 'ADMIN' => $total_admin, 'MODO' => $total_modo, 'MEMBER' => $total_member, 'GUEST' => $total_visit, 'SELECT_CAT' => forum_list_cat(0, 0), 'L_USER' => $total_online > 1 ? $LANG['user_s'] : $LANG['user'], 'L_ADMIN' => $total_admin > 1 ? $LANG['admin_s'] : $LANG['admin'], 'L_MODO' => $total_modo > 1 ? $LANG['modo_s'] : $LANG['modo'], 'L_MEMBER' => $total_member > 1 ? $LANG['member_s'] : $LANG['member'], 'L_GUEST' => $total_visit > 1 ? $LANG['guest_s'] : $LANG['guest'], 'L_AND' => $LANG['and'], 'L_ONLINE' => strtolower($LANG['online'])));
    $Template->pparse('forum_topics');
} else {
    redirect(HOST . DIR . '/forum/index.php' . SID2);
}
include '../kernel/footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:lastread.php

示例4: import

 }
 import('util/pagination');
 $Pagination = new Pagination();
 $i = 0;
 $forum_cats = '';
 foreach ($Bread_crumb->array_links as $key => $array) {
     if ($i == 2) {
         $forum_cats .= '<a href="' . $array[1] . '">' . $array[0] . '</a>';
     } elseif ($i > 2) {
         $forum_cats .= ' &raquo; <a href="' . $array[1] . '">' . $array[0] . '</a>';
     }
     $i++;
 }
 $check_group_edit_auth = $User->check_auth($CAT_FORUM[$id_get]['auth'], EDIT_CAT_FORUM);
 $nbr_topic = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "forum_topics WHERE idcat = '" . $id_get . "'", __LINE__, __FILE__);
 $Template->assign_vars(array('FORUM_NAME' => $CONFIG_FORUM['forum_name'], 'SID' => SID, 'MODULE_DATA_PATH' => $Template->get_module_data_path('forum'), 'PAGINATION' => $Pagination->display('forum' . url('.php?id=' . $id_get . '&amp;p=%d', '-' . $id_get . '-%d.php'), $nbr_topic, 'p', $CONFIG_FORUM['pagination_topic'], 3), 'IDCAT' => $id_get, 'C_MASS_MODO_CHECK' => false, 'C_POST_NEW_SUBJECT' => $check_group_write_auth && !$locked_cat, 'U_MSG_SET_VIEW' => '<a class="small_link" href="../forum/action' . url('.php?read=1&amp;f=' . $id_get, '') . '" title="' . $LANG['mark_as_read'] . '" onclick="javascript:return Confirm_read_topics();">' . $LANG['mark_as_read'] . '</a>', 'U_CHANGE_CAT' => 'forum' . url('.php?id=' . $id_get . '&amp;token=' . $Session->get_token(), '-' . $id_get . $rewrited_title . '.php?token=' . $Session->get_token()), 'U_ONCHANGE' => url(".php?id=' + this.options[this.selectedIndex].value + '", "-' + this.options[this.selectedIndex].value + '.php"), 'U_ONCHANGE_CAT' => url("index.php?id=' + this.options[this.selectedIndex].value + '", "cat-' + this.options[this.selectedIndex].value + '.php"), 'U_FORUM_CAT' => $forum_cats, 'U_POST_NEW_SUBJECT' => 'post' . url('.php?new=topic&amp;id=' . $id_get, ''), 'L_FORUM_INDEX' => $LANG['forum_index'], 'L_SUBFORUMS' => $LANG['sub_forums'], 'L_DISPLAY_UNREAD_MSG' => $LANG['show_not_reads'], 'L_FORUM' => $LANG['forum'], 'L_AUTHOR' => $LANG['author'], 'L_TOPIC' => $LANG['topic_s'], 'L_ANSWERS' => $LANG['replies'], 'L_MESSAGE' => $LANG['message_s'], 'L_VIEW' => $LANG['views'], 'L_LAST_MESSAGE' => $LANG['last_messages'], 'L_POST_NEW_SUBJECT' => $LANG['post_new_subject'], 'L_FOR_SELECTION' => $LANG['for_selection'], 'L_CHANGE_STATUT_TO' => sprintf($LANG['change_status_to'], $CONFIG_FORUM['display_msg']), 'L_CHANGE_STATUT_TO_DEFAULT' => $LANG['change_status_to_default'], 'L_MOVE_TO' => $LANG['move_to'], 'L_DELETE' => $LANG['delete'], 'L_LOCK' => $LANG['forum_lock'], 'L_UNLOCK' => $LANG['forum_unlock'], 'L_GO' => $LANG['go']));
 $nbr_topics_display = 0;
 $result = $Sql->query_while("SELECT m1.login AS login, m2.login AS last_login, t.id, t.title, t.subtitle, t.user_id, t.nbr_msg, t.nbr_views, t.last_user_id , t.last_msg_id, t.last_timestamp, t.type, t.status, t.display_msg, v.last_view_id, p.question, tr.id AS idtrack\n\tFROM " . PREFIX . "forum_topics t\n\tLEFT JOIN " . PREFIX . "forum_view v ON v.user_id = '" . $User->get_attribute('user_id') . "' AND v.idtopic = t.id\n\tLEFT JOIN " . DB_TABLE_MEMBER . " m1 ON m1.user_id = t.user_id\n\tLEFT JOIN " . DB_TABLE_MEMBER . " m2 ON m2.user_id = t.last_user_id\n\tLEFT JOIN " . PREFIX . "forum_poll p ON p.idtopic = t.id\n\tLEFT JOIN " . PREFIX . "forum_track tr ON tr.idtopic = t.id AND tr.user_id = '" . $User->get_attribute('user_id') . "'\n\tWHERE t.idcat = '" . $id_get . "'\n\tORDER BY t.type DESC , t.last_timestamp DESC\n\t" . $Sql->limit($Pagination->get_first_msg($CONFIG_FORUM['pagination_topic'], 'p'), $CONFIG_FORUM['pagination_topic']), __LINE__, __FILE__);
 while ($row = $Sql->fetch_assoc($result)) {
     $type = array('2' => $LANG['forum_announce'] . ':', '1' => $LANG['forum_postit'] . ':', '0' => '');
     $img_announce = 'announce';
     $new_msg = false;
     if (!$is_guest) {
         $new_msg = false;
         if ($row['last_view_id'] != $row['last_msg_id'] && $row['last_timestamp'] >= $max_time_msg) {
             $img_announce = 'new_' . $img_announce;
             $new_msg = true;
         }
     }
     $img_announce .= $row['type'] == '1' ? '_post' : '';
     $img_announce .= $row['type'] == '2' ? '_top' : '';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:forum.php

示例5: foreach

 if (!in_array($criteria, array('entitled', 'module', 'status', 'creation_date', 'fixing_date', 'poster_id', 'fixer_id'))) {
     $criteria = 'current_status';
 }
 $order = $order == 'desc' ? 'desc' : 'asc';
 foreach (ContributionService::get_all_contributions($criteria, $order) as $this_contribution) {
     $creation_date = $this_contribution->get_creation_date();
     $fixing_date = $this_contribution->get_fixing_date();
     if ($User->check_auth($this_contribution->get_auth(), CONTRIBUTION_AUTH_BIT) || $User->get_attribute('user_id') == $this_contribution->get_poster_id()) {
         if ($num_contributions > CONTRIBUTIONS_PER_PAGE * ($pagination->get_current_page() - 1) && $num_contributions <= CONTRIBUTIONS_PER_PAGE * $pagination->get_current_page()) {
             $template->assign_block_vars('contributions', array('ENTITLED' => $this_contribution->get_entitled(), 'MODULE' => $this_contribution->get_module_name(), 'STATUS' => $this_contribution->get_status_name(), 'CREATION_DATE' => $creation_date->format(DATE_FORMAT_SHORT), 'FIXING_DATE' => $fixing_date->format(DATE_FORMAT_SHORT), 'POSTER' => $this_contribution->get_poster_login(), 'FIXER' => $this_contribution->get_fixer_login(), 'ACTIONS' => '', 'U_FIXER_PROFILE' => PATH_TO_ROOT . '/member/' . url('member.php?id=' . $this_contribution->get_fixer_id(), 'member-' . $this_contribution->get_fixer_id() . '.php'), 'U_POSTER_PROFILE' => PATH_TO_ROOT . '/member/' . url('member.php?id=' . $this_contribution->get_poster_id(), 'member-' . $this_contribution->get_poster_id() . '.php'), 'U_CONSULT' => PATH_TO_ROOT . '/member/' . url('contribution_panel.php?id=' . $this_contribution->get_id()), 'C_FIXED' => $this_contribution->get_status() == EVENT_STATUS_PROCESSED, 'C_PROCESSING' => $this_contribution->get_status() == EVENT_STATUS_BEING_PROCESSED));
         }
         $num_contributions++;
     }
 }
 if ($num_contributions > 1) {
     $template->assign_vars(array('PAGINATION' => $pagination->display('contribution_panel.php?p=%d&criteria=' . $criteria . '&order=' . $order, $num_contributions - 1, 'p', CONTRIBUTIONS_PER_PAGE, 3)));
 } else {
     $template->assign_vars(array('C_NO_CONTRIBUTION' => true, 'L_NO_CONTRIBUTION_TO_DISPLAY' => $LANG['no_contribution']));
 }
 define('NUMBER_OF_MODULES_PER_LINE', 4);
 $i_module = 0;
 foreach ($MODULES as $module_name => $module_infos) {
     $module_ini = load_ini_file(PATH_TO_ROOT . '/' . $module_name . '/lang/', get_ulang());
     if (!empty($module_ini['contribution_interface'])) {
         if ($i_module % NUMBER_OF_MODULES_PER_LINE == 0) {
             $template->assign_block_vars('row', array());
         }
         $template->assign_block_vars('row.module', array('WIDTH' => (int) (100.0 / NUMBER_OF_MODULES_PER_LINE), 'U_MODULE_LINK' => PATH_TO_ROOT . '/' . $module_name . '/' . url($module_ini['contribution_interface']), 'MODULE_ID' => $module_name, 'MODULE_NAME' => $module_ini['name'], 'LINK_TITLE' => sprintf($LANG['contribute_in_module_name'], $module_ini['name'])));
         $i_module++;
     }
 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:contribution_panel.php

示例6: retrieve

     case 'alph':
         $sort = 'login';
         break;
     case 'rank':
         $sort = 'level';
         break;
     case 'aprob':
         $sort = 'user_aprob';
         break;
     default:
         $sort = 'timestamp';
 }
 $get_mode = retrieve(GET, 'mode', '');
 $mode = $get_mode == 'asc' ? 'ASC' : 'DESC';
 $unget = !empty($get_sort) && !empty($mode) ? '&amp;sort=' . $get_sort . '&amp;mode=' . $get_mode : '';
 $Template->assign_vars(array('PAGINATION' => $Pagination->display('admin_members.php?p=%d' . $unget, $nbr_membre, 'p', 25, 3), 'THEME' => get_utheme(), 'LANG' => get_ulang(), 'KERNEL_EDITOR' => display_editor(), 'L_REQUIRE_MAIL' => $LANG['require_mail'], 'L_REQUIRE_PASS' => $LANG['require_pass'], 'L_REQUIRE_RANK' => $LANG['require_rank'], 'L_REQUIRE_LOGIN' => $LANG['require_pseudo'], 'L_REQUIRE_TEXT' => $LANG['require_text'], 'L_CONFIRM_DEL_USER' => $LANG['confirm_del_member'], 'L_CONFIRM_DEL_ADMIN' => $LANG['confirm_del_admin'], 'L_CONTENTS' => $LANG['content'], 'L_SUBMIT' => $LANG['submit'], 'L_UPDATE' => $LANG['update'], 'L_USERS_MANAGEMENT' => $LANG['members_management'], 'L_USERS_ADD' => $LANG['members_add'], 'L_USERS_CONFIG' => $LANG['members_config'], 'L_USERS_PUNISHMENT' => $LANG['members_punishment'], 'L_PSEUDO' => $LANG['pseudo'], 'L_PASSWORD' => $LANG['password'], 'L_MAIL' => $LANG['mail'], 'L_RANK' => $LANG['rank'], 'L_APROB' => $LANG['aprob'], 'L_USER' => $LANG['member'], 'L_MODO' => $LANG['modo'], 'L_ADMIN' => $LANG['admin'], 'L_SEARCH_USER' => $LANG['search_member'], 'L_JOKER' => $LANG['joker'], 'L_SEARCH' => $LANG['search'], 'L_WEBSITE' => $LANG['website'], 'L_REGISTERED' => $LANG['registered'], 'L_DELETE' => $LANG['delete']));
 $result = $Sql->query_while("SELECT login, user_id, user_mail, timestamp, user_web, level, user_aprob\n\tFROM " . DB_TABLE_MEMBER . " \n\tORDER BY " . $sort . " " . $mode . $Sql->limit($Pagination->get_first_msg(25, 'p'), 25), __LINE__, __FILE__);
 while ($row = $Sql->fetch_assoc($result)) {
     switch ($row['level']) {
         case 0:
             $rank = $LANG['member'];
             break;
         case 1:
             $rank = $LANG['modo'];
             break;
         case 2:
             $rank = $LANG['admin'];
             break;
         default:
             0;
     }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_members.php

示例7: array

             $Gallery->Resize_pics('pics/' . $row['path']);
         }
         $Template->assign_block_vars('cat.list', array('IDCAT' => $row['id'], 'CAT' => $row['name'], 'IMG' => '<img src="pics/thumbnails/' . $row['path'] . '" alt="" />', 'TR_START' => $tr_start, 'TR_END' => $tr_end, 'LOCK' => $row['status'] == 0 ? '<img class="valign_middle" src="../templates/' . get_utheme() . '/images/readonly.png" alt="" title="' . $LANG['gallery_lock'] . '" />' : '', 'L_NBR_PICS' => sprintf($LANG['nbr_pics_info_admin'], $row['nbr_pics'], $row['nbr_pics_unaprob'])));
     }
     $Sql->query_close($result);
     while (!is_int($i / $nbr_column_cats)) {
         $i++;
         $Template->assign_block_vars('cat.end_td', array('TD_END' => '<td class="row2" style="width:' . $column_width_cats . '%">&nbsp;</td>', 'TR_END' => is_int($i / $nbr_column_cats) ? '</tr>' : ''));
     }
 }
 ##### Affichage des photos #####
 if ($nbr_pics > 0) {
     $Template->assign_block_vars('pics', array('EDIT' => '<a href="admin_gallery_cat.php' . (!empty($idcat) ? '?id=' . $idcat : '') . '"><img class="valign_middle" src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/edit.png" alt="" /></a>', 'PICS_MAX' => !empty($idpics) ? '<img src="show_pics.php?id=' . $idpics . '&amp;cat=' . $idcat . '" alt="" / >' : ''));
     import('util/pagination');
     $Pagination = new Pagination();
     $Template->assign_vars(array('PAGINATION_PICS' => $Pagination->display('admin_gallery.php?cat=' . $idcat . '&amp;pp=%d', $nbr_pics, 'pp', $CONFIG_GALLERY['nbr_pics_max'], 3)));
     $array_cat_list = array(0 => '<option value="0" %s>' . $LANG['root'] . '</option>');
     $result = $Sql->query_while("SELECT id, level, name \n\t\tFROM " . PREFIX . "gallery_cats\n\t\tORDER BY id_left", __LINE__, __FILE__);
     while ($row = $Sql->fetch_assoc($result)) {
         $margin = $row['level'] > 0 ? str_repeat('--------', $row['level']) : '--';
         $array_cat_list[$row['id']] = '<option value="' . $row['id'] . '" %s>' . $margin . ' ' . $row['name'] . '</option>';
     }
     $Sql->query_close($result);
     if (!empty($idpics)) {
         $result = $Sql->query_while("SELECT g.id, g.idcat, g.name, g.user_id, g.views, g.width, g.height, g.weight, g.timestamp, g.note, g.nbrnote, g.nbr_com, g.aprob, m.login\n\t\t\tFROM " . PREFIX . "gallery g\n\t\t\tLEFT JOIN " . DB_TABLE_MEMBER . " m ON m.user_id = g.user_id\t\t\n\t\t\tWHERE g.idcat = '" . $idcat . "' AND g.id = '" . $idpics . "'\n\t\t\t" . $Sql->limit(0, 1), __LINE__, __FILE__);
         $info_pics = $Sql->fetch_assoc($result);
         if (!empty($info_pics['id'])) {
             $id_previous = 0;
             $id_next = 0;
             $nbr_pics_display_before = floor(($nbr_column_pics - 1) / 2);
             $nbr_pics_display_after = $nbr_column_pics - 1 - floor($nbr_pics_display_before);
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_gallery.php

示例8: foreach

    $i = 0;
    $array_poll = array_combine($array_answer, $array_vote);
    foreach ($array_poll as $answer => $nbrvote) {
        $percent = number_round($nbrvote * 100 / $sum_vote, 1);
        $Template->assign_block_vars('answers', array('ID' => $i, 'ANSWER' => !empty($answer) ? $answer : ''));
        $Template->assign_block_vars('votes', array('ID' => $i, 'VOTES' => isset($nbrvote) ? $nbrvote : '', 'PERCENT' => isset($percent) ? $percent . '%' : ''));
        $i++;
    }
    $Template->assign_vars(array('MAX_ID' => $i));
    $Template->pparse('admin_poll_management2');
} else {
    $Template->set_filenames(array('admin_poll_management' => 'poll/admin_poll_management.tpl'));
    $nbr_poll = $Sql->count_table('poll', __LINE__, __FILE__);
    import('util/pagination');
    $Pagination = new Pagination();
    $Template->assign_vars(array('PAGINATION' => $Pagination->display('admin_poll.php?p=%d', $nbr_poll, 'p', 20, 3), 'LANG' => get_ulang(), 'L_CONFIRM_ERASE_POOL' => $LANG['confirm_del_poll'], 'L_POLL_MANAGEMENT' => $LANG['poll_management'], 'L_POLL_ADD' => $LANG['poll_add'], 'L_POLL_CONFIG' => $LANG['poll_config'], 'L_REQUIRE' => $LANG['require'], 'L_QUESTION' => $LANG['question'], 'L_POLLS' => $LANG['polls'], 'L_DATE' => $LANG['date'], 'L_ARCHIVED' => $LANG['archived'], 'L_PSEUDO' => $LANG['pseudo'], 'L_APROB' => $LANG['aprob'], 'L_UPDATE' => $LANG['update'], 'L_DELETE' => $LANG['delete'], 'L_SHOW' => $LANG['show']));
    $result = $Sql->query_while("SELECT p.id, p.question, p.archive, p.timestamp, p.visible, p.start, p.end, m.login \n\tFROM " . PREFIX . "poll p\n\tLEFT JOIN " . DB_TABLE_MEMBER . " m ON p.user_id = m.user_id\t\n\tORDER BY p.timestamp DESC \n\t" . $Sql->limit($Pagination->get_first_msg(20, 'p'), 20), __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        if ($row['visible'] == 2) {
            $aprob = $LANG['waiting'];
        } elseif ($row['visible'] == 1) {
            $aprob = $LANG['yes'];
        } else {
            $aprob = $LANG['no'];
        }
        $archive = $row['archive'] == 1 ? $LANG['yes'] : $LANG['no'];
        $question = strlen($row['question']) > 45 ? substr($row['question'], 0, 45) . '...' : $row['question'];
        $visible = '';
        if ($row['start'] > 0) {
            $visible .= gmdate_format('date_format_short', $row['start']);
        }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_poll.php

示例9: import

    $mode = $get_mode == 'asc' ? 'ASC' : 'DESC';
    $unget = !empty($get_sort) && !empty($mode) ? '?sort=' . $get_sort . '&amp;mode=' . $get_mode : '';
    import('util/pagination');
    $Pagination = new Pagination();
    $Template->assign_vars(array('PAGINATION' => $Pagination->display('web' . url('.php' . (!empty($unget) ? $unget . '&amp;' : '?') . 'cat=' . $idcat . '&amp;p=%d', '-' . $idcat . '-0-%d.php' . (!empty($unget) ? '?' . $unget : '')), $nbr_web, 'p', $CONFIG_WEB['nbr_web_max'], 3)));
    import('content/note');
    $result = $Sql->query_while("SELECT id, title, timestamp, compt, note, nbrnote, nbr_com\n\tFROM " . PREFIX . "web\n\tWHERE aprob = 1 AND idcat = '" . $idcat . "'\n\tORDER BY " . $sort . " " . $mode . $Sql->limit($Pagination->get_first_msg($CONFIG_WEB['nbr_web_max'], 'p'), $CONFIG_WEB['nbr_web_max']), __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $row['title'] = strlen($row['title']) > 45 ? substr(html_entity_decode($row['title'], ENT_COMPAT, 'ISO-8859-1'), 0, 45) . '...' : $row['title'];
        $Template->assign_block_vars('web', array('NAME' => $row['title'], 'CAT' => $CAT_WEB[$idcat]['name'], 'DATE' => gmdate_format('date_format_short', $row['timestamp']), 'COMPT' => $row['compt'], 'NOTE' => $row['nbrnote'] > 0 ? Note::display_img($row['note'], $CONFIG_WEB['note_max']) : '<em>' . $LANG['no_note'] . '</em>', 'COM' => $row['nbr_com'], 'U_WEB_LINK' => url('.php?cat=' . $idcat . '&amp;id=' . $row['id'], '-' . $idcat . '-' . $row['id'] . '.php')));
    }
    $Sql->query_close($result);
    $Template->pparse('web');
} else {
    $Template->set_filenames(array('web' => 'web/web.tpl'));
    $total_link = $Sql->query("SELECT COUNT(*) FROM " . PREFIX . "web_cat wc\n\tLEFT JOIN " . PREFIX . "web w ON w.idcat = wc.id\n\tWHERE w.aprob = 1 AND wc.aprob = 1 AND wc.secure <= '" . $User->get_attribute('level') . "'", __LINE__, __FILE__);
    $total_cat = $Sql->query("SELECT COUNT(*) as compt FROM " . PREFIX . "web_cat WHERE aprob = 1 AND secure <= '" . $User->get_attribute('level') . "'", __LINE__, __FILE__);
    import('util/pagination');
    $Pagination = new Pagination();
    $CONFIG_WEB['nbr_column'] = $total_cat > $CONFIG_WEB['nbr_column'] ? $CONFIG_WEB['nbr_column'] : $total_cat;
    $CONFIG_WEB['nbr_column'] = !empty($CONFIG_WEB['nbr_column']) ? $CONFIG_WEB['nbr_column'] : 1;
    $Template->assign_vars(array('C_WEB_CAT' => true, 'C_IS_ADMIN' => $User->check_level(ADMIN_LEVEL), 'PAGINATION' => $Pagination->display('web' . url('.php?p=%d', '-0-0-%d.php'), $total_cat, 'p', $CONFIG_WEB['nbr_cat_max'], 3), 'TOTAL_FILE' => $total_link, 'L_CATEGORIES' => $LANG['categories'], 'L_PROPOSE_LINK' => $LANG['propose_link'], 'L_HOW_LINK' => $LANG['how_link'], 'U_WEB_ADD' => url('.php?web=true')));
    $column_width = floor(100 / $CONFIG_WEB['nbr_column']);
    $result = $Sql->query_while("SELECT aw.id, aw.name, aw.contents, aw.icon, COUNT(w.id) as count\n\tFROM " . PREFIX . "web_cat aw\n\tLEFT JOIN " . PREFIX . "web w ON w.idcat = aw.id AND w.aprob = 1\n\tWHERE aw.aprob = 1 AND aw.secure <= '" . $User->get_attribute('level') . "'\n\tGROUP BY aw.id\n\tORDER BY aw.class\n\t" . $Sql->limit($Pagination->get_first_msg($CONFIG_WEB['nbr_cat_max'], 'p'), $CONFIG_WEB['nbr_cat_max']), __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $Template->assign_block_vars('cat_list', array('WIDTH' => $column_width, 'TOTAL' => $row['count'], 'CAT' => $row['name'], 'CONTENTS' => $row['contents'], 'U_IMG_CAT' => !empty($row['icon']) ? '<a href="../web/web' . url('.php?cat=' . $row['id'], '-' . $row['id'] . '.php') . '"><img src="' . $row['icon'] . '" alt="" /></a><br />' : '', 'U_WEB_CAT' => url('.php?cat=' . $row['id'], '-' . $row['id'] . '.php')));
    }
    $Sql->query_close($result);
    $Template->pparse('web');
}
require_once '../kernel/footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:web.php

示例10: url

         $Template->assign_vars(array('C_GALLERY_PICS_MAX' => true, 'C_GALLERY_PICS_MODO' => $is_modo ? true : false, 'ID' => $info_pics['id'], 'IMG_MAX' => '<img src="show_pics' . url('.php?id=' . $g_idpics . '&amp;cat=' . $g_idcat) . '" alt="" />', 'NAME' => '<span id="fi_' . $info_pics['id'] . '">' . $info_pics['name'] . '</span> <span id="fi' . $info_pics['id'] . '"></span>', 'POSTOR' => '<a class="small_link" href="../member/member' . url('.php?id=' . $info_pics['user_id'], '-' . $info_pics['user_id'] . '.php') . '">' . $info_pics['login'] . '</a>', 'DATE' => gmdate_format('date_format_short', $info_pics['timestamp']), 'VIEWS' => $info_pics['views'] + 1, 'DIMENSION' => $info_pics['width'] . ' x ' . $info_pics['height'], 'SIZE' => number_round($info_pics['weight'] / 1024, 1), 'COM' => Comments::com_display_link($info_pics['nbr_com'], '../gallery/gallery' . url('.php?cat=' . $info_pics['idcat'] . '&amp;id=' . $info_pics['id'] . '&amp;com=0&amp;sort=' . $g_sort, '-' . $info_pics['idcat'] . '-' . $info_pics['id'] . '.php?com=0&amp;sort=' . $g_sort), $info_pics['id'], 'gallery'), 'KERNEL_NOTATION' => $activ_note ? $Note->display_form() : '', 'COLSPAN' => $CONFIG_GALLERY['nbr_column'] + 2, 'CAT' => $cat_list, 'RENAME' => $html_protected_name, 'RENAME_CUT' => $html_protected_name, 'IMG_APROB' => get_ulang() . '/' . ($info_pics['aprob'] == 1 ? 'unvisible.png' : 'visible.png'), 'ARRAY_JS' => $array_js, 'NBR_PICS' => $i - 1, 'MAX_START' => $i - 1 - $nbr_column_pics, 'START_THUMB' => $pos_pics - $start_thumbnails > 0 ? $pos_pics - $start_thumbnails : 0, 'END_THUMB' => $pos_pics + $end_thumbnails, 'L_KB' => $LANG['unit_kilobytes'], 'L_INFORMATIONS' => $LANG['informations'], 'L_NAME' => $LANG['name'], 'L_POSTOR' => $LANG['postor'], 'L_VIEWS' => $LANG['views'], 'L_ADD_ON' => $LANG['add_on'], 'L_DIMENSION' => $LANG['dimension'], 'L_SIZE' => $LANG['size'], 'L_NOTE' => $LANG['note'], 'L_COM' => $LANG['com'], 'L_EDIT' => $LANG['edit'], 'L_APROB_IMG' => $info_pics['aprob'] == 1 ? $LANG['unaprob'] : $LANG['aprob'], 'L_THUMBNAILS' => $LANG['thumbnails'], 'U_DEL' => url('.php?del=' . $info_pics['id'] . '&amp;token=' . $Session->get_token() . '&amp;cat=' . $g_idcat, '-' . $g_idcat . '.php?token=' . $Session->get_token() . '&amp;del=' . $info_pics['id']), 'U_MOVE' => url('.php?id=' . $info_pics['id'] . '&amp;token=' . $Session->get_token() . '&amp;move=\' + this.options[this.selectedIndex].value', '-0-' . $info_pics['id'] . '.php?token=' . $Session->get_token() . '&amp;move=\' + this.options[this.selectedIndex].value'), 'U_PREVIOUS' => $pos_pics > 0 ? '<a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_previous, '-' . $g_idcat . '-' . $id_previous . '.php') . '#pics_max"><img src="../templates/' . get_utheme() . '/images/left.png" alt="" class="valign_middle" /></a> <a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_previous, '-' . $g_idcat . '-' . $id_previous . '.php') . '#pics_max">' . $LANG['previous'] . '</a>' : '', 'U_NEXT' => $pos_pics < $i - 1 ? '<a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_next, '-' . $g_idcat . '-' . $id_next . '.php') . '#pics_max">' . $LANG['next'] . '</a> <a href="gallery' . url('.php?cat=' . $g_idcat . '&amp;id=' . $id_next, '-' . $g_idcat . '-' . $id_next . '.php') . '#pics_max"><img src="../templates/' . get_utheme() . '/images/right.png" alt="" class="valign_middle" /></a>' : '', 'U_LEFT_THUMBNAILS' => $pos_pics - $start_thumbnails > 0 ? '<span id="display_left"><a href="javascript:display_thumbnails(\'left\')"><img src="../templates/' . get_utheme() . '/images/left.png" class="valign_middle" alt="" /></a></span>' : '<span id="display_left"></span>', 'U_RIGHT_THUMBNAILS' => $pos_pics - $start_thumbnails <= $i - 1 - $nbr_column_pics ? '<span id="display_right"><a href="javascript:display_thumbnails(\'right\')"><img src="../templates/' . get_utheme() . '/images/right.png" class="valign_middle" alt="" /></a></span>' : '<span id="display_right"></span>'));
         $i = 0;
         foreach ($array_pics as $pics) {
             if ($i >= $pos_pics - $start_thumbnails && $i <= $pos_pics + $end_thumbnails) {
                 $Template->assign_block_vars('list_preview_pics', array('PICS' => $pics));
             }
             $i++;
         }
         if (isset($_GET['com'])) {
             $Template->assign_vars(array('COMMENTS' => display_comments('gallery', $g_idpics, url('gallery.php?cat=' . $g_idcat . '&amp;id=' . $g_idpics . '&amp;com=%s', 'gallery-' . $g_idcat . '-' . $g_idpics . '.php?com=%s'))));
         }
     }
 } else {
     import('util/pagination');
     $Pagination = new Pagination();
     $Template->assign_vars(array('C_GALLERY_MODO' => $is_modo ? true : false, 'PAGINATION_PICS' => $Pagination->display('gallery' . url('.php?pp=%d&amp;cat=' . $g_idcat, '-' . $g_idcat . '+' . $rewrite_title . '.php?pp=%d'), $nbr_pics, 'pp', $CONFIG_GALLERY['nbr_pics_max'], 3), 'L_EDIT' => $LANG['edit'], 'L_VIEW' => $LANG['view'], 'L_VIEWS' => $LANG['views']));
     import('content/note');
     $is_connected = $User->check_level(MEMBER_LEVEL);
     $j = 0;
     $result = $Sql->query_while("SELECT g.id, g.idcat, g.name, g.path, g.timestamp, g.aprob, g.width, g.height, g.user_id, g.views, g.note, g.nbrnote, g.nbr_com, g.aprob, m.login\n\t\t\tFROM " . PREFIX . "gallery g\n\t\t\tLEFT JOIN " . DB_TABLE_MEMBER . " m ON m.user_id = g.user_id\n\t\t\tWHERE g.idcat = '" . $g_idcat . "' AND g.aprob = 1\n\t\t\t" . $g_sql_sort . "\n\t\t\t" . $Sql->limit($Pagination->get_first_msg($CONFIG_GALLERY['nbr_pics_max'], 'pp'), $CONFIG_GALLERY['nbr_pics_max']), __LINE__, __FILE__);
     while ($row = $Sql->fetch_assoc($result)) {
         if (!file_exists('pics/thumbnails/' . $row['path'])) {
             $Gallery->Resize_pics('pics/' . $row['path']);
         }
         if ($CONFIG_GALLERY['display_pics'] == 3) {
             $display_link = HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&amp;cat=' . $row['idcat']) . '" rel="lightbox[1]" onmousedown="increment_view(' . $row['id'] . ');" title="' . str_replace('"', '', stripslashes($row['name']));
             $display_name = HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&amp;cat=' . $row['idcat']) . '" rel="lightbox[2]" onmousedown="increment_view(' . $row['id'] . ');" title="' . str_replace('"', '', stripslashes($row['name']));
         } elseif ($CONFIG_GALLERY['display_pics'] == 2) {
             $display_name = $display_link = 'javascript:increment_view(' . $row['id'] . ');display_pics_popup(\'' . HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&amp;cat=' . $row['idcat']) . '\', \'' . $row['width'] . '\', \'' . $row['height'] . '\')';
         } elseif ($CONFIG_GALLERY['display_pics'] == 1) {
             $display_name = $display_link = 'javascript:increment_view(' . $row['id'] . ');display_pics(' . $row['id'] . ', \'' . HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&amp;cat=' . $row['idcat']) . '\')';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:gallery.php

示例11: redirect

        }
    } else {
        redirect(HOST . SCRIPT);
    }
    $Template->pparse('admin_groups_management2');
} elseif ($add) {
    $Template->set_filenames(array('admin_groups_management2' => 'admin/admin_groups_management2.tpl'));
    $img_groups = '<option value="" selected="selected">--</option>';
    import('io/filesystem/folder');
    $img_groups = '<option value="">--</option>';
    $image_folder_path = new Folder(PATH_TO_ROOT . '/images/group');
    foreach ($image_folder_path->get_files('`\\.(png|jpg|bmp|gif)$`i') as $image) {
        $file = $image->get_name();
        $img_groups .= '<option value="' . $file . '">' . $file . '</option>';
    }
    $Template->assign_vars(array('THEME' => get_utheme(), 'LANG' => get_ulang(), 'IMG_GROUPS' => $img_groups, 'C_ADD_GROUP' => true, 'L_REQUIRE_PSEUDO' => $LANG['require_pseudo'], 'L_REQUIRE_NAME' => $LANG['require_name'], 'L_CONFIRM_DEL_USER_GROUP' => $LANG['confirm_del_member_group'], 'L_GROUPS_MANAGEMENT' => $LANG['groups_management'], 'L_ADD_GROUPS' => $LANG['groups_add'], 'L_REQUIRE' => $LANG['require'], 'L_UPLOAD_GROUPS' => $LANG['upload_group'], 'L_UPLOAD_FORMAT' => $LANG['upload_rank_format'], 'L_UPLOAD' => $LANG['upload'], 'L_NAME' => $LANG['name'], 'L_IMG_ASSOC_GROUP' => $LANG['img_assoc_group'], 'L_IMG_ASSOC_GROUP_EXPLAIN' => $LANG['img_assoc_group_explain'], 'L_AUTH_FLOOD' => $LANG['auth_flood'], 'L_PM_GROUP_LIMIT' => $LANG['pm_group_limit'], 'L_PM_GROUP_LIMIT_EXPLAIN' => $LANG['pm_group_limit_explain'], 'L_DATA_GROUP_LIMIT' => $LANG['data_group_limit'], 'L_DATA_GROUP_LIMIT_EXPLAIN' => $LANG['data_group_limit_explain'], 'L_COLOR_GROUP' => $LANG['color_group'], 'L_COLOR_GROUP_EXPLAIN' => $LANG['color_group_explain'], 'L_MB' => $LANG['unit_megabytes'], 'L_YES' => $LANG['yes'], 'L_NO' => $LANG['no'], 'L_ADD' => $LANG['add']));
    $Template->pparse('admin_groups_management2');
} else {
    $Template->set_filenames(array('admin_groups_management' => 'admin/admin_groups_management.tpl'));
    $nbr_group = $Sql->count_table("group", __LINE__, __FILE__);
    import('util/pagination');
    $Pagination = new Pagination();
    $Template->assign_vars(array('PAGINATION' => $Pagination->display('admin_groups.php?p=%d', $nbr_group, 'p', 25, 3), 'THEME' => get_utheme(), 'LANG' => get_ulang(), 'KERNEL_EDITOR' => display_editor(), 'L_CONFIRM_DEL_GROUP' => $LANG['confirm_del_group'], 'L_GROUPS_MANAGEMENT' => $LANG['groups_management'], 'L_ADD_GROUPS' => $LANG['groups_add'], 'L_NAME' => $LANG['name'], 'L_IMAGE' => $LANG['image'], 'L_UPDATE' => $LANG['update'], 'L_DELETE' => $LANG['delete']));
    $result = $Sql->query_while("SELECT id, name, img\n\tFROM " . DB_TABLE_GROUP . "\n\tORDER BY name\n\t" . $Sql->limit($Pagination->get_first_msg(25, 'p'), 25), __LINE__, __FILE__);
    while ($row = $Sql->fetch_assoc($result)) {
        $Template->assign_block_vars('group', array('LINK' => url('.php?g=' . $row['id'], '-0.php?g=' . $row['id']), 'ID' => $row['id'], 'NAME' => $row['name'], 'IMAGE' => !empty($row['img']) ? '<img src="../images/group/' . $row['img'] . '" alt="" />' : ''));
    }
    $Sql->query_close($result);
    $Template->pparse('admin_groups_management');
}
require_once '../admin/admin_footer.php';
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:admin_groups.php

示例12: elseif

}
if (isset($stockage)) {
    $stockage = '&stockage=' . $stockage;
} else {
    $stockage = '';
}
if (isset($_POST['search'])) {
    $search = '&search=' . $_POST['search'];
} elseif (isset($_GET['search'])) {
    $search = '&search=' . $_GET['search'];
} else {
    $search = '';
}
$pagination = new Pagination('?paged=%s' . $region . $appellation . $type . $stockage . $search, $current_page, $total_posts, $options);
// On fait une instance de la classe Pagination
$pagination->display();
// On affiche le rendu de la pagination
switch ($total_posts) {
    //pas de résultats
    case '':
        echo '';
        break;
    case 'index':
        echo '';
        break;
    case 1:
        echo "<p id='nb-enregistrements'>" . $total_posts . ' résultat</p>';
        break;
    default:
        echo "<p id='nb-enregistrements'>" . $total_posts . ' résultats</p>';
}
开发者ID:mathieu-aubin,项目名称:MaCaveOnline,代码行数:31,代码来源:foot.pagination.php

示例13: import

     case 'incomplete':
         $errstr = $LANG['e_incomplete'];
         break;
     default:
         $errstr = '';
 }
 if (!empty($errstr)) {
     $Errorh->handler($errstr, E_USER_NOTICE);
 }
 if ($captcha->is_available() && $CONFIG_GUESTBOOK['guestbook_verifcode']) {
     $Template->assign_vars(array('C_VERIF_CODE' => true, 'VERIF_CODE' => $captcha->display_form(), 'L_REQUIRE_VERIF_CODE' => $captcha->js_require()));
 }
 $nbr_guestbook = $Sql->count_table('guestbook', __LINE__, __FILE__);
 import('util/pagination');
 $Pagination = new Pagination();
 $Template->assign_vars(array('UPDATE' => url('?token=' . $Session->get_token()), 'PAGINATION' => $Pagination->display('guestbook' . url('.php?p=%d'), $nbr_guestbook, 'p', 10, 3), 'KERNEL_EDITOR' => display_editor('guestbook_contents', $CONFIG_GUESTBOOK['guestbook_forbidden_tags']), 'L_ALERT_TEXT' => $LANG['require_text'], 'L_DELETE_MSG' => $LANG['alert_delete_msg'], 'L_ADD_MSG' => $LANG['add_msg'], 'L_REQUIRE' => $LANG['require'], 'L_MESSAGE' => $LANG['message'], 'L_VERIF_CODE' => $LANG['verif_code'], 'L_PSEUDO' => $LANG['pseudo'], 'L_SUBMIT' => $LANG['submit'], 'L_PREVIEW' => $LANG['preview'], 'L_RESET' => $LANG['reset'], 'L_ON' => $LANG['on']));
 $array_ranks = array(-1 => $LANG['guest'], 0 => $LANG['member'], 1 => $LANG['modo'], 2 => $LANG['admin']);
 $Cache->load('ranks');
 $j = 0;
 $result = $Sql->query_while("SELECT g.id, g.login, g.timestamp, m.user_id, m.login as mlogin, m.level, m.user_mail, m.user_show_mail, m.timestamp AS registered, m.user_avatar, m.user_msg, m.user_local, m.user_web, m.user_sex, m.user_msn, m.user_yahoo, m.user_sign, m.user_warning, m.user_ban, m.user_groups, s.user_id AS connect, g.contents\n\tFROM " . PREFIX . "guestbook g\n\tLEFT JOIN " . DB_TABLE_MEMBER . " m ON m.user_id = g.user_id\n\tLEFT JOIN " . DB_TABLE_SESSIONS . " s ON s.user_id = g.user_id AND s.session_time > '" . (time() - $CONFIG['site_session_invit']) . "'\n\tGROUP BY g.id\n\tORDER BY g.timestamp DESC\n\t" . $Sql->limit($Pagination->get_first_msg(10, 'p'), 10), __LINE__, __FILE__);
 while ($row = $Sql->fetch_assoc($result)) {
     $edit = '';
     $del = '';
     $is_guest = empty($row['user_id']);
     $is_modo = $User->check_level(MODO_LEVEL);
     $warning = '';
     $readonly = '';
     if ($is_modo && !$is_guest) {
         $warning = '&nbsp;<a href="../member/moderation_panel' . url('.php?action=warning&amp;id=' . $row['user_id']) . '" title="' . $LANG['warning_management'] . '"><img src="../templates/' . get_utheme() . '/images/admin/important.png" alt="' . $LANG['warning_management'] . '" class="valign_middle" /></a>';
         $readonly = '<a href="../member/moderation_panel' . url('.php?action=punish&amp;id=' . $row['user_id']) . '" title="' . $LANG['punishment_management'] . '"><img src="../templates/' . get_utheme() . '/images/readonly.png" alt="' . $LANG['punishment_management'] . '" class="valign_middle" /></a>';
     }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:guestbook.php

示例14: elseif

            $trend_img = 'up.png';
            $sign = '+';
            $trend = number_round($row['yesterday_visit'] * 100 / $average, 1) - 100;
        } elseif ($row['yesterday_visit'] < $average) {
            $trend_img = 'down.png';
            $sign = '-';
            $trend = 100 - number_round($row['yesterday_visit'] * 100 / $average, 1);
        } else {
            $trend_img = 'right.png';
            $sign = '+';
            $trend = 0;
        }
        $Template->assign_block_vars('keyword_list', array('ID' => $row['id'], 'KEYWORD' => $row['relative_url'], 'IMG_MORE' => '<img src="../templates/' . get_utheme() . '/images/upload/plus.png" alt="" onclick="XMLHttpRequest_referer(' . $row['id'] . ')" class="valign_middle" id="img_url' . $row['id'] . '" />', 'NBR_LINKS' => $row['count'], 'TOTAL_VISIT' => $row['total_visit'], 'AVERAGE_VISIT' => number_round($average, 1), 'LAST_UPDATE' => gmdate_format('date_format_short', $row['last_update']), 'TREND' => '<img src="../templates/' . get_utheme() . '/images/admin/' . $trend_img . '" alt="" class="valign_middle" /> (' . $sign . $trend . '%)'));
    }
    $Sql->query_close($result);
    $Template->assign_vars(array('C_STATS_KEYWORD' => true, 'PAGINATION' => $Pagination->display('stats' . url('.php?keyword=1&amp;p=%d', '-keyword.php?p=%d'), $nbr_keyword, 'p', 15, 3), 'L_SEARCH_ENGINE' => $LANG['keyword_s'], 'L_TOTAL_VISIT' => $LANG['total_visit'], 'L_AVERAGE_VISIT' => $LANG['average_visit'], 'L_TREND' => $LANG['trend'], 'L_LAST_UPDATE' => $LANG['last_update']));
} elseif ($browser || $os || $user_lang) {
    include_once '../lang/' . get_ulang() . '/stats.php';
    $path = '../images/stats/';
    if (!empty($browser)) {
        $Template->assign_vars(array('C_STATS_BROWSERS' => true, 'GRAPH_RESULT' => !file_exists('../cache/browsers.png') ? '<img src="../kernel/framework/ajax/display_stats.php?browsers=1" alt="" />' : '<img src="../cache/browsers.png" alt="" />', 'L_BROWSERS' => $LANG['browser_s']));
        $stats_menu = 'browsers';
        $array_stats_info = $stats_array_browsers;
        $path = '../images/stats/browsers/';
    } elseif (!empty($os)) {
        $Template->assign_vars(array('C_STATS_OS' => true, 'GRAPH_RESULT' => !file_exists('../cache/os.png') ? '<img src="../kernel/framework/ajax/display_stats.php?os=1" alt="" />' : '<img src="../cache/os.png" alt="" />', 'L_OS' => $LANG['os']));
        $stats_menu = 'os';
        $array_stats_info = $stats_array_os;
        $path = '../images/stats/os/';
    } elseif (!empty($user_lang)) {
        $Template->assign_vars(array('C_STATS_LANG' => true, 'GRAPH_RESULT' => !file_exists('../cache/lang.png') ? '<img src="../kernel/framework/ajax/display_stats.php?lang=1" alt="" />' : '<img src="../cache/lang.png" alt="" />', 'L_LANG' => $LANG['stat_lang']));
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:stats.php

示例15: msgs

			</div>
		<?php 
if ($session->is_logged_in()) {
    ?>
			<a type="button" href="new/create" class="ui green button">Write a new story</a>
			<a type="button" href="new/random" data-inverted data-tooltip="Create a new story with generated content" class="ui orange button">Generate story</a>
		<?php 
}
?>
		<?php 
echo msgs();
?>
		<br><br><hr>
		<h3>Stories</h3>
		<?php 
echo $pag->display();
?>
		<div class="questions front-page" id="questions">
			<?php 
if (count($qs) < 1) {
    echo "There are no stories in this section yet.<br>";
} else {
    foreach ($qs as $q) {
        if ($q->status != 1 && $q->uid != USER_ID) {
            continue;
        }
        $self = $q->uid === USER_ID ?: false;
        $commentsCount = count(Comment::get_comments($q->id));
        $votes = QNA::get_votes($q->id);
        $votes = $votes ?: "0";
        $reports_count = QNA::get_reports_count($q->id) ?: null;
开发者ID:khaledkhalil94,项目名称:SH.A,代码行数:31,代码来源:index.php


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