<?php
	include_once('../config.php');   
    
  
          
    if(!isset($_SESSION['userId']))
    { 
         header("Location: ../");
         die;
    }
   
             
             
            $stmt=$conn->prepare("select *   from UI__UserAds  where  Status=1  ");   
            //$stmt->bindValue(':Rid',  $_SESSION['userId'] , PDO::PARAM_INT);  
            $stmt->execute(); 
            $users = $stmt->fetch(PDO::FETCH_OBJ);    
             
            $stmt=$conn->prepare("select RegOn  from  UI__Rgst where cuurentId=:Rid    ");   
            $stmt->bindValue(':Rid',  $_SESSION['userId'] , PDO::PARAM_INT);  
            $stmt->execute(); 
            $RegOn = $stmt->fetch(PDO::FETCH_OBJ); 
            
           $set = 0;
            //if(date("d-m-Y")!=$RegOn->RegOn)
              //  $set = 1;    
               
               
            $stmt=$conn->prepare("select id  from  UI__DChstr where Rid=:Rid and typ=1   ");   
            $stmt->bindValue(':Rid',  $_SESSION['userId'] , PDO::PARAM_INT);  
            $stmt->execute(); 
            if($stmt->rowCount() > 0)   
			    $set = 1;    
               
                
include_once("../view/dashboard/ViewAds.php");
?>