<?php
include '_dirinfo.php';
require_once (PATH_TO_ROOT.'_class/createQuestion/Question.php');

class ExportQuestion extends Question
{
    public static function createQuestion($type,$db=null,$data=null)
    {
        
            switch ($type) {
                case 6:
                    include_once (PATH_TO_ROOT.'webcati/_class/class.ExportTimestamp.php');
                    $q = new ExportTimestamp($db,$data);
                    break;
                default:
                    $q = parent::createQuestion($type, $db, $data);
            }
            return $q;
    }
    
    public static function createQuestionFromTable($db,$project,$id)
    {
            $row = $db->get($project,$id,null,DB_WARPIT_WEBCATI);
            $q = ExportQuestion::createQuestion($row['tip_sql'],$db,$row);
            $q->fill($project,$id);
            return $q;
    }
}

?>