 ";
        $repa_plus = "
 ";
        $repa_plus = "  ";
		$tpl->set('{repa}', "".$repa_plus." ".$repa_type." ".$repa_minus."");
	} else {
		$tpl->set('{repa}', "Выкл.");
	}
}
else
{
	$tpl->set('{repa}', " 0");
}
if( $_REQUEST['action'] == "list" ) {
    $user = $db->safesql( htmlspecialchars( urldecode( $_REQUEST['user'] ) ) );
    include_once SYSTEM_DIR.'/data/repa.php';
   	include_once ROOT_DIR . '/language/' . $config['langs'] . '/website_repa.lng';
    if($repa_cf['status']=='no'){
    	msgbox ($lang['all_err_1'], $lang_repa['gen_status_off']);
    }else{
    	$sql_result = $db->query("SELECT * FROM " . USERPREFIX . "_users where name = '$user'");
    	while($row = $db->get_row($sql_result)){
    		$user_found = TRUE;
    		$repa_off = $row['repa_off'];
    	}
    	if ($repa_off == 0){
            $limit = intval($repa_cf['res_site']);
            $pass = $db->super_query("SELECT COUNT(*) as count FROM `" . USERPREFIX . "_reputation` where `komu` = '$user'");
            $posts = $pass['count'];
    	if($posts == 0)
    	{
    		if ($user_found == TRUE)
    		{
                $tpl->load_template('reputation.tpl');
                $tpl->set('{usertitle}',"".$user."");
                $tpl->set('{history_content}', 'Изменений небыло');
    		}
    	}else{
    		$page = intval( $_REQUEST['cstart'] );
            $total = intval( ( ( $posts - 1 ) / $limit ) + 1 );
        	if( $page <= 0 ) $page = 1;
        	if( $page > $total ) $page = $total;
            $start = $page * $limit - $limit;
            $i = $start;
            $result = $db->query("SELECT * FROM `" . USERPREFIX . "_reputation` WHERE `komu`='$user' ORDER BY `date` DESC LIMIT " . $start . "," . $limit);
            $repa_list = "
";
		$tpl->set('{repa}', "".$repa_plus." ".$repa_type." ".$repa_minus."");
	} else {
		$tpl->set('{repa}', "Выкл.");
	}
}
else
{
	$tpl->set('{repa}', " 0");
}
if( $_REQUEST['action'] == "list" ) {
    $user = $db->safesql( htmlspecialchars( urldecode( $_REQUEST['user'] ) ) );
    include_once SYSTEM_DIR.'/data/repa.php';
   	include_once ROOT_DIR . '/language/' . $config['langs'] . '/website_repa.lng';
    if($repa_cf['status']=='no'){
    	msgbox ($lang['all_err_1'], $lang_repa['gen_status_off']);
    }else{
    	$sql_result = $db->query("SELECT * FROM " . USERPREFIX . "_users where name = '$user'");
    	while($row = $db->get_row($sql_result)){
    		$user_found = TRUE;
    		$repa_off = $row['repa_off'];
    	}
    	if ($repa_off == 0){
            $limit = intval($repa_cf['res_site']);
            $pass = $db->super_query("SELECT COUNT(*) as count FROM `" . USERPREFIX . "_reputation` where `komu` = '$user'");
            $posts = $pass['count'];
    	if($posts == 0)
    	{
    		if ($user_found == TRUE)
    		{
                $tpl->load_template('reputation.tpl');
                $tpl->set('{usertitle}',"".$user."");
                $tpl->set('{history_content}', 'Изменений небыло');
    		}
    	}else{
    		$page = intval( $_REQUEST['cstart'] );
            $total = intval( ( ( $posts - 1 ) / $limit ) + 1 );
        	if( $page <= 0 ) $page = 1;
        	if( $page > $total ) $page = $total;
            $start = $page * $limit - $limit;
            $i = $start;
            $result = $db->query("SELECT * FROM `" . USERPREFIX . "_reputation` WHERE `komu`='$user' ORDER BY `date` DESC LIMIT " . $start . "," . $limit);
            $repa_list = "| Автор | Комментарий | Дата | |
| ".$auth_link." | ".$row['text']." | ".$date." | ".$how." |