home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 March
/
PCWorld_2001-03_cd.bin
/
KOMUNIK
/
progweb
/
progweb.exe
/
phpnuke
/
html
/
header.php
< prev
next >
Wrap
PHP Script
|
2000-12-05
|
4KB
|
106 lines
<?php
######################################################################
# PHP-NUKE: Web Portal System
# ===========================
#
# Copyright (c) 2000 by Francisco Burzi (fburzi@ncc.org.ve)
# http://phpnuke.org
#
# This modules is to be included in the head for each page
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
######################################################################
##################################################
# Include some common header for HTML generation #
##################################################
function head() {
global $index, $hlpfile;
if (!isset($index)) {
include("config.php");
global $artpage, $topic;
} else {
global $site_font, $sitename, $artpage, $topic, $banners, $Default_Theme, $uimages;
}
global $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $textcolor1, $textcolor2;
echo "<html>\n<head>\n";
echo "<style type=\"text/css\">\n";
echo "<!--\n";
$browser = getenv("HTTP_USER_AGENT");
if (ereg("MSIE", "$browser")) {
echo ".textbox { background: transparent; background-color: White; border: 1px solid #000000; color: #000000; font-family: $site_font; font-size: x-small; text-align: left; scrollbar-face-color: #CCCCCC; scrollbar-shadow-color: #FFFFFF; scrollbar-highlight-color: #FFFFFF; scrollbar-3dlight-color: #FFFFFF; scrollbar-darkshadow-color: #FFFFFF; scrollbar-track-color: #FFFFFF; scrollbar-arrow-color: #000000 }\n";
} else {
echo ".textbox { background: transparent; background-color: White; color: #000000; font-family: $site_font; font-size: x-small; text-align: left; scrollbar-face-color: #CCCCCC; scrollbar-shadow-color: #FFFFFF; scrollbar-highlight-color: #FFFFFF; scrollbar-3dlight-color: #FFFFFF; scrollbar-darkshadow-color: #FFFFFF; scrollbar-track-color: #FFFFFF; scrollbar-arrow-color: #000000 }\n";
}
echo "TD {font-size: 10pt; font-family: $site_font}\n";
echo "BODY {font-size: 10pt; font-family: $site_font}\n";
echo "-->\n</style>\n";
echo "<title>$sitename</title>\n";
// if ($admin) {
echo "<script language=\"javascript\">\n";
echo "<!--\n\n";
echo "function openwindow(){\n";
echo " window.open (\"$hlpfile\",\"Help\",\"toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=400\");\n";
echo "}\n\n";
echo "//-->\n";
echo "</script>\n";
// }
if ($artpage==1) {
echo "<script language=\"javascript\" src=\"dhtmllib.js\"></script>\n";
echo "<script language=\"javascript\" src=\"scroller.js\"></script>\n";
echo "<script language=\"javascript\">\n\n";
echo "var myScroller1 = new Scroller(0, 0, 180, 42, 1, 0);\n";
echo "myScroller1.setColors(\"#000000\", \"#FFFFFF\", \"#000000\");\n";
echo "myScroller1.setFont(\"$site_font\", 1);\n";
$result=mysql_query("select sid, title from stories where topic=$topic order by sid DESC limit 0,20");
while(list($sid1, $title1) = mysql_fetch_row($result)) {
$title1 = ereg_replace("\"", "\\\"", $title1);
echo "myScroller1.addItem(\"<center><a href=article.php?sid=$sid1>$title1</a></center>\");\n";
}
echo "\n";
echo "function init() {\n\n";
echo "var img;\n";
echo "var x, y;\n";
echo "img = getImage(\"placeholder\");\n";
echo "x = getImagePageLeft(img);\n";
echo "y = getImagePageTop(img);\n";
echo "myScroller1.create();\n";
echo "myScroller1.hide();\n";
echo "myScroller1.moveTo(x, y);\n";
echo "myScroller1.setzIndex(100);\n";
echo "myScroller1.show();\n\n";
echo "}\n";
echo "</script>";
} else {
echo "<script language=\"javascript\">\n\n";
echo "function init() {\n\n";
echo "}\n";
echo "</script>\n";
}
echo "</head>\n\n";
if ($banners) {
include("banners.php");
}
if(isset($user)) {
$user2 = base64_decode($user);
$cookie = explode(":", $user2);
if($cookie[9]=="") $cookie[9]=$Default_Theme;
if(isset($theme)) $cookie[9]=$theme;
// extra logic to override previous with $theme override var
include("themes/$cookie[9]/theme.php");
include("themes/$cookie[9]/header.php");
} else {
include("themes/$Default_Theme/theme.php");
include("themes/$Default_Theme/header.php");
}
}
head();
include("counter.php");
?>