<commit_before><?php

  define('BASEPATH', 'Staff');
  require_once('../applications/wrapper.php');

  if( !$TANGO->perm->check('access_moderation') ) { redirect(SITE_URL); }//Checks if user has permission to create a thread.
  $TANGO->tpl->getTpl('page');

  $content    = '';
  $page_title = '';

  $query = $MYSQL->query("SELECT * FROM
                          {prefix}reports
                          WHERE
                          report_close = 0
                          ORDER BY
                          reported_time
                          DESC");

  if( !empty($query) ) {
      $posts = '';
      $users = '';
      foreach( $query as $report ) {
          if( $report['reported_post'] !== 0 ) {
              
              $user  = $TANGO->user($report['reported_by']);
              $MYSQL->where('id', $report['reported_post']);
              $query = $MYSQL->get('{prefix}forum_posts');
              if( $query['0']['post_type'] == "1" ) {
                  $posts .= '<div style="overflow:auto;border-bottom:1px solid #ccc;">
                               <p>
                                 ' . $LANG['mod']['reports']['thread'] . ' <a href="' . SITE_URL . '/thread.php/v/' . $query['0']['title_friendly'] . '.' . $query['0']['id'] . '">' . $query['0']['post_title'] . '</a><br />
                                 ' . $LANG['mod']['reports']['reason'] . ' ' . $report['report_reason'] . '<br />
                                 ' . $LANG['mod']['reports']['reported_time'] . ' ' . date('F j, Y', $report['reported_time']) . '<br />
                                 [<a href="' . SITE_URL . '/mod/delete_report.php/id/' . $report['id'] . '">' . $LANG['mod']['del_report']['delete'] . '</a>]
                               </p>
                             </div>';
              } elseif( $query['0']['post_type'] !== "2" ) {
                  $t      = thread($query['0']['origin_thread']);
                  $posts .= '<div style="overflow:auto;border-bottom:1px solid #ccc;">
                               <p>
                                 ' . $LANG['mod']['reports']['thread'] . ' <a href="' . SITE_URL . '/thread.php/v/' . $t['title_friendly'] . '.' . $t['id'] . '#post-' . $report['reported_post'] . '">' . $t['post_title'] . '</a><br />
                                 Reason: ' . $report['report_reason'] . '<br />
                                 Reported Time: ' . date('F j, Y', $report['reported_time']) . '<br />
                                 [<a href="' . SITE_URL . '/mod/delete_report.php/id/' . $report['id'] . '">' . $LANG['mod']['del_report']['delete'] . '</a>]
                               </p>
                             </div>';
              }
              
          } elseif( $report['reported_user'] !== 0 ) {
              
              $user   = $TANGO->user($report['reported_user']);
              
              $users .= '<div style="overflow:auto;border-bottom:1px solid #ccc;">
                               <p>
                                 ' . $LANG['mod']['reports']['user'] . ' <a href="' . SITE_URL . '/members.php/cmd/user/id/' . $user['id'] . '">' . $user['username'] . '</a><br />
                                 ' . $LANG['mod']['reports']['reason'] . ' ' . $report['report_reason'] . '<br />
                                 ' . $LANG['mod']['reports']['reported_time'] . ' ' . date('F j, Y', $report['reported_time']) . '<br />
                                 [<a href="' . SITE_URL . '/mod/delete_report.php/id/' . $report['id'] . '">' . $LANG['mod']['del_report']['delete'] . '</a>]
                               </p>
                             </div>';;
              
          }<commit_msg>Bugfix: Fixed a wrong link in the mod area<commit_after><?php

  define('BASEPATH', 'Staff');
  require_once('../applications/wrapper.php');

  if( !$TANGO->perm->check('access_moderation') ) { redirect(SITE_URL); }//Checks if user has permission to create a thread.
  $TANGO->tpl->getTpl('page');

  $content    = '';
  $page_title = '';

  $query = $MYSQL->query("SELECT * FROM
                          {prefix}reports
                          WHERE
                          report_close = 0
                          ORDER BY
                          reported_time
                          DESC");

  if( !empty($query) ) {
      $posts = '';
      $users = '';
      foreach( $query as $report ) {
          if( $report['reported_post'] !== 0 ) {
              
              $user  = $TANGO->user($report['reported_by']);
              $MYSQL->where('id', $report['reported_post']);
              $query = $MYSQL->get('{prefix}forum_posts');
              if( $query['0']['post_type'] == "1" ) {
                  $posts .= '<div style="overflow:auto;border-bottom:1px solid #ccc;">
                               <p>
                                 ' . $LANG['mod']['reports']['thread'] . ' <a href="' . SITE_URL . '/thread.php/' . $query['0']['title_friendly'] . '.' . $query['0']['id'] . '">' . $query['0']['post_title'] . '</a><br />
                                 ' . $LANG['mod']['reports']['reason'] . ' ' . $report['report_reason'] . '<br />
                                 ' . $LANG['mod']['reports']['reported_time'] . ' ' . date('F j, Y', $report['reported_time']) . '<br />
                                 [<a href="' . SITE_URL . '/mod/delete_report.php/id/' . $report['id'] . '">' . $LANG['mod']['del_report']['delete'] . '</a>]
                               </p>
                             </div>';
              } elseif( $query['0']['post_type'] !== "2" ) {
                  $t      = thread($query['0']['origin_thread']);
                  $posts .= '<div style="overflow:auto;border-bottom:1px solid #ccc;">
                               <p>
                                 ' . $LANG['mod']['reports']['thread'] . ' <a href="' . SITE_URL . '/thread.php/' . $t['title_friendly'] . '.' . $t['id'] . '#post-' . $report['reported_post'] . '">' . $t['post_title'] . '</a><br />
                                 Reason: ' . $report['report_reason'] . '<br />
                                 Reported Time: ' . date('F j, Y', $report['reported_time']) . '<br />
                                 [<a href="' . SITE_URL . '/mod/delete_report.php/id/' . $report['id'] . '">' . $LANG['mod']['del_report']['delete'] . '</a>]
                               </p>
                             </div>';
              }
              
          } elseif( $report['reported_user'] !== 0 ) {
              
              $user   = $TANGO->user($report['reported_user']);
              
              $users .= '<div style="overflow:auto;border-bottom:1px solid #ccc;">
                               <p>
                                 ' . $LANG['mod']['reports']['user'] . ' <a href="' . SITE_URL . '/members.php/cmd/user/id/' . $user['id'] . '">' . $user['username'] . '</a><br />
                                 ' . $LANG['mod']['reports']['reason'] . ' ' . $report['report_reason'] . '<br />
                                 ' . $LANG['mod']['reports']['reported_time'] . ' ' . date('F j, Y', $report['reported_time']) . '<br />
                                 [<a href="' . SITE_URL . '/mod/delete_report.php/id/' . $report['id'] . '">' . $LANG['mod']['del_report']['delete'] . '</a>]
                               </p>
                             </div>';;
              
          }
{'fraction_non_alphanumeric': 0.21641690292966112, 'fraction_numerical': 0.003780207911435129, 'mean_word_length': 1.31717234907726, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 87, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1592653', 'n_tokens_mistral': 2175, 'n_tokens_neox': 2081, 'n_words': 330}