You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cacert-webdb/pages/index/0.php

110 lines
4.1 KiB
PHP

<? /*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ ?>
<h3><?=_("Are you new to CAcert?")?></h3>
<p><?=sprintf(_("If you want to have free certificates issued to you, join the %s CAcert Community %s."),"<a href=\"https://www.cacert.org/index.php?id=1\">","</a>")?></p>
<p><?=sprintf(_("If you want to use certificates issued by CAcert, read the CAcert %s Disclaimer and Licence %s."),'<a href="/policy/NRPDisclaimerAndLicence.php">',"</a>")?>
<?=sprintf(_("This licence applies to using the CAcert %s root keys %s."),'<a href="/index.php?id=3">','</a>')?></p>
<h3><?=_("For CAcert Members")?></h3>
<p><?=sprintf(_("Have you passed the CAcert %s Assurer Challenge %s yet?"),'<a href="http://wiki.cacert.org/wiki/AssurerChallenge">','</a>')?></p>
<p><?=sprintf(_("Have you read the CAcert %sCommunity Agreement%s yet?"),'<a href="/policy/CAcertCommunityAgreement.php">','</a>')?></p>
<p><?=sprintf(_("For general documentation and help, please visit the CAcert %sWiki Documentation site %s."),'<a href="http://wiki.CAcert.org">','</a>')?>
<?=sprintf(_("For specific policies, see the CAcert %sApproved Policies page%s."),'<a href="/policy/">',"</a>")?></p>
<!--
<h3><?=_("Introduction")?></h3>
<p><?=_("It's been a long time coming, but the wait was worthwhile, finally you are able to get security at the right price... Free!")?></p>
<p><?=_("For years we've all been charged high amounts of money to pay for security that doesn't and shouldn't cost the earth.")?></p>
<p><?=_("The primary goals are:")?>
<ul>
<li><?=_("Inclusion into mainstream browsers!")?></li>
<li><?=_("To provide a trust mechanism to go with the security aspects of encryption.")?></li>
</ul>
<p><?=sprintf(_("For general documentation and help please see our %s site"), "<a href='http://wiki.CAcert.org'>"._("Wiki Documentation")."</a>")?>.</p>
-->
<div class="newsbox">
<?
/*
$query = "select *, UNIX_TIMESTAMP(`when`) as `TS` from news order by `when` desc limit 5";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
echo "<p><b>".date("Y-m-d", $row['TS'])."</b> - ".$row['short']."</p>\n";
if($row['story'] != "")
echo "<p>[ <a href='news.php?id=".$row['id']."'>"._("Full Story")."</a> ]</p>\n";
}
if(mysql_num_rows(mysql_query("select * from `news`")) > 2)
echo "<p>[ <a href='news.php'>"._("More News Items")."</a> ]</p>";
*/
$rss = "";
$open = $items = 0;
$fp = @fopen("/www/pages/index/feed.rss", "r");
if($fp)
{
echo '<p><u>'._('Latest News').'</u></p>';
while(!feof($fp))
$rss .= trim(fgets($fp, 4096));
fclose($fp);
$rss = str_replace("><", ">\n<", $rss);
$lines = explode("\n", $rss);
foreach($lines as $line)
{
$line = trim($line);
if($line != "<item>" && $open == 0)
continue;
if($line == "<item>" && $open == 0)
{
$open = 1;
continue;
}
if($line == "</item>" && $open == 1)
{
$items++;
if($items >= 3)
break;
$open == 0;
continue;
}
if(substr($line, 0, 7) == "<title>")
echo "<h3>".str_replace("&amp;#", "&#", recode_string("UTF8..html", str_replace("&amp;", "", trim(substr($line, 7, -8)))))."</h3>\n";
if(substr($line, 0, 13) == "<description>")
echo "<p>".str_replace("&amp;#", "&#", recode_string("UTF8..html", str_replace("&amp;", "", trim(substr($line, 13, -14)))))."</p>\n";
if(substr($line, 0, 6) == "<link>")
echo "<p>[ <a href='".trim(substr($line, 6, -7))."'>"._("Full Story")."</a> ]</p>\n";
}
}
?>
[ <a href="http://blog.CAcert.org/"><?=_('More News Items')?></a> ]
</div>