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


PHP Table::construct_header方法代码示例

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


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

示例1: myalerts_acp_manage_alert_types

function myalerts_acp_manage_alert_types()
{
    global $mybb, $lang, $page, $db, $cache;
    $alertTypeManager = MybbStuff_MyAlerts_AlertTypeManager::getInstance();
    $alertTypes = $alertTypeManager->getAlertTypes();
    if (strtolower($mybb->request_method) == 'post') {
        if (!verify_post_check($mybb->get_input('my_post_key'))) {
            flash_message($lang->invalid_post_verify_key2, 'error');
            admin_redirect("index.php?module=config-myalerts_alert_types");
        }
        $enabledAlertTypes = $mybb->get_input('alert_types_enabled', MyBB::INPUT_ARRAY);
        $canBeUserDisabled = $mybb->get_input('alert_types_can_be_user_disabled', MyBB::INPUT_ARRAY);
        $enabledAlertTypes = array_map('intval', array_keys($enabledAlertTypes));
        $canBeUserDisabled = array_map('intval', array_keys($canBeUserDisabled));
        $updateArray = array();
        foreach ($alertTypes as $alertType) {
            $type = MybbStuff_MyAlerts_Entity_AlertType::unserialize($alertType);
            $type->setEnabled(in_array($type->getId(), $enabledAlertTypes));
            $type->setCanBeUserDisabled(in_array($type->getId(), $canBeUserDisabled));
            $updateArray[] = $type;
        }
        $alertTypeManager->updateAlertTypes($updateArray);
        flash_message($lang->myalerts_alert_types_updated, 'success');
        admin_redirect("index.php?module=config-myalerts_alert_types");
    } else {
        $page->output_header($lang->myalerts_alert_types);
        $form = new Form('index.php?module=config-myalerts_alert_types', 'post');
        $table = new Table();
        $table->construct_header($lang->myalerts_alert_type_code);
        $table->construct_header($lang->myalerts_alert_type_enabled, array('width' => '5%', 'class' => 'align_center'));
        $table->construct_header($lang->myalerts_alert_type_can_be_user_disabled, array('width' => '10%', 'class' => 'align_center'));
        $noResults = false;
        if (!empty($alertTypes)) {
            foreach ($alertTypes as $type) {
                $alertCode = htmlspecialchars_uni($type['code']);
                $table->construct_cell($alertCode);
                $table->construct_cell($form->generate_check_box('alert_types_enabled[' . $type['id'] . ']', '', '', array('checked' => $type['enabled'])));
                $table->construct_cell($form->generate_check_box('alert_types_can_be_user_disabled[' . $type['id'] . ']', '', '', array('checked' => $type['can_be_user_disabled'])));
                $table->construct_row();
            }
        } else {
            $table->construct_cell($lang->myalerts_no_alert_types, array('colspan' => 2));
            $table->construct_row();
            $noResults = true;
        }
        $table->output($lang->myalerts_alert_types);
        if (!$noResults) {
            $buttons[] = $form->generate_submit_button($lang->myalerts_update_alert_types);
            $form->output_submit_wrapper($buttons);
        }
        $form->end();
        $page->output_footer();
    }
}
开发者ID:harrygg,项目名称:MyAlerts,代码行数:54,代码来源:myalerts.php

示例2: main_page

function main_page()
{
    global $cloudflare, $mybb;
    $request = $cloudflare->get_access_rules();
    $table = new Table();
    $table->construct_header("Mode");
    $table->construct_header("IP Address");
    $table->construct_header("Notes");
    $table->construct_header("Modify");
    foreach ($request->result as $rule) {
        $table->construct_cell($rule->mode);
        $table->construct_cell($rule->configuration->value);
        $table->construct_cell($rule->notes);
        $table->construct_cell("<a href=\"index.php?module=cloudflare-manage_firewall&action=modify_rule_by_ip&ip={$rule->configuration->value}&my_post_key={$mybb->post_code}&current_mode={$rule->mode}&current_notes={$rule->notes}\">Modify</a>&nbsp;/&nbsp;<a href=\"index.php?module=cloudflare-manage_firewall&action=delete_rule_by_id&rule_id={$rule->id}&ip_address={$rule->configuration->value}&my_post_key={$mybb->post_code}\">Delete</a>");
        $table->construct_row();
    }
    $table->output("Firewall Rules");
}
开发者ID:dequeues,项目名称:MyBB-CloudFlare-Manager,代码行数:18,代码来源:cloudflare_manage_firewall.php

示例3: jb_update_core

function jb_update_core()
{
    $auto = jb_download_core();
    if ($auto === false) {
        global $page;
        $page->output_header(JB_Lang::get("update_failed"));
        $table = new Table();
        $table->construct_header(JB_Lang::get("attention"));
        $table->construct_cell(JB_Lang::get("update_get"));
        $table->construct_row();
        $table->output(JB_Lang::get("update_failed"));
        $page->output_footer();
        exit;
    }
}
开发者ID:JN-Jones,项目名称:MyLikes,代码行数:15,代码来源:include.php

示例4: ceil

 $pages = $postcount / $perpage;
 $pages = ceil($pages);
 if ($mybb->input['page'] == "last") {
     $pagecnt = $pages;
 }
 if ($pagecnt > $pages) {
     $pagecnt = 1;
 }
 if ($pagecnt) {
     $start = ($pagecnt - 1) * $perpage;
 } else {
     $start = 0;
     $pagecnt = 1;
 }
 $table = new Table();
 $table->construct_header($lang->username, array('width' => '10%'));
 $table->construct_header($lang->date, array("class" => "align_center", 'width' => '15%'));
 $table->construct_header($lang->action, array("class" => "align_center", 'width' => '35%'));
 $table->construct_header($lang->information, array("class" => "align_center", 'width' => '30%'));
 $table->construct_header($lang->ipaddress, array("class" => "align_center", 'width' => '10%'));
 $query = $db->query("\n\t\tSELECT l.*, u.username, u.usergroup, u.displaygroup, t.subject AS tsubject, f.name AS fname, p.subject AS psubject\n\t\tFROM " . TABLE_PREFIX . "moderatorlog l\n\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (u.uid=l.uid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "threads t ON (t.tid=l.tid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "forums f ON (f.fid=l.fid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "posts p ON (p.pid=l.pid)\n\t\t{$where}\n\t\tORDER BY {$sortby} {$order}\n\t\tLIMIT {$start}, {$perpage}\n\t");
 while ($logitem = $db->fetch_array($query)) {
     $information = '';
     $logitem['dateline'] = date("jS M Y, G:i", $logitem['dateline']);
     $trow = alt_trow();
     $username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);
     $logitem['profilelink'] = build_profile_link($username, $logitem['uid']);
     if ($logitem['tsubject']) {
         $information = "<strong>{$lang->thread}</strong> <a href=\"../" . get_thread_link($logitem['tid']) . "\" target=\"_blank\">" . htmlspecialchars_uni($logitem['tsubject']) . "</a><br />";
     }
     if ($logitem['fname']) {
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:modlog.php

示例5: foreach

    foreach ($mybb->input['disporder'] as $cid => $order) {
        $update_query = array("disporder" => (int) $order);
        $db->update_query("calendars", $update_query, "cid='" . (int) $cid . "'");
    }
    $plugins->run_hooks("admin_config_calendars_update_order_commit");
    // Log admin action
    log_admin_action();
    flash_message($lang->success_calendar_orders_updated, 'success');
    admin_redirect("index.php?module=config-calendars");
}
if (!$mybb->input['action']) {
    $page->output_header($lang->manage_calendars);
    $page->output_nav_tabs($sub_tabs, 'manage_calendars');
    $form = new Form("index.php?module=config-calendars&amp;action=update_order", "post");
    $table = new Table();
    $table->construct_header($lang->calendar);
    $table->construct_header($lang->order, array('width' => '5%', 'class' => 'align_center'));
    $table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 3, "width" => 300));
    $query = $db->simple_select("calendars", "*", "", array('order_by' => 'disporder'));
    while ($calendar = $db->fetch_array($query)) {
        $calendar['name'] = htmlspecialchars_uni($calendar['name']);
        $table->construct_cell("<a href=\"index.php?module=config-calendars&amp;action=edit&amp;cid={$calendar['cid']}\"><strong>{$calendar['name']}</strong></a>");
        $table->construct_cell($form->generate_numeric_field("disporder[{$calendar['cid']}]", $calendar['disporder'], array('id' => 'disporder', 'style' => 'width: 80%', 'class' => 'align_center', 'min' => 0)));
        $table->construct_cell("<a href=\"index.php?module=config-calendars&amp;action=edit&amp;cid={$calendar['cid']}\">{$lang->edit}</a>", array("width" => 100, "class" => "align_center"));
        $table->construct_cell("<a href=\"index.php?module=config-calendars&amp;action=permissions&amp;cid={$calendar['cid']}\">{$lang->permissions}</a>", array("width" => 100, "class" => "align_center"));
        $table->construct_cell("<a href=\"index.php?module=config-calendars&amp;action=delete&amp;cid={$calendar['cid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_calendar_deletion}')\">{$lang->delete}</a>", array("width" => 100, "class" => "align_center"));
        $table->construct_row();
    }
    if ($table->num_rows() == 0) {
        $table->construct_cell($lang->no_calendars, array('colspan' => 5));
        $table->construct_row();
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:31,代码来源:calendars.php

示例6: akismet_admin


//.........这里部分代码省略.........
    }
    if ($mybb->input['delete'] && $mybb->request_method == "post") {
        $deletepost = $mybb->input['akismet'];
        if (empty($deletepost)) {
            flash_message($lang->error_deletepost, 'error');
            admin_redirect("index.php?module=forum-akismet");
        }
        $posts_in = '';
        $comma = '';
        foreach ($deletepost as $key => $val) {
            $posts_in .= $comma . intval($key);
            $comma = ',';
        }
        $query = $db->simple_select("posts", "pid, tid", "pid IN ({$posts_in}) AND replyto = '0'");
        while ($post = $db->fetch_array($query)) {
            $threadp[$post['pid']] = $post['tid'];
        }
        if (!is_array($threadp)) {
            $threadp = array();
        }
        require_once MYBB_ROOT . "inc/functions_upload.php";
        foreach ($deletepost as $pid => $val) {
            if (array_key_exists($pid, $threadp)) {
                $db->delete_query("posts", "pid IN ({$posts_in})");
                $db->delete_query("attachments", "pid IN ({$posts_in})");
                // Get thread info
                $query = $db->simple_select("threads", "poll", "tid='" . $threadp[$pid] . "'");
                $poll = $db->fetch_field($query, 'poll');
                // Delete threads, redirects, favorites, polls, and poll votes
                $db->delete_query("threads", "tid='" . $threadp[$pid] . "'");
                $db->delete_query("threads", "closed='moved|" . $threadp[$pid] . "'");
                $db->delete_query("threadsubscriptions", "tid='" . $threadp[$pid] . "'");
                $db->delete_query("polls", "tid='" . $threadp[$pid] . "'");
                $db->delete_query("pollvotes", "pid='{$poll}'");
            }
            // Remove attachments
            remove_attachments($pid);
            // Delete the post
            $db->delete_query("posts", "pid='{$pid}'");
        }
        // Log admin action
        log_admin_action();
        flash_message($lang->success_spam_deleted, 'success');
        admin_redirect("index.php?module=forum-akismet");
    }
    if (!$mybb->input['action']) {
        require MYBB_ROOT . "inc/class_parser.php";
        $parser = new postParser();
        $page->output_header($lang->akismet);
        $form = new Form("index.php?module=forum-akismet", "post");
        $table = new Table();
        $table->construct_header($form->generate_check_box("checkall", 1, '', array('class' => 'checkall')), array('width' => '5%'));
        $table->construct_header("Title / Username / Post", array('class' => 'align_center'));
        $mybb->input['page'] = intval($mybb->input['page']);
        if ($mybb->input['page'] > 0) {
            $start = $mybb->input['page'] * 20;
        } else {
            $start = 0;
        }
        $query = $db->simple_select("posts", "COUNT(pid) as spam", "visible = '-4'");
        $total_rows = $db->fetch_field($query, 'spam');
        if ($start > $total_rows) {
            $start = $total_rows - 20;
        }
        if ($start < 0) {
            $start = 0;
        }
        $query = $db->simple_select("posts", "*", "visible = '-4'", array('limit_start' => $start, 'limit' => '20', 'order_by' => 'dateline', 'order_dir' => 'desc'));
        while ($post = $db->fetch_array($query)) {
            if ($post['uid'] != 0) {
                $username = "<a href=\"../" . str_replace("{uid}", $post['uid'], PROFILE_URL) . "\" target=\"_blank\">" . format_name($post['username'], $post['usergroup'], $post['displaygroup']) . "</a>";
            } else {
                $username = $post['username'];
            }
            $table->construct_cell($form->generate_check_box("akismet[{$post['pid']}]", 1, ''));
            $table->construct_cell("<span style=\"float: right;\">{$lang->username} {$username}</span> <span style=\"float: left;\">{$lang->title}: " . htmlspecialchars_uni($post['subject']) . " <strong>(" . my_date($mybb->settings['dateformat'], $post['dateline']) . ", " . my_date($mybb->settings['timeformat'], $post['dateline']) . ")</strong></span>");
            $table->construct_row();
            $parser_options = array("allow_html" => 0, "allow_mycode" => 0, "allow_smilies" => 0, "allow_imgcode" => 0, "me_username" => $post['username'], "filter_badwords" => 1);
            $post['message'] = $parser->parse_message($post['message'], $parser_options);
            $table->construct_cell($post['message'], array("colspan" => 2));
            $table->construct_row();
        }
        $num_rows = $table->num_rows();
        if ($num_rows == 0) {
            $table->construct_cell($lang->no_spam_found, array("class" => "align_center", "colspan" => 2));
            $table->construct_row();
        }
        $table->output($lang->detected_spam_messages);
        echo "<br />" . draw_admin_pagination($mybb->input['page'], 20, $total_rows, "index.php?module=forum-akismet&amp;page={page}");
        $buttons[] = $form->generate_submit_button($lang->unmark_selected, array('name' => 'unmark'));
        $buttons[] = $form->generate_submit_button($lang->deleted_selected, array('name' => 'delete'));
        if ($num_rows > 0) {
            $buttons[] = $form->generate_submit_button($lang->delete_all, array('name' => 'delete_all', 'onclick' => "return confirm('{$lang->confirm_spam_deletion}');"));
        }
        $form->output_submit_wrapper($buttons);
        $form->end();
        $page->output_footer();
    }
    exit;
}
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:101,代码来源:akismet.php

示例7: ceil

     $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, $unapproved_attachments, "index.php?module=forum/moderation_queue&amp;type=attachments&amp;page={page}");
 $page->add_breadcrumb_item($lang->attachments_awaiting_moderation);
 $page->output_header($lang->attachments_awaiting_moderation);
 $page->output_nav_tabs($sub_tabs, "attachments");
 $form = new Form("index.php?module=forum/moderation_queue", "post");
 $table = new Table();
 $table->construct_header($lang->filename);
 $table->construct_header($lang->uploadedby, array("class" => "align_center", "width" => "20%"));
 $table->construct_header($lang->posted, array("class" => "align_center", "width" => "20%"));
 $table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 3));
 $query = $db->query("\n\t\t\tSELECT a.*, p.subject AS postsubject, p.dateline, p.uid, u.username, t.tid, t.subject AS threadsubject\n\t\t\tFROM  " . TABLE_PREFIX . "attachments a\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "posts p ON (p.pid=a.pid)\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "threads t ON (t.tid=p.tid)\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (u.uid=p.uid)\n\t\t\tWHERE a.visible='0'\n\t\t\tORDER BY a.dateuploaded DESC\n\t\t\tLIMIT {$start}, {$per_page}\n\t\t");
 while ($attachment = $db->fetch_array($query)) {
     if (!$attachment['dateuploaded']) {
         $attachment['dateuploaded'] = $attachment['dateline'];
     }
     $attachdate = my_date($mybb->settings['dateformat'], $attachment['dateuploaded']);
     $attachtime = my_date($mybb->settings['timeformat'], $attachment['dateuploaded']);
     $attachment['postsubject'] = htmlspecialchars_uni($attachment['postsubject']);
     $attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
     $attachment['threadsubject'] = htmlspecialchars_uni($attachment['threadsubject']);
     $attachment['filesize'] = get_friendly_size($attachment['filesize']);
     $link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:moderation_queue.php

示例8: array

 $plugins->run_hooks("admin_config_smilies_start");
 $page->output_header($lang->manage_smilies);
 $sub_tabs['manage_smilies'] = array('title' => $lang->manage_smilies, 'link' => "index.php?module=config-smilies", 'description' => $lang->manage_smilies_desc);
 $sub_tabs['add_smilie'] = array('title' => $lang->add_smilie, 'link' => "index.php?module=config-smilies&amp;action=add");
 $sub_tabs['add_multiple_smilies'] = array('title' => $lang->add_multiple_smilies, 'link' => "index.php?module=config-smilies&amp;action=add_multiple");
 $sub_tabs['mass_edit'] = array('title' => $lang->mass_edit, 'link' => "index.php?module=config-smilies&amp;action=mass_edit");
 $page->output_nav_tabs($sub_tabs, 'manage_smilies');
 $pagenum = intval($mybb->input['page']);
 if ($pagenum) {
     $start = ($pagenum - 1) * 20;
 } else {
     $start = 0;
     $pagenum = 1;
 }
 $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"));
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:smilies.php

示例9: build_users_view

function build_users_view($view)
{
    global $mybb, $db, $cache, $lang, $user_view_fields, $page;
    $view_title = '';
    if ($view['title']) {
        $title_string = "view_title_{$view['vid']}";
        if ($lang->{$title_string}) {
            $view['title'] = $lang->{$title_string};
        }
        $view_title .= " (" . htmlspecialchars_uni($view['title']) . ")";
    }
    // Build the URL to this view
    if (!isset($view['url'])) {
        $view['url'] = "index.php?module=user-users";
    }
    if (!is_array($view['conditions'])) {
        $view['conditions'] = unserialize($view['conditions']);
    }
    if (!is_array($view['fields'])) {
        $view['fields'] = unserialize($view['fields']);
    }
    if (!is_array($view['custom_profile_fields'])) {
        $view['custom_profile_fields'] = unserialize($view['custom_profile_fields']);
    }
    if (isset($mybb->input['username'])) {
        $view['conditions']['username'] = $mybb->input['username'];
    }
    if ($view['vid']) {
        $view['url'] .= "&amp;vid={$view['vid']}";
    } else {
        // If this is a custom view we need to save everything ready to pass it on from page to page
        global $admin_session;
        if (!$mybb->input['search_id']) {
            $search_id = md5(random_str());
            $admin_session['data']['user_views'][$search_id] = $view;
            update_admin_session('user_views', $admin_session['data']['user_views']);
            $mybb->input['search_id'] = $search_id;
        }
        $view['url'] .= "&amp;search_id=" . htmlspecialchars_uni($mybb->input['search_id']);
    }
    if (isset($mybb->input['username'])) {
        $view['url'] .= "&amp;username=" . urlencode(htmlspecialchars_uni($mybb->input['username']));
    }
    if (!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != str_replace("&amp;", "&", $view['url'])) {
        update_admin_session('last_users_url', str_replace("&amp;", "&", $view['url']));
    }
    if (isset($view['conditions']['referrer'])) {
        $view['url'] .= "&amp;action=referrers&amp;uid=" . htmlspecialchars_uni($view['conditions']['referrer']);
    }
    // Do we not have any views?
    if (empty($view)) {
        return false;
    }
    $table = new Table();
    // Build header for table based view
    if ($view['view_type'] != "card") {
        foreach ($view['fields'] as $field) {
            if (!$user_view_fields[$field]) {
                continue;
            }
            $view_field = $user_view_fields[$field];
            $field_options = array();
            if ($view_field['width']) {
                $field_options['width'] = $view_field['width'];
            }
            if ($view_field['align']) {
                $field_options['class'] = "align_" . $view_field['align'];
            }
            $table->construct_header($view_field['title'], $field_options);
        }
        $table->construct_header("<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this);\" />");
        // Create a header for the "select" boxes
    }
    $search_sql = '1=1';
    // Build the search SQL for users
    // List of valid LIKE search fields
    $user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle");
    foreach ($user_like_fields as $search_field) {
        if (!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field . '_blank']) {
            $search_sql .= " AND u.{$search_field} LIKE '%" . $db->escape_string_like($view['conditions'][$search_field]) . "%'";
        } else {
            if (!empty($view['conditions'][$search_field . '_blank'])) {
                $search_sql .= " AND u.{$search_field} != ''";
            }
        }
    }
    // EXACT matching fields
    $user_exact_fields = array("referrer");
    foreach ($user_exact_fields as $search_field) {
        if (!empty($view['conditions'][$search_field])) {
            $search_sql .= " AND u.{$search_field}='" . $db->escape_string($view['conditions'][$search_field]) . "'";
        }
    }
    // LESS THAN or GREATER THAN
    $direction_fields = array("postnum");
    foreach ($direction_fields as $search_field) {
        $direction_field = $search_field . "_dir";
        if (isset($view['conditions'][$search_field]) && ($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field]) {
            switch ($view['conditions'][$direction_field]) {
                case "greater_than":
//.........这里部分代码省略.........
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:101,代码来源:users.php

示例10: die

 * $Id$
 */
// Disallow direct access to this file for security reasons
if (!defined("IN_MYBB")) {
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$page->add_breadcrumb_item($lang->mybb_credits, "index.php?module=home-credits");
$plugins->run_hooks("admin_home_credits_begin");
if (!$mybb->input['action']) {
    $plugins->run_hooks("admin_home_credits_start");
    $page->output_header($lang->mybb_credits);
    $sub_tabs['credits'] = array('title' => $lang->mybb_credits, 'link' => "index.php?module=home-credits", 'description' => $lang->mybb_credits_description);
    $sub_tabs['credits_about'] = array('title' => $lang->about_the_team, 'link' => "http://mybb.com/about/team", 'link_target' => "_blank");
    $page->output_nav_tabs($sub_tabs, 'credits');
    $table = new Table();
    $table->construct_header($lang->product_managers, array('width' => '15%'));
    $table->construct_header($lang->developers, array('width' => '15%'));
    $table->construct_header($lang->software_quality_assurance, array('width' => '20%'));
    $table->construct_header($lang->support_representative, array('width' => '20%'));
    $table->construct_header($lang->pr_liaison, array('width' => '15%'));
    $table->construct_cell("<a href=\"http://community.mybb.com/user-1.html\" target=\"_blank\">Chris Boulton</a>");
    $table->construct_cell("<a href=\"http://community.mybb.com/user-8242.html\" target=\"_blank\">dvb</a>");
    $table->construct_cell("<a href=\"http://community.mybb.com/user-6928.html\" target=\"_blank\">Imad Jomaa</a>");
    $table->construct_cell("<a href=\"http://community.mybb.com/user-24328.html\" target=\"_blank\">Alan Shepperson</a>");
    $table->construct_cell("<a href=\"http://community.mybb.com/user-3971.html\" target=\"_blank\">Ryan Loos</a>");
    $table->construct_row();
    $table->construct_cell("<a href=\"http://community.mybb.com/user-81.html\" target=\"_blank\">Dennis Tsang</a>");
    $table->construct_cell("<a href=\"http://community.mybb.com/user-23291.html\" target=\"_blank\">Huji Lee</a>");
    $table->construct_cell("<a href=\"http://community.mybb.com/user-12694.html\" target=\"_blank\">Jitendra M</a>");
    $table->construct_cell("<a href=\"http://community.mybb.com/user-22890.html\" target=\"_blank\">Dylan M</a>");
    $table->construct_cell("&nbsp;");
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:31,代码来源:credits.php

示例11: array

        $table->construct_cell($lang->no_task_logs, array("colspan" => "3"));
        $table->construct_row();
    }
    $table->output($lang->task_logs);
    echo $pagination;
    $page->output_footer();
}
if (!$mybb->input['action']) {
    $plugins->run_hooks("admin_tools_tasks_start");
    $page->output_header($lang->task_manager);
    $sub_tabs['scheduled_tasks'] = array('title' => $lang->scheduled_tasks, 'link' => "index.php?module=tools/tasks", 'description' => $lang->scheduled_tasks_desc);
    $sub_tabs['add_task'] = array('title' => $lang->add_new_task, 'link' => "index.php?module=tools/tasks&amp;action=add");
    $sub_tabs['task_logs'] = array('title' => $lang->view_task_logs, 'link' => "index.php?module=tools/tasks&amp;action=logs");
    $page->output_nav_tabs($sub_tabs, 'scheduled_tasks');
    $table = new Table();
    $table->construct_header($lang->task);
    $table->construct_header($lang->next_run, array("class" => "align_center", "width" => 200));
    $table->construct_header($lang->controls, array("class" => "align_center", "width" => 150));
    $query = $db->simple_select("tasks", "*", "", array("order_by" => "title", "order_dir" => "asc"));
    while ($task = $db->fetch_array($query)) {
        $task['title'] = htmlspecialchars_uni($task['title']);
        $task['description'] = htmlspecialchars_uni($task['description']);
        $next_run = date($mybb->settings['dateformat'], $task['nextrun']) . ", " . date($mybb->settings['timeformat'], $task['nextrun']);
        if ($task['enabled'] == 1) {
            $icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.gif\" alt=\"({$lang->alt_enabled})\" title=\"{$lang->alt_enabled}\"  style=\"vertical-align: middle;\" /> ";
        } else {
            $icon = "<img src=\"styles/{$page->style}/images/icons/bullet_off.gif\" alt=\"({$lang->alt_disabled})\" title=\"{$lang->alt_disabled}\"  style=\"vertical-align: middle;\" /> ";
        }
        $table->construct_cell("<div class=\"float_right\"><a href=\"index.php?module=tools/tasks&amp;action=run&amp;tid={$task['tid']}&amp;my_post_key={$mybb->post_code}\"><img src=\"styles/{$page->style}/images/icons/run_task.gif\" title=\"{$lang->run_task_now}\" alt=\"{$lang->run_task}\" /></a></div><div>{$icon}<strong><a href=\"index.php?module=tools/tasks&amp;action=edit&amp;tid={$task['tid']}\">{$task['title']}</a></strong><br /><small>{$task['description']}</small></div>");
        $table->construct_cell($next_run, array("class" => "align_center"));
        $popup = new PopupMenu("task_{$task['tid']}", $lang->options);
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:tasks.php

示例12: intval

        } else {
            $hid = intval($mybb->input['hid']);
            $page->output_confirm_action("index.php?module=config-help_documents&amp;action=delete&amp;hid={$hid}", $lang->confirm_document_deletion);
        }
    }
}
// List document and sections
if (!$mybb->input['action']) {
    $plugins->run_hooks("admin_config_help_documents_start");
    $page->output_header($lang->help_documents);
    $sub_tabs['manage_help_documents'] = array('title' => $lang->manage_help_documents, 'link' => "index.php?module=config-help_documents", 'description' => $lang->manage_help_documents_desc);
    $sub_tabs['add_help_document'] = array('title' => $lang->add_new_document, 'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=document");
    $sub_tabs['add_help_section'] = array('title' => $lang->add_new_section, 'link' => "index.php?module=config-help_documents&amp;action=add&amp;type=section");
    $page->output_nav_tabs($sub_tabs, 'manage_help_documents');
    $table = new Table();
    $table->construct_header($lang->section_document);
    $table->construct_header($lang->controls, array('class' => "align_center", 'colspan' => 2, "width" => "150"));
    $query = $db->simple_select("helpsections", "*", "", array('order_by' => "disporder"));
    while ($section = $db->fetch_array($query)) {
        // Icon to differentiate section type
        if ($section['sid'] > 2) {
            $icon = "<img src=\"styles/default/images/icons/custom.gif\" title=\"{$lang->custom_doc_sec}\" alt=\"{$lang->custom_doc_sec}\" style=\"vertical-align: middle;\" />";
        } else {
            $icon = "<img src=\"styles/default/images/icons/default.gif\" title=\"{$lang->default_doc_sec}\" alt=\"{$lang->default_doc_sec}\" style=\"vertical-align: middle;\" />";
        }
        $table->construct_cell("<div class=\"float_right\">{$icon}</div><div><strong><a href=\"index.php?module=config-help_documents&amp;action=edit&amp;sid={$section['sid']}\">{$section['name']}</a></strong><br /><small>{$section['description']}</small></div>");
        $table->construct_cell("<a href=\"index.php?module=config-help_documents&amp;action=edit&amp;sid={$section['sid']}\">{$lang->edit}</a>", array("class" => "align_center", "width" => '60'));
        // Show delete only if not a default section
        if ($section['sid'] > 2) {
            $table->construct_cell("<a href=\"index.php?module=config-help_documents&amp;action=delete&amp;sid={$section['sid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_section_deletion}')\">{$lang->delete}</a>", array("class" => "align_center", "width" => '90'));
        } else {
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:31,代码来源:help_documents.php

示例13: newpoints_shop_admin_stats

function newpoints_shop_admin_stats()
{
    global $form, $db, $lang, $mybb;
    newpoints_lang_load("newpoints_shop");
    echo "<br />";
    // table
    $table = new Table();
    $table->construct_header($lang->newpoints_shop_item, array('width' => '30%'));
    $table->construct_header($lang->newpoints_shop_username, array('width' => '30%'));
    $table->construct_header($lang->newpoints_shop_price, array('width' => '20%', 'class' => 'align_center'));
    $table->construct_header($lang->newpoints_shop_date, array('width' => '20%', 'class' => 'align_center'));
    $query = $db->simple_select('newpoints_log', '*', 'action=\'shop_purchase\'', array('order_by' => 'date', 'order_dir' => 'DESC', 'limit' => intval($mybb->settings['newpoints_shop_lastpurchases'])));
    while ($stats = $db->fetch_array($query)) {
        $data = explode('-', $stats['data']);
        $item = newpoints_shop_get_item($data[0]);
        $table->construct_cell(htmlspecialchars_uni($item['name']));
        $link = build_profile_link(htmlspecialchars_uni($stats['username']), intval($stats['uid']));
        $table->construct_cell($link);
        $table->construct_cell(newpoints_format_points($data[1]), array('class' => 'align_center'));
        $table->construct_cell(my_date($mybb->settings['dateformat'], intval($stats['date']), '', false) . ", " . my_date($mybb->settings['timeformat'], intval($stats['date'])), array('class' => 'align_center'));
        $table->construct_row();
    }
    if ($table->num_rows() == 0) {
        $table->construct_cell($lang->newpoints_error_gathering, array('colspan' => 4));
        $table->construct_row();
    }
    $table->output($lang->newpoints_stats_lastpurchases);
}
开发者ID:ambsalinas,项目名称:anima,代码行数:28,代码来源:newpoints_shop.php

示例14: FeedParser

 $latest_version = "<strong>" . $tree['mybb']['latest_version']['value'] . "</strong> (" . $latest_code . ")";
 if ($latest_code > $mybb->version_code) {
     $latest_version = "<span style=\"color: #C00;\">" . $latest_version . "</span>";
     $version_warn = 1;
     $updated_cache['latest_version'] = $latest_version;
     $updated_cache['latest_version_code'] = $latest_code;
 } else {
     $version_warn = 0;
     $latest_version = "<span style=\"color: green;\">" . $latest_version . "</span>";
 }
 $cache->update("update_check", $updated_cache);
 require_once MYBB_ROOT . "inc/class_feedparser.php";
 $feed_parser = new FeedParser();
 $feed_parser->parse_feed("http://feeds.feedburner.com/MyBBDevelopmentBlog");
 $table = new Table();
 $table->construct_header($lang->your_version);
 $table->construct_header($lang->latest_version);
 $table->construct_cell("<strong>" . $mybb->version . "</strong> (" . $mybb->version_code . ")");
 $table->construct_cell($latest_version);
 $table->construct_row();
 $table->output($lang->version_check);
 if ($version_warn) {
     $page->output_error("<p><em>{$lang->error_out_of_date}</em> {$lang->update_forum}</p>");
 } else {
     $page->output_success("<p><em>{$lang->success_up_to_date}</em></p>");
 }
 if ($feed_parser->error == '') {
     foreach ($feed_parser->items as $item) {
         if ($item['date_timestamp']) {
             $stamp = my_date($mybb->settings['dateformat'], $item['date_timestamp']) . ", " . my_date($mybb->settings['timeformat'], $item['date_timestamp']);
         } else {
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:31,代码来源:version_check.php

示例15: array

         $title = $lang->disallowed_usernames;
         break;
     default:
         $type = "1";
         $title = $lang->banned_ip_addresses;
         $mybb->input['type'] = "ips";
 }
 $page->output_header($title);
 $sub_tabs['ips'] = array('title' => $lang->banned_ips, 'link' => "index.php?module=config/banning", 'description' => $lang->banned_ips_desc);
 $sub_tabs['users'] = array('title' => $lang->banned_accounts, 'link' => "index.php?module=user/banning");
 $sub_tabs['usernames'] = array('title' => $lang->disallowed_usernames, 'link' => "index.php?module=config/banning&amp;type=usernames", 'description' => $lang->disallowed_usernames_desc);
 $sub_tabs['emails'] = array('title' => $lang->disallowed_email_addresses, 'link' => "index.php?module=config/banning&amp;type=emails", 'description' => $lang->disallowed_email_addresses_desc);
 $page->output_nav_tabs($sub_tabs, $mybb->input['type']);
 $table = new Table();
 if ($mybb->input['type'] == "usernames") {
     $table->construct_header($lang->username);
     $table->construct_header($lang->date_disallowed, array("class" => "align_center", "width" => 200));
     $table->construct_header($lang->last_attempted_use, array("class" => "align_center", "width" => 200));
 } else {
     if ($mybb->input['type'] == "emails") {
         $table->construct_header($lang->email_address);
         $table->construct_header($lang->date_disallowed, array("class" => "align_center", "width" => 200));
         $table->construct_header($lang->last_attempted_use, array("class" => "align_center", "width" => 200));
     } else {
         $table->construct_header($lang->ip_address);
         $table->construct_header($lang->ban_date, array("class" => "align_center", "width" => 200));
         $table->construct_header($lang->last_access, array("class" => "align_center", "width" => 200));
     }
 }
 $table->construct_header($lang->controls, array("width" => 1));
 $query = $db->simple_select("banfilters", "*", "type='{$type}'", array("order_by" => "filter", "order_dir" => "asc"));
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:banning.php


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