Esempio n. 1
0
 *   Author URI: http://www.myminipin.com/
 *
 *   an exclusive file for downloads
 *   
 *   depends: RJSES
 *   		  RJDL
 *   		  RJSHOP
 *   	      RJDGTXN
 */
include dirname(__FILE__) . '/../../../../wp-load.php';
$ar = wp_parse_args($_REQUEST);
$dl = false;
if (empty($ar['i']) || !is_numeric($ar['i'])) {
    //	session_id()
} else {
    RJSES::start();
    $i = new RJDGSHOP($ar['i']);
    $txn = new RJDGPPTXN();
    //$txn->loadByShopObj($i);
    if ($txn->loadBy('transaction_id', $ar['txn_id']) && $i->isLoaded()) {
        if ($txn->isComplete($i)) {
            status_header(200);
            //show pdf
            if (RJDL::http($i->pathname)) {
                $dl = true;
            }
        } else {
            status_header(404);
            $a = $txn->getStatus($i);
            array_walk($a, create_function('&$i,$k', '$i="<li>$i</li>";'));
            get_header();