diff options
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)){ ?> |