diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-08-08 01:40:33 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-08-08 01:40:33 -0500 |
commit | 0ea4eee5b55282f01b4a9f61c04b3523237772b0 (patch) | |
tree | 147b058d5a3d1b027ee11abc4d5bcd6a18de5b6b /config/backup/backup_edit.php | |
parent | 1b63e9a79c3006378719bde2d106812b8ee09e15 (diff) | |
parent | 330d4acae1727401eef2face8041df4195fcc8a9 (diff) | |
download | pfsense-packages-0ea4eee5b55282f01b4a9f61c04b3523237772b0.tar.gz pfsense-packages-0ea4eee5b55282f01b4a9f61c04b3523237772b0.tar.bz2 pfsense-packages-0ea4eee5b55282f01b4a9f61c04b3523237772b0.zip |
Merge pull request #947 from phil-davis/backup-code-style
Diffstat (limited to 'config/backup/backup_edit.php')
-rwxr-xr-x | config/backup/backup_edit.php | 173 |
1 files changed, 86 insertions, 87 deletions
diff --git a/config/backup/backup_edit.php b/config/backup/backup_edit.php index c7dbc38a..fbaa9096 100755 --- a/config/backup/backup_edit.php +++ b/config/backup/backup_edit.php @@ -1,4 +1,4 @@ -<?php +<?php /* $Id$ */ /* @@ -66,7 +66,7 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; - + if (!$input_errors) { $ent = array(); @@ -76,11 +76,10 @@ if ($_POST) { $ent['description'] = $_POST['description']; if (isset($id) && $a_backup[$id]) { - //update - $a_backup[$id] = $ent; - } - else { - //add + //update + $a_backup[$id] = $ent; + } else { + //add $a_backup[] = $ent; } @@ -99,7 +98,7 @@ include("head.inc"); <script type="text/javascript" language="JavaScript"> function show_advanced_config() { - document.getElementById("showadvancedbox").innerHTML=''; + document.getElementById("showadvancedbox").innerHTML = ''; aodiv = document.getElementById('showadvanced'); aodiv.style.display = "block"; </script> @@ -124,87 +123,87 @@ function show_advanced_config() { </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> - <td class="tabcont" > - - <!-- - <table width="100%" border="0" cellpadding="6" cellspacing="0"> - <tr> - <td><p><span class="vexpl"><span class="red"><strong>PHP<br> - </strong></span> - </p></td> - </tr> - </table> - --> - <br /> - - <form action="backup_edit.php" method="post" name="iform" id="iform"> - <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <td class="tabcont" > - <tr> - <td width="25%" valign="top" class="vncellreq">Name</td> - <td width="75%" class="vtable"> - <input name="name" type="text" class="formfld" id="name" size="40" value="<?=htmlspecialchars($pconfig['name']);?>"> - </td> - </tr> - - <tr> - <td width="22%" valign="top" class="vncellreq">Path</td> - <td width="78%" class="vtable"> - <input name="path" type="text" class="formfld" id="path" size="40" value="<?=htmlspecialchars($pconfig['path']);?>"> - </td> - </tr> - <tr> - <td width="22%" valign="top" class="vncellreq">Enabled</td> - <td width="78%" class="vtable"> - <?php - echo " <select name='enabled' class='formfld'>\n"; - echo " <option></option>\n"; - switch (htmlspecialchars($pconfig['enabled'])) { - case "true": - echo " <option value='true' selected='yes'>true</option>\n"; - echo " <option value='false'>false</option>\n"; - break; - case "false": - echo " <option value='true'>true</option>\n"; - echo " <option value='false' selected='yes'>false</option>\n"; - - break; - default: - echo " <option value='true' selected='yes'>true</option>\n"; - echo " <option value='false'>false</option>\n"; - } - echo " </select>\n"; - ?> - </td> - </tr> - <tr> - <td width="25%" valign="top" class="vncellreq">Description</td> - <td width="75%" class="vtable"> - <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>"> - <br><span class="vexpl">Enter the description here.<br></span> - </td> - </tr> - - <tr> - <td valign="top"> </td> - <td> - <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()"> - <?php if (isset($id) && $a_backup[$id]): ?> - <input name="id" type="hidden" value="<?=$id;?>"> - <?php endif; ?> - </td> - </tr> + <!-- + <table width="100%" border="0" cellpadding="6" cellspacing="0"> + <tr> + <td><p><span class="vexpl"><span class="red"><strong>PHP<br> + </strong></span> + </p></td> + </tr> </table> - </form> - - <br> - <br> - <br> - <br> - <br> - <br> - - </td> + --> + <br /> + + <form action="backup_edit.php" method="post" name="iform" id="iform"> + <table width="100%" border="0" cellpadding="6" cellspacing="0"> + + <tr> + <td width="25%" valign="top" class="vncellreq">Name</td> + <td width="75%" class="vtable"> + <input name="name" type="text" class="formfld" id="name" size="40" value="<?=htmlspecialchars($pconfig['name']);?>"> + </td> + </tr> + + <tr> + <td width="22%" valign="top" class="vncellreq">Path</td> + <td width="78%" class="vtable"> + <input name="path" type="text" class="formfld" id="path" size="40" value="<?=htmlspecialchars($pconfig['path']);?>"> + </td> + </tr> + <tr> + <td width="22%" valign="top" class="vncellreq">Enabled</td> + <td width="78%" class="vtable"> + <?php + echo " <select name='enabled' class='formfld'>\n"; + echo " <option></option>\n"; + switch (htmlspecialchars($pconfig['enabled'])) { + case "true": + echo " <option value='true' selected='yes'>true</option>\n"; + echo " <option value='false'>false</option>\n"; + break; + case "false": + echo " <option value='true'>true</option>\n"; + echo " <option value='false' selected='yes'>false</option>\n"; + + break; + default: + echo " <option value='true' selected='yes'>true</option>\n"; + echo " <option value='false'>false</option>\n"; + } + echo " </select>\n"; + ?> + </td> + </tr> + <tr> + <td width="25%" valign="top" class="vncellreq">Description</td> + <td width="75%" class="vtable"> + <input name="description" type="text" class="formfld" id="description" size="40" value="<?=htmlspecialchars($pconfig['description']);?>"> + <br><span class="vexpl">Enter the description here.<br></span> + </td> + </tr> + + <tr> + <td valign="top"> </td> + <td> + <input name="Submit" type="submit" class="formbtn" value="Save"> <input class="formbtn" type="button" value="Cancel" onclick="history.back()"> + <?php if (isset($id) && $a_backup[$id]): ?> + <input name="id" type="hidden" value="<?=$id;?>"> + <?php endif; ?> + </td> + </tr> + </table> + </form> + + <br> + <br> + <br> + <br> + <br> + <br> + + </td> </tr> </table> |