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 . */ $SITE = "zEscrow"; include("credentials.html"); $CONN = pg_pconnect("host=localhost dbname=$DBNAME user=$DBUSER password=$DBPASSWORD"); function genkey() { $max = 2147483647; $count = 4; $key = ""; for ($i=0; $i<$count; $i++) { $key .= rand(1, $max); } return $key; } function error($msg) { print("
Error: $msg
"); include("below.html"); exit(0); } function mailer($recipient, $key) { global $URL; $subject = "zEscrow Retrieval"; $message = " Access your deposit(s) at: $URL/retrieve/download/?key=$key This URL will expire in approximately 15 minutes! "; $headers .= 'From: Retrievals <' . $CONTACT . '>'; $rc = mail($recipient, $subject, $message, $headers); return $rc; } function redirect($url) { print(""); exit; } ?>