<?php
include_once("_dirinfo.php");
include_once(PATH_TO_ROOT."init.php");
include_once(PATH_TO_ROOT."_class/class.Extjs_grid.php");

        $tabId = $_POST['tabId'];
	$projectId = $_POST['projectId'];
	$idQuestion = $_POST['idQuestion'];
        $projectName = $_POST['projectName'];
        $reqUrl = 'webcati/_forms/_ajax/ajax.questionStatisticDetails.php';
        
        
      	$gridQ = new MakeGrid($projectName.'_QDetails');
        $gridQ->setMainTable('_www_ids',DB_WARPIT_WEBCATI_BASE)
		->setTitle('QuestionId: 12')
		->setCheckBoxSelectionModel()
		->setSortable(false)
		->flex(1)
       ->baseParams="idQuestion:'{$_POST['idQuestion']}', projectName:'{$_POST['projectName']}'";         
        $gridQ->setReqUrl($reqUrl);
        
        $gridQ->addColumn('click', "Click")->width(120); 
        $gridQ->addColumn('q_name', 'Name')->width(120);
        $gridQ->addColumn('objName', 'Variable')->width(60); 
        $gridQ->addColumn('objType', 'Type')->width(120); 
        $gridQ->addColumn('objValue', 'Value')->width(120);
        $gridQ->addColumn('time', 'Time')->width(250); 
        $gridQ->addColumn('betwen', 'Difference')->width(150); 
        
	 echo $gridQ->createGrid();       
        

       
            echo "mainTabPanel.add({ 
		id:'question_$idQuestion',
		closable:true,
		title: 'QuestionId:$idQuestion ',
                RMreopen : function(p){ 
			$gridQ.getStore().reload( );
		},
		iconCls: 'RMicon_view_details',
		layout:'vbox',
                items:[$gridQ] }).show();"; 
 
?>
