本文整理汇总了PHP中Table::construct_cell方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::construct_cell方法的具体用法?PHP Table::construct_cell怎么用?PHP Table::construct_cell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::construct_cell方法的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();
}
}
示例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}¤t_mode={$rule->mode}¤t_notes={$rule->notes}\">Modify</a> / <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");
}
示例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;
}
}
示例4: restfulapi_admin_load
//.........这里部分代码省略.........
restfulapi_cache_rebuild();
flash_message($lang->restfulapi_key_deleted_successfully, "success");
} else {
flash_message($lang->restfulapi_key_not_found, "error");
}
admin_redirect("index.php?module=config-restfulapi&action=manage-keys");
} elseif ($do == "regenerate" && isset($mybb->input["key_id"]) && isset($mybb->input["my_post_key"]) && verify_post_check($mybb->input["my_post_key"])) {
$key_id = $db->escape_string($mybb->input["key_id"]);
if ($db->simple_select("apikeys", "*", "id='{$key_id}'")->num_rows == 1) {
$apikey = restfulapi_generate_key();
/* can't figure out a better way to generate a random yet never-generated-before API key than this one */
while ($db->simple_select("apikeys", "*", "apikey='{$apikey}'")->num_rows != 0) {
$apikey = restfulapi_generate_key();
}
$update = array("apikey" => $db->escape_string(htmlspecialchars_uni($apikey)));
$db->update_query("apikeys", $update, "id='{$key_id}'");
restfulapi_cache_rebuild();
flash_message($lang->restfulapi_key_regenerated_successfully, "success");
} else {
flash_message($lang->restfulapi_key_not_found, "error");
}
admin_redirect("index.php?module=config-restfulapi&action=manage-keys");
}
} else {
$restfulapi_cache = $cache->read("restfulapi");
$apikeysets = $restfulapi_cache["keys"];
$table = new Table();
$table->construct_header($lang->restfulapi_customer, array("width" => "15%"));
$table->construct_header($lang->restfulapi_api_key, array("class" => "align_center", "width" => "29%"));
$table->construct_header($lang->restfulapi_comment, array("class" => "align_center", "width" => "30%"));
$table->construct_header($lang->restfulapi_usage, array("class" => "align_center", "width" => "5%"));
$table->construct_header($lang->restfulapi_controls, array("class" => "align_center", "width" => "21%", "colspan" => 3));
if (count($apikeysets) == 0) {
$table->construct_cell($lang->sprintf($lang->restfulapi_no_api_key, '<a href="index.php?module=config-restfulapi&action=add-key">', '</a>'), array("class" => "first", "colspan" => 5));
$table->construct_row();
} else {
// TODO : pagination maybe ?
foreach ($apikeysets as $key => $keyset) {
$table->construct_cell("<b>" . htmlspecialchars_uni($keyset['apicustomer']) . "</b>");
$table->construct_cell(htmlspecialchars_uni($keyset['apikey']));
$table->construct_cell(htmlspecialchars_uni($keyset['apicomment']));
$table->construct_cell(htmlspecialchars_uni($keyset['access']), array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-restfulapi&action=manage-keys&do=regenerate&key_id={$keyset['id']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->restfulapi_regenerate_api_key_confirmation}')\">{$lang->restfulapi_regenerate_api_key}</a>", array("class" => "align_center", "width" => "9%"));
$table->construct_cell("<a href=\"index.php?module=config-restfulapi&action=manage-keys&do=edit&key_id={$keyset['id']}\">{$lang->restfulapi_edit}</a>", array("class" => "align_center", "width" => "6%"));
$table->construct_cell("<a href=\"index.php?module=config-restfulapi&action=manage-keys&do=delete&key_id={$keyset['id']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->restfulapi_delete_confirm}')\">{$lang->restfulapi_delete}</a>", array("class" => "align_center", "width" => "6%"));
$table->construct_row();
}
}
$table->output($lang->restfulapi_manage_api_keys);
}
break;
case "add-key":
if ($mybb->request_method == "post" && isset($mybb->input["apicustomer"]) && is_string($mybb->input["apicustomer"]) && isset($mybb->input["apicomment"]) && is_string($mybb->input["apicomment"]) && isset($mybb->input["maxreq"]) && is_numeric($mybb->input["maxreq"]) && isset($mybb->input["maxreqrate"]) && in_array($mybb->input["maxreqrate"], array("m", "w", "d", "h"))) {
$apikey = restfulapi_generate_key();
/* can't figure out a better way to generate a random yet never-generated-before API key than this one */
while ($db->simple_select("apikeys", "*", "apikey='{$db->escape_string($apikey)}'")->num_rows != 0) {
$apikey = restfulapi_generate_key();
}
$insert = array("apicustomer" => $db->escape_string(htmlspecialchars_uni($mybb->input["apicustomer"])), "apicomment" => $db->escape_string(htmlspecialchars_uni($mybb->input["apicomment"])), "access" => 0, "maxreq" => (int) $mybb->input["maxreq"], "maxreqrate" => $db->escape_string(htmlspecialchars_uni($mybb->input["maxreqrate"])), "apikey" => $db->escape_string(htmlspecialchars_uni($apikey)));
$apikeyid = $db->insert_query("apikeys", $insert);
if (isset($mybb->input["apinames"]) && is_array($mybb->input["apinames"])) {
$insert_allowed = array();
foreach ($mybb->input["apinames"] as $apiname) {
$insert_allowed[] = array("apikey" => $db->escape_string($apikeyid), "apiname" => $db->escape_string($apiname));
}
$db->insert_query_multiple("apipermissions", $insert_allowed);
示例5: Table
} 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' => "70%"));
$table->construct_header($lang->controls, array('class' => "align_center", 'colspan' => 2));
$query = $db->simple_select("icons", "*", "", array('limit_start' => $start, 'limit' => 20, 'order_by' => 'name'));
while ($icon = $db->fetch_array($query)) {
if (my_strpos($icon['path'], "p://") || substr($icon['path'], 0, 1) == "/") {
$image = $icon['path'];
} else {
$image = "../" . $icon['path'];
}
$table->construct_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center"));
$table->construct_cell("{$icon['name']}");
$table->construct_cell("<a href=\"index.php?module=config/post_icons&action=edit&iid={$icon['iid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config/post_icons&action=delete&iid={$icon['iid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_post_icon_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));
$table->construct_row();
}
if ($table->num_rows() == 0) {
$table->construct_cell($lang->no_post_icons, array('colspan' => 4));
$table->construct_row();
}
$table->output($lang->manage_post_icons);
$query = $db->simple_select("icons", "COUNT(iid) AS icons");
$total_rows = $db->fetch_field($query, "icons");
echo "<br />" . draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config/post_icons&page={page}");
$page->output_footer();
}
示例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&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;
}
示例7: Form
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&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&action=edit&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&action=edit&cid={$calendar['cid']}\">{$lang->edit}</a>", array("width" => 100, "class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-calendars&action=permissions&cid={$calendar['cid']}\">{$lang->permissions}</a>", array("width" => 100, "class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-calendars&action=delete&cid={$calendar['cid']}&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();
$no_results = true;
}
$table->output($lang->manage_calendars);
if (!$no_results) {
$buttons[] = $form->generate_submit_button($lang->save_calendar_orders);
$form->output_submit_wrapper($buttons);
示例8: Table
$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&action=edit&sid={$smilie['sid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=config-smilies&action=delete&sid={$smilie['sid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_smilie_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));
$table->construct_row();
}
if ($table->num_rows() == 0) {
$table->construct_cell($lang->no_smilies, array('colspan' => 5));
$table->construct_row();
}
$table->output($lang->manage_smilies);
$query = $db->simple_select("smilies", "COUNT(sid) as smilies");
$total_rows = $db->fetch_field($query, "smilies");
echo "<br />" . draw_admin_pagination($pagenum, "20", $total_rows, "index.php?module=config-smilies&page={page}");
$page->output_footer();
示例9: Table
$mybb->input['action'] = "inline_usergroup";
log_admin_action($to_update_count);
my_unsetcookie("inlinemod_useracp");
flash_message($lang->success_mass_usergroups, 'success');
admin_redirect("index.php?module=user-users" . $vid_url);
} else {
// They tried to edit super admins! Uh-oh!
$errors[] = $lang->no_usergroup_changed;
}
}
$page->output_header($lang->manage_users);
$page->output_nav_tabs($sub_tabs, 'manage_users');
// Display a table warning
$table = new Table();
$lang->usergroup_info = $lang->sprintf($lang->usergroup_info, count($selected));
$table->construct_cell($lang->usergroup_info);
$table->construct_row();
$table->output($lang->important);
if ($errors) {
$page->output_inline_error($errors);
}
// Display the usergroup options
$form = new Form("index.php?module=user-users", "post");
echo $form->generate_hidden_field('action', 'inline_edit');
echo $form->generate_hidden_field('inline_action', 'multiusergroup');
echo $form->generate_hidden_field('processed', '1');
$form_container = new FormContainer($lang->mass_usergroups);
// Usergroups
$display_group_options[0] = $lang->use_primary_user_group;
$options = array();
$query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title'));
示例10: elseif
$basic = '';
$simplified = 'selected=selected';
$agg = '';
} elseif (cloudflare_cache_lvl_setting() == 'agg') {
$basic = '';
$simplified = '';
$agg = 'selected=selected';
}
$table->construct_cell('
<strong>Adjust your caching level to modify CloudFlare\'s caching behavior.</strong><br /><br />
<form action="index.php?module=cloudflare-cache_lvl&action=change" method="post">
<input type="hidden" value="' . $mybb->post_code . '" name="my_post_key">
Level: <select name="type">
<option name="agg"' . $agg . '>Aggressive</option>
<option name="simplified"' . $simplified . '>Simplified</option>
<option name="basic"' . $basic . '>Basic</option>
</select><br /><br />
The <strong>basic</strong> setting will cache most static resources (i.e., css, images, and JavaScript). The <strong>aggressive</strong> setting will cache all static resources, including ones with a query string.<br /><br />
<strong>Basic:</strong> http://' . $mybb->settings['cloudflare_domain'] . '/images/logo.gif<br /><br />
<strong>Simplified:</strong> http://' . $mybb->settings['cloudflare_domain'] . '/images/logo.gif<s>?ignore=this-query-string</s><br /><br />
<strong>Aggressive:</strong> http://' . $mybb->settings['cloudflare_domain'] . '/images/logo.gif?with=query
<br /><br />
<input type="submit" name="submit" value="Change">
</form>
');
$table->construct_row();
$table->output("Change Cache Level");
$page->output_footer();
}
示例11: array
$time_remaining = "<span style=\"color: green;\">{$time_remaining}</span>";
} else {
$time_remaining = "{$time_remaining}";
}
}
}
$lifts_on = my_date($mybb->settings['dateformat'], $ban['lifted']);
}
if (!$ban['adminuser']) {
if ($ban['admin'] == 0) {
$ban['adminuser'] = "MyBB System";
} else {
$ban['adminuser'] = $ban['admin'];
}
}
$table->construct_cell($lang->sprintf($lang->bannedby_x_on_x, $profile_link, htmlspecialchars_uni($ban['adminuser']), $ban_date, $ban_period));
$table->construct_cell($lifts_on, array("class" => "align_center"));
$table->construct_cell($time_remaining, array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&action=edit&uid={$ban['uid']}\">{$lang->edit}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&action=lift&uid={$ban['uid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_lift_ban}');\">{$lang->lift}</a>", array("class" => "align_center"));
$table->construct_cell("<a href=\"index.php?module=user-banning&action=prune&uid={$ban['uid']}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_prune}');\">{$lang->prune_threads_and_posts}</a>", array("class" => "align_center"));
$table->construct_row();
}
if ($table->num_rows() == 0) {
$table->construct_cell($lang->no_banned_users, array("colspan" => "6"));
$table->construct_row();
}
$table->output($lang->banned_accounts);
echo $pagination;
$form = new Form("index.php?module=user-banning", "post");
if ($errors) {
示例12: 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);
}
示例13: Table
continue;
}
$announcements[$announcement['fid']][$announcement['aid']] = $announcement;
}
if (!empty($global_announcements)) {
$table = new Table();
$table->construct_header($lang->announcement);
$table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 2, "width" => 150));
// Get the global announcements
foreach ($global_announcements as $aid => $announcement) {
if ($announcement['enddate'] < TIME_NOW && $announcement['enddate'] != 0) {
$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_off.png\" alt=\"(Expired)\" title=\"Expired Announcement\" style=\"vertical-align: middle;\" /> ";
} else {
$icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.png\" alt=\"(Active)\" title=\"Active Announcement\" style=\"vertical-align: middle;\" /> ";
}
$table->construct_cell($icon . "<a href=\"index.php?module=forum-announcements&action=edit&aid={$aid}\">" . htmlspecialchars_uni($announcement['subject']) . "</a>");
$table->construct_cell("<a href=\"index.php?module=forum-announcements&action=edit&aid={$aid}\">{$lang->edit}</a>", array("class" => "align_center", "width" => 75));
$table->construct_cell("<a href=\"index.php?module=forum-announcements&action=delete&aid={$aid}&my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_announcement_deletion}')\">{$lang->delete}</a>", array("class" => "align_center", "width" => 75));
$table->construct_row();
}
$table->output($lang->global_announcements);
}
$table = new Table();
$table->construct_header($lang->announcement);
$table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 2, "width" => 200));
fetch_forum_announcements($table);
if ($table->num_rows() == 0) {
$table->construct_cell($lang->no_forums, array("colspan" => "3"));
$table->construct_row();
}
$table->output($lang->forum_announcements);
示例14: array
$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&action=add&type=document");
$sub_tabs['add_help_section'] = array('title' => $lang->add_new_section, 'link' => "index.php?module=config-help_documents&action=add&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&action=edit&sid={$section['sid']}\">{$section['name']}</a></strong><br /><small>{$section['description']}</small></div>");
$table->construct_cell("<a href=\"index.php?module=config-help_documents&action=edit&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&action=delete&sid={$section['sid']}&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 {
$table->construct_cell(" ", array("width" => '90'));
}
$table->construct_row();
$query2 = $db->simple_select("helpdocs", "*", "sid='{$section['sid']}'", array('order_by' => "disporder"));
while ($doc = $db->fetch_array($query2)) {
// Icon to differentiate document type
if ($doc['hid'] > 7) {
$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;\" />";
示例15: FeedParser
$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 {
$stamp = '';
}