2013-09-27 01:40:27 +02:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
|
|
|
|
gpg-mailgate
|
|
|
|
|
|
|
|
This file is part of the gpg-mailgate source code.
|
|
|
|
|
|
|
|
gpg-mailgate is free software: you can redistribute it and/or modify
|
2013-10-02 20:27:28 +02:00
|
|
|
it under the terms of the GNU General Public License as published by
|
2013-09-27 01:40:27 +02:00
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
gpg-mailgate source code 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
|
2013-10-02 20:27:28 +02:00
|
|
|
GNU General Public License for more details.
|
2013-09-27 01:40:27 +02:00
|
|
|
|
2013-10-02 20:27:28 +02:00
|
|
|
You should have received a copy of the GNU General Public License
|
2013-09-27 01:40:27 +02:00
|
|
|
along with gpg-mailgate source code. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2013-09-28 04:09:32 +02:00
|
|
|
require_once("include/config.php");
|
2013-09-28 23:38:18 +02:00
|
|
|
require_once("include/language.php");
|
2013-09-27 01:40:27 +02:00
|
|
|
require_once("include/common.php");
|
|
|
|
require_once("include/dbconnect.php");
|
|
|
|
require_once("include/pgp.php");
|
2014-03-02 14:12:09 +01:00
|
|
|
require_once("include/phphkp.php");
|
2014-02-24 21:13:45 +01:00
|
|
|
|
2013-09-27 01:40:27 +02:00
|
|
|
|
|
|
|
if(isset($_POST['email']) && isset($_POST['key'])) {
|
|
|
|
$result = requestPGP($_POST['email'], $_POST['key']);
|
|
|
|
|
|
|
|
if($result === true) {
|
2013-09-28 23:38:18 +02:00
|
|
|
get_page("home", array('message' => $lang['submit_success']));
|
2013-09-27 01:40:27 +02:00
|
|
|
} else {
|
2013-09-28 23:38:18 +02:00
|
|
|
get_page("home", array('message' => $result));
|
2013-09-27 01:40:27 +02:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
get_page("home");
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|