Split showheader() into header and bodycontent

pull/1/head
root 16 years ago
parent 8f52d2c5de
commit b71a0a3a4b

@ -18,46 +18,15 @@
if(!function_exists("showheader"))
{
function showheader($title = "CAcert.org", $title2 = "")
function showbodycontent($title = "CAcert.org", $title2 = "")
{
global $id;
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?=$title?></title>
<? if(array_key_exists("header",$_SESSION['_config']) && $_SESSION['_config']['header'] != "") { ?><?=$_SESSION['_config']['header']?><? } ?>
<link rel="stylesheet" href="/styles/default.css" type="text/css">
<link href="http://blog.CAcert.org/feed/" rel="alternate" type="application/rss+xml" title="rss">
<script language="JavaScript" type="text/javascript">
function explode(e) {
if (document.getElementById(e).style.display == 'none') {
document.getElementById(e).style.display = 'block';
} else {
document.getElementById(e).style.display = 'none';
}
}
function hideall() {
var Nodes = document.getElementsByTagName('ul')
var max = Nodes.length
for(var i = 0;i < max;i++) {
var nodeObj = Nodes.item(i)
if (nodeObj.className == "menu" && nodeObj.id != "recom") {
nodeObj.style.display = 'none';
}
}
}
</script>
</head>
<body onload="hideall();">
<div id="pagecell1">
?> <div id="pagecell1">
<div id="pageName"><br>
<div id="pageLogo"><a href="http://<?=$_SESSION['_config']['normalhostname']?>"><img src="/images/cacert4.png" border="0" alt="CAcert.org logo"></a></div>
<div id="googlead"><? if($_SERVER['HTTPS'] != "on") { ?><script type="text/javascript">
<!--
google_ad_client = "pub-0959373285729680";
google_alternate_ad_url = "http://text.happysnapper.net/?userid=06f45be90b9c7456f98f304d0cae3405&border=FFFFFF&bg=FFFFFF&nourl=www.cacert.org";
google_alternate_ad_url = "http://www.cacert.org/";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
@ -106,6 +75,44 @@ google_color_border = "FFFFFF";
<p><? echo $_SESSION['_config']['errmsg']; $_SESSION['_config']['errmsg'] = ""; ?> </p>
<? } ?>
<?
}
function showheader($title = "CAcert.org", $title2 = "")
{
global $id;
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?=$title?></title>
<? if(array_key_exists("header",$_SESSION['_config']) && $_SESSION['_config']['header'] != "") { ?><?=$_SESSION['_config']['header']?><? } ?>
<link rel="stylesheet" href="/styles/default.css" type="text/css">
<link href="http://blog.CAcert.org/feed/" rel="alternate" type="application/rss+xml" title="rss">
<script language="JavaScript" type="text/javascript">
function explode(e) {
if (document.getElementById(e).style.display == 'none') {
document.getElementById(e).style.display = 'block';
} else {
document.getElementById(e).style.display = 'none';
}
}
function hideall() {
var Nodes = document.getElementsByTagName('ul')
var max = Nodes.length
for(var i = 0;i < max;i++) {
var nodeObj = Nodes.item(i)
if (nodeObj.className == "menu" && nodeObj.id != "recom") {
nodeObj.style.display = 'none';
}
}
}
</script>
</head>
<body onload="hideall();">
<?
showbodycontent($title,$title2);
}
}

Loading…
Cancel
Save