diff options
author | Phil Davis <phil.davis@inf.org> | 2015-08-06 17:22:24 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2015-08-06 17:22:24 +0545 |
commit | 330d4acae1727401eef2face8041df4195fcc8a9 (patch) | |
tree | ea250c330857d76ad07dba79a85b71dcb37c81e2 /config/backup/backup_edit.php | |
parent | bad0f316bf513e8a7b61646ceb2e1ddb3bf2b03d (diff) | |
download | pfsense-packages-330d4acae1727401eef2face8041df4195fcc8a9.tar.gz pfsense-packages-330d4acae1727401eef2face8041df4195fcc8a9.tar.bz2 pfsense-packages-330d4acae1727401eef2face8041df4195fcc8a9.zip |
Backup package 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> |