summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-01-18 00:01:05 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-01-18 00:01:05 +0000
commit2cf712c4495b722086401f4be034cfef2e33a5a1 (patch)
treed3a2e5f9f90dd38fd5c7994fb7f40e0d4d248a12 /usr/local/www/pkg.php
parent03dce3bd1ac8897f4bc7f71c934e43d2ee6199e9 (diff)
downloadpfsense-2cf712c4495b722086401f4be034cfef2e33a5a1.zip
pfsense-2cf712c4495b722086401f4be034cfef2e33a5a1.tar.gz
Add type column to adddeleteeditpagefields allowing for the script to answer yes and no for checkbox items.
Diffstat (limited to 'usr/local/www/pkg.php')
-rwxr-xr-xusr/local/www/pkg.php60
1 files changed, 34 insertions, 26 deletions
diff --git a/usr/local/www/pkg.php b/usr/local/www/pkg.php
index a1c4c56..25b18a7 100755
--- a/usr/local/www/pkg.php
+++ b/usr/local/www/pkg.php
@@ -114,35 +114,43 @@ include("fbegin.inc");
<?php
$cols = 0;
foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
- echo "<td class=\"listhdrr\">" . $column['fielddescr'] . "</td>";
- $cols++;
+ echo "<td class=\"listhdrr\">" . $column['fielddescr'] . "</td>";
+ $cols++;
}
echo "</tr>";
- $i=0;
- if($evaledvar)
- foreach ($evaledvar as $ip) {
- echo "<tr valign=\"top\">\n";
- foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
- ?>
- <td class="listlr">
- <?php
- $toeval="echo \$ip['" . xml_safe_fieldname($column['fieldname']) . "'];";
- eval($toeval);
- ?>
- </td>
- <?php
- }
- ?>
- <td valign="middle" class="list" nowrap>
- &nbsp;<a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="pkg.php?xml=<?=$xml?>&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this item?')"><img src="x.gif" width="17" height="17" border="0"></a>
- </td>
- <?php
- echo "</tr>\n";
- $i++;
+ $i=0;
+ if($evaledvar)
+ foreach ($evaledvar as $ip) {
+ echo "<tr valign=\"top\">\n";
+ foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
+ ?>
+ <td class="listlr">
+ <?php
+ $toeval="\$fieldname = \$ip['" . xml_safe_fieldname($column['fieldname']) . "'];";
+ eval($toeval);
+ if($column['type'] == "checkbox") {
+ if($fieldname == "") {
+ echo "No";
+ } else {
+ echo "Yes";
+ }
+ } else {
+ echo $fieldname;
+ }
+ ?>
+ </td>
+ <?php
}
- ?>
-
+ ?>
+ <td valign="middle" class="list" nowrap>
+ &nbsp;<a href="pkg_edit.php?xml=<?=$xml?>&act=edit&id=<?=$i;?>"><img src="e.gif" width="17" height="17" border="0"></a>
+ &nbsp;<a href="pkg.php?xml=<?=$xml?>&act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this item?')"><img src="x.gif" width="17" height="17" border="0"></a>
+ </td>
+ <?php
+ echo "</tr>\n";
+ $i++;
+ }
+ ?>
<tr><td colspan="<?=$cols?>"></td><td><a href="pkg_edit.php?xml=<?=$xml?>"><img src="plus.gif" width="17" height="17" border="0"></a></td></tr>
</table>
</td>
OpenPOWER on IntegriCloud