› Download Area
Be sure to enter your payer email address, user id, account #, etc in the Buyer field.
$find=mysqli_real_escape_string($connect,$find);
//This is only displayed if they have submitted the form
if ($searching =='yes')
{
echo '
';
//If they did not enter a search term we give them an error
if ($find == "")
{
echo '
'.$lang['LOST_DOWNLOAD_4'].'...';
exit;
}
// We preform a bit of filtering
//$find = preg_replace("/[^a-zA-Z0-9s]/", " ", $find);
//$find = strtoupper($find);
$find = strip_tags($find);
$find = trim ($find);
//Now we search for our search term, in the field the user specified
//$data = mysqli_query("SELECT * FROM `downloadlinks` WHERE `dbatch` LIKE '%$find%'");
//dpay = payment processor, dpayer = buyer email addy or account #
$data = $connect->query("SELECT * FROM `downloadlinks` WHERE dpayer='$find' ORDER BY ddate DESC");
echo "
Date |
Item |
Order # |
Payment |
Download Link |
";
//And we display the results
while($result = mysqli_fetch_array( $data ))
{
echo "
";
echo $result['ddate'];
echo " |
";
if ($result['dscript']=='1'){ $result_dscript = 'PBTLA'; }
if ($result['dscript']=='2'){ $result_dscript = 'ADVERTIZ'; }
echo $result_dscript;
//echo $result['dscript'];
echo " |
";
echo $result['dtransid'];
echo " |
";
echo $result['dpay'].' | '.$result['dbatch'];
echo " |
";
if ($result['dtransid']==''){
echo "Link #1";
} else {
echo " Link #1";
}
echo" | ";
echo " Link #2";
echo " |
";
}
echo "
";
//This counts the number or results - and if there wasn't any it gives them a little message explaining that
$anymatches=mysqli_num_rows($data);
if ($anymatches == 0)
{
echo '
'.$lang['LOST_DOWNLOAD_5'].'
';
}
echo '
'.$lang['LOST_DOWNLOAD_6'].'
';
//And we remind them what they searched for
//echo "
Entered: " .$find;
echo "
";
}
?>