diff --git a/config.inc.php b/config.inc.php
index 848998a..6a6f80a 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -45,5 +45,13 @@ function rechte($curpage, $uid){
}
}
+function rolle($uid){
+ $db = dbconnect();
+ $result_rolle = $db->query("SELECT rid
+ FROM jumi_admin_rollen_user_zuord
+ WHERE uid = $uid");
+ $row_rolle = $result_rolle->fetch_array();
+ return $row_rolle['rid'];
+}
#---------------------------------------------------------------------------------------------------------------------------------------
?>
\ No newline at end of file
diff --git a/dashboard/create_member.php b/dashboard/create_member.php
index 63df830..debf9de 100644
--- a/dashboard/create_member.php
+++ b/dashboard/create_member.php
@@ -52,7 +52,8 @@ if($action == ''){
$smarty->assign('member_anlegen_einw_socialmedia', $row0['einw_socialmedia']);
$smarty->assign('member_anlegen_alter16', $row0['alter16']);
$smarty->assign('member_anlegen_selfreg_date_form', $row0['selfreg_date_form']);
-
+ $smarty->assign('admin_rolle', rolle($uid));
+
$query = "SELECT id, filename, originalname, date_format(datum, '%d.%m.%y - %H:%i') uploaddatum FROM jumi_chor_saenger_uploads WHERE csid='$csid' ORDER BY datum DESC";
$result = $db->query( $query)
or die ("Cannot execute query1");
diff --git a/dashboard/edit_member.php b/dashboard/edit_member.php
index 131e4b3..3273fbc 100644
--- a/dashboard/edit_member.php
+++ b/dashboard/edit_member.php
@@ -51,6 +51,7 @@ if($action == ''){
$value[] = $row;
}
$smarty->assign('table_data', $value);
+ $smarty->assign('admin_rolle', rolle($uid));
}
diff --git a/dashboard/edit_noten.php b/dashboard/edit_noten.php
index de63213..5017398 100644
--- a/dashboard/edit_noten.php
+++ b/dashboard/edit_noten.php
@@ -91,6 +91,7 @@ require_once "../language/german.inc.php";
$value[] = $row;
}
$smarty->assign('table_data', $value);
+ $smarty->assign('admin_rolle', rolle($uid));
diff --git a/dashboard/notenbuch.php b/dashboard/notenbuch.php
index c9f3660..aedff73 100644
--- a/dashboard/notenbuch.php
+++ b/dashboard/notenbuch.php
@@ -48,6 +48,7 @@ if ($action == '') {
$table_data[] = $row;
}
$smarty->assign('table_data', $table_data);
+ $smarty->assign('admin_rolle', rolle($uid));
}
diff --git a/dashboard/notenbuchzuordnung.php b/dashboard/notenbuchzuordnung.php
index eb6f034..0887d8c 100644
--- a/dashboard/notenbuchzuordnung.php
+++ b/dashboard/notenbuchzuordnung.php
@@ -6,7 +6,7 @@ include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
-if(!rechte('rollen.php', $uid)){
+if(!rechte('notenbuch.php', $uid)){
echo "";
exit;
}
diff --git a/dashboard/notenupload.php b/dashboard/notenupload.php
index 6c4e334..646a640 100644
--- a/dashboard/notenupload.php
+++ b/dashboard/notenupload.php
@@ -13,7 +13,7 @@ if(!rechte('__noright__', $uid)){
}
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
require_once "../language/german.inc.php";
-
+ $smarty->assign('admin_rolle', rolle($uid));
if(isset($_GET['editjndid']) and $_GET['editjndid'] != ''){
# Aus externer Seite edit_user.php
#echo "
-----------------------------------------------hier";
diff --git a/dashboard/notenuserzuordnung.php b/dashboard/notenuserzuordnung.php
index 751b2fe..98a9e7b 100644
--- a/dashboard/notenuserzuordnung.php
+++ b/dashboard/notenuserzuordnung.php
@@ -6,7 +6,7 @@ include_once '../classes/TestProjektSmarty.class_subdir.php';
require_once("../config.inc.php");
$templatename = substr(basename($_SERVER['PHP_SELF']), 0, -3) . "html";
$smarty = new SmartyAdmin();
-if(!rechte('rollen.php', $uid)){
+if(!rechte('notenbuch.php', $uid)){
echo "";
exit;
}
diff --git a/dashboard/survey_edit.php b/dashboard/survey_edit.php
index 64c750d..7476988 100644
--- a/dashboard/survey_edit.php
+++ b/dashboard/survey_edit.php
@@ -33,6 +33,7 @@ if ($action == '') {
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
+ $smarty->assign('admin_rolle', rolle($uid));
}
diff --git a/templates/modern/dashboard/create_member.html b/templates/modern/dashboard/create_member.html
index a1792db..e8dde85 100644
--- a/templates/modern/dashboard/create_member.html
+++ b/templates/modern/dashboard/create_member.html
@@ -134,7 +134,9 @@