-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverbackup.tpl
185 lines (184 loc) · 7.7 KB
/
serverbackup.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
<section class="content container-fluid">
<div class="col-xs-12 col-xs-offset-0 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1 no-padding">
{if !empty($error)}
<div class="alert alert-danger">{$error}</div>
{/if}
{if !empty($noerror)}
<div class="alert alert-info">{$noerror}</div>
{/if}
<div class="box box-warning">
<div class="box-body">
<p>{$lang['servbackdesc']}</p>
<p>{$lang['snapwarning']}</p>
</div>
</div>
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">{$lang['serverbackups']}</h3>
</div>
<div class="box-body">
<table class="table table-striped">
<tr>
<th class="text-center">{$lang['created']}</th>
{if isset($files[0]) AND !empty($files[0]) OR isset($folder[2]) AND !empty($folder[2])}
{if isset($smarty.post.backupdate)}
<th class="text-center">{$lang['server']}</th>
{/if}
<th></th>
{else}
<th></th>
{/if}
</tr>
{if isset($files[0]) AND !empty($files[0]) OR isset($folder[2]) AND !empty($folder[2])}
{if !isset($smarty.post.backupdate)}
{foreach key=key item=value from=$folder.2}
<tr>
<td style="vertical-align: middle; width: 50%;" class="text-center">{$value}</td>
<td colspan="2" style="vertical-align: middle;" class="text-center no-padding">
<form style="display: inline;" method="post" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="backupdate" value="{$value}" />
<input type="submit" class="btn btn-flat btn-sm btn-warning" name="chose" value="Auswählen" />
</form>
<form style="display: inline;" method="post" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="backupdate" value="{$value}" />
<input class="btn btn-flat btn-sm btn-danger" type="submit" name="deleteall" value="{$lang['delete']}" />
</form>
</td>
</tr>
{/foreach}
{else}
{if isset($files[0])}
{foreach key=key item=value from=$files.0}
<tr>
<td style="vertical-align: middle; width: 30%;" class="text-center">{$value['timestamp']|date_format:"%d.%m.%Y - %H:%M:%S"}</td>
<td style="vertical-align: middle; width: 30%;" class="text-center">{$value['server']}</td>
<td style="vertical-align: middle;" class="text-center no-padding">
<form method="post" style="display: inline;" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="backupid" value="{$value['timestamp']}" />
<input type="hidden" name="fileport" value="{$value['server']}" />
<input type="hidden" name="backupdate" value="{$smarty.post.backupdate}" />
<input class="btn btn-flat btn-sm btn-warning" type="submit" name="deploy" value="{$lang['deploy']}" />
</form>
<form method="post" style="display: inline;" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="backupid" value="{$value['timestamp']}" />
<input type="hidden" name="fileport" value="{$value['server']}" />
<input type="hidden" name="backupdate" value="{$smarty.post.backupdate}" />
<input class="btn btn-flat btn-sm btn-danger" type="submit" name="delete" value="{$lang['delete']}" />
</form>
</td>
</tr>
{/foreach}
{else}
<tr>
<td colspan="3" class="text-center">No Backups found!</td>
</tr>
{/if}
{/if}
{else}
<tr>
<td colspan="3" class="text-center">No Backups found!</td>
</tr>
{/if}
</table>
</div>
</div>
{if $hoststatus == true}
<div class="box box-info">
<div class="box-header">
<h3 class="box-title">{$lang['host']} {$lang['serverbackups']}</h3>
</div>
<div class="box-body">
<table class="table table-striped">
<tr>
<th class="text-center">{$lang['created']}</th>
{if isset($files[0]) AND !empty($files[0]) OR isset($folder[2]) AND !empty($folder[2])}
{if isset($smarty.post.backupdate)}
<th class="text-center">{$lang['server']}</th>
{/if}
<th></th>
{else}
<th></th>
{/if}
</tr>
{if isset($files[1]) AND !empty($files[1]) OR isset($folder[1]) AND !empty($folder[1])}
{if !isset($smarty.post.backupdate)}
{foreach key=key item=value from=$folder[1]}
<tr>
<td style="vertical-align: middle; width: 50%;" class="text-center">{$value}</td>
<td colspan="2" style="vertical-align: middle;" class="text-center">
<form method="post" style="display: inline;" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="backupdate" value="{$value}" />
<input type="submit" class="btn btn-flat btn-sm btn-warning" name="chose" value="Auswählen" />
</form>
<form method="post" style="display: inline;" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="hostbackup" value="1" />
<input type="hidden" name="backupdate" value="{$value}" />
<input class="btn btn-flat btn-sm btn-danger" type="submit" name="deleteall" value="{$lang['delete']}" />
</form>
</td>
</tr>
{/foreach}
{else}
{if isset($files[1])}
{foreach key=key item=value from=$files[1]}
<tr>
<td style="vertical-align: middle; width: 30%" class="text-center">{$value['timestamp']|date_format:"%d.%m.%Y - %H:%M:%S"}</td>
<td style="vertical-align: middle; width: 30%" class="text-center">{$value['server']}</td>
<td style="vertical-align: middle;" class="text-center no-padding">
<form method="post" style="display: inline;" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="hostbackup" value="1" />
<input type="hidden" name="backupdate" value="{$smarty.post.backupdate}" />
<input type="hidden" name="backupid" value="{$value['timestamp']}" />
<input type="hidden" name="fileport" value="{$value['server']}" />
<input class="btn btn-flat btn-sm btn-warning" type="submit" name="deploy" value="{$lang['deploy']}" />
</form>
<form method="post" style="display: inline;" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="hostbackup" value="1" />
<input type="hidden" name="backupdate" value="{$smarty.post.backupdate}" />
<input type="hidden" name="backupid" value="{$value['timestamp']}" />
<input type="hidden" name="fileport" value="{$value['server']}" />
<input class="btn btn-flat btn-sm btn-danger" type="submit" name="delete" value="{$lang['delete']}" />
</form>
</td>
</tr>
{/foreach}
{else}
<tr>
<td colspan="3" class="text-center">No Backups found!</td>
</tr>
{/if}
{/if}
{else}
<tr>
<td colspan="3" class="text-center">No Backups found!</td>
</tr>
{/if}
</table>
</div>
</div>
{/if}
<div class="box box-success">
<div class="box-header">
<h3 class="box-title">{$lang['createserverbackup']}</h3>
</div>
<div class="box-body">
<br />
<div class="row">
<div class="col-md-6">
<form method="post" action="index.php?site=serverbackup&sid={$sid}">
<input class="btn btn-flat btn-block btn-primary" type="submit" name="create" value="{$lang['create']}" />
</form>
</div>
{if $hoststatus==true}
<div class="col-md-6">
<form method="post" action="index.php?site=serverbackup&sid={$sid}">
<input type="hidden" name="hostbackup" value="1" />
<input class="btn btn-flat btn-block btn-info" type="submit" name="create" value="{$lang['host']} {$lang['create']}" />
</form>
</div>
{/if}
</div>
</div>
</div>
</div>
</section>