diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php
index 1273c517b..bb4433910 100644
--- a/cis/private/profile/index.php
+++ b/cis/private/profile/index.php
@@ -66,6 +66,9 @@ if (isset($_GET['uid']) && $_GET['uid'] != $uid)
$uid = stripslashes($_GET['uid']);
$ansicht = true;
}
+
+$adminOrOwnUser = $rechte->isBerechtigt('admin') || !$ansicht;
+
if ($rechte->isBerechtigt('basis/kontakt'))
$ansicht = false;
@@ -526,7 +529,7 @@ if (!defined('CIS_PROFIL_FUNKTIONEN_ANZEIGEN') || CIS_PROFIL_FUNKTIONEN_ANZEIGEN
*/
function printFunctionsTable($query, $headingphrase, $tableid, $showVertragsstunden = false)
{
- global $db, $p, $datum_obj, $uid;
+ global $db, $p, $datum_obj, $uid, $adminOrOwnUser;
if ($result_funktion = $db->db_query($query))
{
@@ -540,9 +543,9 @@ function printFunctionsTable($query, $headingphrase, $tableid, $showVertragsstun
'.$p->t('global/bezeichnung').' |
'.$p->t('global/organisationseinheit').' |
'.$p->t('profil/gueltigvon').' |
- '.$p->t('profil/gueltigbis').' |
- '.$p->t('profil/wochenstunden').' |
-
+ '.$p->t('profil/gueltigbis').' | '.
+ ($adminOrOwnUser ? ''.$p->t('profil/wochenstunden').' | ' : '').
+ '
';
@@ -559,17 +562,17 @@ function printFunctionsTable($query, $headingphrase, $tableid, $showVertragsstun
echo "
".$row_funktion->organisationseinheittyp_kurzbz.' '.$row_funktion->oe_bezeichnung." |
".$datum_obj->formatDatum($row_funktion->datum_von,'d.m.Y')." |
- ".$datum_obj->formatDatum($row_funktion->datum_bis,'d.m.Y')." |
- ".number_format($row_funktion->wochenstunden, 2)." |
- ";
+ ".$datum_obj->formatDatum($row_funktion->datum_bis,'d.m.Y')." | ".
+ ($adminOrOwnUser ? "".number_format($row_funktion->wochenstunden, 2)." | " : "").
+ "";
- if(isset($row_funktion->wochenstunden))
+ if(isset($row_funktion->wochenstunden) && $adminOrOwnUser)
$wochenstunden_sum += (double)$row_funktion->wochenstunden;
}
echo '
';
//vertragsstunden
- if ($showVertragsstunden === true)
+ if ($showVertragsstunden === true && $adminOrOwnUser)
{
$vertragsstunden = 0.00;
$qry = "SELECT sum(vertragsstunden) AS vertragsstdsumme from bis.tbl_bisverwendung
@@ -588,16 +591,19 @@ function printFunctionsTable($query, $headingphrase, $tableid, $showVertragsstun
}
}
- echo "
-
-
- |
- |
- Summe Wochenstunden".($showVertragsstunden === true ? " (".$p->t('profil/vertragsstunden').")" : "")." |
- ".number_format($wochenstunden_sum,2).($showVertragsstunden === true ?
- " (".number_format($vertragsstunden,2).")" : "")." |
-
- ";
+ if ($adminOrOwnUser)
+ {
+ echo "
+
+
+ |
+ |
+ Summe Wochenstunden".($showVertragsstunden === true ? " (".$p->t('profil/vertragsstunden').")" : "")." |
+ ".number_format($wochenstunden_sum, 2).($showVertragsstunden === true ?
+ " (".number_format($vertragsstunden, 2).")" : "")." |
+
+ ";
+ }
echo "";
}
}