Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: recount_rebuild.php 5112 2010-07-25 22:30:31Z RyanGordon $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 28 | Zeile 28 |
---|
$page = intval($mybb->input['page']); $per_page = intval($mybb->input['forumcounters']);
|
$page = intval($mybb->input['page']); $per_page = intval($mybb->input['forumcounters']);
|
| if($per_page <= 0) { $per_page = 50; }
|
$start = ($page-1) * $per_page; $end = $start + $per_page;
| $start = ($page-1) * $per_page; $end = $start + $per_page;
|
Zeile 41 | Zeile 45 |
---|
check_proceed($num_forums, $end, ++$page, $per_page, "forumcounters", "do_rebuildforumcounters", $lang->success_rebuilt_forum_counters); }
|
check_proceed($num_forums, $end, ++$page, $per_page, "forumcounters", "do_rebuildforumcounters", $lang->success_rebuilt_forum_counters); }
|
|
|
function acp_rebuild_thread_counters() { global $db, $mybb, $lang;
|
function acp_rebuild_thread_counters() { global $db, $mybb, $lang;
|
|
|
$query = $db->simple_select("threads", "COUNT(*) as num_threads"); $num_threads = $db->fetch_field($query, 'num_threads'); $page = intval($mybb->input['page']); $per_page = intval($mybb->input['threadcounters']);
|
$query = $db->simple_select("threads", "COUNT(*) as num_threads"); $num_threads = $db->fetch_field($query, 'num_threads'); $page = intval($mybb->input['page']); $per_page = intval($mybb->input['threadcounters']);
|
| if($per_page <= 0) { $per_page = 500; }
|
$start = ($page-1) * $per_page; $end = $start + $per_page;
| $start = ($page-1) * $per_page; $end = $start + $per_page;
|
Zeile 61 | Zeile 69 |
---|
} check_proceed($num_threads, $end, ++$page, $per_page, "threadcounters", "do_rebuildthreadcounters", $lang->success_rebuilt_thread_counters);
|
} check_proceed($num_threads, $end, ++$page, $per_page, "threadcounters", "do_rebuildthreadcounters", $lang->success_rebuilt_thread_counters);
|
}
| }
|
function acp_recount_user_posts() { global $db, $mybb, $lang;
|
function acp_recount_user_posts() { global $db, $mybb, $lang;
|
|
|
$query = $db->simple_select("users", "COUNT(uid) as num_users"); $num_users = $db->fetch_field($query, 'num_users'); $page = intval($mybb->input['page']); $per_page = intval($mybb->input['userposts']);
|
$query = $db->simple_select("users", "COUNT(uid) as num_users"); $num_users = $db->fetch_field($query, 'num_users'); $page = intval($mybb->input['page']); $per_page = intval($mybb->input['userposts']);
|
| if($per_page <= 0) { $per_page = 500; }
|
$start = ($page-1) * $per_page; $end = $start + $per_page;
| $start = ($page-1) * $per_page; $end = $start + $per_page;
|
Zeile 119 | Zeile 131 |
---|
$page = intval($mybb->input['page']); $per_page = intval($mybb->input['attachmentthumbs']);
|
$page = intval($mybb->input['page']); $per_page = intval($mybb->input['attachmentthumbs']);
|
| if($per_page <= 0) { $per_page = 20; }
|
$start = ($page-1) * $per_page; $end = $start + $per_page;
| $start = ($page-1) * $per_page; $end = $start + $per_page;
|
Zeile 164 | Zeile 180 |
---|
echo "<div class=\"confirm_action\">\n"; echo "<p>{$lang->confirm_proceed_rebuild}</p>\n"; echo "<br />\n";
|
echo "<div class=\"confirm_action\">\n"; echo "<p>{$lang->confirm_proceed_rebuild}</p>\n"; echo "<br />\n";
|
echo "<script type=\"text/javascript\">window.onload = function() { var button = $$('#proceed_button'); if(button[0]) { button[0].value = 'Automatically Redirecting...'; button[0].disabled = true; button[0].style.color = '#aaa'; button[0].style.borderColor = '#aaa'; document.forms[0].submit(); }}</script>";
| echo "<script type=\"text/javascript\">window.onload = function() { var button = $$('#proceed_button'); if(button[0]) { button[0].value = '{$lang->automatically_redirecting}'; button[0].disabled = true; button[0].style.color = '#aaa'; button[0].style.borderColor = '#aaa'; document.forms[0].submit(); }}</script>";
|
echo "<p class=\"buttons\">\n"; echo $form->generate_submit_button($lang->proceed, array('class' => 'button_yes', 'id' => 'proceed_button')); echo "</p>\n";
| echo "<p class=\"buttons\">\n"; echo $form->generate_submit_button($lang->proceed, array('class' => 'button_yes', 'id' => 'proceed_button')); echo "</p>\n";
|
Zeile 202 | Zeile 218 |
---|
if(!intval($mybb->input['forumcounters'])) { $mybb->input['forumcounters'] = 50;
|
if(!intval($mybb->input['forumcounters'])) { $mybb->input['forumcounters'] = 50;
|
}
| }
|
acp_rebuild_forum_counters(); } elseif(isset($mybb->input['do_rebuildthreadcounters']))
| acp_rebuild_forum_counters(); } elseif(isset($mybb->input['do_rebuildthreadcounters']))
|
Zeile 285 | Zeile 301 |
---|
$form_container->output_row_header($lang->name); $form_container->output_row_header($lang->data_per_page, array('width' => 50)); $form_container->output_row_header(" ");
|
$form_container->output_row_header($lang->name); $form_container->output_row_header($lang->data_per_page, array('width' => 50)); $form_container->output_row_header(" ");
|
$form_container->output_cell("<label>{$lang->recount_stats}</label><div class=\"description\">{$lang->recount_stats_desc}</div>"); $form_container->output_cell($lang->na); $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountstats"))); $form_container->construct_row();
| |
$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->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->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->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->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->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")));
|
Zeile 309 | Zeile 320 |
---|
$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->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(); $form_container->output_cell("<label>{$lang->recount_stats}</label><div class=\"description\">{$lang->recount_stats_desc}</div>"); $form_container->output_cell($lang->na); $form_container->output_cell($form->generate_submit_button($lang->go, array("name" => "do_recountstats")));
|
$form_container->construct_row(); $plugins->run_hooks("admin_tools_recount_rebuild_output_list");
| $form_container->construct_row(); $plugins->run_hooks("admin_tools_recount_rebuild_output_list");
|