cacert-webdb/stamp/certdet.php

71 lines
2.6 KiB
PHP
Raw Normal View History

2006-11-27 00:52:11 +00:00
<?
$org = $invalid = 0;
$tz = intval($_REQUEST['tz']);
$now = date("Y-m-d", gmmktime("U") + ($tz * 3600));
$arr = explode("//", mysql_real_escape_string(trim($_REQUEST['refer'])), 2);
$arr = explode("/", $arr['1'], 2);
$ref = $arr['0'];
2006-11-27 23:10:08 +00:00
$arr = explode("//", mysql_real_escape_string(trim($_SERVER['HTTP_REFERER'])), 2);
$arr = explode("/", $arr['1'], 2);
$siteref = $arr['0'];
2006-11-29 11:08:20 +00:00
if($siteref != "")
$siterefer = $_SERVER['HTTP_REFERER'];
else
$siterefer = $_REQUEST['refer'];
2006-11-27 23:10:08 +00:00
if($ref == "" || ($ref != $siteref && $siteref != ""))
{
$invalid = 2;
} else {
2006-11-29 11:08:20 +00:00
if($_SESSION['_stamp']['ref'] == "")
$_SESSION['_stamp']['ref'] = $siterefer;
list($invalid, $info) = checkhostname($ref);
2006-11-27 00:52:11 +00:00
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CAcert.org Certificate Details!</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div id="pagecell1">
<div id="pageName"><br>
<h2><a href="http<? if($_SERVER['HTTPS']=="on") { echo "s"; } ?>://www.cacert.org">
<img src="http<? if($_SERVER['HTTPS']=="on") { echo "s"; } ?>://www.cacert.org/images/cacert3.png" border="0" alt="CAcert.org logo"></a></h2>
<? if($_SERVER['HTTPS']!="on") { ?>
<div id="googlead"><br><script type="text/javascript"><!--
google_ad_client = "pub-0959373285729680";
google_alternate_color = "ffffff";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text";
google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>
<? } ?>
</div>
<div id="content">
<div class="story">
<h3>SSL Certificate Details for <?=$ref?></h3>
<? if($invalid == 0) { ?>
<p>
Status: Valid<br />
2006-11-29 11:08:20 +00:00
Valid From: <?=$info['issued']?> GMT<br />
Valid To: <?=$info['expire']?> GMT<br />
Subject: <a href="#" title="<?=$info['subject']?>" onClick="return false;"><?=substr($info['subject'],0,80)?></a><br />
Organisation: <? if($info['org'] == 0) { ?>N/A<? } else { echo $info['O'].", ".$info['L']." ".$info['ST']." ".$info['C']; } ?><br />
Verification: <? if($info['points'] >= 50) { echo "Person had been assured at time of issue with at least 50 points."; }
else if($info['org'] == 1) { ?>This organisation was assured at the time the certificate was issued.<? } ?></p>
2006-11-27 00:52:11 +00:00
<? } else { ?>
<p style="color:red">This site has potentially abused CAcert logos and Copyrights, please report it so we may further investigate.</p>
<? } ?>
2006-11-29 11:08:20 +00:00
<p><a href="report.php">Problem with this site? Please report it</a></p>
2006-11-27 00:52:11 +00:00
</div>
</div>
</body>
</html>