This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, version 3 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
require_once("../../include/functions.html");
session_start();
$TITLE = "Confirm a Deposit";
if (!isset($_SESSION["email"]) || empty($_SESSION["email"])) {
if (isset($_REQUEST["u"])) {
$_SESSION["u"] = urldecode($_REQUEST["u"]);
}
$_SESSION["return"] = "/deposit/go";
redirect("/openid/");
}
if (isset($_REQUEST["u"]) && !isset($_SESSION["u"])) {
$_SESSION["u"] = urldecode($_REQUEST["u"]);
}
$_SESSION["email"] = strtolower(urldecode($_SESSION["email"]));
list($md5, $auth) = preg_split("/-/", $_SESSION["u"], 2);
include("../../include/above.html");
$resultset = pg_query($CONN, "
update
payload
set
email='" . pg_escape_string($_SESSION["email"]) . "',
registration=now()
where
email is null
and
auth='" . pg_escape_string($auth) . "'
and
md5='" . pg_escape_string($md5) . "'
returning
filename,
filesize,
email,
md5
");
if (pg_num_rows($resultset) == 1) {
$result = pg_fetch_object($resultset, 0);
if (isset($result->email)) {
print("
The following escrow deposit has been received. You may securely retrieve it at any time.
");
?>
Email | email ?> |
File name | filename ?> |
File size | filesize . " bytes" ?> |
md5 | md5 ?> |
Please be aware that your usage of this site is bound by the Terms of Service and Privacy Statement.");
} else {
error("An error has occurred (bad update)");
}
} else {
error("An error has occurred (empty file)");
}
include("../../include/below.html");
?>