source: branches/1.1dev/templates/adm_record_version_list.ihtml

Last change on this file was 185, checked in by scdev, 18 years ago

Q - added oTxt() around all printed PHP_SELFs to avoid XSS attack. See: http://blog.phpdoc.info/archives/13-XSS-Woes.html

File size: 1.8 KB
Line 
1<form method="post" action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>">
2<?php printHiddenSession() ?>
3<input type="submit" class="formsubmitbutton" name="op" value="<?php echo _("Cancel"); ?>">
4<table class="list" border="0" cellspacing="0" cellpadding="4">
5<tr>
6    <th class="padleft" colspan="3">&nbsp;</th>
7    <th class="padleft"><?php echo _("ID"); ?></th>
8    <th class="padleft"><?php echo _("Saved"); ?></th>
9    <th class="padleft"><?php echo _("By"); ?></th>
10</tr>
11<?php
12$first = true;
13foreach ($versions as $v) { ?>
14<tr>
15    <?php if ($first) { ?>
16    <td class="padleft nowrap">[<a href="<?php echo ohref($_SERVER['PHP_SELF'] . '?op=view&current=true&version_id=' . $v['version_id']); ?>">view</a>]</td>
17    <td class="padleft nowrap" colspan="2">(<?php echo _("Current record"); ?>)</td>
18    <?php } else { ?>
19    <td class="padleft nowrap">[<a href="<?php echo ohref($_SERVER['PHP_SELF'] . '?op=view&version_id=' . $v['version_id']); ?>">view</a>]</td>
20    <td class="padleft nowrap">[<a href="<?php echo ohref($_SERVER['PHP_SELF'] . '?op=diff&version_id=' . $v['version_id']); ?>">diff</a>]</td>
21    <td class="padleft nowrap">[<a href="<?php echo ohref($_SERVER['PHP_SELF'] . '?op=restore&version_id=' . $v['version_id']); ?>">restore</a>]</td>
22    <?php } ?>
23    <td class="padleft nowrap"><?php echo $v['version_id']; ?></td>
24    <td class="padleft nowrap"><?php echo date('d M Y H:i:s', strtotime($v['version_datetime'])); ?></td>
25    <td class="padleft nowrap"><?php echo $v['editor']; ?></td>
26</tr>
27<?php
28$first = false;
29}
30?>
31</table>
32<div class="help"><?php printf(_("When there are more than %s versions, those over %s days old are deleted."), $version->record_version_min_qty, $version->record_version_min_days); ?></div>
33<input type="submit" class="formsubmitbutton" name="op" value="<?php echo _("Cancel"); ?>">
34</form>
Note: See TracBrowser for help on using the repository browser.