[ Index ]

PHP Cross Reference of MyBB 1.8.29

title

Body

[close]

/admin/modules/forum/ -> moderation_queue.php (source)

   1  <?php
   2  /**
   3   * MyBB 1.8
   4   * Copyright 2014 MyBB Group, All Rights Reserved
   5   *
   6   * Website: http://www.mybb.com
   7   * License: http://www.mybb.com/about/license
   8   *
   9   */
  10  
  11  // Disallow direct access to this file for security reasons
  12  if(!defined("IN_MYBB"))
  13  {
  14      die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
  15  }
  16  
  17  $page->add_breadcrumb_item($lang->moderation_queue, "index.php?module=forum-moderation_queue");
  18  
  19  $sub_tabs['threads'] = array(
  20      'title' => $lang->threads,
  21      'link' => "index.php?module=forum-moderation_queue&amp;type=threads",
  22      'description' => $lang->threads_desc
  23  );
  24  
  25  $sub_tabs['posts'] = array(
  26      'title' => $lang->posts,
  27      'link' => "index.php?module=forum-moderation_queue&amp;type=posts",
  28      'description' => $lang->posts_desc
  29  );
  30  
  31  $sub_tabs['attachments'] = array(
  32      'title' => $lang->attachments,
  33      'link' => "index.php?module=forum-moderation_queue&amp;type=attachments",
  34      'description' => $lang->attachments_desc
  35  );
  36  
  37  $plugins->run_hooks("admin_forum_moderation_queue_begin");
  38  
  39  // Actually performing our moderation choices
  40  if($mybb->request_method == "post")
  41  {
  42      $plugins->run_hooks("admin_forum_moderation_queue_commit");
  43  
  44      require_once  MYBB_ROOT."inc/functions_upload.php";
  45      require_once  MYBB_ROOT."inc/class_moderation.php";
  46      $moderation = new Moderation;
  47  
  48      if($mybb->get_input('threads', MyBB::INPUT_ARRAY))
  49      {
  50          $threads_to_approve = $threads_to_delete = array();
  51          // Fetch threads
  52          $query = $db->simple_select("threads", "tid", "tid IN (".implode(",", array_map("intval", array_keys($mybb->input['threads']))).")");
  53          while($thread = $db->fetch_array($query))
  54          {
  55              $action = $mybb->input['threads'][$thread['tid']];
  56              if($action == "approve")
  57              {
  58                  $threads_to_approve[] = $thread['tid'];
  59              }
  60              else if($action == "delete" && $mybb->settings['soft_delete'] != 1)
  61              {
  62                  $moderation->delete_thread($thread['tid']);
  63              }
  64              else if($action == "delete")
  65              {
  66                  $threads_to_delete[] = $thread['tid'];
  67              }
  68          }
  69          if(!empty($threads_to_approve))
  70          {
  71              $moderation->approve_threads($threads_to_approve);
  72          }
  73          if(!empty($threads_to_delete))
  74          {
  75              $moderation->soft_delete_threads($threads_to_delete);
  76          }
  77  
  78          $plugins->run_hooks("admin_forum_moderation_queue_threads_commit");
  79  
  80          // Log admin action
  81          log_admin_action('threads');
  82  
  83          flash_message($lang->success_threads, 'success');
  84          admin_redirect("index.php?module=forum-moderation_queue&type=threads");
  85      }
  86      else if($mybb->get_input('posts', MyBB::INPUT_ARRAY))
  87      {
  88          $posts_to_approve = $posts_to_delete = array();
  89          // Fetch posts
  90          $pids = array_map(
  91              "intval",
  92              array_keys($mybb->get_input('posts', MyBB::INPUT_ARRAY))
  93          );
  94  
  95          $query = $db->simple_select("posts", "pid", "pid IN (".implode(",", $pids).")");
  96          while($post = $db->fetch_array($query))
  97          {
  98              $action = $mybb->input['posts'][$post['pid']];
  99              if($action == "approve")
 100              {
 101                  $posts_to_approve[] = $post['pid'];
 102              }
 103              else if($action == "delete" && $mybb->settings['soft_delete'] != 1)
 104              {
 105                  $moderation->delete_post($post['pid']);
 106              }
 107              else if($action == "delete")
 108              {
 109                  $posts_to_delete[] = $post['pid'];
 110              }
 111          }
 112          if(!empty($posts_to_approve))
 113          {
 114              $moderation->approve_posts($posts_to_approve);
 115          }
 116          if(!empty($posts_to_delete))
 117          {
 118              $moderation->soft_delete_posts($posts_to_delete);
 119          }
 120  
 121          $plugins->run_hooks("admin_forum_moderation_queue_posts_commit");
 122  
 123          // Log admin action
 124          log_admin_action('posts');
 125  
 126          flash_message($lang->success_posts, 'success');
 127          admin_redirect("index.php?module=forum-moderation_queue&type=posts");
 128  
 129      }
 130      else if($mybb->get_input('attachments', MyBB::INPUT_ARRAY))
 131      {
 132          $query = $db->simple_select("attachments", "aid, pid", "aid IN (".implode(",", array_map("intval", array_keys($mybb->input['attachments']))).")");
 133          while($attachment = $db->fetch_array($query))
 134          {
 135              $action = $mybb->input['attachments'][$attachment['aid']];
 136              if($action == "approve")
 137              {
 138                  $db->update_query("attachments", array("visible" => 1), "aid='{$attachment['aid']}'");
 139              }
 140              else if($action == "delete")
 141              {
 142                  remove_attachment($attachment['pid'], '', $attachment['aid']);
 143              }
 144          }
 145  
 146          $plugins->run_hooks("admin_forum_moderation_queue_attachments_commit");
 147  
 148          // Log admin action
 149          log_admin_action('attachments');
 150  
 151          flash_message($lang->success_attachments, 'success');
 152          admin_redirect("index.php?module=forum-moderation_queue&type=attachments");
 153      }
 154  }
 155  
 156  $all_options = "<ul class=\"modqueue_mass\">\n";
 157  $all_options .= "<li><a href=\"#\" class=\"mass_ignore\">{$lang->mark_as_ignored}</a></li>\n";
 158  $all_options .= "<li><a href=\"#\" class=\"mass_delete\">{$lang->mark_as_deleted}</a></li>\n";
 159  $all_options .= "<li><a href=\"#\" class=\"mass_approve\">{$lang->mark_as_approved}</a></li>\n";
 160  $all_options .= "</ul>\n";
 161  
 162  // Threads awaiting moderation
 163  if(empty($mybb->input['type']) || $mybb->input['type'] == "threads")
 164  {
 165      $plugins->run_hooks("admin_forum_moderation_queue_threads");
 166  
 167      $forum_cache = $cache->read("forums");
 168  
 169      $query = $db->simple_select("threads", "COUNT(tid) AS unapprovedthreads", "visible=0");
 170      $unapproved_threads = $db->fetch_field($query, "unapprovedthreads");
 171  
 172      if($unapproved_threads > 0)
 173      {
 174          // Figure out if we need to display multiple pages.
 175          $per_page = 15;
 176          $mybb->input['page'] = $mybb->get_input('page', MyBB::INPUT_INT);
 177          if($mybb->input['page'] > 0)
 178          {
 179              $current_page = $mybb->input['page'];
 180              $start = ($current_page-1)*$per_page;
 181              $pages = $unapproved_threads / $per_page;
 182              $pages = ceil($pages);
 183              if($current_page > $pages)
 184              {
 185                  $start = 0;
 186                  $current_page = 1;
 187              }
 188          }
 189          else
 190          {
 191              $start = 0;
 192              $current_page = 1;
 193          }
 194  
 195          $pagination = draw_admin_pagination($current_page, $per_page, $unapproved_threads, "index.php?module=forum-moderation_queue&amp;page={page}");
 196  
 197          $page->add_breadcrumb_item($lang->threads_awaiting_moderation);
 198          $page->output_header($lang->threads_awaiting_moderation);
 199          $page->output_nav_tabs($sub_tabs, "threads");
 200  
 201          $form = new Form("index.php?module=forum-moderation_queue", "post");
 202  
 203          $table = new Table;
 204          $table->construct_header($lang->subject);
 205          $table->construct_header($lang->author, array("class" => "align_center", "width" => "20%"));
 206          $table->construct_header($lang->posted, array("class" => "align_center", "width" => "20%"));
 207  
 208          $query = $db->query("
 209              SELECT t.tid, t.dateline, t.fid, t.subject, t.username AS threadusername, p.message AS postmessage, u.username AS username, t.uid
 210              FROM ".TABLE_PREFIX."threads t
 211              LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=t.firstpost)
 212              LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
 213              WHERE t.visible='0'
 214              ORDER BY t.lastpost DESC
 215              LIMIT {$start}, {$per_page}
 216          ");
 217          while($thread = $db->fetch_array($query))
 218          {
 219              $thread['subject'] = htmlspecialchars_uni($thread['subject']);
 220              $thread['threadlink'] = get_thread_link($thread['tid']);
 221              $thread['forumlink'] = get_forum_link($thread['fid']);
 222              $forum_name = $forum_cache[$thread['fid']]['name'];
 223              $threaddate = my_date('relative', $thread['dateline']);
 224  
 225              if(!$thread['uid'])
 226              {
 227                  if($thread['threadusername'] != "")
 228                  {
 229                      $profile_link = $thread['threadusername'];
 230                  }
 231                  else
 232                  {
 233                      $profile_link = htmlspecialchars_uni($lang->guest);
 234                  }
 235              }
 236              else
 237              {
 238                  $profile_link = build_profile_link(htmlspecialchars_uni($thread['username']), $thread['uid'], "_blank");
 239              }
 240  
 241              $thread['postmessage'] = nl2br(htmlspecialchars_uni($thread['postmessage']));
 242  
 243              $table->construct_cell("<a href=\"../{$thread['threadlink']}\" target=\"_blank\">{$thread['subject']}</a>");
 244              $table->construct_cell($profile_link, array("class" => "align_center"));
 245              $table->construct_cell($threaddate, array("class" => "align_center"));
 246              $table->construct_row();
 247  
 248              $controls = "<div class=\"modqueue_controls\">\n";
 249              $controls .= $form->generate_radio_button("threads[{$thread['tid']}]", "ignore", $lang->ignore, array('class' => 'radio_ignore', 'checked' => true))." ";
 250              $controls .= $form->generate_radio_button("threads[{$thread['tid']}]", "delete", $lang->delete, array('class' => 'radio_delete', 'checked' => false))." ";
 251              $controls .= $form->generate_radio_button("threads[{$thread['tid']}]", "approve", $lang->approve, array('class' => 'radio_approve', 'checked' => false));
 252              $controls .= "</div>";
 253  
 254              $forum = "<strong>{$lang->forum} <a href=\"../{$thread['forumlink']}\" target=\"_blank\">{$forum_name}</a></strong><br />";
 255  
 256              $table->construct_cell("<div class=\"modqueue_message\">{$controls}<div class=\"modqueue_meta\">{$forum}</div>{$thread['postmessage']}</div>", array("colspan" => 3));
 257              $table->construct_row();
 258          }
 259  
 260          $table->output($lang->threads_awaiting_moderation, 1, "general tfixed");
 261          echo $all_options;
 262          echo $pagination;
 263  
 264          $buttons[] = $form->generate_submit_button($lang->perform_action);
 265          $form->output_submit_wrapper($buttons);
 266          $form->end();
 267  
 268          echo '<script type="text/javascript">
 269              $(".mass_ignore").on("click", function () {
 270                  $("input.radio_ignore").each(function(e) {
 271                      $(this).prop("checked", true);
 272                  });
 273                  return false;
 274              });
 275              $(".mass_delete").on("click", function () {
 276                  $("input.radio_delete").each(function(e) {
 277                      $(this).prop("checked", true);
 278                  });
 279                  return false;
 280              });
 281              $(".mass_approve").on("click", function () {
 282                  $("input.radio_approve").each(function(e) {
 283                      $(this).prop("checked", true);
 284                  });
 285                  return false;
 286              });
 287          </script>';
 288  
 289          $page->output_footer();
 290      }
 291  }
 292  
 293  // Posts awaiting moderation
 294  if($mybb->get_input('type') == "posts" || $mybb->get_input('type') == "")
 295  {
 296      $plugins->run_hooks("admin_forum_moderation_queue_posts");
 297  
 298      $forum_cache = $cache->read("forums");
 299  
 300      $query = $db->query("
 301          SELECT COUNT(pid) AS unapprovedposts
 302          FROM  ".TABLE_PREFIX."posts p
 303          LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
 304          WHERE p.visible='0' AND t.firstpost != p.pid
 305      ");
 306      $unapproved_posts = $db->fetch_field($query, "unapprovedposts");
 307  
 308      if($unapproved_posts > 0)
 309      {
 310          // Figure out if we need to display multiple pages.
 311          $per_page = 15;
 312          if($mybb->get_input('page') > 0)
 313          {
 314              $current_page = $mybb->get_input('page', MyBB::INPUT_INT);
 315              $start = ($current_page-1)*$per_page;
 316              $pages = $unapproved_posts / $per_page;
 317              $pages = ceil($pages);
 318              if($current_page > $pages)
 319              {
 320                  $start = 0;
 321                  $current_page = 1;
 322              }
 323          }
 324          else
 325          {
 326              $start = 0;
 327              $current_page = 1;
 328          }
 329  
 330          $pagination = draw_admin_pagination($current_page, $per_page, $unapproved_posts, "index.php?module=forum-moderation_queue&amp;type=posts&amp;page={page}");
 331  
 332  
 333          $page->add_breadcrumb_item($lang->posts_awaiting_moderation);
 334          $page->output_header($lang->posts_awaiting_moderation);
 335          $page->output_nav_tabs($sub_tabs, "posts");
 336  
 337          $form = new Form("index.php?module=forum-moderation_queue", "post");
 338  
 339          $table = new Table;
 340          $table->construct_header($lang->subject);
 341          $table->construct_header($lang->author, array("class" => "align_center", "width" => "20%"));
 342          $table->construct_header($lang->posted, array("class" => "align_center", "width" => "20%"));
 343  
 344          $query = $db->query("
 345              SELECT p.pid, p.subject, p.message, p.dateline, p.username AS postusername, t.subject AS threadsubject, t.tid, u.username, p.uid, t.fid
 346              FROM  ".TABLE_PREFIX."posts p
 347              LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
 348              LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
 349              WHERE p.visible='0' AND t.firstpost != p.pid
 350              ORDER BY p.dateline DESC
 351              LIMIT {$start}, {$per_page}
 352          ");
 353          while($post = $db->fetch_array($query))
 354          {
 355              $altbg = alt_trow();
 356              $post['threadsubject'] = htmlspecialchars_uni($post['threadsubject']);
 357              $post['subject'] = htmlspecialchars_uni($post['subject']);
 358  
 359              if(!$post['subject'])
 360              {
 361                  $post['subject'] = $lang->re." ".$post['threadsubject'];
 362              }
 363  
 364              $post['postlink'] = get_post_link($post['pid'], $post['tid']);
 365              $post['threadlink'] = get_thread_link($post['tid']);
 366              $post['forumlink'] = get_forum_link($post['fid']);
 367              $forum_name = $forum_cache[$post['fid']]['name'];
 368              $postdate = my_date('relative', $post['dateline']);
 369  
 370              if(!$post['uid'])
 371              {
 372                  if($post['postusername'] != "")
 373                  {
 374                      $profile_link = $post['postusername'];
 375                  }
 376                  else
 377                  {
 378                      $profile_link = $lang->guest;
 379                  }
 380              }
 381              else
 382              {
 383                  $profile_link = build_profile_link(htmlspecialchars_uni($post['username']), $post['uid'], "_blank");
 384              }
 385  
 386              $post['message'] = nl2br(htmlspecialchars_uni($post['message']));
 387  
 388              $table->construct_cell("<a href=\"../{$post['postlink']}#pid{$post['pid']}\" target=\"_blank\">{$post['subject']}</a>");
 389              $table->construct_cell($profile_link, array("class" => "align_center"));
 390              $table->construct_cell($postdate, array("class" => "align_center"));
 391              $table->construct_row();
 392  
 393              $controls = "<div class=\"modqueue_controls\">\n";
 394              $controls .= $form->generate_radio_button("posts[{$post['pid']}]", "ignore", $lang->ignore, array('class' => 'radio_ignore', 'checked' => true))." ";
 395              $controls .= $form->generate_radio_button("posts[{$post['pid']}]", "delete",$lang->delete, array('class' => 'radio_delete', 'checked' => false))." ";
 396              $controls .= $form->generate_radio_button("posts[{$post['pid']}]", "approve", $lang->approve, array('class' => 'radio_approve', 'checked' => false));
 397              $controls .= "</div>";
 398  
 399              $thread = "<strong>{$lang->thread} <a href=\"../{$post['threadlink']}\" target=\"_blank\">{$post['threadsubject']}</a></strong>";
 400              $forum = "<strong>{$lang->forum} <a href=\"../{$post['forumlink']}\" target=\"_blank\">{$forum_name}</a></strong><br />";
 401  
 402              $table->construct_cell("<div class=\"modqueue_message\">{$controls}<div class=\"modqueue_meta\">{$forum}{$thread}</div>{$post['message']}</div>", array("colspan" => 3));
 403              $table->construct_row();
 404          }
 405  
 406          $table->output($lang->posts_awaiting_moderation, 1, "general tfixed");
 407          echo $all_options;
 408          echo $pagination;
 409  
 410          $buttons[] = $form->generate_submit_button($lang->perform_action);
 411          $form->output_submit_wrapper($buttons);
 412          $form->end();
 413  
 414          echo '<script type="text/javascript">
 415              $(".mass_ignore").on("click", function () {
 416                  $("input.radio_ignore").each(function(e) {
 417                      $(this).prop("checked", true);
 418                  });
 419                  return false;
 420              });
 421              $(".mass_delete").on("click", function () {
 422                  $("input.radio_delete").each(function(e) {
 423                      $(this).prop("checked", true);
 424                  });
 425                  return false;
 426              });
 427              $(".mass_approve").on("click", function () {
 428                  $("input.radio_approve").each(function(e) {
 429                      $(this).prop("checked", true);
 430                  });
 431                  return false;
 432              });
 433          </script>';
 434  
 435          $page->output_footer();
 436      }
 437      else if($mybb->get_input('type') == "posts")
 438      {
 439          $page->output_header($lang->moderation_queue);
 440          $page->output_nav_tabs($sub_tabs, "posts");
 441          echo "<p class=\"notice\">{$lang->error_no_posts}</p>";
 442          $page->output_footer();
 443      }
 444  }
 445  
 446  // Attachments awaiting moderation
 447  if($mybb->get_input('type') == "attachments" || $mybb->get_input('type') == "")
 448  {
 449      $plugins->run_hooks("admin_forum_moderation_queue_attachments");
 450  
 451      $query = $db->query("
 452          SELECT COUNT(aid) AS unapprovedattachments
 453          FROM  ".TABLE_PREFIX."attachments a
 454          LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
 455          LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
 456          WHERE a.visible='0'
 457      ");
 458      $unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");
 459  
 460      if($unapproved_attachments > 0)
 461      {
 462          // Figure out if we need to display multiple pages.
 463          $per_page = 15;
 464          if($mybb->input['page'] > 0)
 465          {
 466              $current_page = $mybb->get_input('page', MyBB::INPUT_INT);
 467              $start = ($current_page-1)*$per_page;
 468              $pages = $unapproved_attachments / $per_page;
 469              $pages = ceil($pages);
 470              if($current_page > $pages)
 471              {
 472                  $start = 0;
 473                  $current_page = 1;
 474              }
 475          }
 476          else
 477          {
 478              $start = 0;
 479              $current_page = 1;
 480          }
 481  
 482          $pagination = draw_admin_pagination($current_page, $per_page, $unapproved_attachments, "index.php?module=forum-moderation_queue&amp;type=attachments&amp;page={page}");
 483  
 484          $page->add_breadcrumb_item($lang->attachments_awaiting_moderation);
 485          $page->output_header($lang->attachments_awaiting_moderation);
 486          $page->output_nav_tabs($sub_tabs, "attachments");
 487  
 488          $form = new Form("index.php?module=forum-moderation_queue", "post");
 489  
 490          $table = new Table;
 491          $table->construct_header($lang->filename);
 492          $table->construct_header($lang->uploadedby, array("class" => "align_center", "width" => "20%"));
 493          $table->construct_header($lang->posted, array("class" => "align_center", "width" => "20%"));
 494          $table->construct_header($lang->controls, array("class" => "align_center", "colspan" => 3));
 495  
 496          $query = $db->query("
 497              SELECT a.*, p.subject AS postsubject, p.dateline, p.username AS postusername, p.uid, u.username, t.tid, t.subject AS threadsubject
 498              FROM  ".TABLE_PREFIX."attachments a
 499              LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
 500              LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
 501              LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
 502              WHERE a.visible='0'
 503              ORDER BY a.dateuploaded DESC
 504              LIMIT {$start}, {$per_page}
 505          ");
 506  
 507          while($attachment = $db->fetch_array($query))
 508          {
 509              if(!$attachment['dateuploaded']) $attachment['dateuploaded'] = $attachment['dateline'];
 510              $attachdate = my_date('relative', $attachment['dateuploaded']);
 511  
 512              $attachment['postsubject'] = htmlspecialchars_uni($attachment['postsubject']);
 513              $attachment['filename'] = htmlspecialchars_uni($attachment['filename']);
 514              $attachment['threadsubject'] = htmlspecialchars_uni($attachment['threadsubject']);
 515              $attachment['filesize'] = get_friendly_size($attachment['filesize']);
 516  
 517              $link = get_post_link($attachment['pid'], $attachment['tid']) . "#pid{$attachment['pid']}";
 518              $thread_link = get_thread_link($attachment['tid']);
 519  
 520              if(!$attachment['uid'])
 521              {
 522                  if($attachment['postusername'] != "")
 523                  {
 524                      $profile_link = $attachment['postusername'];
 525                  }
 526                  else
 527                  {
 528                      $profile_link = htmlspecialchars_uni($lang->guest);
 529                  }
 530              }
 531              else
 532              {
 533                  $profile_link = build_profile_link(htmlspecialchars_uni($attachment['username']), $attachment['uid'], "_blank");
 534              }
 535  
 536              $table->construct_cell("<a href=\"../attachment.php?aid={$attachment['aid']}\" target=\"_blank\">{$attachment['filename']}</a> ({$attachment['filesize']})<br /><small class=\"modqueue_meta\">{$lang->post} <a href=\"{$link}\" target=\"_blank\">{$attachment['postsubject']}</a></small>");
 537              $table->construct_cell($profile_link, array("class" => "align_center"));
 538              $table->construct_cell($attachdate, array("class" => "align_center"));
 539  
 540              $table->construct_cell($form->generate_radio_button("attachments[{$attachment['aid']}]", "ignore", $lang->ignore, array('class' => 'radio_ignore', 'checked' => true)), array("class" => "align_center"));
 541              $table->construct_cell($form->generate_radio_button("attachments[{$attachment['aid']}]", "delete", $lang->delete, array('class' => 'radio_delete', 'checked' => false)), array("class" => "align_center"));
 542              $table->construct_cell($form->generate_radio_button("attachments[{$attachment['aid']}]", "approve", $lang->approve, array('class' => 'radio_approve', 'checked' => false)), array("class" => "align_center"));
 543              $table->construct_row();
 544          }
 545          $table->output($lang->attachments_awaiting_moderation);
 546          echo $all_options;
 547          echo $pagination;
 548  
 549          $buttons[] = $form->generate_submit_button($lang->perform_action);
 550          $form->output_submit_wrapper($buttons);
 551          $form->end();
 552  
 553          echo '<script type="text/javascript">
 554              $(".mass_ignore").on("click", function () {
 555                  $("input.radio_ignore").each(function(e) {
 556                      $(this).prop("checked", true);
 557                  });
 558                  return false;
 559              });
 560              $(".mass_delete").on("click", function () {
 561                  $("input.radio_delete").each(function(e) {
 562                      $(this).prop("checked", true);
 563                  });
 564                  return false;
 565              });
 566              $(".mass_approve").on("click", function () {
 567                  $("input.radio_approve").each(function(e) {
 568                      $(this).prop("checked", true);
 569                  });
 570                  return false;
 571              });
 572          </script>';
 573  
 574          $page->output_footer();
 575      }
 576      else if($mybb->get_input('type') == "attachments")
 577      {
 578          $page->output_header($lang->moderation_queue);
 579          $page->output_nav_tabs($sub_tabs, "attachments");
 580          echo "<p class=\"notice\">{$lang->error_no_attachments}</p>";
 581          $page->output_footer();
 582      }
 583  }
 584  
 585  // Still nothing? All queues are empty! :-D
 586  $page->output_header($lang->moderation_queue);
 587  echo "<p class=\"notice\">{$lang->error_no_threads}</p>";
 588  $page->output_footer();


2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref