<?php
class CheckSession{
    
    public function CheckSession(){
        //print_r(Yii::app()->session['ad_id']);
       if(!empty(Yii::app()->session['ad_id'])){
           return;
       }else{
            //$this->redirect(array('admin/logout'));
           echo '<script language="javascript"> '
           . 'window.location="'.Yii::app()->request->baseUrl.'/index.php?r=site/AdminLogin" '
                   . '</script> ';
       }
    }
    
}
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */