public function get_UserType() { return UserType::from_mysql_id($this->UserType_id); }
<select id="form<?php echo $class_name; ?> SelectUserType" class="fullWidth ui-widget-content ui-corner-all"> <option value="0" <?php echo !$obj->has_UserType() ? "selected" : ""; ?> ><<?php echo Language::string(73); ?> ></option> <?php $sql = $logged_user->mysql_list_rights_filter("UserType", "`name` ASC"); $z = mysql_query($sql); while ($r = mysql_fetch_array($z)) { $type = UserType::from_mysql_id($r[0]); ?> <option value="<?php echo $type->id; ?> " <?php echo $obj->UserType_id == $type->id ? "selected" : ""; ?> ><?php echo $type->name; ?> ( <?php echo $type->get_system_data(); ?> )</option> <?php