diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php index b70d93666..be4399a75 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/support_group.php @@ -8,6 +8,17 @@ class Support_Group{ ////////////////////////////////////////////Functions//////////////////////////////////////////////////// + //return all groups + public static function getGroup($id) { + $dbl = new DBLayer("lib"); + $statement = $dbl->execute("SELECT * FROM support_group WHERE SGroupId = :id", array('id' => $id)); + $row = $statement->fetch(); + $instanceGroup = new self(); + $instanceGroup->set($row); + return $instanceGroup; + + } + //return all groups public static function getGroups() { $dbl = new DBLayer("lib"); diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index d44423e22..babd587e0 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -31,6 +31,8 @@ t_send = "Send reply" [show_queue] +[show_sgroup] + [sgroup_list] group_success = "The group has been created!" group_name_taken = "The groupname was already used!" diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index fde9c20a5..c9d6d64c0 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -31,6 +31,8 @@ t_send = "Envoyer la reponse" [show_queue] +[show_sgroup] + [sgroup_list] group_success = "le group est cree!" group_name_taken = "le nom pour le group est deja utilise!" diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/inc/sgroup_list.php b/code/ryzom/tools/server/ryzom_ams/www/html/inc/sgroup_list.php index 590b56ef0..061fa3daf 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/inc/sgroup_list.php +++ b/code/ryzom/tools/server/ryzom_ams/www/html/inc/sgroup_list.php @@ -1,13 +1,11 @@ getName(); + $result['grouplist'] = Gui_Elements::make_table(Support_Group::getGroups(), Array("getSGroupId","getName","getTag"), Array("sGroupId","name","tag")); + return $result; + + }else{ + + //ERROR: No page specified! + $_SESSION['error_code'] = "404"; + header("Location: index.php?page=error"); + exit; + } + + }else{ + //ERROR: No access! + $_SESSION['error_code'] = "403"; + header("Location: index.php?page=error"); + exit; + } + }else{ + //ERROR: not logged in! + header("Location: index.php"); + exit; + } + +} \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl index 9a3bc2e07..75595f230 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/sgroup_list.tpl @@ -34,7 +34,6 @@ -
ID | +Name | + +||
---|---|---|---|
{$group.sGroupId} | +{$group.name} | +{$group.tag} | +Delete | +