cacert-webdb/pages/gpg/3.php

34 lines
1.2 KiB
PHP
Raw Normal View History

2004-11-18 23:21:15 +00:00
<? /*
2008-04-06 19:45:09 +00:00
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
2004-11-18 23:21:15 +00:00
2008-04-06 19:45:09 +00:00
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.
2004-11-18 23:21:15 +00:00
2008-04-06 19:45:09 +00:00
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.
2004-11-18 23:21:15 +00:00
2008-04-06 19:45:09 +00:00
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
2004-11-18 23:21:15 +00:00
*/ ?>
<?
2008-09-03 16:12:30 +00:00
$certid = intval($_REQUEST['cert']);
$query = "select * from `gpg` where `id`='$certid' and `memid`='".intval($_SESSION['profile']['id'])."'";
2004-11-18 23:21:15 +00:00
$res = mysql_query($query);
if(mysql_num_rows($res) <= 0)
{
2008-07-16 17:18:37 +00:00
echo _("No such OpenPGP key attached to your account.");
2004-11-18 23:21:15 +00:00
showfooter();
exit;
}
$row = mysql_fetch_assoc($res);
?>
2008-07-16 17:18:37 +00:00
<h3><?=_("Below is your OpenPGP key")?></h3>
2004-11-18 23:21:15 +00:00
<pre>
2008-09-03 16:12:30 +00:00
<? readfile($row['crt']); ?>
2004-11-18 23:21:15 +00:00
</pre>