<?php

class DefaultController extends Controller
{

    /**
    * @var string the default layout for the views. Defaults to '//layouts/column2', meaning
    * using two-column layout. See 'protected/views/layouts/column2.php'.
    */
    public $layout='//layouts/column2';
    
    
    public function accessRules()
    {
        return array(
            array('allow',  // allow all users to perform 'index' and 'view' actions
                'actions'=>array('createReport'),
                'expression'=>AccessManager::checkSessionPermission($this->module->name),
            ),
            array('deny',  // deny all users
                'users'=>array('*'),
            ),
        );
    }

    
	public function actionIndex(){
		$this->render('index');
	}
	
	public function actionCreateReport(){
	    echo "date	close
30-Apr-12	28.98
29-Apr-12	27.00
28-Apr-12	26.00
27-Apr-12	25.00
26-Apr-12	20.70
25-Apr-12	30.00
24-Apr-12	26.28
23-Apr-12	27.70
22-Apr-12	17.98
21-Apr-12	17.98
20-Apr-12	17.98
19-Apr-12	18.44
18-Apr-12	10.34
17-Apr-12	10.70
16-Apr-12	18.13
15-Apr-12	20.23
14-Apr-12	20.23
13-Apr-12	20.23
12-Apr-12	22.77
11-Apr-12	22.20
10-Apr-12	22.44
9-Apr-12	23.23
8-Apr-12	22.23
7-Apr-12	25.23
6-Apr-12	23.23
5-Apr-12	23.68
4-Apr-12	22.31
3-Apr-12	22.32
2-Apr-12	11.63
1-Apr-12	14.63
31-Mar-12	17.55
30-Mar-12	19.55
29-Mar-12	10.86
28-Mar-12	11.62
27-Mar-12	11.48";
	    /*
echo "State,Successfull,Missed";
    	for($i=1;$i<24;$i++){
            echo "\n".$i."H,".rand(0, 84).",".rand(0, 84);
        }
*/
	}
}