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


PHP FormContainer::output_cell方法代码示例

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


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

示例1: array

     $sub_tabs['manage_icons'] = array('title' => $lang->manage_post_icons, 'link' => "index.php?module=config/post_icons");
     $sub_tabs['add_icon'] = array('title' => $lang->add_post_icon, 'link' => "index.php?module=config/post_icons&action=add");
     $sub_tabs['add_multiple'] = array('title' => $lang->add_multiple_post_icons, 'link' => "index.php?module=config/post_icons&action=add_multiple", 'description' => $lang->add_multiple_post_icons_desc);
     $page->output_nav_tabs($sub_tabs, 'add_multiple');
     $form = new Form("index.php?module=config/post_icons&action=add_multiple", "post", "add_multiple");
     echo $form->generate_hidden_field("step", "2");
     echo $form->generate_hidden_field("pathfolder", $path);
     $form_container = new FormContainer($lang->add_multiple_post_icons);
     $form_container->output_row_header($lang->image, array("class" => "align_center", 'width' => '10%'));
     $form_container->output_row_header($lang->name);
     $form_container->output_row_header($lang->add, array("class" => "align_center", 'width' => '5%'));
     foreach ($icons as $key => $file) {
         $ext = get_extension($file);
         $find = str_replace("." . $ext, "", $file);
         $name = ucfirst($find);
         $form_container->output_cell("<img src=\"../" . $path . $file . "\" alt=\"\" /><br /><small>{$file}</small>", array("class" => "align_center", "width" => 1));
         $form_container->output_cell($form->generate_text_box("name[{$file}]", $name, array('id' => 'name', 'style' => 'width: 98%')));
         $form_container->output_cell($form->generate_check_box("include[{$file}]", 1, "", array('checked' => 1)), array("class" => "align_center"));
         $form_container->construct_row();
     }
     if ($form_container->num_rows() == 0) {
         flash_message($lang->error_no_images, 'error');
         admin_redirect("index.php?module=config/post_icons&action=add_multiple");
     }
     $form_container->end();
     $buttons[] = $form->generate_submit_button($lang->save_post_icons);
     $form->output_submit_wrapper($buttons);
     $form->end();
     $page->output_footer();
     exit;
 }
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:post_icons.php

示例2: FormContainer

 $form_container = new FormContainer($lang->manage_smilies);
 $form_container->output_row_header($lang->image, array("class" => "align_center", 'width' => '1'));
 $form_container->output_row_header($lang->name);
 $form_container->output_row_header($lang->text_replace, array('width' => '20%'));
 $form_container->output_row_header($lang->order, array('width' => '5%'));
 $form_container->output_row_header($lang->mass_edit_show_clickable, array("width" => 165));
 $form_container->output_row_header($lang->smilie_delete, array("class" => "align_center", 'width' => '5%'));
 $query = $db->simple_select("smilies", "*", "", array('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'];
     }
     $form_container->output_cell("<img src=\"{$image}\" alt=\"\" />", array("class" => "align_center", "width" => 1));
     $form_container->output_cell($form->generate_text_box("name[{$smilie['sid']}]", $smilie['name'], array('id' => 'name', 'style' => 'width: 98%')));
     $form_container->output_cell($form->generate_text_box("find[{$smilie['sid']}]", $smilie['find'], array('id' => 'find', 'style' => 'width: 95%')));
     $form_container->output_cell($form->generate_text_box("disporder[{$smilie['sid']}]", $smilie['disporder'], array('id' => 'disporder', 'style' => 'width: 80%')));
     $form_container->output_cell($form->generate_yes_no_radio("showclickable[{$smilie['sid']}]", $smilie['showclickable']), array("class" => "align_center"));
     $form_container->output_cell($form->generate_check_box("delete[{$smilie['sid']}]", 1, $mybb->input['delete']), array("class" => "align_center"));
     $form_container->construct_row();
 }
 if ($form_container->num_rows() == 0) {
     $form_container->output_cell($lang->no_smilies, array('colspan' => 6));
     $form_container->construct_row();
 }
 $form_container->end();
 $buttons[] = $form->generate_submit_button($lang->save_smilies);
 $buttons[] = $form->generate_reset_button($lang->reset);
 $form->output_submit_wrapper($buttons);
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:smilies.php

示例3: array

     $page->add_breadcrumb_item($groupinfo['title']);
     $page->output_header($lang->board_settings . " - {$groupinfo['title']}");
     $sub_tabs['newpoints_settings'] = array('title' => $lang->newpoints_settings, 'link' => 'index.php?module=newpoints-settings', 'description' => $lang->newpoints_settings_description);
     $sub_tabs['newpoints_settings_change'] = array('title' => $lang->newpoints_settings_change, 'link' => 'index.php?module=newpoints-settings&amp;action=change', 'description' => $lang->newpoints_settings_change_description);
     $page->output_nav_tabs($sub_tabs, 'newpoints_settings_change');
     $form = new Form("index.php?module=newpoints-settings&amp;action=change", "post", "change");
     echo $form->generate_hidden_field("gid", $group['gid']);
 } else {
     flash_message($lang->newpoints_select_plugin, 'error');
     admin_redirect("index.php?module=newpoints-settings");
 }
 // Build rest of page
 $buttons[] = $form->generate_submit_button($lang->save_settings);
 $form_container = new FormContainer($groupinfo['title']);
 if (empty($cache_settings[$groupinfo['plugin']])) {
     $form_container->output_cell($lang->error_no_settings_found);
     $form_container->construct_row();
     $form_container->end();
     echo '<br />';
     $form->end();
     $page->output_footer();
 }
 foreach ($cache_settings[$groupinfo['plugin']] as $setting) {
     $options = "";
     $type = explode("\n", $setting['type']);
     $type[0] = trim($type[0]);
     $element_name = "upsetting[{$setting['name']}]";
     $element_id = "setting_{$setting['name']}";
     if ($type[0] == "text" || $type[0] == "") {
         $setting_code = $form->generate_text_box($element_name, $setting['value'], array('id' => $element_id));
     } else {
开发者ID:ambsalinas,项目名称:anima,代码行数:31,代码来源:settings.php

示例4: implode

 } else {
     $icon = "<img src=\"styles/default/images/icons/default.png\" alt=\"{$lang->default_user_group}\" style=\"vertical-align: middle;\" />";
 }
 $leaders_list = '';
 if (isset($leaders[$usergroup['gid']])) {
     $leaders_list = "<br />{$lang->group_leaders}: " . implode($lang->comma, $leaders[$usergroup['gid']]);
 }
 $join_requests = '';
 if ($joinrequests[$usergroup['gid']] > 1 && $usergroup['type'] == 4) {
     $join_requests = " <small><a href=\"index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}\"><span style=\"color: red;\">({$joinrequests[$usergroup['gid']]} {$lang->outstanding_join_request})</span></a></small>";
 } else {
     if ($joinrequests[$usergroup['gid']] == 1 && $usergroup['type'] == 4) {
         $join_requests = " <small><a href=\"index.php?module=user-groups&amp;action=join_requests&amp;gid={$usergroup['gid']}\"><span style=\"color: red;\">({$joinrequests[$usergroup['gid']]} {$lang->outstanding_join_request})</span></a></small>";
     }
 }
 $form_container->output_cell("<div class=\"float_right\">{$icon}</div><div><strong><a href=\"index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}\">" . htmlspecialchars_uni($usergroup['title']) . "</a></strong>{$join_requests}<br /><small>" . htmlspecialchars_uni($usergroup['description']) . "{$leaders_list}</small></div>");
 if (!$primaryusers[$usergroup['gid']]) {
     $primaryusers[$usergroup['gid']] = 0;
 }
 $numusers = $primaryusers[$usergroup['gid']];
 $numusers += $secondaryusers[$usergroup['gid']];
 $form_container->output_cell(my_number_format($numusers), array("class" => "align_center"));
 if ($usergroup['showforumteam'] == 1) {
     $form_container->output_cell("<input type=\"text\" name=\"disporder[{$usergroup['gid']}]\" value=\"{$usergroup['disporder']}\" class=\"text_input align_center\" style=\"width: 80%;\" />", array("class" => "align_center"));
 } else {
     $form_container->output_cell("&nbsp;", array("class" => "align_center"));
 }
 $popup = new PopupMenu("usergroup_{$usergroup['gid']}", $lang->options);
 $popup->add_item($lang->edit_group, "index.php?module=user-groups&amp;action=edit&amp;gid={$usergroup['gid']}");
 $popup->add_item($lang->list_users, "index.php?module=user-users&amp;action=search&amp;results=1&amp;conditions[usergroup]={$usergroup['gid']}");
 if ($joinrequests[$usergroup['gid']] > 0 && $usergroup['type'] == 4) {
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:groups.php

示例5: retrieve_single_permissions_row

/**
 * @param int $gid
 * @param int $fid
 *
 * @return string
 */
function retrieve_single_permissions_row($gid, $fid)
{
    global $mybb, $lang, $cache, $db;
    $query = $db->simple_select("usergroups", "*", "gid='{$gid}'");
    $usergroup = $db->fetch_array($query);
    $query = $db->simple_select("forums", "*", "fid='{$fid}'");
    $forum_data = $db->fetch_array($query);
    $query = $db->simple_select("forumpermissions", "*", "fid='{$fid}'");
    while ($existing = $db->fetch_array($query)) {
        $existing_permissions[$existing['gid']] = $existing;
    }
    $cached_forum_perms = $cache->read("forumpermissions");
    $field_list = array('canview' => $lang->permissions_canview, 'canpostthreads' => $lang->permissions_canpostthreads, 'canpostreplys' => $lang->permissions_canpostreplys, 'canpostpolls' => $lang->permissions_canpostpolls);
    $field_list2 = array('canview' => $lang->perm_drag_canview, 'canpostthreads' => $lang->perm_drag_canpostthreads, 'canpostreplys' => $lang->perm_drag_canpostreplys, 'canpostpolls' => $lang->perm_drag_canpostpolls);
    $form = new Form('', '', "", 0, "", true);
    $form_container = new FormContainer();
    $perms = array();
    if (is_array($existing_permissions) && $existing_permissions[$usergroup['gid']]) {
        $perms = $existing_permissions[$usergroup['gid']];
        $default_checked = false;
    } elseif (is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['fid']][$usergroup['gid']]) {
        $perms = $cached_forum_perms[$forum_data['fid']][$usergroup['gid']];
        $default_checked = true;
    } else {
        if (is_array($cached_forum_perms) && $cached_forum_perms[$forum_data['pid']][$usergroup['gid']]) {
            $perms = $cached_forum_perms[$forum_data['pid']][$usergroup['gid']];
            $default_checked = true;
        }
    }
    if (!$perms) {
        $perms = $usergroup;
        $default_checked = true;
    }
    foreach ($field_list as $forum_permission => $forum_perm_title) {
        if ($perms[$forum_permission] == 1) {
            $perms_checked[$forum_permission] = 1;
        } else {
            $perms_checked[$forum_permission] = 0;
        }
    }
    $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
    if ($default_checked == 1) {
        $inherited_text = $lang->inherited_permission;
    } else {
        $inherited_text = $lang->custom_permission;
    }
    $form_container->output_cell("<strong>{$usergroup['title']}</strong> <small style=\"vertical-align: middle;\">({$inherited_text})</small>");
    $field_select = "<div class=\"quick_perm_fields\">\n";
    $field_select .= "<div class=\"enabled\"><div class=\"fields_title\">{$lang->enabled}</div><ul id=\"fields_enabled_{$usergroup['gid']}\">\n";
    foreach ($perms_checked as $perm => $value) {
        if ($value == 1) {
            $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";
        }
    }
    $field_select .= "</ul></div>\n";
    $field_select .= "<div class=\"disabled\"><div class=\"fields_title\">{$lang->disabled}</div><ul id=\"fields_disabled_{$usergroup['gid']}\">\n";
    foreach ($perms_checked as $perm => $value) {
        if ($value == 0) {
            $field_select .= "<li id=\"field-{$perm}\">{$field_list2[$perm]}</li>";
        }
    }
    $field_select .= "</ul></div></div>\n";
    $field_select .= $form->generate_hidden_field("fields_" . $usergroup['gid'], @implode(",", @array_keys($perms_checked, 1)), array('id' => 'fields_' . $usergroup['gid']));
    $field_select = str_replace("\n", "", $field_select);
    foreach ($field_list as $forum_permission => $permission_title) {
        $field_options[$forum_permission] = $permission_title;
    }
    $form_container->output_cell($field_select, array('colspan' => 2));
    if (!$default_checked) {
        $form_container->output_cell("<a href=\"index.php?module=forum-management&amp;action=permissions&amp;pid={$perms['pid']}\" onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&pid={$perms['pid']}&ajax=1', null, true); return false;\">{$lang->edit_permissions}</a>", array("class" => "align_center"));
        $form_container->output_cell("<a href=\"index.php?module=forum-management&amp;action=clear_permission&amp;pid={$perms['pid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_clear_custom_permission}')\">{$lang->clear_custom_perms}</a>", array("class" => "align_center"));
    } else {
        $form_container->output_cell("<a href=\"index.php?module=forum-management&amp;action=permissions&amp;gid={$usergroup['gid']}&amp;fid={$fid}\"  onclick=\"MyBB.popupWindow('index.php?module=forum-management&action=permissions&gid={$usergroup['gid']}&fid={$fid}&ajax=1', null, true); return false;\">{$lang->set_custom_perms}</a>", array("class" => "align_center", "colspan" => 2));
    }
    $form_container->construct_row();
    return $form_container->output_row_cells(0, true);
}
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:83,代码来源:management.php

示例6: while

 $count = 0;
 while ($querydata = $db->fetch_array($query)) {
     if ($querydata['link'] != null) {
         $data[$count]['announcement'] = $parser->parse_message("[url=" . $querydata['link'] . "]" . html_entity_decode($querydata['announcement']) . "[/url]", $parser_options);
     } else {
         $data[$count]['announcement'] = $parser->parse_message(html_entity_decode($querydata['announcement']), $parser_options);
         // parse bbcode
     }
     $data[$count]['PID'] = $querydata['PID'];
     $data[$count]['class'] = $querydata['class'];
     $data[$count]['pinned'] = $querydata['pinned'];
     $data[$count]['disporder'] = $querydata['disporder'];
     $count++;
 }
 if ($count == 0) {
     $table->output_cell($lang->bam_manage_null);
     // no announcements found
     $table->output_cell("");
     $table->output_cell("");
     $table->output_row("");
 } else {
     $i = 0;
     while ($i <= $count) {
         if (isset($data[$i]['PID']) && $data[$i]['PID'] != null) {
             $table->output_cell($data[$i]['announcement']);
             $table->output_cell($data[$i]['class']);
             $table->output_cell("<center><input type='text' name=\"disporder[" . $data[$i]['PID'] . "]\" value='" . $data[$i]['disporder'] . "' /></center>");
             $table->output_cell("<center><a href='index.php?module=config-bam&action=edit&id=" . $data[$i]['PID'] . "'>" . $lang->bam_manage_edit . "</a></center>");
             $table->output_cell("<center><a href='index.php?module=config-bam&action=delete&id=" . $data[$i]['PID'] . "&my_post_key=" . $mybb->post_code . "' onclick=' return confirm(\"" . $lang->bam_manage_delete_confirm . "\");'>" . $lang->bam_manage_delete . "</a></center>");
             if ($data[$i]['pinned'] == 1) {
                 $table->output_cell("<center><a href='index.php?module=config-bam&action=unpin&id=" . $data[$i]['PID'] . "&my_post_key=" . $mybb->post_code . "'>" . $lang->bam_manage_unpin . "</a></center>");
开发者ID:Darth-Apple,项目名称:BAM,代码行数:31,代码来源:bam.php

示例7: asb_admin_custom_boxes


//.........这里部分代码省略.........
        $this_box = new Custom_type((int) $mybb->input['id']);
        $action = $lang->asb_add_custom;
        if ($this_box->get('id')) {
            $specify_box = '&amp;id=' . $this_box->get('id');
            $currently_editing = $lang->asb_editing . ': <strong>' . $this_box->get('title') . '</strong>';
            $action = $lang->asb_edit . ' ' . $this_box->get('title');
        } else {
            // new box
            $specify_box = '';
            $sample_content = <<<EOF
<tr>
\t\t<td class="trow1">{$lang->asb_sample_content_line1} (HTML)</td>
\t</tr>
\t<tr>
\t\t<td class="trow2">{$lang->asb_sample_content_line2}</td>
\t</tr>
\t<tr>
\t\t<td class="trow1"><strong>{$lang->asb_sample_content_line3}</td>
\t</tr>
EOF;
            $this_box->set('content', $sample_content);
            $this_box->set('wrap_content', true);
        }
        $page->extra_header .= <<<EOF
\t<link rel="stylesheet" type="text/css" href="styles/asb_acp.css" media="screen" />
\t<script src="jscripts/asb/asb{$min}.js" type="text/javascript"></script>
EOF;
        $page->add_breadcrumb_item($lang->asb_custom_boxes, $html->url(array("action" => 'custom_boxes')));
        $page->add_breadcrumb_item($lang->asb_add_custom);
        $page->output_header("{$lang->asb} - {$action}");
        asb_output_tabs('asb_add_custom');
        $form = new Form($html->url(array("action" => 'custom_boxes')) . $specify_box, 'post', 'edit_box');
        $form_container = new FormContainer($currently_editing);
        $form_container->output_cell($lang->asb_name);
        $form_container->output_cell($lang->asb_description);
        $form_container->output_cell($lang->asb_custom_box_wrap_content);
        $form_container->output_row('');
        // name
        $form_container->output_cell($form->generate_text_box('box_name', $this_box->get('title'), array("id" => 'box_name')));
        // description
        $form_container->output_cell($form->generate_text_box('box_description', $this_box->get('description')));
        // wrap content?
        $form_container->output_cell($form->generate_check_box('wrap_content', 'yes', $lang->asb_custom_box_wrap_content_desc, array("checked" => $this_box->get('wrap_content'))));
        $form_container->output_row('');
        $form_container->output_cell('Content:', array("colspan" => 3));
        $form_container->output_row('');
        // content
        $form_container->output_cell($form->generate_text_area('box_content', $this_box->get('content'), array("id" => 'box_content', 'class' => 'codepress mybb', 'style' => 'width: 100%; height: 240px;')), array("colspan" => 3));
        $form_container->output_row('');
        // finish form
        $form_container->end();
        $buttons[] = $form->generate_submit_button('Save', array('name' => 'save_box_submit'));
        $form->output_submit_wrapper($buttons);
        $form->end();
        if ($admin_options['codepress'] != 0) {
            echo <<<EOF
\t\t<script type="text/javascript">
\t\t<!--
\t\t\tEvent.observe('edit_box', 'submit', function() {
\t\t\t\tif (\$('box_content_cp')) {
\t\t\t\t\tvar area = \$('box_content_cp');
\t\t\t\t\tarea.id = 'box_content';
\t\t\t\t\tarea.value = box_content.getCode();
\t\t\t\t\tarea.disabled = false;
\t\t\t\t}
\t\t\t});
开发者ID:badboy4life91,项目名称:Advanced-Sidebox,代码行数:67,代码来源:acp.php

示例8: array

         $cache->update_stats();
         // Log admin action
         log_admin_action("stats");
         flash_message($lang->success_rebuilt_forum_stats, 'success');
         admin_redirect("index.php?module=tools-recount_rebuild");
     }
 }
 $page->output_header($lang->recount_rebuild);
 $sub_tabs['recount_rebuild'] = array('title' => $lang->recount_rebuild, 'link' => "index.php?module=tools-recount_rebuild", 'description' => $lang->recount_rebuild_desc);
 $page->output_nav_tabs($sub_tabs, 'recount_rebuild');
 $form = new Form("index.php?module=tools-recount_rebuild", "post");
 $form_container = new FormContainer($lang->recount_rebuild);
 $form_container->output_row_header($lang->name);
 $form_container->output_row_header($lang->data_per_page, array('width' => 50));
 $form_container->output_row_header("&nbsp;");
 $form_container->output_cell("<label>{$lang->rebuild_forum_counters}</label><div class=\"description\">{$lang->rebuild_forum_counters_desc}</div>");
 $form_container->output_cell($form->generate_numeric_field("forumcounters", 50, array('style' => 'width: 150px;', 'min' => 0)));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildforumcounters")));
 $form_container->construct_row();
 $form_container->output_cell("<label>{$lang->rebuild_thread_counters}</label><div class=\"description\">{$lang->rebuild_thread_counters_desc}</div>");
 $form_container->output_cell($form->generate_numeric_field("threadcounters", 500, array('style' => 'width: 150px;', 'min' => 0)));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildthreadcounters")));
 $form_container->construct_row();
 $form_container->output_cell("<label>{$lang->rebuild_poll_counters}</label><div class=\"description\">{$lang->rebuild_poll_counters_desc}</div>");
 $form_container->output_cell($form->generate_numeric_field("pollcounters", 500, array('style' => 'width: 150px;', 'min' => 0)));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildpollcounters")));
 $form_container->construct_row();
 $form_container->output_cell("<label>{$lang->recount_user_posts}</label><div class=\"description\">{$lang->recount_user_posts_desc}</div>");
 $form_container->output_cell($form->generate_numeric_field("userposts", 500, array('style' => 'width: 150px;', 'min' => 0)));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountuserposts")));
 $form_container->construct_row();
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:recount_rebuild.php

示例9: array

         $plugins->run_hooks("admin_tools_recount_rebuild_stats");
         // Log admin action
         log_admin_action("stats");
         flash_message($lang->success_rebuilt_forum_stats, 'success');
         admin_redirect("index.php?module=tools-recount_rebuild");
     }
 }
 $page->output_header($lang->recount_rebuild);
 $sub_tabs['recount_rebuild'] = array('title' => $lang->recount_rebuild, 'link' => "index.php?module=tools-recount_rebuild", 'description' => $lang->recount_rebuild_desc);
 $page->output_nav_tabs($sub_tabs, 'recount_rebuild');
 $form = new Form("index.php?module=tools-recount_rebuild", "post");
 $form_container = new FormContainer($lang->recount_rebuild);
 $form_container->output_row_header($lang->name);
 $form_container->output_row_header($lang->data_per_page, array('width' => 50));
 $form_container->output_row_header("&nbsp;");
 $form_container->output_cell("<label>{$lang->rebuild_forum_counters}</label><div class=\"description\">{$lang->rebuild_forum_counters_desc}</div>");
 $form_container->output_cell($form->generate_text_box("forumcounters", 50, array('style' => 'width: 150px;')));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildforumcounters")));
 $form_container->construct_row();
 $form_container->output_cell("<label>{$lang->rebuild_thread_counters}</label><div class=\"description\">{$lang->rebuild_thread_counters_desc}</div>");
 $form_container->output_cell($form->generate_text_box("threadcounters", 500, array('style' => 'width: 150px;')));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildthreadcounters")));
 $form_container->construct_row();
 $form_container->output_cell("<label>{$lang->recount_user_posts}</label><div class=\"description\">{$lang->recount_user_posts_desc}</div>");
 $form_container->output_cell($form->generate_text_box("userposts", 500, array('style' => 'width: 150px;')));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountuserposts")));
 $form_container->construct_row();
 $form_container->output_cell("<label>{$lang->rebuild_attachment_thumbs}</label><div class=\"description\">{$lang->rebuild_attachment_thumbs_desc}</div>");
 $form_container->output_cell($form->generate_text_box("attachmentthumbs", 20, array('style' => 'width: 150px;')));
 $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_rebuildattachmentthumbs")));
 $form_container->construct_row();
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:31,代码来源:recount_rebuild.php

示例10: array

     $form_container->construct_row();
 }
 $form_container->end();
 $buttons = array();
 $buttons[] = $form->generate_submit_button($lang->update_forum_permissions);
 $buttons[] = $form->generate_reset_button($lang->reset);
 $form->output_submit_wrapper($buttons);
 echo "</div>\n";
 $form->end();
 echo "<div id=\"tab_moderators\">\n";
 $form_container = new FormContainer($lang->sprintf($lang->moderators_assigned_to, $forum_cache[$fid]['name']));
 $form_container->output_row_header($lang->username, array('width' => '75%'));
 $form_container->output_row_header($lang->controls, array("class" => "align_center", 'style' => 'width: 200px', 'colspan' => 2));
 $query = $db->query("\n\t\t\tSELECT m.mid, m.uid, u.username\n\t\t\tFROM " . TABLE_PREFIX . "moderators m\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (m.uid=u.uid)\n\t\t\tWHERE fid='{$fid}'\n\t\t");
 while ($moderator = $db->fetch_array($query)) {
     $form_container->output_cell("<a href=\"index.php?module=user/users&amp;action=edit&amp;uid={$moderator['uid']}\">{$moderator['username']}</a>");
     $form_container->output_cell("<a href=\"index.php?module=forum/management&amp;action=editmod&amp;mid={$moderator['mid']}\">{$lang->edit}</a>", array("class" => "align_center"));
     $form_container->output_cell("<a href=\"index.php?module=forum/management&amp;action=deletemod&amp;uid={$moderator['uid']}&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}\" onclick=\"return AdminCP.deleteConfirmation(this, '{$lang->confirm_moderator_deletion}')\">{$lang->delete}</a>", array("class" => "align_center"));
     $form_container->construct_row();
 }
 if ($form_container->num_rows() == 0) {
     $form_container->output_cell($lang->no_moderators, array('colspan' => 3));
     $form_container->construct_row();
 }
 $form_container->end();
 $buttons = array();
 $form = new Form("index.php?module=forum/management", "post", "management");
 echo $form->generate_hidden_field("fid", $mybb->input['fid']);
 echo $form->generate_hidden_field("add", "moderators");
 $form_container = new FormContainer($lang->add_moderator);
 $form_container->output_row($lang->username . " <em>*</em>", $lang->moderator_username_desc, $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username');
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:31,代码来源:management.php

示例11: array

    if ($mybb->request_method == "post") {
        if (!isset($mybb->input['page']) || $mybb->get_input('page', MyBB::INPUT_INT) < 1) {
            $mybb->input['page'] = 1;
        }
        if (isset($mybb->input['do_recounttyls'])) {
            if ($mybb->input['page'] == 1) {
                // Log admin action
                log_admin_action("Recounted ThankYou/Likes");
            }
            if (!$mybb->get_input('tyls', MyBB::INPUT_INT)) {
                $mybb->input['tyls'] = 500;
            }
            acp_tyl_recount();
        }
    }
    $page->output_header($lang->tyl_recount);
    $sub_tabs['thankyoulike_recount'] = array('title' => $lang->tyl_recount, 'link' => "index.php?module=tools-thankyoulike_recount", 'description' => $lang->tyl_recount_desc);
    $page->output_nav_tabs($sub_tabs, 'thankyoulike_recount');
    $form = new Form("index.php?module=tools-thankyoulike_recount", "post");
    $form_container = new FormContainer($lang->tyl_recount);
    $form_container->output_row_header($lang->tyl_name);
    $form_container->output_row_header($lang->tyl_data_per_page, array('width' => 50));
    $form_container->output_row_header("&nbsp;");
    $form_container->output_cell("<label>{$lang->tyl_recount}</label><div class=\"description\">{$lang->tyl_recount_do_desc}</div>");
    $form_container->output_cell($form->generate_text_box("tyls", 500, array('style' => 'width: 150px;')));
    $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recounttyls")));
    $form_container->construct_row();
    $form_container->end();
    $form->end();
    $page->output_footer();
}
开发者ID:myWebDev,项目名称:thankyou-like-plugin,代码行数:31,代码来源:thankyoulike_recount.php

示例12: tslink_admin

function tslink_admin()
{
    global $db, $lang, $mybb, $page, $run_module, $action_file, $plugins, $cache;
    $lang->load('tslink');
    if ($run_module == 'user' && $action_file == 'tslink') {
        $page->add_breadcrumb_item($lang->tslink_plugin_name, 'index.php?module=tslink');
        if ($mybb->input['action'] == 'tslink_changestatus') {
            $mybb_uid = intval($mybb->input['uid']);
            $changeto = intval($mybb->input['changeto']);
            $db->query('UPDATE ' . TABLE_PREFIX . "users SET memberstatus= '" . $changeto . "' WHERE uid='" . $mybb_uid . "'");
            $queryUser = $db->simple_select('users', 'username, lastip', "uid='{$mybb_uid}'");
            $bin_ip_in_db = $db->fetch_field($queryUser, 'lastip');
            $givenip = my_inet_ntop($db->unescape_binary($bin_ip_in_db));
            $forUser = $db->fetch_field($queryUser, 'username');
            // If there's an ip of the user in de database, update the unique id's in the database
            if (!empty($givenip)) {
                tslink_log("=============================================================\n=================== " . date('d-m-Y H:i:s') . " =====================\n=============================================================\n", $forUser);
                tslink_log('Started on AdminCP by ' . $mybb->user['username'] . ' - IP address of user available (' . $givenip . ') - doing tslink_update_uids & tslink_update_groups', $forUser);
                $tslink_update_uids_results = tslink_update_uids($givenip);
                tslink_log($tslink_update_uids_results, $forUser);
                $message = $lang->tslink_status_changed;
            }
            // If there's no lastip of the user in the database - dont try to update the unique id's in the database
            if (empty($givenip)) {
                tslink_log("=============================================================\n=================== " . date('d-m-Y H:i:s') . " =====================\n=============================================================\n", $forUser);
                tslink_log('Started on AdminCP ' . $mybb->user['username'] . ' - IP address of user NOT available - only doing tslink_update_groups to update previously registered TS uids', $forUser);
                $tslink_update_groups_results = tslink_update_groups($mybb_uid);
                tslink_log($tslink_update_groups_results, $forUser);
                $message = $lang->tslink_status_changed;
            }
            admin_redirect('index.php?module=user-tslink');
        }
        if (!$mybb->input['action'] || $mybb->input['action'] == 'conntest') {
            $page->output_header($lang->tslink);
            $sub_tabs['tslink'] = ['title' => $lang->tslink_tab_home, 'link' => 'index.php?module=user-tslink', 'description' => $lang->tslink_admin_tab_home_desc];
            $sub_tabs['tslink-conntest'] = ['title' => $lang->tslink_admin_tsinfo_title, 'link' => 'index.php?module=user-tslink&action=conntest', 'description' => $lang->tslink_admin_tsinfo_desc];
        }
        if ($mybb->input['action'] == 'conntest') {
            require __DIR__ . '/config.php';
            $page->output_nav_tabs($sub_tabs, 'tslink-conntest');
            //build a new ts3admin object
            $ts3 = new ts3admin($ts3_server, $ts3_query_port);
            if ($ts3->getElement('success', $ts3->connect())) {
                //login as serveradmin
                $ts3->login($ts3_username, $ts3_password);
                //select teamspeakserver
                $ts3->selectServer($ts3_server_port);
                // Set displayed name in TS to given
                $ts3->setName($ts3_nickname);
                $form = new Form('index.php?module=user-tslink&action=conntest', 'post');
                $form_container = new FormContainer($lang->tslink_admin_tsinfo_full_title);
                $form_container->output_row($lang->tslink_admin_server_version, $ts3->version()['data']['version']);
                $form_container->output_row($lang->tslink_admin_server_platform, $ts3->version()['data']['platform']);
                $form_container->output_row($lang->tslink_admin_server_online_clients, $ts3->serverInfo()['data']['virtualserver_clientsonline'] . '/' . $ts3->serverInfo()['data']['virtualserver_maxclients']);
                $form_container->end();
                $form->end();
            } else {
                echo 'Connection could not be established.';
            }
            /*
             * This code retuns all errors from the debugLog
             */
            if (count($ts3->getDebugLog()) > 0) {
                foreach ($ts3->getDebugLog() as $logEntry) {
                    echo '<script>alert("' . $logEntry . '");</script>';
                }
            }
            $page->output_footer();
        }
        if (!$mybb->input['action']) {
            $page->output_nav_tabs($sub_tabs, 'tslink');
            $form = new Form('index.php?module=user-tslink', 'post');
            $form_container = new FormContainer($lang->tslink_admin_table_heading_users);
            $form_container->output_row_header($lang->tslink_admin_row_username, ['class' => 'align_left', width => '50%']);
            $form_container->output_row_header($lang->tslink_admin_row_status, ['class' => 'align_center']);
            $form_container->output_row_header($lang->tslink_admin_row_options, ['class' => 'align_center']);
            $form_container->output_row_header($lang->tslink_admin_row_options, ['class' => 'align_center']);
            $query = $db->simple_select('users', 'uid, username, memberstatus', '', ['order_by' => 'username', 'order_dir' => 'ASC']);
            while ($users = $db->fetch_array($query)) {
                $form_container->output_cell("<div style=\"\"><strong>{$users['username']}</strong></div>");
                if ($users['memberstatus'] == '0') {
                    $form_container->output_cell('<div style=""><strong>Member</strong></div>', ['class' => 'align_center']);
                    $form_container->output_cell("<a href=\"index.php?module=user-tslink&amp;action=tslink_changestatus&amp;uid={$users['uid']}&amp;changeto=1\">{$lang->tslink_admin_row_changestatus1}</a>", ['class' => 'align_center']);
                    $form_container->output_cell("<a href=\"index.php?module=user-tslink&amp;action=tslink_changestatus&amp;uid={$users['uid']}&amp;changeto=2\">{$lang->tslink_admin_row_changestatus2}</a>", ['class' => 'align_center']);
                } elseif ($users['memberstatus'] == '1') {
                    $form_container->output_cell('<div style=""><strong>Donating Member</strong></div>', ['class' => 'align_center']);
                    $form_container->output_cell("<a href=\"index.php?module=user-tslink&amp;action=tslink_changestatus&amp;uid={$users['uid']}&amp;changeto=0\">{$lang->tslink_admin_row_changestatus0}</a>", ['class' => 'align_center']);
                    $form_container->output_cell("<a href=\"index.php?module=user-tslink&amp;action=tslink_changestatus&amp;uid={$users['uid']}&amp;changeto=2\">{$lang->tslink_admin_row_changestatus2}</a>", ['class' => 'align_center']);
                } elseif ($users['memberstatus'] == '2') {
                    $form_container->output_cell('<div style=""><strong>VIP Member</strong></div>', ['class' => 'align_center']);
                    $form_container->output_cell("<a href=\"index.php?module=user-tslink&amp;action=tslink_changestatus&amp;uid={$users['uid']}&amp;changeto=0\">{$lang->tslink_admin_row_changestatus0}</a>", ['class' => 'align_center']);
                    $form_container->output_cell("<a href=\"index.php?module=user-tslink&amp;action=tslink_changestatus&amp;uid={$users['uid']}&amp;changeto=1\">{$lang->tslink_admin_row_changestatus1}</a>", ['class' => 'align_center']);
                }
                $form_container->construct_row();
            }
            $form_container->end();
            $form->end();
            $page->output_footer();
        }
    }
//.........这里部分代码省略.........
开发者ID:f0nt4,项目名称:TSLink,代码行数:101,代码来源:tslinkfunctions.php

示例13: Form

 generate_tabs("list");
 $form = new Form("index.php?module=" . MODULE . "&amp;action=order", "post");
 $form_container = new FormContainer($lang->announcement);
 $form_container->output_row_header($lang->announcement_simple, array("colspan" => 2));
 $form_container->output_row_header($lang->order, array('class' => 'align_center'));
 $form_container->output_row_header($lang->announcement_location, array('class' => 'align_center'));
 $form_container->output_row_header($lang->controls, array("colspan" => 2, 'class' => 'align_center'));
 $query = $db->simple_select("announcement", "ID, Sort, Announcement, Global, Enabled", "", array("order_by" => "Sort"));
 if ($db->num_rows($query) > 0) {
     while ($announcement = $db->fetch_array($query)) {
         if ($announcement['Enabled']) {
             $icon = "<img src=\"styles/{$page->style}/images/icons/bullet_on.png\" alt=\"(Active)\" title=\"Active Announcement\" /> ";
         } else {
             $icon = "<img src=\"styles/{$page->style}/images/icons/bullet_off.png\" alt=\"(Inactive)\" title=\"Inactive Announcement\" /> ";
         }
         $form_container->output_cell("<a href=\"index.php?module=" . MODULE . "&amp;action=enable&amp;aid={$announcement['ID']}\">{$icon}</a>", array('width' => '2%'));
         $form_container->output_cell($announcement['Announcement']);
         $form_container->output_cell("<input type=\"text\" name=\"disporder[" . $announcement['ID'] . "]\" value=\"" . $announcement['Sort'] . "\" class=\"text_input align_center\" style=\"width: 80%; font-weight: bold;\" />", array('width' => '5%'));
         if ($announcement['Global']) {
             $form_container->output_cell($lang->yes, array('class' => 'align_center', 'width' => '5%'));
         } else {
             $form_container->output_cell($lang->no, array('class' => 'align_center', 'width' => '5%'));
         }
         $form_container->output_cell("<a href=\"index.php?module=" . MODULE . "&amp;action=edit&amp;aid={$announcement['ID']}\">{$lang->edit}</a>", array('class' => 'align_center', 'width' => '10%'));
         $form_container->output_cell("<a href=\"index.php?module=" . MODULE . "&amp;action=delete&amp;aid={$announcement['ID']}\">{$lang->delete}</a>", array('class' => 'align_center', 'width' => '10%'));
         $form_container->construct_row();
     }
 } else {
     $form_container->output_cell($lang->announcement_no, array('class' => 'align_center', 'colspan' => 6));
     $form_container->construct_row();
 }
开发者ID:ambsalinas,项目名称:anima,代码行数:31,代码来源:announcement.php


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