<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Jure
 * Date: 21.3.14
 * Time: 18:44
 * To change this template use File | Settings | File Templates.
 */
include_once("_dirinfo.php");
include_once(PATH_TO_ROOT . "init.php");

$db->ChangeDatabase(DB_WARPIT_WEBCATI_BASE);

$tabId = "UniqueTabMainInterviewersSamplePoints" . $_POST['project_id'];
$samplePointsPanedId = "UniqueSamplePointPanelId" . $_POST['project_id'];

include('forms.interviewers.php');
include('forms.samplepoints.php');

?>
    var <?php echo $tabId;?> = new Ext.Panel({
        id:'<?php echo $tabId;?>',
        title:'<?php echo $_POST['project_text'];?>',
        iconCls:'icon_userspool_query',
        defaults:{split:true, border:false},
        layout:'border',
        border:false,
        closable:true,
        items:[
            {
                region:'west',
                xtype:'panel',
                width:'350',
                layout:'fit',
                flex:1,
                items:[<?php echo $tabIdInterviewers;?>] },
            {
                xtype:'panel',
                id:'<?php echo $samplePointsPanedId;?>',
                region:'center',
                layout:'fit',
                flex:1,
                items: <?php echo $tabIdSamplePoint;?>
            }
        ]});
    mainTabPanel.add( <?php echo $tabId;?> ).show();

