Rollenkonzept verbessert
This commit is contained in:
parent
2313b67545
commit
d86dcf1dfe
@ -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'];
|
||||
}
|
||||
#---------------------------------------------------------------------------------------------------------------------------------------
|
||||
?>
|
@ -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");
|
||||
|
@ -51,6 +51,7 @@ if($action == ''){
|
||||
$value[] = $row;
|
||||
}
|
||||
$smarty->assign('table_data', $value);
|
||||
$smarty->assign('admin_rolle', rolle($uid));
|
||||
|
||||
}
|
||||
|
||||
|
@ -91,6 +91,7 @@ require_once "../language/german.inc.php";
|
||||
$value[] = $row;
|
||||
}
|
||||
$smarty->assign('table_data', $value);
|
||||
$smarty->assign('admin_rolle', rolle($uid));
|
||||
|
||||
|
||||
|
||||
|
@ -48,6 +48,7 @@ if ($action == '') {
|
||||
$table_data[] = $row;
|
||||
}
|
||||
$smarty->assign('table_data', $table_data);
|
||||
$smarty->assign('admin_rolle', rolle($uid));
|
||||
|
||||
}
|
||||
|
||||
|
@ -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 "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
|
||||
exit;
|
||||
}
|
||||
|
@ -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 "<br><br><br><br><br><br><br><br>-----------------------------------------------hier";
|
||||
|
@ -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 "<meta http-equiv=\"refresh\" content=\"0; URL=error.php\">";
|
||||
exit;
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ if ($action == '') {
|
||||
$table_data1[] = $row1;
|
||||
}
|
||||
$smarty->assign('table_data1', $table_data1);
|
||||
$smarty->assign('admin_rolle', rolle($uid));
|
||||
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,9 @@
|
||||
<tr>
|
||||
<th style="color:blue; text-align:center;">Datei</th>
|
||||
<th style="color:blue; text-align:center;">Uploaddatum</th>
|
||||
{if $admin_rolle == 1}
|
||||
<th style="color:blue; text-align:center;">Aktion</th>
|
||||
{/if}
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -148,7 +150,9 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$table_data[table_data].uploaddatum}</td>
|
||||
{if $admin_rolle == 1}
|
||||
<td><a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delMemberFile({$table_data[table_data].id})"><i class="fa fa-trash" style="width:18px;"></i></a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/section}
|
||||
</tbody>
|
||||
|
@ -75,8 +75,10 @@
|
||||
<td class="d-none d-md-table-cell">{$table_data[table_data].singstimme}</td>
|
||||
<td>
|
||||
<a href="create_member.php?editcsid={$table_data[table_data].csid}" class="settings" title="Edit Member" data-toggle="tooltip"><i class="fas fa fa-edit"></i></a>
|
||||
{if $admin_rolle == 1}
|
||||
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delMember({$table_data[table_data].csid})"><i class="fa fa-trash" style="width:18px;"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
|
@ -97,8 +97,10 @@
|
||||
<td class="d-none d-md-table-cell">{$table_data[table_data].streamlizenz_vorh}</td>
|
||||
<td>
|
||||
<a href="notenupload.php?editjndid={$table_data[table_data].jndid}" class="settings" title="Edit Member" data-toggle="tooltip"><i class="fas fa fa-edit"></i></a>
|
||||
{if $admin_rolle == 1}
|
||||
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delNoten({$table_data[table_data].jndid})"><i class="fa fa-trash" style="width:10px;"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/section}
|
||||
|
@ -112,7 +112,9 @@ $(document).ready(function(){
|
||||
<a class="btn mt-1 mt-md-0 btn-success btn-rounded btn-icon btn-sm" onclick="editNotenbuch({$table_data[table_data].zsid})"><i class="fa fa-edit" style="width:18px;"></i></a>
|
||||
<a class="btn mt-1 mt-md-0 btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data[table_data].zsid}|notenbuchzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-eye" style="width:18px;"></i></a>
|
||||
<a class="btn mt-1 mt-md-0 btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data[table_data].zsid}|notenuserzuordnung.php" onclick="ShowZuordnung(this)" data-bs-target="#ZuordnungModal"><i class="fa fa-user" style="width:18px;"></i></a>
|
||||
{if $admin_rolle == 1}
|
||||
<a class="btn mt-1 mt-md-0 btn-danger btn-rounded btn-icon btn-sm" onclick="delZusammenstellung({$table_data[table_data].zsid})"><i class="fa fa-trash" style="width:18px;"></i></a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/section}
|
||||
|
@ -128,7 +128,9 @@
|
||||
<tr>
|
||||
<th style="color:blue; text-align:center;">Datei</th>
|
||||
<th class="d-none d-lg-table-cell" style="color:blue; text-align:center;">Uploaddatum</th>
|
||||
{if $admin_rolle == 1}
|
||||
<th style="color:blue; text-align:center;">Aktion</th>
|
||||
{/if}
|
||||
<tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -142,7 +144,9 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td class="d-none d-lg-table-cell">{$table_data[table_data].uploaddatum}</td>
|
||||
{if $admin_rolle == 1}
|
||||
<td><a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="delNotenFile({$table_data[table_data].id})"><i class="fa fa-trash" style="width:18px;"></i></a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/section}
|
||||
</tbody>
|
||||
|
@ -64,7 +64,9 @@
|
||||
<div class="col-3 col-lg-2 mb-2 mb-sm-3">
|
||||
<a href="survey_erfassen.php?edit=1&umid={$table_data1[table_data1].umid}" class="btn btn-primary btn-rounded btn-icon btn-sm"><i class="fa fa-edit" style="width:18px;"></i></a>
|
||||
<a class="btn btn-success btn-rounded btn-icon btn-sm" data-bs-toggle="modal" value="{$table_data1[table_data1].umid}" onclick="ShowDetails(this)" data-bs-target="#exampleModal"><i class="fa fa-eye" style="width:18px;"></i></a>
|
||||
{if $admin_rolle == 1}
|
||||
<a class="btn btn-danger btn-rounded btn-icon btn-sm" onclick="onClickDeleteSurvey({$table_data1[table_data1].umid})"><i class="fa fa-trash" style="width:18px;"></i></a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/section}
|
||||
|
Loading…
x
Reference in New Issue
Block a user