diff options
author | mcrane <mctch@yahoo.com> | 2009-08-01 04:29:33 -0600 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-08-01 04:29:33 -0600 |
commit | e0660de17552d5a859b6215d1b8fa3132119bc8c (patch) | |
tree | 01cf49ef60b4dfdbd1c9d3c6af4fd0e7f97085e5 /config/denyhosts/denyhosts_log.tmp | |
parent | 391e0bad90da42e64f244b979b83167b8acb744b (diff) | |
download | pfsense-packages-e0660de17552d5a859b6215d1b8fa3132119bc8c.tar.gz pfsense-packages-e0660de17552d5a859b6215d1b8fa3132119bc8c.tar.bz2 pfsense-packages-e0660de17552d5a859b6215d1b8fa3132119bc8c.zip |
DenyHosts syntax improvements, editarea loaded if not available
Diffstat (limited to 'config/denyhosts/denyhosts_log.tmp')
-rw-r--r-- | config/denyhosts/denyhosts_log.tmp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/config/denyhosts/denyhosts_log.tmp b/config/denyhosts/denyhosts_log.tmp index 69d16cce..a56e4eab 100644 --- a/config/denyhosts/denyhosts_log.tmp +++ b/config/denyhosts/denyhosts_log.tmp @@ -51,9 +51,18 @@ if ($_POST['a'] == "save") { } */ +if(!is_file("/var/log/denyhosts")) { + exec ('touch /var/log/denyhosts'); +} + $filename = '/var/log/denyhosts'; $fd = fopen($filename, "r"); -$content = fread($fd, filesize($filename)); +if (filesize($filename) > 0) { + $content = fread($fd, filesize($filename)); +} +else { + $content = ''; +} fclose($fd); include("head.inc"); @@ -83,7 +92,7 @@ function sf() { document.forms[0].savetopath.focus(); } <?php include("fbegin.inc"); -echo "<p class=\"pgtitle\">$v_project_label: Variables</p>\n"; +echo "<p class=\"pgtitle\">Deny Hosts</p>\n"; ?> <div id="mainlevel"> @@ -107,36 +116,38 @@ echo "<p class=\"pgtitle\">$v_project_label: Variables</p>\n"; <?php ?> + <!-- <table width="98%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td width='90%'><p><span class="vexpl"><span class="red"><strong>DenyHosts Log<br> + <td width='90%'><p><span class="vexpl"><span class="red"><strong>zzz<br> </strong></span> - <!-- Description --> + Description </p> </td> - <td width='10%' align='right' valign='middle'><!--<input type="submit" value="save" />--></td> + <td width='10%' align='right' valign='middle'><input type="submit" value="save" /></td> </tr> </table> + --> <br /> <br /> <textarea style="width:98%" id="code" name="code" rows="30" cols="<?php echo $cols; ?>" name="content"><?php echo htmlentities($content); ?></textarea> <br /> <br /> - <!-- + <table width="98%" border="0" cellpadding="6" cellspacing="0"> <tr> - <td>/usr/local/zzz/conf/zzz.xml</td> + <td>/var/log/denyhosts</td> <td align='right'> <input type="hidden" name="f" value="<?php echo $_GET['f']; ?>" /> <input type="hidden" name="a" value="save" /> <?php - echo "<input type='button' value='Restore Default' onclick=\"document.location.href='/packages/zzz/zzz.php?a=default&f=zzz';\" />"; + //echo "<input type='button' value='Restore Default' onclick=\"document.location.href='/packages/zzz/zzz.php?a=default&f=zzz';\" />"; ?> </td> </tr> </table> - --> + <!-- </form> --> |