<?php

if (!defined('ROOT')) exit('Can\'t Access !');

class questiontype extends table {
    public $name='question_type';
    static $me;
    public static function getInstance() {
        if (!self::$me) {
            $class=new questiontype();
            self::$me=$class;
        }
        return self::$me;
    }

    function getcols($act) {
        return '*';
    }

    static function gettypeoption(){
        $questiontype=questiontype::getInstance()->getrows("state=1 and langid=".lang::getlangid(lang::getisadmin()),0);
        $option=array();
        if (is_array($questiontype))
            foreach ($questiontype as $val){
                $option[$val['id']]=$val['typename'];
            }
        return $option;
    }


}