diff options
author | Erik Kristensen <ekristen@pfsense.org> | 2005-08-23 23:57:06 +0000 |
---|---|---|
committer | Erik Kristensen <ekristen@pfsense.org> | 2005-08-23 23:57:06 +0000 |
commit | 4ce8ac00f5c45c8167b05e3220042abc5afe46bf (patch) | |
tree | 53a11245767694aad392ea36638b812cfece8c2c /usr/local/www/head.inc | |
parent | da07227ec27129e22d410fab8ef3c517cf96287b (diff) | |
download | pfsense-4ce8ac00f5c45c8167b05e3220042abc5afe46bf.zip pfsense-4ce8ac00f5c45c8167b05e3220042abc5afe46bf.tar.gz |
Adding AutoComplete to firewall_nat_edit
head.inc searchs javascript directory for includes now
Diffstat (limited to 'usr/local/www/head.inc')
-rwxr-xr-x | usr/local/www/head.inc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc index 3246e48..ca98497 100755 --- a/usr/local/www/head.inc +++ b/usr/local/www/head.inc @@ -12,10 +12,10 @@ else "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title><?=gentitle($pgtitle);?></title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" /> - <link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print"> + <title><?=gentitle($pgtitle);?></title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" /> + <link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print"> <script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script> <? @@ -27,6 +27,7 @@ else ## Make Sure $page_filename has been set ## ## if it hasn't been don't bother ... :P ## + /* if ($page_filename) { include('includes/javascript.inc.php'); @@ -34,6 +35,19 @@ else echo '<script type="text/javascript" src="/javascript/'.$file.'"></script>'; } } + */ + $dir = trim(basename($_SERVER["PHP_SELF"]), '.php'); + $path = "/usr/local/www/javascript/" . $dir . "/"; + if (is_dir($path)) { + if ($dh = opendir($path)) { + while (($file = readdir($dh)) !== false) { + "here<br>"; + if (is_dir($file)) continue; + echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n"; + } + closedir($dh); + } + } ?> <?php if (!isset($closehead)){ ?> |