fixed bugs with missing filed in ui.class sql query
added db wrapper for usage of mysqli