AutoAuth plugin now opens linked site in new window
[PHPCredLocker.git] / views / Creds / listtypes.php
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
<?php
/** Add Credential Type
*
* Copyright (C) 2012 B Tasker
* Released under GNU GPL V2
* See LICENSE
*
*/ 
defined('_CREDLOCK') or die;
BTMain::checkSuperAdmin();
 
global $notifications;
$notifications->RequireScript('admin');
 
$db = new CredDB;
$crypt = new Crypto;
$crypt->safemode = 0;
 
$notifications->setPageTitle("List " .Lang::_('Cred Types'));
 
$credtypes = $db->getCredTypes();
 
$path = array(array('name'=>Lang::_("Cred Types"),'url'=>'index.php?option=listCredTypes'));
 
$notifications->setBreadcrumb($path);
 
 
foreach ($credtypes as $cred){
 
$name = $crypt->decrypt($cred->Name,'CredType');
$creds[$name] = $cred->id;
 
}
 
ksort($creds);
?>
<h1><?php echo Lang::_("Cred Types");?></h1>
<br />
<button class="btn btn-primary" onclick="window.location.href = 'index.php?option=addCredType';">Add <?php echo Lang::_("Credential Type");?></button><br />
<br />
<table class="table table-hover">
<tr><th><?php echo Lang::_("Credential Type");?></th><th></th><th></th></tr>
 
 
<?php 
foreach ($creds as $key=>$value){
?>
 
 
<tr id='CredType<?php echo $value;?>'>
  <td><?php echo $key;?></td>
  <td class='editicon' onclick="window.location.href = 'index.php?option=editCredType&id=<?php echo $value;?>';"><i class='icon-pencil'></i></td>
  <td class='delicon' onclick="delCredType('<?php echo $value;?>');"><i class='icon-remove'></i></td>
</tr>
 
 
<?php } ?>
</table>
<button class="btn btn-primary" onclick="window.location.href = 'index.php?option=addCredType';">Add <?php echo Lang::_("Credential Type");?></button><br />