Beispiel #1
0
<?php

require_once("../../classes/PluploadHandler.php");
require_once '../../includes/global.inc.php';
require_once '../../utils/Account.util.php';
require_once '../../utils/Generators.util.php';

$emailToUpdate = "*****@*****.**";

$tanNos = Generators::generateTANs ($emailToUpdate, 10);

  $tanEmailMessage = "";

  for ($i=0; $i < count($tanNos); $i++) { 
    $tanEmailMessage .= $i . ": " . $tanNos[$i] . "<br/>";
    $tanEmailMessage .= "<br/><hr>";
  }

echo $tanEmailMessage;

$tanToDecrypt = "dHDhS024hPzH/T8GxZiWFZoVDNVVJWCj/nfi7rBeNxBKQf904WD5zSEV4KppYKCzpC4mldvM9THJB2gwlw==";

echo "====>".AccountUtils::checkTANValidity($emailToUpdate, $tanToDecrypt);

  // Update the initial balance
  $updateBalanceData = array (
      "balance" => $initialAmount
    );

  if (filter_var($emailToUpdate, FILTER_VALIDATE_EMAIL) != true) {
    header ("Location: error.php?message=Email Validation Failed");
  }
  
  
  if (!preg_match("/^[[:digit:]]+$/", $initialAmount)) {
    header ("Location: error.php?message=Initial Amount Validation Failed");
  }

  //$tanNos = $db->select("TANS", "userId = '$emailToUpdate'");
  $tanNos = Generators::generateTANs ($emailToUpdate, NO_OF_TAN);
  $tanEmailMessage = "";

  if (count($tanNos) > 2) {

    for ($i=0; $i < count($tanNos); $i++) { 
      $tanEmailMessage .= $i . ": " . $tanNos[$i] . "<br/>";
      $tanEmailMessage .= "<br/><hr>";
    }

    $password = Generators::randomPasswordGenerate(8);
  
    $mpdf=new mPDF('c','A4','','',32,25,27,25,16,13); 

    $mpdf=new mPDF('win-1252','A4','','',20,15,48,25,10,10); 
    $mpdf->useOnlyCoreFonts = true;