211 lines
8.2 KiB
PHP
211 lines
8.2 KiB
PHP
<? /*
|
||
Copyright (C) 2004 by Duane Groth <duane_at_CAcert_dot_org>
|
||
|
||
This file is part of CAcert.
|
||
|
||
CAcert has been released under a CAcert license
|
||
which can be found included with these source files or can
|
||
be downloaded from the internet from the following address:
|
||
http://www.cacert.org/src-lic.php
|
||
|
||
CAcert is distributed WITHOUT ANY WARRANTY; without even
|
||
the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||
PARTICULAR PURPOSE. See the License for more details.
|
||
*/
|
||
|
||
function showheader($title = "CAcert.org", $title2 = "")
|
||
{
|
||
global $hostname, $id, $PHP_SELF;
|
||
|
||
$locrest = "";
|
||
if($_SESSION['profile']['ccid'] > 0)
|
||
$locrest .= "&ccid=".$_SESSION['profile']['ccid'];
|
||
|
||
if($_SESSION['profile']['regid'] > 0)
|
||
$locrest .= "®id=".$_SESSION['profile']['regid'];
|
||
|
||
if($_SESSION['profile']['locid'] > 0)
|
||
$locrest .= "&locid=".$_SESSION['profile']['locid'];
|
||
|
||
$tmpid = $id;
|
||
if($PHP_SELF == "/wot.php")
|
||
$tmpid = $id + 500;
|
||
if($PHP_SELF == "/gpg.php")
|
||
$tmpid = $id + 1000;
|
||
|
||
switch($tmpid)
|
||
{
|
||
case 1:
|
||
case 2: $expand = " explode('emailacc');"; break;
|
||
case 3:
|
||
case 4:
|
||
case 5:
|
||
case 6: $expand = " explode('clicerts');"; break;
|
||
case 7:
|
||
case 8:
|
||
case 9: $expand = " explode('domains');"; break;
|
||
case 10:
|
||
case 11:
|
||
case 12:
|
||
case 15: $expand = " explode('servercert');"; break;
|
||
case 13:
|
||
case 14:
|
||
case 36:
|
||
case 41:
|
||
case 507:
|
||
case 508: $expand = " explode('mydetails');"; break;
|
||
case 16:
|
||
case 17:
|
||
case 18:
|
||
case 19: $expand = " explode('clientorg');"; break;
|
||
case 20:
|
||
case 21:
|
||
case 21:
|
||
case 23: $expand = " explode('serverorg');"; break;
|
||
case 24:
|
||
case 25:
|
||
case 26:
|
||
case 27:
|
||
case 28:
|
||
case 29:
|
||
case 30:
|
||
case 31:
|
||
case 32:
|
||
case 33:
|
||
case 34:
|
||
case 35: $expand = " explode('orgadmin');"; break;
|
||
case 42:
|
||
case 43:
|
||
case 44: $expand = " explode('sysadmin');"; break;
|
||
case 500:
|
||
case 501:
|
||
case 502:
|
||
case 503:
|
||
case 504:
|
||
case 505:
|
||
case 506: $expand = " explode('WoT');"; break;
|
||
case 1000:
|
||
case 1001:
|
||
case 1002:
|
||
case 1003:
|
||
case 1004:
|
||
case 1005:
|
||
case 1006:
|
||
case 1007:
|
||
case 1008:
|
||
case 1009:
|
||
case 1010: $expand = " explode('gpg');"; break;
|
||
}
|
||
|
||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<title><?=$title?></title>
|
||
<? if($_SESSION['_config']['header'] != "") { ?><?=$_SESSION['_config']['header']?><? } ?>
|
||
<link rel="stylesheet" href="styles/default.css" type="text/css">
|
||
<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.style.display = 'none';
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
</head>
|
||
<body onload="hideall(); explode('home');<?=$expand?>">
|
||
<div id="pagecell1">
|
||
<div id="pageName"><br>
|
||
<h2><a href="http://www.CAcert.org"><img src="/images/cacert2.png" border="0"></a></h2>
|
||
<div id="googlead"><h2><3E>Vive la R<>volution!</h2></div>
|
||
</div>
|
||
<div id="pageNav">
|
||
<div class="relatedLinks">
|
||
<h3>CAcert.org</h3>
|
||
<ul class="menu" id="home"><li><a href="index.php"><?=_("Go Home")?></a></li><li><a href="account.php?id=logout"><?=_("Logout")?></a></li></ul>
|
||
</div>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('mydetails')">+ <?=_("My Details")?></h3>
|
||
<ul class="menu" id="mydetails"><li><a href="account.php?id=13"><?=_("Edit")?></a></li><li><a href="account.php?id=14"><?=_("Change Password")?></a></li><li><a href="account.php?id=41"><?=_("Default Language")?></a></li><li><a href="wot.php?id=8"><?=_("My Listing")?></a></li><li><a href="wot.php?id=7<?=$locrest?>"><?=_("My Location")?></a></li><li><a href="account.php?id=36"><?=_("My Alert Settings")?></a></li><li><a href="wot.php?id=10">My Points</a></li></ul>
|
||
</div>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('emailacc')">+ <?=_("Email Accounts")?></h3>
|
||
<ul class="menu" id="emailacc"><li><a href="account.php?id=1"><?=_("Add")?></a></li><li><a href="account.php?id=2"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('clicerts')">+ <?=_("Client Certificates")?></h3>
|
||
<ul class="menu" id="clicerts"><li><a href="account.php?id=3"><?=_("New")?></a></li><li><a href="account.php?id=5"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('domains')">+ <?=_("Domains")?></h3>
|
||
<ul class="menu" id="domains"><li><a href="account.php?id=7"><?=_("Add")?></a></li><li><a href="account.php?id=9"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('servercert')">+ <?=_("Server Certificates")?></h3>
|
||
<ul class="menu" id="servercert"><li><a href="account.php?id=10"><?=_("New")?></a></li><li><a href="account.php?id=12"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<? if(mysql_num_rows(mysql_query("select * from `org` where `memid`='".$_SESSION['profile']['id']."'")) > 0 || $_SESSION['profile']['admin'] == 1) { ?>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('clientorg')">+ <?=_("Org Client Certs")?></h3>
|
||
<ul class="menu" id="clientorg"><li><a href="account.php?id=16"><?=_("New")?></a></li><li><a href="account.php?id=18"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('serverorg')">+ <?=_("Org Server Certs")?></h3>
|
||
<ul class="menu" id="serverorg"><li><a href="account.php?id=20"><?=_("New")?></a></li><li><a href="account.php?id=22"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<? } ?>
|
||
<? if(mysql_num_rows(mysql_query("select * from `org` where `memid`='".$_SESSION['profile']['id']."' and `masteracc`='1'")) > 0 || $_SESSION['profile']['admin'] == 1) { ?>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('orgadmin')">+ <?=_("Org Admin")?></h3>
|
||
<ul class="menu" id="orgadmin"><? if($_SESSION['profile']['admin'] == 1) { ?><li><a href="account.php?id=24"><?=_("New Organisation")?></a></li><li><a href="account.php?id=25"><?=_("View Organisations")?></a></li><? } ?><li><a href="account.php?id=35"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<? } ?>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('WoT')">+ <?=_("CAcert Web of Trust")?></h3>
|
||
<ul class="menu" id="WoT"><li><a href="wot.php?id=0"><?=_("About")?></a></li><li><a href="wot.php?id=1"><?=_("Find an Assurer")?></a></li><li><a href="wot.php?id=3"><?=_("Rules")?></a></li><li><? if($_SESSION['profile']['points'] < 100) { ?><a href="wot.php?id=2"><?=_("Becoming an Assurer")?></a><? } else { ?><a href="wot.php?id=5"><?=_("Assure Someone")?></a><? } ?></li><li><a href="wot.php?id=4"><?=_("Trusted Third Parties")?></a></li><li><a href="http://www.cacert.org/docs/CAP.pdf"><?=_("WoT Form")?></a></li><li><a href="http://www.cacert.org/docs/TTP.pdf"><?=_("TTP Form")?></a></li></ul>
|
||
</div>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('gpg')">+ <?=_("GPG/PGP Keys")?></h3>
|
||
<ul class="menu" id="gpg"><li><a href="gpg.php?id=0"><?=_("New")?></a></li><li><a href="gpg.php?id=2"><?=_("View")?></a></li></ul>
|
||
</div>
|
||
<? if($_SESSION['profile']['admin'] == 1) { ?>
|
||
<div class="relatedLinks">
|
||
<h3 onclick="explode('sysadmin')">+ <?=_("System Admin")?></h3>
|
||
<ul class="menu" id="sysadmin"><li><a href="account.php?id=42"><?=_("Find User")?></a></li></ul>
|
||
</div>
|
||
<? } ?>
|
||
</div>
|
||
<div id="content">
|
||
<div class="story">
|
||
<h3><?=$title2?></h3>
|
||
<? if($_SESSION['_config']['errmsg'] != "") { ?>
|
||
<p class="errmsg"><? echo $_SESSION['_config']['errmsg']; $_SESSION['_config']['errmsg'] = ""; ?> </p>
|
||
<? } ?>
|
||
<?
|
||
}
|
||
|
||
function showfooter()
|
||
{
|
||
global $hostname;
|
||
?>
|
||
</div>
|
||
</div>
|
||
<div id="siteInfo"><a href="account.php?id=37"><?=_("About Us")?></a> | <a href="account.php?id=38"><?=_("Donations")?></a> |
|
||
<a href="account.php?id=39"><?=_("Privacy Policy")?></a> | <a href="account.php?id=40"><?=_("Contact Us")?></a>
|
||
| ©2004 by CAcert</div>
|
||
</div>
|
||
</body>
|
||
</html><?
|
||
}
|
||
?>
|