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

Last change on this file was 312, checked in by quinn, 16 years ago

Escaped HTML in versions view and diff.

File size: 1.1 KB
Line 
1<div id="commandbox">              
2<?php if (!getFormData('current', false)) { ?>
3    <span class="nowrap commandtext"><a href="<?php echo ohref($_SERVER['PHP_SELF'] . '?op=restore', array('version_id', 'version_title')); ?>"><?php echo _("Restore this saved version"); ?></a></span>
4<?php } else { ?>
5    <span class="nowrap commandtext">&nbsp;</span>
6<?php } ?>
7</div>
8
9<?php if (is_array($data) && !empty($data) && is_array($current) && !empty($current)) { ?>
10<table class="list" border="0" cellspacing="0" cellpadding="4">
11    <tr>
12        <th class="padleft"><?php echo _("Field"); ?></th>
13        <th class="padleft"><?php echo _("Saved version"); ?></th>
14        <th class="padleft"><?php echo _("Current record"); ?></th>
15    </tr>
16<?php
17foreach ($current as $k=>$v_c) {
18    $v_d = $data[$k];
19    $style = $v_d != $v_c ? ' style="color: #c00;"' : '';
20    ?>
21    <tr>
22        <td class="padleft nowrap formlabel"<?php echo $style; ?>><?php echo oTxt($k); ?></td>
23        <td class="padleft"><?php echo oTxt($v_d); ?></td>
24        <td class="padleft"><?php echo oTxt($v_c); ?></td>
25    </tr>
26<?php } ?>
27</table>
28<?php } ?>
Note: See TracBrowser for help on using the repository browser.