Advertisement
Guest User

toprated.php

a guest
Dec 28th, 2011
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 19.35 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Allows users to to rate posts
  4.  *
  5.  * @copyright Copyright (C) 2009 crurf.info
  6.  * @license http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons License version 3.0 or higher
  7.  * @package ajax_rating
  8.  */
  9.  
  10. define('FORUM_SKIP_CSRF_CONFIRM', 1);
  11.  
  12. if (!defined('FORUM_ROOT'))
  13.     define('FORUM_ROOT', './');
  14. require FORUM_ROOT.'include/common.php';
  15.  
  16. include_once FORUM_ROOT . '/extensions/ajax_rating/fns.php';
  17.  
  18. if (!$lang_ajax_rating) {
  19.     if (file_exists(FORUM_ROOT . '/extensions/ajax_rating/lang/' . $forum_user['language'] . '/ajax_rating2.php'))
  20.         include_once FORUM_ROOT . '/extensions/ajax_rating/lang/' . $forum_user['language'] . '/ajax_rating2.php';
  21.     else
  22.         include_once FORUM_ROOT . '/extensions/ajax_rating/lang/English/ajax_rating2.php';
  23. }
  24.  
  25. // Load the viewtopic.php language file
  26. require FORUM_ROOT.'lang/'.$forum_user['language'].'/topic.php';
  27.  
  28. $type = isset($_GET['type']) ? intval($_GET['type']) : 0;
  29. $tab = isset($_GET['tab']) ? intval($_GET['tab']) : 0;
  30.  
  31. if (!in_array($type, array(0,1))) $type = 0;
  32. if (!in_array($tab, array(0,1,2))) $tab = 0;
  33.  
  34. $curtime = mktime();
  35. $period = 24 * 60 * 60;
  36. switch ($tab) {
  37.     case 1:
  38.         $period = 7 * 24 * 60 * 60;
  39.         break;
  40.     case 2:
  41.         $period = 30 * 24 * 60 * 60;
  42.         break;
  43. }
  44.  
  45. $forum_page['item_count'] = 0;  // Keep track of post numbers
  46.  
  47. // Retrieve the posts (and their respective poster/online status)
  48. $query = array(
  49.     'SELECT'    => 'a.rate, t.subject as topicsubj, p.topic_id, u.email, u.title, u.url, u.location, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online',
  50.     'FROM' => '(
  51.         SELECT ((sum(pd.rating) * 100) / count(*)) as rate, pd.postid
  52.         FROM ' . $forum_db->prefix . 'postrating_det AS pd
  53.         WHERE pd.tstamp <= ' . $curtime . ' AND pd.tstamp >= ' . ($curtime - $period) . '
  54.         GROUP BY pd.postid
  55.     ) AS a',
  56.     'JOINS'     => array(
  57.         array(
  58.             'INNER JOIN'    => $forum_db->prefix . 'posts AS p',
  59.             'ON'            => 'p.id=a.postid'
  60.         ),
  61.         array(
  62.             'INNER JOIN'    => $forum_db->prefix . 'topics AS t',
  63.             'ON'            => 'p.topic_id=t.id'
  64.         ),
  65.         array(
  66.             'INNER JOIN'    => $forum_db->prefix . 'users AS u',
  67.             'ON'            => 'u.id=p.poster_id'
  68.         ),
  69.         array(
  70.             'INNER JOIN'    => $forum_db->prefix . 'groups AS g',
  71.             'ON'            => 'g.g_id=u.group_id'
  72.         ),
  73.         array(
  74.             'LEFT JOIN'     => $forum_db->prefix . 'online AS o',
  75.             'ON'            => '(o.user_id=u.id AND o.user_id!=1 AND o.idle=0)'
  76.         ),
  77.     ),
  78.     'ORDER BY'  => 'a.rate ' . ($type == 1 ? 'ASC' : 'DESC'),
  79.     'LIMIT'     => 5,
  80.     'PARAMS'        => array('NO_PREFIX' => 1)
  81. );
  82.  
  83. $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
  84.  
  85. if (!$forum_db->num_rows($result)) {
  86.     message($lang_common['Bad request']);
  87. } else {
  88.     define('FORUM_PAGE', 'toprated');
  89.     require FORUM_ROOT.'header.php';
  90.    
  91.     // START SUBST - <!-- forum_main -->
  92.     ob_start();
  93.     ?>
  94.     <div class="admin-menu gen-content">
  95.         <ul>
  96.             <li class="<?php echo ($type == 0 ? 'active ' : ''); ?>first-item"><a href="?type=0&tab=<? echo $tab; ?>"><span><?php echo $lang_ajax_rating['Best']; ?></span></a></li>
  97.             <li class="<?php echo ($type == 1 ? 'active ' : ''); ?>normal"><a href="?type=1&tab=<? echo $tab; ?>"><span><?php echo $lang_ajax_rating['Worst']; ?></span></a></li>
  98.         </ul>
  99.     </div>
  100.     <div class="admin-submenu gen-content">
  101.         <ul>
  102.             <li class="<?php echo ($tab == 0 ? 'active ' : ''); ?>first-item"><a href="?type=<? echo $type; ?>&tab=0"><span><?php echo $lang_ajax_rating['Last day']; ?></span></a></li>
  103.             <li class="<?php echo ($tab == 1 ? 'active ' : ''); ?>normal"><a href="?type=<? echo $type; ?>&tab=1"><span><?php echo $lang_ajax_rating['Last week']; ?></span></a></li>
  104.             <li class="<?php echo ($tab == 2 ? 'active ' : ''); ?>normal"><a href="?type=<? echo $type; ?>&tab=2"><span><?php echo $lang_ajax_rating['Last month']; ?></span></a></li>
  105.         </ul>
  106.     </div>
  107.     <div class="main-content main-topic" id="forum1">
  108.         <?php
  109.             while ($cur_post = $forum_db->fetch_assoc($result)) {
  110.                 ++$forum_page['item_count'];
  111.                 $forum_page['post_ident'] = array();
  112.                 $forum_page['author_ident'] = array();
  113.                 $forum_page['author_info'] = array();
  114.                 $forum_page['post_options'] = array();
  115.                 $forum_page['post_contacts'] = array();
  116.                 $forum_page['post_actions'] = array();
  117.                 $forum_page['message'] = array();
  118.  
  119.                 // Generate the post heading
  120.                 $forum_page['post_ident']['num'] = '<span class="post-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span>';
  121.  
  122.                 if ($cur_post['poster_id'] > 1)
  123.                     $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_post['id'] == $cur_topic['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), (($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['username']).'</a>' : '<strong>'.forum_htmlencode($cur_post['username']).'</strong>')).'</span>';
  124.                 else
  125.                     $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_post['id'] == $cur_topic['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), '<strong>'.forum_htmlencode($cur_post['username']).'</strong>').'</span>';
  126.  
  127.                 $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" href="'.forum_link($forum_url['topic'], $cur_post['topic_id']).'"><b>'. $cur_post['topicsubj'] .'</b></a> - <a class="permalink" rel="bookmark" title="'.$lang_topic['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_post['id']).'">'.format_time($cur_post['posted']).'</a></span>';
  128.  
  129.                 ($hook = get_hook('vt_row_pre_post_ident_merge')) ? eval($hook) : null;
  130.  
  131.                 if (isset($user_data_cache[$cur_post['poster_id']]['author_ident']))
  132.                     $forum_page['author_ident'] = $user_data_cache[$cur_post['poster_id']]['author_ident'];
  133.                 else
  134.                 {
  135.                     // Generate author identification
  136.                     if ($cur_post['poster_id'] > 1)
  137.                     {
  138.                         if ($forum_config['o_avatars'] == '1' && $forum_user['show_avatars'] != '0')
  139.                         {
  140.                             $forum_page['avatar_markup'] = generate_avatar_markup($cur_post['poster_id']);
  141.  
  142.                             if (!empty($forum_page['avatar_markup']))
  143.                                 $forum_page['author_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>';
  144.                         }
  145.  
  146.                         $forum_page['author_ident']['username'] = '<li class="username">'.(($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['username']).'</a>' : '<strong>'.forum_htmlencode($cur_post['username']).'</strong>').'</li>';
  147.                         $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($cur_post).'</span></li>';
  148.  
  149.                         if ($cur_post['is_online'] == $cur_post['poster_id'])
  150.                             $forum_page['author_ident']['status'] = '<li class="userstatus"><span>'.$lang_topic['Online'].'</span></li>';
  151.                         else
  152.                             $forum_page['author_ident']['status'] = '<li class="userstatus"><span>'.$lang_topic['Offline'].'</span></li>';
  153.                     }
  154.                     else
  155.                     {
  156.                         $forum_page['author_ident']['username'] = '<li class="username"><strong>'.forum_htmlencode($cur_post['username']).'</strong></li>';
  157.                         $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($cur_post).'</span></li>';
  158.                     }
  159.                 }
  160.  
  161.                 if (isset($user_data_cache[$cur_post['poster_id']]['author_info']))
  162.                     $forum_page['author_info'] = $user_data_cache[$cur_post['poster_id']]['author_info'];
  163.                 else
  164.                 {
  165.                     // Generate author information
  166.                     if ($cur_post['poster_id'] > 1)
  167.                     {
  168.                         if ($forum_config['o_show_user_info'] == '1')
  169.                         {
  170.                             if ($cur_post['location'] != '')
  171.                             {
  172.                                 if ($forum_config['o_censoring'] == '1')
  173.                                     $cur_post['location'] = censor_words($cur_post['location']);
  174.  
  175.                                 $forum_page['author_info']['from'] = '<li><span>'.$lang_topic['From'].' <strong>'.forum_htmlencode($cur_post['location']).'</strong></span></li>';
  176.                             }
  177.  
  178.                             $forum_page['author_info']['registered'] = '<li><span>'.$lang_topic['Registered'].' <strong>'.format_time($cur_post['registered'], 1).'</strong></span></li>';
  179.  
  180.                             if ($forum_config['o_show_post_count'] == '1' || $forum_user['is_admmod'])
  181.                                 $forum_page['author_info']['posts'] = '<li><span>'.$lang_topic['Posts info'].' <strong>'.forum_number_format($cur_post['num_posts']).'</strong></span></li>';
  182.                         }
  183.  
  184.                         if ($forum_user['is_admmod'])
  185.                         {
  186.                             if ($cur_post['admin_note'] != '')
  187.                                 $forum_page['author_info']['note'] = '<li><span>'.$lang_topic['Note'].' <strong>'.forum_htmlencode($cur_post['admin_note']).'</strong></span></li>';
  188.                         }
  189.                     }
  190.                 }
  191.  
  192.                 // Generate IP information for moderators/administrators
  193.                 if ($forum_user['is_admmod'])
  194.                     $forum_page['author_info']['ip'] = '<li><span>'.$lang_topic['IP'].' <a href="'.forum_link($forum_url['get_host'], $cur_post['id']).'">'.$cur_post['poster_ip'].'</a></span></li>';
  195.  
  196.                 // Generate author contact details
  197.                 if ($forum_config['o_show_user_info'] == '1')
  198.                 {
  199.                     if (isset($user_data_cache[$cur_post['poster_id']]['post_contacts']))
  200.                         $forum_page['post_contacts'] = $user_data_cache[$cur_post['poster_id']]['post_contacts'];
  201.                     else
  202.                     {
  203.                         if ($cur_post['poster_id'] > 1)
  204.                         {
  205.                             if ($cur_post['url'] != '')
  206.                                 $forum_page['post_contacts']['url'] = '<span class="user-url'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a class="external" href="'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($cur_post['url']) : $cur_post['url']).'">'.sprintf($lang_topic['Visit website'], '<span>'.sprintf($lang_topic['User possessive'], forum_htmlencode($cur_post['username'])).'</span>').'</a></span>';
  207.                             if ((($cur_post['email_setting'] == '0' && !$forum_user['is_guest']) || $forum_user['is_admmod']) && $forum_user['g_send_email'] == '1')
  208.                                 $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['email']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
  209.                             else if ($cur_post['email_setting'] == '1' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')
  210.                                 $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['email'], $cur_post['poster_id']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
  211.                         }
  212.                         else
  213.                         {
  214.                             if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1')
  215.                                 $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span>&#160;'.forum_htmlencode($cur_post['username']).'</span></a></span>';
  216.                         }
  217.                     }
  218.  
  219.                     ($hook = get_hook('vt_row_pre_post_contacts_merge')) ? eval($hook) : null;
  220.  
  221.                     if (!empty($forum_page['post_contacts']))
  222.                         $forum_page['post_options']['contacts'] = '<p class="post-contacts">'.implode(' ', $forum_page['post_contacts']).'</p>';
  223.                 }
  224.  
  225.                 // Generate the post options links
  226.                 if (!$forum_user['is_guest'])
  227.                 {
  228.                     $forum_page['post_actions']['report'] = '<span class="report-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['report'], $cur_post['id']).'">'.$lang_topic['Report'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  229.  
  230.                     if (!$forum_page['is_admmod'])
  231.                     {
  232.                         if ($cur_topic['closed'] == '0')
  233.                         {
  234.                             if ($cur_post['poster_id'] == $forum_user['id'])
  235.                             {
  236.                                 if (($forum_page['start_from'] + $forum_page['item_count']) == 1 && $forum_user['g_delete_topics'] == '1')
  237.                                     $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>';
  238.                                 if (($forum_page['start_from'] + $forum_page['item_count']) > 1 && $forum_user['g_delete_posts'] == '1')
  239.                                     $forum_page['post_actions']['delete'] = '<span class="delete-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  240.                                 if ($forum_user['g_edit_posts'] == '1')
  241.                                     $forum_page['post_actions']['edit'] = '<span class="edit-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  242.                             }
  243.  
  244.                             if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1')
  245.                                 $forum_page['post_actions']['quote'] = '<span class="quote-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  246.                         }
  247.                     }
  248.                     else
  249.                     {
  250.                         if (($forum_page['start_from'] + $forum_page['item_count']) == 1)
  251.                             $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>';
  252.                         else
  253.                             $forum_page['post_actions']['delete'] = '<span class="delete-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  254.  
  255.                         $forum_page['post_actions']['edit'] = '<span class="edit-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  256.                         $forum_page['post_actions']['quote'] = '<span class="quote-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  257.                     }
  258.                 }
  259.                 else
  260.                 {
  261.                     if ($cur_topic['closed'] == '0')
  262.                     {
  263.                         if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1')
  264.                             $forum_page['post_actions']['quote'] = '<span class="report-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
  265.                     }
  266.                 }
  267.  
  268.                 ($hook = get_hook('vt_row_pre_post_actions_merge')) ? eval($hook) : null;
  269.  
  270.                 if (!empty($forum_page['post_actions']))
  271.                     $forum_page['post_options']['actions'] = '<p class="post-actions">'.implode(' ', $forum_page['post_actions']).'</p>';
  272.  
  273.                 // Give the post some class
  274.                 $forum_page['item_status'] = array(
  275.                     'post',
  276.                     ($forum_page['item_count'] % 2 != 0) ? 'odd' : 'even'
  277.                 );
  278.  
  279.                 if ($forum_page['item_count'] == 1)
  280.                     $forum_page['item_status']['firstpost'] = 'firstpost';
  281.  
  282.                 if (($forum_page['start_from'] + $forum_page['item_count']) == $forum_page['finish_at'])
  283.                     $forum_page['item_status']['lastpost'] = 'lastpost';
  284.  
  285.                 if ($cur_post['id'] == $cur_topic['first_post_id'])
  286.                     $forum_page['item_status']['topicpost'] = 'topicpost';
  287.                 else
  288.                     $forum_page['item_status']['replypost'] = 'replypost';
  289.  
  290.  
  291.                 // Generate the post title
  292.                 if ($cur_post['id'] == $cur_topic['first_post_id'])
  293.                     $forum_page['item_subject'] = sprintf($lang_topic['Topic title'], $cur_topic['subject']);
  294.                 else
  295.                     $forum_page['item_subject'] = sprintf($lang_topic['Reply title'], $cur_topic['subject']);
  296.  
  297.                 $forum_page['item_subject'] = forum_htmlencode($forum_page['item_subject']);
  298.  
  299.                 // Perform the main parsing of the message (BBCode, smilies, censor words etc)
  300.                 $forum_page['message']['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
  301.  
  302.                 if ($cur_post['edited'] != '')
  303.                     $forum_page['message']['edited'] = '<p class="lastedit"><em>'.sprintf($lang_topic['Last edited'], forum_htmlencode($cur_post['edited_by']), format_time($cur_post['edited'])).'</em></p>';
  304.  
  305.                 // Do signature parsing/caching
  306.                 if ($cur_post['signature'] != '' && $forum_user['show_sig'] != '0' && $forum_config['o_signatures'] == '1')
  307.                 {
  308.                     if (!isset($signature_cache[$cur_post['poster_id']]))
  309.                         $signature_cache[$cur_post['poster_id']] = parse_signature($cur_post['signature']);
  310.  
  311.                     $forum_page['message']['signature'] = '<div class="sig-content"><span class="sig-line"><!-- --></span>'.$signature_cache[$cur_post['poster_id']].'</div>';
  312.                 }
  313.                 ?>
  314.                 <div class="<?php echo implode(' ', $forum_page['item_status']) ?>">
  315.                     <div id="p<?php echo $cur_post['id'] ?>" class="posthead">
  316.                         <h3 class="hn post-ident"><?php echo implode(' ', $forum_page['post_ident']) ?></h3>
  317.                     </div>
  318.                     <div class="postbody<?php echo ($cur_post['is_online'] == $cur_post['poster_id']) ? ' online' : '' ?>">
  319.                         <div class="post-author">
  320.                             <ul class="author-ident">
  321.                                 <?php echo implode("\n\t\t\t\t\t\t", $forum_page['author_ident'])."\n" ?>
  322.                             </ul>
  323.                             <ul class="author-info">
  324.                                 <?php echo implode("\n\t\t\t\t\t\t", $forum_page['author_info'])."\n" ?>
  325.                             </ul>
  326.                         </div>
  327.                         <div class="post-entry">
  328.                             <h4 id="pc<?php echo $cur_post['id'] ?>" class="entry-title hn"><?php echo $forum_page['item_subject'] ?></h4>
  329.                             <div class="entry-content">
  330.                                 <?php echo implode("\n\t\t\t\t\t\t", $forum_page['message'])."\n" ?>
  331.                             </div>
  332.                         </div>
  333.                     </div>
  334.                     <div class="postfoot">
  335.                         <div class="post-options">
  336.                             <?php
  337.                                 AR_getRating($cur_post['id'], $forum_page['post_options'], $forum_user['is_guest']);
  338.                                 echo implode("\n\t\t\t\t\t", $forum_page['post_options'])."\n";
  339.                             ?>
  340.                         </div>
  341.                     </div>
  342.                 </div>
  343.                 <?php
  344.             }
  345.         ?>
  346.     </div>
  347.     <?php
  348.     $tpl_temp = forum_trim(ob_get_contents());
  349.     $tpl_main = str_replace('<!-- forum_main -->', $tpl_temp, $tpl_main);
  350.     ob_end_clean();
  351.     // END SUBST - <!-- forum_main -->
  352.    
  353.     require FORUM_ROOT.'footer.php';
  354. }
  355. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement