<?
class module extends controller {

    var $params = array("act");
    var $isNeedSession = false;

    function run() {
        switch($this->act) {
            case "get_data":
                $hwId = (int) $_REQUEST["id"];
                $sql = "
                    SELECT
                        *
                    FROM 
                        "._DB_TABLE_PREFIX."html_widgets
                    WHERE
                        id = '".$hwId."'
                    LIMIT 1";
                $res = $this->db->query($sql);

                return array("status" => "data",
                             "data" => $res);                        
                break;
        }
    }

}
?>
