blob: 2b6934c6d560f4f252fa529bf8937eb6369c1dde (
plain)
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
|
<h2>API keys</h2>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>Key</th>
<th style="width: 30%;">Comment</th>
<th>Created on</th>
<th>Access</th>
<th></th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php foreach($query as $key => $item): ?>
<tr>
<td><?php echo $i++; ?></td>
<td><?php echo $item["key"]; ?></td>
<td><?php echo htmlentities($item["comment"]); ?></td>
<td><?php echo date("Y/m/d H:i", $item["created"]); ?></td>
<td>
<?php if ($item["access_level"] == "full"): ?>
<span class="glyphicon glyphicon-warning-sign"></span>
<?php endif; ?>
<?php echo $item["access_level"]; ?>
</td>
<td>
<?php echo form_open("user/delete_apikey", array("style" => "margin-bottom: 0")); ?>
<?php echo form_hidden("key", $item["key"]); ?>
<button class="btn btn-danger btn-xs" type="submit">Delete</input>
</form>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<h3>Access levels:</h3>
<dl class="dl-horizontal">
<dt>basic</dt>
<dd>Allows uploading files.</dd>
<dt>apikey</dt>
<dd>Allows removing existing files and viewing the history. Includes <code>basic</code>.</dd>
<dt>full</dt>
<dd>Allows everything, including, but not limited to, creating and removing api keys, changing profile settings and creating invitation keys. Includes <code>apikey</code>.</dd>
<p>
<?php echo form_open('user/create_apikey', array("class" => "form-inline")); ?>
<input type="text" name="comment" placeholder="Comment" class="form-control" style="width: 200px;"/>
<select name="access_level" class="form-control" style="width: 100px;">
<option>basic</option>
<option selected="selected">apikey</option>
<option>full</option>
</select>
<input class="btn btn-primary" type="submit" value="Create a new key" name="process" />
</form>
</p>
|