".$repa_mod_mas[0]."|".$repa_mod_mas[1].")"; $repa_minus = "- "; $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 = ""; while($row = $db->get_row($result)) { $i ++; if ($repa_cf['robot'] == $row['author']) $auth_link = $row['author']; else{$auth_link = "".$row['author']."";} switch($row['how']) { case($row['how'] > 0): $how = ''.$lang_repa['repa_up'].''; break; case($row['how'] < 0): $how = ''.$lang_repa['repa_down'].''; break; case($row['how'] == "totalminus"): $how = ''.$lang_repa['repa_adm'].''; break; case($row['how'] == "totalplus"): $how = ''.$lang_repa['repa_adm'].''; break; } $row['date'] = strtotime($row['date']); if( date( Ymd, $row['date'] ) == date( Ymd, $_TIME ) )$date = $lang['time_heute'] . langdate( ", H:i", $row['date'] ); elseif( date( Ymd, $row['date'] ) == date( Ymd, ($_TIME - 86400) ) )$date = $lang['time_gestern'] . langdate( ", H:i", $row['date'] ); else $date = langdate( $config['timestamp_active'], $row['date'] ); if ($repa_cf['comm_page'] == 1 AND $row['url_page']) $row['text'] .= "
Изменено на этой странице."; $repa_list .= ""; } $repa_list .= "
Автор
Комментарий
Дата
".$auth_link."".$row['text']."".$date."".$how."
"; $tpl->load_template('reputation.tpl'); $tpl->set('{usertitle}',"".$user.""); $tpl->set('{history_content}', $repa_list); $tpl->compile('content'); $tpl->clear(); $nav = "/user/reputation/".$user."/page/{page}"; CreateNavigation( $nav, $page, $total ); } $tpl->compile('content'); $tpl->clear(); $db->free(); } else msgbox ($lang['all_err_1'], "Пользователь отключил репутацию в своих настройках. Вы не можете просмотреть историю его репутации.
Вернуться назад."); if ($user_found == FALSE) { msgbox ($lang['all_err_1'], $lang['news_err_26']); } } } ?>