Advertisement
Guest User

Untitled

a guest
Jul 7th, 2012
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. define('IN_MYBB', 1);
  5. define('THIS_SCRIPT', rules.php);
  6. define('RULES_FID', 1207);
  7.  
  8.  
  9. $templatelist = 'rules, rules_row';
  10.  
  11. require_once './global.php';
  12. require_once MYBB_ROOT."inc/class_parser.php";
  13. add_breadcrumb('Regulamin');
  14.  
  15. $parser = new postParser;
  16. $parser_options = array(
  17. "allow_html" => 0,
  18. "allow_mycode" => 1,
  19. "allow_smilies" => 1,
  20. "allow_imgcode" => 1,
  21. "allow_videocode" => 0,
  22. "filter_badwords" => 1
  23. );
  24.  
  25. $query = $db->query('
  26. SELECT t.subject, t.tid, p.message
  27. FROM ' . TABLE_PREFIX . 'threads t
  28. LEFT JOIN ' . TABLE_PREFIX . 'posts p ON (t.firstpost = p.pid)
  29. WHERE t.fid = '1207. '
  30. ORDER BY t.tid DESC ');
  31.  
  32. $rows = '';
  33.  
  34. while($row = $db->fetch_array($query))
  35. {
  36. $message = $parser->parse_message($row['message'], $parser_options);
  37. $expcolimage = 'collapse' . $collapsedimg['rules' . $row['tid']] . '.gif';
  38. $expdisplay = $collapsed['rules_' . $row['tid'] . '_e'];
  39. eval("\$rows .= \"".$templates->get("rules_row")."\";");
  40.  
  41. }
  42.  
  43. eval("\$template = \"".$templates->get("rules")."\";");
  44. output_page($template);
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement