<?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 "State,Successfull,Missed
1H,10,29
2H,23,20
3H,6,16
4H,43,49
5H,68,2
6H,26,33
7H,41,3
8H,34,62
9H,17,37
10H,2,55
11H,23,6
12H,64,26
13H,46,77
14H,66,82
15H,10,61
16H,63,21
17H,5,1
18H,42,11
19H,18,1
20H,61,1
21H,3,2
22H,34,45
23H,6,69";
	    /*
echo "State,Successfull,Missed";
    	for($i=1;$i<24;$i++){
            echo "\n".$i."H,".rand(0, 84).",".rand(0, 84);
        }
*/
	}
}