mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r334
IP юзера в профиле, удаление условия SHOW_ADMIN_OPTIONS git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@334 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
ea87931bff
commit
417dace9b0
10 changed files with 100 additions and 16 deletions
|
@ -67,6 +67,7 @@ class ajax_common
|
|||
'edit_user_profile' => array('admin'),
|
||||
'change_user_rank' => array('admin'),
|
||||
'change_user_opt' => array('admin'),
|
||||
'manage_user' => array('admin'),
|
||||
|
||||
'change_tor_status' => array('mod'),
|
||||
'mod_action' => array('mod'),
|
||||
|
@ -74,7 +75,7 @@ class ajax_common
|
|||
|
||||
'gen_passkey' => array('user'),
|
||||
'change_torrent' => array('user'),
|
||||
'manage_user' => array('user'),
|
||||
'change_tz' => array('user'),
|
||||
|
||||
'view_post' => array('guest'),
|
||||
'view_torrent' => array('guest'),
|
||||
|
@ -82,8 +83,6 @@ class ajax_common
|
|||
'posts' => array('guest'),
|
||||
'birthday_list' => array('guest'),
|
||||
'get_forum_mods' => array('guest'),
|
||||
|
||||
'change_tz' => array('user'),
|
||||
);
|
||||
|
||||
var $action = null;
|
||||
|
|
|
@ -51,7 +51,8 @@ switch ($mode)
|
|||
if(isset($news_forums[$t_data['forum_id']]) && $bb_cfg['show_latest_news'])
|
||||
{
|
||||
$datastore->enqueue('latest_news');
|
||||
$datastore->update('latest_news');
}
|
||||
$datastore->update('latest_news');
|
||||
}
|
||||
|
||||
$net_forums = array_flip(explode(',', $bb_cfg['network_news_forum_id']));
|
||||
if(isset($net_forums[$t_data['forum_id']]) && $bb_cfg['show_network_news'])
|
||||
|
@ -63,4 +64,61 @@ switch ($mode)
|
|||
$this->response['topic_id'] = $topic_id;
|
||||
$this->response['topic_title'] = $new_title;
|
||||
break;
|
||||
|
||||
case 'profile_ip':
|
||||
$user_id = (int) $this->request['user_id'];
|
||||
$profiledata = get_userdata($user_id);
|
||||
|
||||
if(!$user_id) $this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
|
||||
$reg_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM ". BB_USERS ."
|
||||
WHERE user_reg_ip = '{$profiledata['user_reg_ip']}'
|
||||
AND user_reg_ip != ''
|
||||
AND user_id != {$profiledata['user_id']}
|
||||
ORDER BY username ASC");
|
||||
|
||||
$last_ip = DB()->fetch_rowset("SELECT username, user_id, user_rank FROM " .BB_USERS ."
|
||||
WHERE user_last_ip = '{$profiledata['user_last_ip']}'
|
||||
AND user_last_ip != ''
|
||||
AND user_id != {$profiledata['user_id']}");
|
||||
|
||||
$link_reg_ip = $link_last_ip = '';
|
||||
|
||||
if(!empty($reg_ip))
|
||||
{
|
||||
$link_reg_ip .= $lang['OTHER_IP'] .' ';
|
||||
foreach ($reg_ip as $row)
|
||||
{
|
||||
$link_reg_ip .= profile_url($row) .' ';
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($last_ip))
|
||||
{
|
||||
$link_last_ip .= $lang['OTHER_IP'] .' ';
|
||||
foreach ($last_ip as $row)
|
||||
{
|
||||
$link_last_ip .= profile_url($row) .' ';
|
||||
}
|
||||
}
|
||||
|
||||
$this->response['ip_list_html'] = '
|
||||
<style type="text/css">
|
||||
table.mod_ip { background: #F9F9F9; border: 1px solid #A5AFB4; border-collapse: separate;}
|
||||
table.mod_ip td { padding: 2px 5px; white-space: normal; font-size: 11px; }
|
||||
table.mod_ip div { max-height: 150px; overflow: auto;}
|
||||
</style>
|
||||
<br /><table class="mod_ip bCenter borderless" cellspacing="1">
|
||||
<tr class="row5" >
|
||||
<td>'. $lang['REG_IP'] .'</td>
|
||||
<td class="tCenter"><a href="http://ip-whois.net/ip_geo.php?ip='.decode_ip($profiledata['user_reg_ip']).'" class="gen" target="_blank">'.decode_ip($profiledata['user_reg_ip']).'</a></td>
|
||||
<td><div>'. $link_reg_ip .'</div></td>
|
||||
</tr>
|
||||
<tr class="row4">
|
||||
<td>'. $lang['LAST_IP'] .'</td>
|
||||
<td class="tCenter"><a href="http://ip-whois.net/ip_geo.php?ip='.decode_ip($profiledata['user_last_ip']).'" class="gen" target="_blank">'.decode_ip($profiledata['user_last_ip']).'</a></td>
|
||||
<td><div>'. $link_last_ip .'</div></td>
|
||||
</tr>
|
||||
</table><br />';
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.4 (beta)';
|
||||
$bb_cfg['tp_release_state'] = 'R333';
|
||||
$bb_cfg['tp_release_state'] = 'R334';
|
||||
$bb_cfg['tp_release_date'] = '05-12-2011';
|
||||
|
||||
// Database
|
||||
|
|
|
@ -230,7 +230,6 @@ $template->assign_vars(array(
|
|||
'U_TRACKER' => "tracker.php",
|
||||
'U_GALLERY' => "gallery.php",
|
||||
|
||||
'SHOW_ADMIN_OPTIONS' => $is_admin,
|
||||
'SHOW_SIDEBAR1' => (!empty($page_cfg['show_sidebar1'][BB_SCRIPT]) || $bb_cfg['show_sidebar1_on_every_page']),
|
||||
'SHOW_SIDEBAR2' => (!empty($page_cfg['show_sidebar2'][BB_SCRIPT]) || $bb_cfg['show_sidebar2_on_every_page']),
|
||||
|
||||
|
|
|
@ -1379,6 +1379,10 @@ $lang['ONLY_FOR_SUPER_ADMIN'] = 'This option only for super admins';
|
|||
$lang['ACCESS'] = 'Access';
|
||||
$lang['ACCESS_SRV_LOAD'] = 'Depend on server load';
|
||||
$lang['LOGS'] = 'Topic history';
|
||||
|
||||
$lang['LAST_IP'] = 'Last IP:';
|
||||
$lang['REG_IP'] = 'Registration IP:';
|
||||
$lang['OTHER_IP'] = 'Other IP:';
|
||||
$lang['ALREADY_REG_IP'] = 'With your IP-address is already registered user %s. If you have not previously registered on our tracker, mail to <a href="mailto:%s">Administrator</ a>';
|
||||
|
||||
//
|
||||
|
|
|
@ -1387,6 +1387,10 @@ $lang['ONLY_FOR_SUPER_ADMIN'] = 'Эта опция доступна только
|
|||
$lang['ACCESS'] = 'Доступ';
|
||||
$lang['ACCESS_SRV_LOAD'] = 'Зависит от загрузки сервера';
|
||||
$lang['LOGS'] = 'История темы';
|
||||
|
||||
$lang['LAST_IP'] = 'Последний IP:';
|
||||
$lang['REG_IP'] = 'IP регистрации:';
|
||||
$lang['OTHER_IP'] = 'Другие IP:';
|
||||
$lang['ALREADY_REG_IP'] = 'С вашего IP-адреса уже зарегистрирован пользователь %s. Если Вы ранее не регистрировались на нашем сайте, обратитесь к <a href="mailto:%s">Администрации</a>';
|
||||
|
||||
//
|
||||
|
|
|
@ -191,11 +191,11 @@
|
|||
|
||||
<div class="hr1" style="margin: 5px 0 4px;"></div>
|
||||
|
||||
<p>{TOTAL_USERS_ONLINE}<!-- IF SHOW_ADMIN_OPTIONS --> {USERS_ONLINE_COUNTS}<!-- ENDIF --></p>
|
||||
<p>{TOTAL_USERS_ONLINE}<!-- IF IS_ADMIN --> {USERS_ONLINE_COUNTS}<!-- ENDIF --></p>
|
||||
<p>{RECORD_USERS}</p>
|
||||
|
||||
<!-- IF SHOW_ONLINE_LIST -->
|
||||
<style type="text/css"><!-- IF SHOW_ADMIN_OPTIONS -->.colorISL, a.colorISL, a.colorISL:visited { color: #793D00; }<!-- ELSE -->.ou_stat { display: none; }<!-- ENDIF --></style>
|
||||
<style type="text/css"><!-- IF IS_ADMIN -->.colorISL, a.colorISL, a.colorISL:visited { color: #793D00; }<!-- ELSE -->.ou_stat { display: none; }<!-- ENDIF --></style>
|
||||
<a name="online"></a>
|
||||
<div id="online_userlist" style="margin-top: 4px;">{LOGGED_IN_USER_LIST}</div>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- IF SHOW_ADMIN_OPTIONS -->
|
||||
<!-- IF IS_ADMIN -->
|
||||
<script type="text/javascript">
|
||||
ajax.init.edit_user_profile = function(params){
|
||||
if (params.submit) {
|
||||
|
@ -92,15 +92,31 @@ $(document).ready(function(){
|
|||
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_release"}</var>
|
||||
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_bonus"}</var>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF / SHOW_ADMIN_OPTIONS -->
|
||||
<script type="text/javascript">
|
||||
ajax.callback.manage_user = function(data) {
|
||||
if(data.info) alert(data.info);
|
||||
if(data.url) document.location.href = data.url;
|
||||
};
|
||||
</script>
|
||||
<a name="editprofile"></a>
|
||||
<!-- ENDIF / IS_ADMIN -->
|
||||
|
||||
<!-- IF IS_AM -->
|
||||
<script type="text/javascript">
|
||||
ajax.mod_action = function(mode) {
|
||||
ajax.exec({
|
||||
action : 'mod_action',
|
||||
mode : mode,
|
||||
user_id : {PROFILE_USER_ID}
|
||||
});
|
||||
}
|
||||
ajax.callback.mod_action = function(data) {
|
||||
$('#ip_list').html(data.ip_list_html);
|
||||
}
|
||||
</script>
|
||||
<!-- ENDIF / IS_AM -->
|
||||
|
||||
|
||||
<a name="editprofile"></a>
|
||||
<h1 class="pagetitle">{L_VIEWING_PROFILE}</h1>
|
||||
|
||||
<div class="nav">
|
||||
|
@ -223,6 +239,7 @@ ajax.callback.manage_user = function(data) {
|
|||
<span class="editable bold">{LAST_VISIT_TIME}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th class="nowrap">{L_LAST_ACTIVITY}:</th>
|
||||
<td><b>{LAST_ACTIVITY_TIME}</b></td>
|
||||
|
@ -235,6 +252,7 @@ ajax.callback.manage_user = function(data) {
|
|||
[ <a href="{U_SEARCH_USER}" class="med">{L_SEARCH_USER_POSTS}</a> ]
|
||||
[ <a href="{U_SEARCH_TOPICS}" class="med">{L_SEARCH_USER_TOPICS}</a> ]
|
||||
[ <a class="med" href={U_SEARCH_RELEASES}>{L_SEARCH_RELEASES}</a> ]
|
||||
<!-- IF IS_AM -->[ <a href="#" class="adm" onclick="ajax.mod_action('profile_ip'); return false;">{L_IP_ADDRESS}</a> ]<!-- ENDIF -->
|
||||
<!-- IF IS_ADMIN -->[ <a href="#" onclick="toggle_block('delete'); return false;" class="adm">{L_USER_DELETE}</a> ]<!-- ENDIF -->
|
||||
</p>
|
||||
</td>
|
||||
|
@ -297,6 +315,8 @@ ajax.callback.manage_user = function(data) {
|
|||
<!-- ENDIF -->
|
||||
</table><!--/user_details-->
|
||||
|
||||
<!-- IF IS_AM --><span id="ip_list"></span><!-- ENDIF -->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Report -->
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<tr class="{guest_user_row.ROW_CLASS}">
|
||||
<td>{guest_user_row.USER}</td>
|
||||
<td class="tCenter">{guest_user_row.LASTUPDATE}</td>
|
||||
<!-- IF SHOW_ADMIN_OPTIONS --><td class="tCenter"><a href="{guest_user_row.U_WHOIS_IP}" class="gen" target="_blank">{guest_user_row.USERIP}</a></td><!-- ENDIF -->
|
||||
<!-- IF ADMIN --><td class="tCenter"><a href="{guest_user_row.U_WHOIS_IP}" class="gen" target="_blank">{guest_user_row.USERIP}</a></td><!-- ENDIF -->
|
||||
</tr>
|
||||
<!-- END guest_user_row -->
|
||||
</tfoot>
|
||||
|
|
|
@ -463,7 +463,7 @@ $(document).ready(function(){
|
|||
<br clear="all" />
|
||||
<div style="float: left;">{S_TOPIC_ADMIN}</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF SHOW_ADMIN_OPTIONS -->
|
||||
<!-- IF IS_ADMIN -->
|
||||
<div class="med" style="float: right;">
|
||||
Admin:
|
||||
<a href="{U_LOGS}">{L_LOGS}</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue