Esempio n. 1
0
function optUsersTypes()
{
    $USER = UsersDAO::userLoged();
    $html = "";
    $read = new Read();
    $read->ExeRead('a.users_types', "WHERE a.status = 1 AND (a.id = :type OR :type = 1 OR a.permissoes LIKE CONCAT('%[',:type,']%')) ORDER BY a.id ASC", array('type' => $USER->getId()));
    foreach ($read->getResult() as $v) {
        $html .= "<option value='{$v['id']}'>{$v['title']}</option>";
    }
    return $html;
}