<?php

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

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

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

    function get_form() {
        return array(
            'status'=>array(
                'selecttype'=>'radio',
                'select'=>form::arraytoselect(array(0=>lang_admin('no'),1=>lang_admin('yes'))),
                'default'=>0,
            ),
        );
    }

    function getmenu(){
       $menudata=menu::getInstance()->getrows(null,0);
       $menudata_status=array();
       foreach ($menudata as $val){
           $menudata_status[$val['listkey']]=array("status"=>$val['status']);
       }
       return $menudata_status;
    }
}