Location: PHPKode > projects > MembersGear > membersgear/thankyou.php
<?php
    require_once "config/config.php";
    require_once INCLUDE_DIR."/product_class.php";
    require_once INCLUDE_DIR."/users_class.php";  
    $loProductClass = new product_class();  
    $users=new users_class();
  
    $laTracking_Code = array();
    $getProductUserId=false;
    $getUserinfo=false;
     if(isset($_COOKIE[COOKIE_PREFIX.'user__id']) )  
     {                                                                     
         $getProductUserId=decrypt($_COOKIE[COOKIE_PREFIX.'user__id']);   
         $getUserinfo=$users->getSpecificUserInfoById($getProductUserId);
         
     }     
  
    if(isset($_GET['productid']) and $_GET['productid'] != '' and is_numeric($_GET['productid']))
    {
        $query = 'SELECT id FROM '.TABLE_PREFIX.'productpaymentoptions WHERE productid='.$_GET['productid'];
        $liProductPaymentOptionID = $loProductClass->View($query,null,null);
        
        if(is_array($liProductPaymentOptionID) and sizeof($liProductPaymentOptionID) > 0)
        {
            $query = 'SELECT trackingcode FROM '.TABLE_PREFIX.'thankyoupage_tracking WHERE productpaymentoptionid='.(int)$liProductPaymentOptionID[0]['id'];
            //die($query);
            $laResultTrackingCode = $loProductClass->View($query,null,null);
            
            if(is_array($laResultTrackingCode) and sizeof($laResultTrackingCode) > 0)
            {
                foreach($laResultTrackingCode as $key=>$value)
                {
                       $laTracking_Code[] = html_entity_decode($laResultTrackingCode[$key]['trackingcode']);
                }
              
            }    
        }
    }

    if($_SERVER['QUERY_STRING']!=""){
        $sThankyouPageUrl = strchr($_SERVER['QUERY_STRING'],'thankyoupageurl=');
        $sThankyouPageUrl = substr($sThankyouPageUrl,strlen('thankyoupageurl=')); 
    }
    else{
        $sThankyouPageUrl = strchr($_SERVER['REQUEST_URI'],'thankyoupageurl=');
        $sThankyouPageUrl = substr($sThankyouPageUrl,strlen('thankyoupageurl=')); 
    }
    $laTracking_Code[] = "
                                        <SCRIPT language=\"JavaScript\">
                                                setTimeout('window.location=\"".$sThankyouPageUrl."\"', 5000);
                                        </SCRIPT>
    
                               ";
    $isapproved=0;    
                                 
    if($getUserinfo!=false)
    {
       $isapproved=$getUserinfo[0]['isapproved'];
      
    }                                     
    $smarty->assign('tracking_code',$laTracking_Code);
    $smarty->assign('isapproved',$isapproved);
    $PAGE_CONTENT          = $smarty->fetch('thank_you.tpl');  
     
//**********************************************End Page code*************************************************
//Common Line
$smarty->assign('USER_CONTENT',     $PAGE_CONTENT); 
$smarty->display('user_page_main.tpl');
?>
Return current item: MembersGear