User Groups and Rights, Fewo

This commit is contained in:
Kevin Adametz 2019-04-10 17:38:52 +02:00
parent c0c2a1822c
commit 26ecb09cdc
22 changed files with 1316 additions and 787 deletions

View file

@ -86,10 +86,11 @@ class HTMLHelper
}
public static function getRolesOptions(){
public static function getRolesOptions($id = 0){
$ret = "";
foreach (self::$roles as $role_id => $value){
$ret .= '<option value="'.$role_id.'">'.$value.'</option>\n';
$attr = ($role_id == $id) ? 'selected="selected"' : '';
$ret .= '<option value="'.$role_id.'" '.$attr.'>'.$value.'</option>\n';
}
return $ret;
}
@ -128,9 +129,9 @@ class HTMLHelper
return $ret;
}
public static function getRangeOptions($id = false, $range = 30, $name = ""){
public static function getRangeOptions($id = false, $range = 30, $name = "", $start=1){
$range = range(1, $range);
$range = range($start, $range);
$ret = "";
foreach ($range as $item){