<?php
set_time_limit(0);
session_start();
require_once ("db/AppManager.php");

if (empty($_SESSION['step1']) || empty($_SESSION['step2']) || empty($_SESSION['step3'])) {
    header('Location:index.php');
}

$pm = AppManager::getPM();
 $asin = $_SESSION['asin'];
$sqlredi='select * from sortlink_asin where `ASIN`="'.$asin.'"';
$result=$pm->fetchResult($sqlredi);
if(!empty($result))
{
				
$url=$result[0]['sort_link'];
				
header("Location:".$url,TRUE,301);	
}else
{
	header("Location:index.php");
}

?>
