<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB по-русски &mdash; Reputation mod 2.0.1]]></title>
		<link>http://punbb.ru/topic160-reputation-mod-201.html</link>
		<atom:link href="http://punbb.ru/feed-rss-topic160.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Reputation mod 2.0.1».]]></description>
		<lastBuildDate>Sun, 22 Mar 2009 12:49:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post23084.html#p23084</link>
			<description><![CDATA[<p>Благодарю!</p>]]></description>
			<author><![CDATA[null@example.com (khaan)]]></author>
			<pubDate>Sun, 22 Mar 2009 12:49:08 +0000</pubDate>
			<guid>http://punbb.ru/post23084.html#p23084</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post23067.html#p23067</link>
			<description><![CDATA[<p>Удали строку<br /></p><div class="codebox"><pre><code>&lt;a href=&quot;./reputation.php?&lt;?php echo $repdataminus; ?&gt;&quot;&gt;&lt;img src=&quot;./img/warn_minus.gif&quot; alt=&quot;-&quot; border=&quot;0&quot;&gt;&lt;/a&gt;</code></pre></div><p>в файле include/reputation/rep_viewtopic.php</p>]]></description>
			<author><![CDATA[null@example.com (hcs)]]></author>
			<pubDate>Sat, 21 Mar 2009 14:42:37 +0000</pubDate>
			<guid>http://punbb.ru/post23067.html#p23067</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post23064.html#p23064</link>
			<description><![CDATA[<p>Здравствуйте, возможно ли убрать &quot;-&quot; (минус) из репутации?<br />Можно просто убрать на него ссылку?</p>]]></description>
			<author><![CDATA[null@example.com (khaan)]]></author>
			<pubDate>Sat, 21 Mar 2009 12:05:31 +0000</pubDate>
			<guid>http://punbb.ru/post23064.html#p23064</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post22403.html#p22403</link>
			<description><![CDATA[<p>Спасибо хороший мод , установил на свой форум <img src="http://punbb.ru/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Ximera)]]></author>
			<pubDate>Fri, 30 Jan 2009 17:56:45 +0000</pubDate>
			<guid>http://punbb.ru/post22403.html#p22403</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post20302.html#p20302</link>
			<description><![CDATA[<p>Спасибо, теперь вроде все понятно!</p>]]></description>
			<author><![CDATA[null@example.com (mixar)]]></author>
			<pubDate>Sat, 25 Oct 2008 19:08:21 +0000</pubDate>
			<guid>http://punbb.ru/post20302.html#p20302</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post20289.html#p20289</link>
			<description><![CDATA[<p>В профиле не должен отображаться. В профиле можно отказаться от использования рейтинга конкретным юзером.</p>]]></description>
			<author><![CDATA[null@example.com (coordinator)]]></author>
			<pubDate>Fri, 24 Oct 2008 19:00:39 +0000</pubDate>
			<guid>http://punbb.ru/post20289.html#p20289</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post20287.html#p20287</link>
			<description><![CDATA[<p>Странно, в папке include/reputation/ 2 файла:<br />rep_viewtopic.php<br />rep_profile.php</p><p>тогда зачем второй нужен?</p><p>И еще, хотелось бы узнать, что нового в 2.2.4, у меня 2.2.3 оказывается стоит с панреса. Стоит ли обновиться, если да, то где скачать?</p>]]></description>
			<author><![CDATA[null@example.com (mixar)]]></author>
			<pubDate>Fri, 24 Oct 2008 17:10:33 +0000</pubDate>
			<guid>http://punbb.ru/post20287.html#p20287</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post20283.html#p20283</link>
			<description><![CDATA[<p>Не должен. Это можно сделать, в теме есть решения, но в мод они не включены.</p>]]></description>
			<author><![CDATA[null@example.com (hcs)]]></author>
			<pubDate>Fri, 24 Oct 2008 16:19:41 +0000</pubDate>
			<guid>http://punbb.ru/post20283.html#p20283</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post20278.html#p20278</link>
			<description><![CDATA[<p>А в профиле должен указываться рейтинг? Я ставил 2.2.4 но в профиле у человека не указывается рейтинг.</p>]]></description>
			<author><![CDATA[null@example.com (mixar)]]></author>
			<pubDate>Fri, 24 Oct 2008 09:30:07 +0000</pubDate>
			<guid>http://punbb.ru/post20278.html#p20278</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post20256.html#p20256</link>
			<description><![CDATA[<p>У меня ошибочно работает определение количества постов для выставления рейтинга.<br />Берется наибольшее. Если я ставлю 5 сообщения для возможности выставить минус и 1 для положительного рейтинга, то положительный выставить возможно только после 5 постов, а не одного.</p><p>Лечение здесь:<br /><a href="http://punbb.ru/viewtopic.php?pid=16340#p16340">http://punbb.ru/viewtopic.php?pid=16340#p16340</a><br />Странно, что не исправлено в моде 2.2.4</p>]]></description>
			<author><![CDATA[null@example.com (coordinator)]]></author>
			<pubDate>Sun, 19 Oct 2008 10:04:08 +0000</pubDate>
			<guid>http://punbb.ru/post20256.html#p20256</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post19606.html#p19606</link>
			<description><![CDATA[<p>Спасибо вам огромное, все супер.</p>]]></description>
			<author><![CDATA[null@example.com (vvsh)]]></author>
			<pubDate>Tue, 19 Aug 2008 07:28:06 +0000</pubDate>
			<guid>http://punbb.ru/post19606.html#p19606</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post19596.html#p19596</link>
			<description><![CDATA[<div class="codebox"><pre><code>&lt;?php
/******************************************************************************************************
        Reputation Plugin for PunBB
        ----------------------------
-- Version 2.2.4
-- (c) Copyright 2006-2008 hcs  hcs---mail.ru

-- GPL:
  This software is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  This software is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA
******************************************************************************************************/



define(&#039;PUN_ROOT&#039;, &#039;./&#039;);

require PUN_ROOT.&#039;include/common.php&#039;;
require PUN_ROOT.&#039;include/parser.php&#039;;



require PUN_ROOT.&#039;lang/&#039;.$pun_user[&#039;language&#039;].&#039;/reputation.php&#039;;

if ($pun_user[&#039;g_rep_enable&#039;] == 0)
    message($lang_reputation[&#039;Group Disabled&#039;]);
if ($pun_user[&#039;reputation_enable_adm&#039;] == 0)
    message($lang_reputation[&#039;Individual Disabled&#039;]);
if ($pun_config[&#039;o_reputation_enabled&#039;] == 0)
    message($lang_reputation[&#039;Disabled&#039;]);
if ($pun_user[&#039;reputation_enable&#039;] == 0)
    message($lang_reputation[&#039;Your Disabled&#039;]);
    
$page_title = $lang_reputation[&#039;Reputation&#039;];
$is_admmod = ($pun_user[&#039;g_id&#039;] == PUN_ADMIN || $pun_user[&#039;g_id&#039;] == PUN_MOD) ? true : false;        

if (isset($_POST[&#039;form_sent&#039;]))
{

    if (isset($_POST[&#039;delete_rep_id&#039;])) 
    {
        if ($pun_user[&#039;g_id&#039;] == PUN_ADMIN || $pun_user[&#039;g_id&#039;] == PUN_MOD) {
            $uid = intval($_GET[&#039;uid&#039;]);
            $p = intval($_GET[&#039;p&#039;]);
            if ($uid&lt;2)
                message($lang_common[&#039;Bad request&#039;]);
                
            $idlist = implode(&#039;,&#039;,  array_map(&#039;intval&#039;, array_values($_POST[&#039;delete_rep_id&#039;])));
            confirm_referrer(&#039;reputation.php&#039;);

            // Delete reputation 

            $db-&gt;query(&#039;DELETE FROM &#039;.$db-&gt;prefix.&#039;reputation WHERE id IN(&#039;.$idlist.&#039;)&#039;) or error(&#039;Unable to delete reputation data.&#039;, __FILE__, __LINE__, $db-&gt;error());

            $result = $db-&gt;query(&#039;SELECT SUM(rep_plus) AS plus, SUM(rep_minus) AS minus FROM &#039;.$db-&gt;prefix.&#039;reputation WHERE user_id=&#039;. $uid.&#039;  GROUP BY user_id &#039;) or error(&#039;Unable to counting rep&#039;, __FILE__, __LINE__, $db-&gt;error());
            
            if     (!$db-&gt;num_rows($result)) {
                $rep[&#039;plus&#039;] = 0;
                $rep[&#039;minus&#039;] = 0;
            } else 
                $rep =$db-&gt;fetch_assoc($result);
            $db-&gt;query(&#039;UPDATE &#039;.$db-&gt;prefix.&#039;users SET rep_plus=&#039;.$rep[&#039;plus&#039;].&#039;,rep_minus=&#039;.$rep[&#039;minus&#039;].&#039; WHERE  id=&#039;.$uid)  or error(&#039;Unable to update rep fo user&#039;, __FILE__, __LINE__, $db-&gt;error());

            redirect(&#039;reputation.php?uid=&#039;.$uid.&#039;&amp;p=&#039;.$p, $lang_reputation[&#039;Deleted redirect&#039;]);
        }
        else
        {
        message($lang_common[&#039;No permission&#039;]);
        }
    }

    
    
    if ($pun_user[&#039;is_guest&#039;] &amp;&amp; $pun_config[&#039;o_rep_guest_enabled&#039;] == 0)
        message($lang_common[&#039;No permission&#039;]);
    
    $pid = isset($_POST[&#039;pid&#039;]) ? intval($_POST[&#039;pid&#039;]) : message($lang_common[&#039;Bad request&#039;]);
    $poster = isset($_POST[&#039;poster&#039;]) ? $_POST[&#039;poster&#039;] : message($lang_common[&#039;Bad request&#039;]);    
    $method = isset($_POST[&#039;method&#039;]) ? intval($_POST[&#039;method&#039;]) : message($lang_common[&#039;Bad request&#039;]);    
    
    if ($method!=2 &amp;&amp; $method!=1)
        message($lang_common[&#039;Bad request&#039;]);
    
    $result = $db-&gt;query(&#039;SELECT p.poster, p.poster_id, p.posted, p.id, p.topic_id, t.subject, u.reputation_enable, r.time FROM &#039;.$db-&gt;prefix.&#039;posts AS p INNER JOIN &#039;.$db-&gt;prefix.&#039;topics AS t ON p.topic_id=t.id INNER JOIN &#039;.$db-&gt;prefix.&#039;users AS u ON p.poster_id = u.id LEFT JOIN &#039;.$db-&gt;prefix.&#039;reputation AS r ON (r.from_user_id =&#039;.$pun_user[&quot;id&quot;] .&#039; AND  r.user_id = u.id) WHERE p.id=&#039;.$pid.&#039; AND p.poster=&quot;&#039;. $db-&gt;escape($poster) .&#039;&quot; ORDER BY r.time DESC LIMIT 0 , 1&#039;) or error(&#039;Unable to fetch post info&#039;, __FILE__, __LINE__, $db-&gt;error());
    
    if (!$db-&gt;num_rows($result))
        message($lang_common[&#039;Bad request&#039;]);
    $target = $db-&gt;fetch_assoc($result);

    //Check last reputation point given timestamp
    if ($target[&#039;time&#039;])
    {
        if($pun_config[&#039;o_reputation_timeout&#039;]*60 &gt; (time()-$target[&#039;time&#039;]))
              message($lang_reputation[&#039;Timeout 1&#039;].$pun_config[&#039;o_reputation_timeout&#039;].$lang_reputation[&#039;Timeout 2&#039;]);
    }
    

    if ($target[&#039;reputation_enable&#039;]!=1)
        message($lang_reputation[&#039;User Disable&#039;]);
    
    // Prevent people from voting for themselves via URL hacking.
    if ($pun_user[&quot;id&quot;] == $target[&quot;poster_id&quot;])
        message($lang_reputation[&#039;Silly user&#039;]);    
        
    if ((($pun_user[&#039;g_rep_minus_min&#039;] &gt; $pun_user[&#039;num_posts&#039;]) &amp;&amp; ($method=2) ) || (($pun_user[&#039;g_rep_plus_min&#039;] &gt;  $pun_user[&#039;num_posts&#039;]) &amp;&amp; ($method=1) ))
        message($lang_reputation[&#039;Small Number of post&#039;]);
            
    // Clean up message from POST
    $message = pun_linebreaks(pun_trim($_POST[&#039;req_message&#039;]));

    // Check message
    if ($message == &#039;&#039;)
        message($lang_reputation[&#039;No message&#039;]);
    else if (strlen($message) &gt; 400)
        message($lang_reputation[&#039;Too long message&#039;]);
    else if ($pun_config[&#039;p_message_all_caps&#039;] == &#039;0&#039; &amp;&amp; pun_strtoupper($message) == $message &amp;&amp; $pun_user[&#039;g_id&#039;] &gt; PUN_GUEST)
        $message = ucwords(pun_strtolower($message));

        
    // Validate BBCode syntax
    if ($pun_config[&#039;p_message_bbcode&#039;] == &#039;1&#039; &amp;&amp; strpos($message, &#039;[&#039;) !== false &amp;&amp; strpos($message, &#039;]&#039;) !== false)
        $message = preparse_bbcode($message, $errors);
            
    $message = addslashes($message);            
    if (isset($errors))
        message($errors[0]);
    if($method == 1)
    {    $rep_column=&quot;rep_plus&quot;;}
    else 
    {$rep_column=&quot;rep_minus&quot;;}
    //Add voice
    $db-&gt;query(&quot;INSERT INTO &quot;.$db-&gt;prefix.&quot;reputation (user_id, from_user_id, time, post_id, reason, topics_id, &quot;. $rep_column .&quot;) Values (&#039;&quot;. $target[&#039;poster_id&#039;] . &quot;&#039;, &#039;&quot; . $pun_user[&quot;id&quot;] .&quot;&#039;, &#039;&quot; . mktime() . &quot;&#039;, &#039;&quot; . $target[&#039;id&#039;] .&quot;&#039;, &#039;&quot; . $message . &quot;&#039;, &#039;&quot;. $target[&#039;topic_id&#039;] . &quot;&#039;, &#039;1&#039; )&quot;) or error(&#039;Unable to add reputation info&#039;, __FILE__, __LINE__, $db-&gt;error());

    $db-&gt;query(&#039;UPDATE &#039;.$db-&gt;prefix.&#039;users SET &#039;.$rep_column.&#039;=&#039;.$rep_column.&#039;+1 WHERE  id=&#039;.$target[&#039;poster_id&#039;]);

    
    redirect(&#039;viewtopic.php?&amp;pid=&#039; .$pid .&#039;#p&#039; .$pid , $lang_reputation[&#039;Redirect Message&#039;]);
}

if ( isset($_GET[&#039;uid&#039;]) &amp;&amp; !isset($_GET[&#039;method&#039;])) 
{
    require PUN_ROOT.&#039;header.php&#039;;    
    $uid = intval($_GET[&#039;uid&#039;]);
    if ($uid&lt;2)
        message($lang_common[&#039;Bad request&#039;]);
    
    $result = $db-&gt;query(&#039;SELECT u.username, u.rep_plus AS count_rep_plus, u.rep_minus AS count_rep_minus FROM &#039;.$db-&gt;prefix.&#039;users AS u LEFT JOIN &#039;.$db-&gt;prefix.&#039;reputation as r ON r.user_id=u.id WHERE u.id=&#039;.$uid.&#039; GROUP by u.id&#039;) or error(&#039;Unable to fetch post info&#039;, __FILE__, __LINE__, $db-&gt;error());
    if (!$db-&gt;num_rows($result))
        message($lang_common[&#039;Bad request&#039;]);
    $user_rep =$db-&gt;fetch_assoc($result);

    $result = $db-&gt;query(&#039;SELECT COUNT(*) FROM &#039;.$db-&gt;prefix.&#039;reputation WHERE user_id=&#039;.$uid) or error(&#039;Unable to fetch post info&#039;, __FILE__, __LINE__, $db-&gt;error());    
    list($num_rows) = $db-&gt;fetch_row($result);
    if ($num_rows&gt;0)
    {
        $num_pages = ceil(($num_rows + 1) / $pun_user[&#039;disp_posts&#039;]);
        $p = (!isset($_GET[&#039;p&#039;]) || $_GET[&#039;p&#039;] &lt;= 1 || $_GET[&#039;p&#039;] &gt; $num_pages) ? 1 : $_GET[&#039;p&#039;];
        $start_from = $pun_user[&#039;disp_posts&#039;] * ($p - 1);
        $paging_links = $lang_common[&#039;Pages&#039;].&#039;: &#039;.paginate($num_pages, $p, &#039;reputation.php?uid=&#039;.$uid);
        $result = $db-&gt;query(&#039;SELECT r.id, r.time, r.reason, r.post_id, r.rep_plus, r.rep_minus, r.user_id, t.subject, u2.username as from_user_name, u2.id as from_user_id FROM &#039;.$db-&gt;prefix.&#039;reputation AS r LEFT JOIN &#039;.$db-&gt;prefix.&#039;users AS u ON r.user_id = u.id LEFT JOIN &#039;.$db-&gt;prefix.&#039;topics AS t ON t.id=r.topics_id LEFT JOIN &#039;.$db-&gt;prefix.&#039;users AS u2 ON r.from_user_id = u2.id WHERE u.id=&#039;.$uid.&#039; ORDER BY r.time DESC LIMIT &#039;.$start_from.&#039;,&#039;.$pun_user[&#039;disp_posts&#039;]) or error(&#039;Unable to fetch post info&#039;, __FILE__, __LINE__, $db-&gt;error());
        
        $form_del = &quot;\t\t\t\t&quot;.&#039;&lt;form action=&quot;reputation.php?p=&#039;.$p.&#039;&amp;uid=&#039;.$uid.&#039;&quot; method=&quot;post&quot; name=&quot;del_rep&quot;&gt;&#039;;
        $form_end = &quot;\t\t\t\t&quot;.&#039;&lt;/form&gt;&#039;;
        if ($is_admmod)    
            echo $form_del . &quot;\n&quot;. &quot;\t\t\t\t&quot;.&#039;&lt;input type=&quot;hidden&quot; name=&quot;form_sent&quot; value=&quot;1&quot; /&gt;&#039;.&quot;\n&quot;;
?&gt;

&lt;div class=&quot;postlinksb&quot;&gt;
    &lt;div class=&quot;inbox&quot;&gt;
        &lt;p class=&quot;pagelink conl&quot;&gt;&lt;?php echo $paging_links ?&gt;&lt;/p&gt;
        &lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;?php echo $lang_reputation[&#039;User reputation&#039;]. pun_htmlspecialchars($user_rep[&#039;username&#039;]) . &#039;&amp;nbsp;&amp;nbsp;&lt;strong&gt;[+&#039;. $user_rep[&#039;count_rep_plus&#039;] . &#039; / -&#039; . $user_rep[&#039;count_rep_minus&#039;] .&#039;] &amp;nbsp;&lt;/strong&gt;&#039; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div class=&quot;inbox&quot;&gt;
            &lt;table cellspacing=&quot;0&quot;&gt;
            &lt;thead&gt;
                &lt;tr&gt;
                &lt;th class=&quot;tc3&quot; style=&quot;width:15%&quot;&gt;&lt;?php echo $lang_reputation[&#039;From user&#039;] ?&gt;&lt;/th&gt;
                &lt;th class=&quot;tc3&quot; style=&quot;width:15%&quot;&gt;&lt;?php echo $lang_reputation[&#039;For topic&#039;] ?&gt;&lt;/th&gt;
                &lt;th class=&quot;tc3&quot;  style=&quot;width:&lt;?php if ($is_admmod){ echo &#039;35&#039;; }else {echo &#039;45&#039;;} ?&gt;%&quot;&gt;&lt;?php echo $lang_reputation[&#039;Reason&#039;] ?&gt;&lt;/th&gt;
                &lt;th class=&quot;tc3&quot; style=&quot;width:10%; text-align:center;&quot;&gt;&lt;?php echo $lang_reputation[&#039;Estimation&#039;] ?&gt;&lt;/th&gt;
                &lt;th class=&quot;tc3&quot; style=&quot;width:15%&quot;&gt;&lt;?php echo $lang_reputation[&#039;Date&#039;] ?&gt;&lt;/th&gt;
                &lt;?php if ($is_admmod) echo &#039;&lt;th class=&quot;tc3&quot; style=&quot;width:10%&quot;&gt;&#039;.$lang_reputation[&#039;Delete&#039;].&#039;&lt;/th&gt;&#039;; ?&gt;
                &lt;/tr&gt;
                &lt;tbody&gt;
&lt;?php
        while ($cur_rep = $db-&gt;fetch_assoc($result))
        {
            $cur_rep[&#039;reason&#039;]= parse_message($cur_rep[&#039;reason&#039;], 0);
?&gt;
                    &lt;tr&gt;                    
                        &lt;td&gt;&lt;?php echo $cur_rep[&#039;from_user_name&#039;] ? &#039;&lt;a href=&quot;reputation.php?uid=&#039; . $cur_rep[&#039;from_user_id&#039;] . &#039;&quot;&gt;&#039;. pun_htmlspecialchars($cur_rep[&#039;from_user_name&#039;]).&#039;&lt;/a&gt;&#039; :  $lang_reputation[&#039;Profile deleted&#039;] ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $cur_rep[&#039;subject&#039;] ? &#039;&lt;a href=&quot;viewtopic.php?pid=&#039; . $cur_rep[&#039;post_id&#039;] . &#039;#p&#039;. $cur_rep[&#039;post_id&#039;] . &#039;&quot;&gt;&#039;.pun_htmlspecialchars($cur_rep[&#039;subject&#039;]).&#039;&lt;/a&gt;&#039; : $lang_reputation[&#039;Removed or deleted&#039;] ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo $cur_rep[&#039;reason&#039;] ?&gt;&lt;/td&gt;
                        &lt;td style=&quot;text-align:center;&quot;&gt;&lt;?php echo $cur_rep[&#039;rep_plus&#039;]==1 ? &#039;&lt;img src=&quot;./img/warn_add.gif&quot; alt=&quot;+&quot; border=&quot;0&quot;&gt;&#039; : &#039;&lt;img src=&quot;./img/warn_minus.gif&quot; alt=&quot;-&quot; border=&quot;0&quot;&gt;&#039;; ?&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;?php echo format_time($cur_rep[&#039;time&#039;]) ?&gt;&lt;/td&gt;
                        &lt;?php if ($is_admmod) echo &#039;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;delete_rep_id[]&quot; value=&quot;&#039;.$cur_rep[&#039;id&#039;].&#039;&quot;&gt;&lt;/td&gt;&#039;; ?&gt;                        
                    &lt;/tr&gt;
&lt;?php
        }
    }
    else 
    { 
?&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;?php echo $lang_reputation[&#039;User reputation&#039;]. pun_htmlspecialchars($user_rep[&#039;username&#039;]) . &#039;&amp;nbsp;&amp;nbsp;&lt;strong&gt;[+&#039;. $user_rep[&#039;count_rep_plus&#039;] . &#039; / -&#039; . $user_rep[&#039;count_rep_minus&#039;] .&#039;] &amp;nbsp;&lt;/strong&gt;&#039; ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;
        &lt;div class=&quot;inbox&quot;&gt;
            &lt;table cellspacing=&quot;0&quot; style=&quot;table-layout:fixed&quot;&gt;
                &lt;tbody&gt;
                    &lt;tr&gt;&lt;td &gt;&lt;?php echo $lang_reputation[&#039;No reputation&#039;] ?&gt;&lt;/td&gt;&lt;/tr&gt;    
&lt;?php    
    }
    if ($pun_user[&#039;is_guest&#039;]) echo &quot;\t\t\t\t\t&quot;.&#039;&lt;tr&gt;&lt;td colspan=&quot;5&quot; style=&quot;text-align:right;&quot;&gt;&#039;.base64_decode(&#039;PGEgaHJlZj0iaHR0cDovL3B1bmJiLnJ1Ij5SZXB1dGF0aW9uIHN5c3RlbSBmb3IgUHVuQkI8L2E+&#039;).&#039;&lt;/td&gt;&lt;/tr&gt;&#039;.&quot;\n&quot;;
?&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;postlinksb&quot;&gt;
    &lt;div class=&quot;inbox&quot;&gt;
&lt;?php if ($num_rows&gt;0) :?&gt;        
        &lt;p class=&quot;pagelink conl&quot;&gt;&lt;?php echo $paging_links ?&gt;&lt;/p&gt;
&lt;?php if ($is_admmod)    { ?&gt;
        &lt;p class=&quot;postlink conr&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;del_rep&quot; value=&quot;Delete&quot; onclick=&quot;return confirm(&#039;&lt;?php echo $lang_reputation[&#039;Are you sure&#039;]; ?&gt;&#039;)&quot; /&gt;&lt;/p&gt;
&lt;?php } ?&gt;
&lt;?php endif; ?&gt;
        &lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;?php
require PUN_ROOT.&#039;footer.php&#039;;
}

else 

{

if (empty($_GET[&#039;pid&#039;]) ||     empty($_GET[&#039;method&#039;]) || empty($_GET[&#039;uid&#039;]) )
    message($lang_common[&#039;Bad request&#039;]);
    
if ($pun_user[&#039;is_guest&#039;])
    message($lang_common[&#039;No permission&#039;]);

$pid = intval($_GET[&#039;pid&#039;]); 
$method = intval($_GET[&#039;method&#039;]); 
$uid = intval($_GET[&#039;uid&#039;]);

// Prevent people from voting for themselves via URL hacking.
if ($pun_user[&#039;id&#039;] == $uid)
    message($lang_reputation[&#039;Silly user&#039;]);


if (($method!=1) &amp;&amp; ($method!=2))
    message($lang_common[&#039;Bad request&#039;]);

$result = $db-&gt;query(&#039;SELECT r.time, u.username FROM &#039;.$db-&gt;prefix.&#039;users AS u LEFT JOIN &#039;.$db-&gt;prefix.&#039;reputation AS r ON ( r.user_id=&#039;.$uid.&#039; AND r.from_user_id=&#039;.$pun_user[&quot;id&quot;].&#039; ) WHERE u.id=&#039;.$uid.&#039; ORDER BY r.time DESC LIMIT 0 , 1&#039;) or error(&#039;Unable to fetch time last voice info&#039;, __FILE__, __LINE__, $db-&gt;error());


if (!$db-&gt;num_rows($result))
    message($lang_common[&#039;Bad request&#039;]);
$target = $db-&gt;fetch_assoc($result);
//Check last reputation point given timestamp
if ($target[&#039;time&#039;])
{
    if($pun_config[&#039;o_reputation_timeout&#039;]*60 &gt; (time()-$target[&#039;time&#039;]))
             message($lang_reputation[&#039;Timeout 1&#039;].$pun_config[&#039;o_reputation_timeout&#039;].$lang_reputation[&#039;Timeout 2&#039;]);
}

// Prevent people from voting for themselves via URL hacking.
if ($pun_user[&quot;id&quot;] == $uid)
    message($lang_reputation[&#039;Silly user&#039;]);

if ((($pun_user[&#039;g_rep_minus_min&#039;] &gt; $pun_user[&#039;num_posts&#039;]) &amp;&amp; ($method=2) ) || (($pun_user[&#039;g_rep_plus_min&#039;] &gt;  $pun_user[&#039;num_posts&#039;]) &amp;&amp; ($method=1) ))
    message($lang_reputation[&#039;Small Number of post&#039;]);

$poster=pun_htmlspecialchars($target[&#039;username&#039;]);

require PUN_ROOT.&#039;header.php&#039;;
$form = &#039;&lt;form action=&quot;reputation.php?&quot; method=&quot;post&quot; name=&quot;Reput&quot; onSubmit=&quot;return Validate()&quot;&gt;&#039;;
?&gt;

&lt;script language=&quot;javascript&quot;&gt;
&lt;!--
    function Validate() {
        var Max = 100;
        Length = document.Reput.req_message.value.length;
        if (( Length &gt; Max) &amp;&amp; ( Max &gt; 0 )) {
            alert(&quot;&lt;?php echo $lang_reputation[&#039;Max length of message&#039;] ?&gt; &quot; + Max + &quot; &lt;?php echo $lang_reputation[&#039;You already of use&#039;] ?&gt; &quot; + Length + &quot; &lt;?php echo $lang_reputation[&#039;Of symbol&#039;] ?&gt;&quot;);
            return false;
        } else {
            document.Reput.go.disabled = true;
            return true;
        }
    }
// --&gt;
&lt;/script&gt;
&lt;?php echo $form.&quot;\n&quot; ?&gt;
&lt;div class=&quot;blockform&quot;&gt;
    &lt;h2&gt;&lt;span&gt;&lt;?php echo $lang_reputation[&#039;Form header&#039;] ?&gt;&lt;/span&gt;&lt;/h2&gt;
    &lt;div class=&quot;box&quot;&gt;

        &lt;div class=&quot;inbox&quot;&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;form_sent&quot; value=&quot;1&quot; /&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;pid&quot; value=&quot;&lt;?php echo $pid ?&gt;&quot; /&gt;    
            &lt;input type=&quot;hidden&quot; name=&quot;poster&quot; value=&quot;&lt;?php echo $poster ?&gt;&quot; /&gt;    
            &lt;input type=&quot;hidden&quot; name=&quot;method&quot; value=&quot;&lt;?php echo $method ?&gt;&quot; /&gt;        
            &lt;table cellspacing=&quot;0&quot;&gt;
                &lt;tr&gt;
                    &lt;td  class=&quot;tc4&quot; width=&quot;30%&quot;&gt;&lt;?php echo $lang_reputation[&#039;Form your name&#039;] ?&gt;:&lt;/td&gt;
                    &lt;td  class=&quot;tc4&quot; width=&quot;70%&quot;&gt;&lt;?php echo pun_htmlspecialchars($pun_user[&#039;username&#039;]) ?&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td class=&quot;tc4&quot; width=&quot;30%&quot;&gt;&lt;?php echo $lang_reputation[&#039;Form to name&#039;] ?&gt;:&lt;/td&gt;
                    &lt;td class=&quot;tc4&quot; width=&quot;70%&quot;&gt;&lt;?php echo pun_htmlspecialchars($poster) ?&gt;&lt;/td&gt;
                &lt;/tr&gt;
                &lt;tr&gt;
                    &lt;td class=&quot;tc4&quot; width=&quot;30%&quot;&gt;&lt;?php echo $lang_reputation[&#039;Form reason&#039;] ?&gt;:&lt;/td&gt;
                    &lt;td class=&quot;tc4&quot; width=&quot;70%&quot;&gt;&lt;textarea cols=&#039;60&#039; rows=&#039;10&#039; wrap=&#039;soft&#039; name=&quot;req_message&quot; class=&#039;textinput&#039;&gt;&lt;/textarea&gt;&lt;/td&gt;
                &lt;/tr&gt;                
                &lt;tr&gt;
                    &lt;td class=&quot;tc4&quot; width=&quot;30%&quot;&gt;&lt;?php echo $lang_reputation[&#039;Form method&#039;] ?&gt;:&lt;/td&gt;
                    &lt;td class=&quot;tc4&quot; width=&quot;70%&quot;&gt;&lt;?php echo  ($method==1) ? $lang_reputation[&#039;Plus&#039;] : $lang_reputation[&#039;Minus&#039;]; ?&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
            &lt;table cellspacing=&quot;0&quot;&gt;
                &lt;tr&gt;
                    &lt;td  class=&quot;tc4&quot; style=&quot;text-align:center;&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php echo $lang_common[&#039;Submit&#039;] ?&gt;&quot;&gt; : &lt;a href=&quot;javascript:history.go(-1)&quot;&gt;&lt;?php echo $lang_common[&#039;Go back&#039;] ?&gt;&lt;/a&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/form&gt;
&lt;?php
require PUN_ROOT.&#039;footer.php&#039;;
}
?&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (hcs)]]></author>
			<pubDate>Mon, 18 Aug 2008 16:40:47 +0000</pubDate>
			<guid>http://punbb.ru/post19596.html#p19596</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post19592.html#p19592</link>
			<description><![CDATA[<p>В админке все исправил, дайте плиз кто-нить файл reputation.php от Reputation mod 2.0.4, спасибо.<br />Вот какой у меня заголовок в файле репутатион.php:<br /></p><div class="codebox"><pre><code>&lt;br /&gt; &lt;b&gt;Notice&lt;/b&gt;: Undefined variable: page_title in &lt;b&gt;/полный_путь/forum/header.php&lt;/b&gt; on line &lt;b&gt;88&lt;/b&gt;&lt;br /&gt;</code></pre></div><p>И внизу файла пишет:<br /></p><div class="codebox"><pre><code>Notice: Undefined variable: paging_links in /полный_путь/forum/reputation.php on line 242

Notice: Undefined variable: is_admmod in /полный_путь/forum/reputation.php on line 243</code></pre></div><p>как это все исправить?</p>]]></description>
			<author><![CDATA[null@example.com (vvsh)]]></author>
			<pubDate>Sun, 17 Aug 2008 19:37:03 +0000</pubDate>
			<guid>http://punbb.ru/post19592.html#p19592</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post19590.html#p19590</link>
			<description><![CDATA[<p>Как мне от них избавится?</p>]]></description>
			<author><![CDATA[null@example.com (vvsh)]]></author>
			<pubDate>Sun, 17 Aug 2008 17:01:15 +0000</pubDate>
			<guid>http://punbb.ru/post19590.html#p19590</guid>
		</item>
		<item>
			<title><![CDATA[Re: Reputation mod 2.0.1]]></title>
			<link>http://punbb.ru/post19576.html#p19576</link>
			<description><![CDATA[<p>у меня в 2.2.3 выдает в теме после айпи:<br />Notice: Undefined index: reputation_enable in /forum/include/reputation/rep_viewtopic.php on line 28<br />Вы админке там где управление плагином репутация выдает:<br />Notice: Undefined index: o_reputation_enabled in /forum/plugins/AP_Reputation.php on line 282<br />/&gt; Yes&nbsp; &nbsp;<br />Notice: Undefined index: o_reputation_enabled in /forum/plugins/AP_Reputation.php on line 282<br />/&gt; No</p>]]></description>
			<author><![CDATA[null@example.com (vvsh)]]></author>
			<pubDate>Fri, 15 Aug 2008 15:56:44 +0000</pubDate>
			<guid>http://punbb.ru/post19576.html#p19576</guid>
		</item>
	</channel>
</rss>

