if(!empty($_POST["filename"]) && file_exists("refids/".str_replace(".pdf", "", $_POST["filename"]).".rebranderids")){
$file = str_replace(".pdf", "", $_POST["filename"]).".rebranderids";
$reportdetails = unserialize(file_get_contents("refids/$file"));
//get break between reportname_code.rebranderids
$undpos = strrpos($file,"_");
//get reportname
$reportname = substr($file, 0, $undpos);
//get code, stripping off .rebranderids
$code = substr($file, $undpos+1,-13);
$admindefaults = unserialize(file_get_contents(FOLDER."/".$reportname.".pdf.defaults"));
if(isset($reportdetails["user_email"])){
$downloadurl = "https://".$_SERVER["HTTP_HOST"].safe_dirname($_SERVER['PHP_SELF'])."/pdf/".$reportname."_".$code.".pdf";
$updateurl = "https://".$_SERVER["HTTP_HOST"].safe_dirname($_SERVER['PHP_SELF'])."/update.php?file=$reportname&code=$code&access=".$reportdetails["access_code"];
$dlburl = "https://".$_SERVER["HTTP_HOST"].safe_dirname($_SERVER['PHP_SELF'])."/index.php?file=$reportname&s=".$admindefaults[4][1]."&code=$code";
$email_body = str_replace(array("#DOWNLOAD#", "#UPDATE#", "#DOWNLINEBUILDER#"), array($downloadurl, $updateurl, $dlburl), $admindefaults[6][12]);
$email_headers = "MIME-Version:1.0\r\n"
."Content-Type: text/plain; charset=iso-8859-1\r\n"
."Content-Transfer-Encoding: base64\r\n"
."From: ".$admindefaults[6][13]." <".$admindefaults[6][14].">"."\r\n";
mail(trim($reportdetails["user_email"]), $admindefaults[6][11], base64_encode($email_body), $email_headers);
echo print_success("A confirmation email has been sent to your email address on file");
}
else
echo print_error("Your report was found, but no email is on file. Contact the admin to get your details.");
}
else if(!empty($_POST["filename"]))
echo print_error("No such report could be found. Contact the admin for help retrieving your details.")
?>
Forgotten your report update url, downline-building rebrander link, or hosted download url?
If you still have the filename of your rebranded pdf, enter it below. If you entered your email
when rebranding the form, we will resend you the download instructions and links.
Don't know the filename? Contact the site owner and they should be able to help you out.