-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewqueue.tpl
executable file
·68 lines (68 loc) · 2.29 KB
/
viewqueue.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
<div class="header">
<h2>Download > <strong>Queue</strong></h2>
<div class="breadcrumb-wrapper">
<ol class="breadcrumb">
<li><a href="{$smarty.const.WWW_TOP}{$site->home_link}">Home</a></li>
/ NZB
</ol>
</div>
</div>
{if $error == ''}
{if {{App\Models\Settings::settingValue('apps.sabnzbplus.integrationtype')}} > 0 || $user.queuetype == 2}
<p style="text-align:center;">
The following queue is pulled from
<a href="{$serverURL|escape:"htmlall"}">{$serverURL|escape:"htmlall"}</a>.
<br/>
{if {{App\Models\Settings::settingValue('apps.sabnzbplus.integrationtype')}} == 2 || $user.queuetype == 2}Edit your queue settings in
<a href="{$smarty.const.WWW_TOP}/profileedit">your profile</a>
.{/if}
</p>
<div class="sab_queue"></div>
{if $user.queuetype == 2}
{literal}
<script type="text/javascript">
function getQueue() {
var rand_no = Math.random();
$.ajax({
url: "nzbgetqueuedata?id=" + rand_no,
cache: false,
success: function (html) {
$(".sab_queue").html(html);
setTimeout("getQueue()", 2500);
},
error: function () {
$(".sab_queue").html("<p style='text-align:center;'>Could not contact your queue. <a href=\"javascript:location.reload(true)\">Refresh</a></p>");
},
timeout: 5000
});
}
</script>
{/literal}
{else}
{literal}
<script type="text/javascript">
function getQueue() {
var rand_no = Math.random();
$.ajax({
url: "sabqueuedata?id=" + rand_no,
cache: false,
success: function (html) {
$(".sab_queue").html(html);
setTimeout("getQueue()", 2500);
},
error: function () {
$(".sab_queue").html("<p style='text-align:center;'>Could not contact your queue. <a href=\"javascript:location.reload(true)\">Refresh</a></p>");
},
timeout: 5000
});
}
</script>
{/literal}
{/if}
<body onLoad="getQueue();">
{else}
<p style="text-align:center;">The {$queueType} queue has been disabled by the administrator.</p>
{/if}
{else}
<p style="text-align:center;">{$error}</p>
{/if}