diff options
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/pkg.php | 13 | ||||
-rwxr-xr-x | usr/local/www/pkg_edit.php | 14 |
2 files changed, 21 insertions, 6 deletions
diff --git a/usr/local/www/pkg.php b/usr/local/www/pkg.php index 806b473..d46e995 100755 --- a/usr/local/www/pkg.php +++ b/usr/local/www/pkg.php @@ -116,10 +116,17 @@ if ($pkg['tabs'] <> "") { foreach($pkg['tabs']['tab'] as $tab) { $active = "tabinact"; if(isset($tab['active'])) $active = "tabact"; - $url = ""; + $urltmp = ""; $title = $tab['text']; - if($tab['url'] <> "") $url = $tab['url']; - if($tab['xml'] <> "") $url = "pkg_edit.php?xml=" . $tab['xml']; + if($tab['url'] <> "") $urltmp = $tab['url']; + if($tab['xml'] <> "") $urltmp = "pkg_edit.php?xml=" . $tab['xml']; + + $toeval = "\$myurl = \"" . getenv("HTTP_HOST") . "\"; \n"; + eval($toeval); + // eval url so that above $myurl item can be processed if need be. + $toeval = "\$url = \"" . $urltmp . "\"; \n"; + eval($toeval); + if($active == "tabinact") { echo "<li class=\"{$active}\">"; echo "<a href=\""; diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php index d5a184f..b97ee7c 100755 --- a/usr/local/www/pkg_edit.php +++ b/usr/local/www/pkg_edit.php @@ -235,10 +235,18 @@ if ($pkg['tabs'] <> "") { foreach($pkg['tabs']['tab'] as $tab) { $active = "tabinact"; if(isset($tab['active'])) $active = "tabact"; - $url = ""; + + $urltmp = ""; $title = $tab['text']; - if($tab['url'] <> "") $url = $tab['url']; - if($tab['xml'] <> "") $url = "pkg_edit.php?xml=" . $tab['xml']; + if($tab['url'] <> "") $urltmp = $tab['url']; + if($tab['xml'] <> "") $urltmp = "pkg_edit.php?xml=" . $tab['xml']; + + $toeval = "\$myurl = \"" . getenv("HTTP_HOST") . "\"; \n"; + eval($toeval); + // eval url so that above $myurl item can be processed if need be. + $toeval = "\$url = \"" . $urltmp . "\"; \n"; + eval($toeval); + if($active == "tabinact") { echo "<li class=\"{$active}\">"; echo "<a href=\""; |