-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.tpl
executable file
·277 lines (276 loc) · 11.1 KB
/
profile.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<div class="header">
<h2>Profile > <strong>{$user.username|escape:"htmlall"}</strong></h2>
<div class="breadcrumb-wrapper">
<ol class="breadcrumb">
<li><a href="{$smarty.const.WWW_TOP}{$site->home_link}">Home</a></li>
/ Profile / {$user.username|escape:"htmlall"}
</ol>
</div>
</div>
<div class="row">
<div class="box col-md-12">
<div class="box-content">
<div class="row">
<div class="col-lg-12 portlets">
<div class="panel panel-default">
<div class="panel-body pagination2">
<div class="panel-body">
<ul class="nav nav-tabs nav-primary">
<li class="active"><a href="#tab2_1" data-toggle="tab"><i
class="zmdi zmdi-account"></i>
Main</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="tab2_1">
<div id="tab-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr valign="top">
<td>
<table class="table table-condensed table-striped table-responsive table-hover">
<tbody>
<tr class="bg-aqua-active">
<td colspan="2" style="padding-left: 8px;"><strong>General</strong>
</td>
</tr>
<tr>
<th width="200">Username</th>
<td>{$user.username|escape:"htmlall"}</td>
</tr>
{if isset($isadmin) || !$publicview}
<tr>
<th width="200" title="Not public">E-mail</th>
<td>{$user.email}</td>
</tr>
{/if}
<tr>
<th width="200">Registered</th>
<td>{$user.created_at|date_format}
({$user.created_at|timeago} ago)
</td>
</tr>
<tr>
<th width="200">Last Login</th>
<td>{$user.lastlogin|date_format}
({$user.lastlogin|timeago} ago)
</td>
</tr>
<tr>
<th width="200">Role</th>
<td>{$user->role->name}</td>
</tr>
{if !empty($user.rolechangedate)}
<tr>
<th width="200">Role expiration date</th>
<td>{$user.rolechangedate|date_format:"%A, %B %e, %Y"}</td>
</tr>
{/if}
</tbody>
</table>
<table class="data table table-condensed table-striped table-responsive table-hover">
<tbody>
<tr class="bg-aqua-active">
<td colspan="2" style="padding-left: 8px;"><strong>UI
Preferences</strong></td>
</tr>
<tr>
<th>Theme:</th>
<td>{$user.style}</td>
</tr>
<tr>
<th>Cover view:</th>
<td>
{if $user.movieview == "1"}View movie covers{else}View standard movie category{/if}
<br/>
{if $user.musicview == "1"}View music covers{else}View standard music category{/if}
<br/>
{if $user.consoleview == "1"}View console covers{else}View standard console category{/if}
<br/>
{if $user.gameview == "1"}View games covers{else}View standard games category{/if}
<br/>
{if $user.bookview == "1"}View book covers{else}View standard book category{/if}
<br/>
{if $user.xxxview == "1"}View xxx covers{else}View standard xxx category{/if}
<br/>
</td>
</tr>
</tbody>
</table>
<table class="data table table-condensed table-striped table-responsive table-hover">
<tbody>
<tr class="bg-aqua-active">
<td colspan="2" style="padding-left: 8px;"><strong>API &
Downloads</strong></td>
</tr>
<tr>
<th>API Hits last 24 hours</th>
<td>
<span id="uatd">{$apirequests}</span> {if isset($isadmin) && $apirequests > 0}
<a
onclick="resetapireq({$user.id}, 'api'); document.getElementById('uatd').innerHTML='0'; return false;"
href="#" class="label label-danger">
Reset</a>{/if}</td>
</tr>
<tr>
<th>Downloads last 24 hours</th>
<td><span id="ugrtd">{$grabstoday}</span> /
{if $user.grabs >= $user->role->downloadrequests}
<small>(Next DL
in {($grabstoday.nextdl/3600)|intval}
h {($grabstoday.nextdl/60) % 60}
m)
</small>
{else} {$user->role->downloadrequests} {/if}
{if isset($isadmin) && $grabstoday > 0}
<a onclick="resetapireq({$user.id}, 'grabs'); document.getElementById('ugrtd').innerHTML='0'; return false;"
href="#" class="label label-danger">
Reset</a>
{/if}</td>
</tr>
<tr>
<th>Downloads Total</th>
<td>{$user.grabs}</td>
</tr>
{if $site->integrationtype == 2 && !$publicview}
<tr>
<th>SABnzbd Integration:</th>
<td>
<b>Url:</b> {if $saburl == ''}N/A{else}{$saburl}{/if}
<br/>
<b>Key:</b> {if $sabapikey == ''}N/A{else}{$sabapikey}{/if}
<br/>
<b>Type:</b> {if $sabapikeytype == ''}N/A{else}{$sabapikeytype}{/if}
<br/>
<b>Priority:</b> {if $sabpriority == ''}N/A{else}{$sabpriority}{/if}
<br/>
<b>Storage:</b> {if $sabsetting == ''}N/A{else}{$sabsetting}{/if}
</td>
</tr>
{/if}
{if isset($isadmin) || !$publicview}
<tr>
<th title="Not public">API/RSS Key</th>
<td>
<a href="{$smarty.const.WWW_TOP}rss?t=0&dl=1&i={$user.id}&r={$user.rsstoken}">{$user.rsstoken}</a>
<a href="{$smarty.const.WWW_TOP}profileedit?action=newapikey"
class="label label-danger">GENERATE NEW
KEY</a>
</td>
</tr>
<tr>
<th title="Admin Notes">Notes:</th>
<td>{$user.notes|escape:htmlall}{if $user.notes|count_characters > 0}
<br/>
{/if}{if isset($isadmin)}<a
href="{$smarty.const.WWW_TOP}/admin/user-edit.php?id={$user.id}#notes"
class="label label-info">Add/Edit</a>{/if}
</td>
</tr>
{/if}
</tbody>
</table>
{if ($user.id == $userdata.id || $isadmin) && $site->registerstatus == 1}
<table class="data table table-condensed table-striped table-responsive table-hover">
<tbody>
<tr class="bg-aqua-active">
<td colspan="2" style="padding-left: 8px;"><strong>Invites</strong>
</td>
</tr>
<tr>
<tr>
<th title="Not public">Send Invite:</th>
<td>{$user.invites}
{if $user.invites > 0}
[
<a id="lnkSendInvite"
onclick="return false;" href="#">Send
Invite</a>
]
<span title="Your invites will be reduced when the invitation is claimed."
class="invitesuccess"
id="divInviteSuccess"></span>
<span class="invitefailed"
id="divInviteError"></span>
<div style="display:none;" id="divInvite">
<form id="frmSendInvite" method="GET">
<label for="txtInvite">Email</label>:
<input type="text" id="txtInvite"/>
<input type="submit" value="Send"/>
</form>
</div>
{/if}
</td>
</tr>
{if $userinvitedby && $userinvitedby.username != ""}
<tr>
<th width="200">Invited By</th>
{if $privileged || !$privateprofiles}
<td>
<a title="View {$userinvitedby.username}'s profile"
href="{$smarty.const.WWW_TOP}/profile?name={$userinvitedby.username}">{$userinvitedby.username}</a>
</td>
{else}
<td>
{$userinvitedby.username}
</td>
{/if}
</tr>
{/if}
</tbody>
</table>
{/if}
{if isset($isadmin) && $downloadlist|@count > 0}
<table class="data table table-condensed table-striped table-responsive table-hover">
<tbody>
<tr class="bg-aqua-active">
<td colspan="2" style="padding-left: 8px;"><strong>Downloads
for user</strong>
</td>
</tr>
<tr>
<th>date</th>
<th>release</th>
</tr>
{foreach $downloadlist as $download}
{if $download@iteration == 10}
<tr class="more">
<td colspan="3"><a
onclick="$('tr.extra').toggle();$('tr.more').toggle();return false;"
href="#">show all...</a></td>
</tr>
{/if}
<tr {if $download@iteration >= 10}class="extra"
style="display:none;"{/if}>
<td width="80"
title="{$download.timestamp}">{$download.timestamp|date_format}</td>
<td>{if $download->release->guid == ""}n/a{else}
<a
href="{$smarty.const.WWW_TOP}/details/{$download->release->guid}">{$download->release->searchname}</a>{/if}
</td>
</tr>
{/foreach}
</table>
{/if}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{if isset($isadmin) || !$publicview}
<a class="btn btn-primary" href="{$smarty.const.WWW_TOP}profileedit">Edit
Profile</a>
{/if}
{if !isset($isadmin)}
<a class="btn btn-warning confirm_action"
href="{$smarty.const.WWW_TOP}profile_delete?id={$user.id}">Delete your account</a>
{/if}
</div>
</div>
</div>
</div>
</div>
</div>
</div>