source: trunk/services/templates/admin_list.ihtml @ 21

Last change on this file since 21 was 21, checked in by scdev, 19 years ago

More random updates. Improved self-instantiation pattern in SessionCache? to match that of App. More little tweaks.

File size: 5.0 KB
Line 
1
2<?php $fv->printErrorMessages(); ?>
3<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
4<?php App::printHiddenSession(false); ?>
5<div id="commandbox">
6    <span class="nowrap commandtext"><a href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . '?op=add'); ?>"><?php echo _("Add administrator"); ?></a></span>
7    <br />
8   
9    <input type="text" class="small" size="20" name="search_query" value="<?php echo getFormData('search_query'); ?>" title="<?php echo oTxt(_("Fields searched: Admin id, Username, Userpass, First name, Last name, Email, User type, Login abuse exempt, Blocked, Blocked reason, Abuse warning level, Seconds online, Last login datetime, Last access datetime, Last login ip, Added by user id, Modified by user id, Added datetime, Modified datetime.")); ?>" />
10    <input type="submit" value="<?php echo _("Search"); ?>" />
11</div>
12
13<?php include 'list_info.ihtml'; ?>
14
15<table class="list">
16    <tr>
17        <th>&nbsp;</th>
18        <th>&nbsp;</th>
19        <th><?php echo $so->printSortHeader('admin_tbl.admin_id', _("ID"), 'ASC'); ?></th>
20        <th><?php echo $so->printSortHeader('admin_tbl.username', _("Username"), 'ASC'); ?></th>
21        <th><?php echo $so->printSortHeader('admin_tbl.first_name', _("First"), 'ASC'); ?> <?php echo $so->printSortHeader('admin_tbl.last_name', _("Last name"), 'ASC'); ?></th>
22        <th><?php echo $so->printSortHeader('admin_tbl.email', _("Email"), 'ASC'); ?></th>
23        <th><?php echo $so->printSortHeader('admin_tbl.user_type', _("User type"), 'ASC'); ?></th>
24        <th><?php echo $so->printSortHeader('admin_tbl.seconds_online', _("Min online"), 'ASC'); ?></th>
25        <th><?php echo $so->printSortHeader('admin_tbl.last_login_datetime', _("Last login"), 'ASC'); ?></th>
26        <th><?php echo $so->printSortHeader('admin_tbl.last_login_ip', _("Remote host"), 'ASC'); ?></th>
27        <th><?php echo $so->printSortHeader('admin_tbl.added_datetime', _("Added"), 'ASC'); ?></th>
28        <th><?php echo $so->printSortHeader('admin_tbl.added_by_user_id', _("by admin"), 'ASC'); ?></th>
29        <th><?php echo $so->printSortHeader('admin_tbl.modified_datetime', _("Last modified"), 'ASC'); ?></th>
30        <th>&nbsp;</th>
31    </tr>
32    <?php for ($i = 0; $i <= $page->last_item - $page->first_item && $page->total_items > 0; $i++) { ?>
33    <tr>
34        <td class="padleft nowrap"><a title="<?php printf(_("Edit %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . '?op=edit&admin_id=' . $list[$i]['admin_id']); ?>"><img src="/admin/_widgets/edit.gif" alt="Edit" width="14" height="18" border="0"></a> &nbsp;</td>
35        <td class="padleft nowrap"><a title="<?php printf(_("Versions of %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo App::oHREF('/admin/versions.php?record_table=admin_tbl&record_key=admin_id&boomerang=true&record_val=' . $list[$i]['admin_id']); ?>"><img src="/admin/_widgets/subcategory.gif" alt="" width="18" height="14" border="0" /></a> &nbsp;</td>
36        <td class="nowrap"><?php echo oTxt($list[$i]['admin_id'], true); ?> &nbsp;</td>
37        <td class="nowrap"><?php echo oTxt($list[$i]['username'], true); ?> &nbsp;</td>
38        <td class="nowrap"><?php echo oTxt($list[$i]['first_name'], true); ?> <?php echo oTxt($list[$i]['last_name'], true); ?> &nbsp;</td>
39        <td class="nowrap"><?php echo oTxt($list[$i]['email'], true); ?> &nbsp;</td>
40        <td class="nowrap"><?php echo oTxt($list[$i]['user_type'], true); ?> &nbsp;</td>
41        <td class="nowrap"><?php echo round($list[$i]['seconds_online'] / 60); ?> &nbsp;</td>
42        <td class="nowrap"><?php echo '0000-00-00 00:00:00' == $list[$i]['last_login_datetime'] ? '' : date(App::getParam('date_format'), strtotime($list[$i]['last_login_datetime'])); ?> &nbsp;</td>
43        <td class="nowrap"><?php echo gethostbyaddr($list[$i]['last_login_ip']); ?> &nbsp;</td>
44        <td class="nowrap"><?php echo '0000-00-00 00:00:00' == $list[$i]['added_datetime'] ? '' : date(App::getParam('date_format'), strtotime($list[$i]['added_datetime'])); ?> &nbsp;</td>
45        <td class="nowrap"><?php echo oTxt($list[$i]['added_admin_username'], true); ?> &nbsp;</td>
46        <td class="nowrap"><?php echo '0000-00-00 00:00:00' == $list[$i]['modified_datetime'] ? '' : date(App::getParam('date_format'), strtotime($list[$i]['modified_datetime'])); ?> &nbsp;</td>
47        <td class="padleft nowrap" align="right"><a title="<?php printf(_("Delete %s"), oTxt($list[$i]['username'])) ?>" href="<?php echo App::oHREF($_SERVER['PHP_SELF'] . "?op=del&admin_id=" . $list[$i]['admin_id']); ?>" onClick="javascript:return confirm('<?php printf(_("Are you sure you want to delete the record %s? This action is permanent and cannot be undone."), oTxt($list[$i]['username'])) ?>')"><img src="/admin/_widgets/delete.gif" alt="Delete" width="16" height="17" border="0"></a> &nbsp;</td>
48    </tr>
49    <?php } ?>
50</table>
51
52<?php if ($page->total_pages > 1) { ?>
53<div class="nowrap commandtext" style="float: right;"><?php echo _("Pages:"); ?>&nbsp;<?php $page->printPageNumbers() ?></div>
54<?php } ?>
55</form>
Note: See TracBrowser for help on using the repository browser.