mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
This commit is contained in:
+3
-3
@@ -139,8 +139,8 @@ p.freigegeben
|
||||
color:green;
|
||||
}
|
||||
|
||||
.error
|
||||
input[type="submit"],input[type="button"]
|
||||
{
|
||||
|
||||
}
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -591,7 +591,6 @@ function eingabeOrganisationseinheit($firma_id,$firma_organisationseinheit_id,$o
|
||||
$organisationseinheit_obj = new organisationseinheit();
|
||||
$organisationseinheit_obj->getAll();
|
||||
|
||||
|
||||
$i=0;
|
||||
foreach ($firma->result as $row)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Karl Burkhart <burkhart@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../config/wawi.config.inc.php');
|
||||
require_once('auth.php');
|
||||
require_once('../include/wawi_kostenstelle.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/benutzer.class.php');
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>WaWi Kostenstellen - Berechtigungen</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css"/>
|
||||
|
||||
<script type="text/javascript" src="../include/js/jquery.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
$kostenstelle = new wawi_kostenstelle();
|
||||
$user=get_uid();
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(isset($_GET['kostenstelle_id']))
|
||||
{
|
||||
$kostenstelle_id = $_GET['kostenstelle_id'];
|
||||
|
||||
if($rechte->isBerechtigt('wawi/rechnung',null, null, $kostenstelle_id)
|
||||
|| $rechte->isBerechtigt('wawi/bestellung',null, null, $kostenstelle_id)
|
||||
|| $rechte->isBerechtigt('wawi/freigabe',null, null, $kostenstelle_id))
|
||||
{
|
||||
$kst = new wawi_kostenstelle();
|
||||
if(!$kst->load($kostenstelle_id))
|
||||
die('Fehler beim Laden der Kostenstelle');
|
||||
|
||||
echo '<h1>Berechtigungen - Kostenstelle '.$kst->bezeichnung.'</h1>';
|
||||
echo '<a href="#Zurück" onclick="javascript:history.back();">Zurück</a>';
|
||||
$rechte->getKostenstelleUser($kostenstelle_id);
|
||||
|
||||
$rights = array();
|
||||
|
||||
function getArt($art)
|
||||
{
|
||||
$value=array();
|
||||
if(mb_strstr($art,'s'))
|
||||
$value['read']=true;
|
||||
if(mb_strstr($art,'u'))
|
||||
$value['write']=true;
|
||||
if(mb_strstr($art,'i'))
|
||||
$value['write']=true;
|
||||
if(mb_strstr($art,'d'))
|
||||
$value['delete']=true;
|
||||
return $value;
|
||||
}
|
||||
|
||||
foreach($rechte->berechtigungen as $row)
|
||||
{
|
||||
|
||||
if(!isset($rights[$row->uid]))
|
||||
{
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($row->uid);
|
||||
|
||||
if($benutzer->bnaktiv==true && in_array($row->berechtigung_kurzbz, array('wawi/rechnung','wawi/bestellung','wawi/freigabe')))
|
||||
{
|
||||
$rights[$row->uid]['vorname']=$benutzer->vorname;
|
||||
$rights[$row->uid]['nachname']=$benutzer->nachname;
|
||||
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
switch($row->berechtigung_kurzbz)
|
||||
{
|
||||
case 'wawi/rechnung': $rights[$row->uid]['rechnung']=getArt($row->art); break;
|
||||
case 'wawi/bestellung': $rights[$row->uid]['bestellung']=getArt($row->art); break;
|
||||
case 'wawi/freigabe': $rights[$row->uid]['freigabe']=true; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
}
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTable").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>';
|
||||
echo '<table class="tablesorter" id="myTable" style="width:auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nachname</th>
|
||||
<th>Vorname</th>
|
||||
<th colspan="3">Bestellung</th>
|
||||
<th colspan="3">Rechnung</th>
|
||||
<th>Freigabe</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Lesen</th>
|
||||
<th>Schreiben</th>
|
||||
<th>Löschen</th>
|
||||
<th>Lesen</th>
|
||||
<th>Schreiben</th>
|
||||
<th>Löschen</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach($rights as $user)
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>'.$user['nachname'].'</td>';
|
||||
echo '<td>'.$user['vorname'].'</td>';
|
||||
echo '<td>'.(isset($user['bestellung']['read'])?'X':'').'</td>';
|
||||
echo '<td>'.(isset($user['bestellung']['write'])?'X':'').'</td>';
|
||||
echo '<td>'.(isset($user['bestellung']['delete'])?'X':'').'</td>';
|
||||
echo '<td>'.(isset($user['rechnung']['read'])?'X':'').'</td>';
|
||||
echo '<td>'.(isset($user['rechnung']['write'])?'X':'').'</td>';
|
||||
echo '<td>'.(isset($user['rechnung']['delete'])?'X':'').'</td>';
|
||||
echo '<td>'.(isset($user['freigabe'])?'X':'').'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
else
|
||||
die('Sie haben keine Berechtigung!');
|
||||
}
|
||||
else
|
||||
{
|
||||
$kst_array = $rechte->getKostenstelle('wawi/bestellung');
|
||||
$kst_array = array_merge($kst_array, $rechte->getKostenstelle('wawi/rechnung'));
|
||||
$kst_array = array_merge($kst_array, $rechte->getKostenstelle('wawi/bestellung'));
|
||||
$kst_array = array_merge($kst_array, $rechte->getKostenstelle('wawi/freigabe'));
|
||||
|
||||
$kst_array = array_unique($kst_array);
|
||||
|
||||
echo '<h1>Kostenstellen - Berechtigungen</h1>';
|
||||
|
||||
if(count($kst_array)==0)
|
||||
die('Sie benoetigen eine Kostenstellenberechtigung um diese Seite anzuzeigen');
|
||||
|
||||
$kst = new wawi_kostenstelle();
|
||||
$kst->loadArray($kst_array);
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#myTable").tablesorter(
|
||||
{
|
||||
sortList: [[1,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
}
|
||||
);
|
||||
</script>';
|
||||
echo '<table id="myTable" class="tablesorter" style="width:auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Bezeichnung</th>
|
||||
<th>Berechtigung</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach($kst->result as $row)
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>',$row->kostenstelle_id,'</td>';
|
||||
echo '<td>',$row->bezeichnung,'</td>';
|
||||
echo '<td><a href="'.$_SERVER['PHP_SELF'].'?kostenstelle_id='.$row->kostenstelle_id.'">User anzeigen</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</tbody>
|
||||
</table>';
|
||||
}
|
||||
|
||||
echo '<br><br><br><br><br><br>';
|
||||
|
||||
?>
|
||||
+18
-11
@@ -52,18 +52,16 @@ if(isset($_POST['getBetragRow']) && isset($_POST['id']))
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>WaWi Rechnung</title>
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="stylesheet" href="../skin/tablesort.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/jquery.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/fhcomplete.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="../skin/tablesort.css" type="text/css">
|
||||
<link rel="stylesheet" href="../skin/jquery.css" type="text/css">
|
||||
<link rel="stylesheet" href="../skin/fhcomplete.css" type="text/css">
|
||||
<link rel="stylesheet" href="../skin/wawi.css" type="text/css">
|
||||
|
||||
<script type="text/javascript" src="../include/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="../include/js/jquery.ui.datepicker-de.js"></script>
|
||||
@@ -84,7 +82,7 @@ if(isset($_POST['getBetragRow']) && isset($_POST['id']))
|
||||
|
||||
function formatItem(row)
|
||||
{
|
||||
return row[0] + " <br/>" + row[1];
|
||||
return row[0] + " <br>" + row[1];
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +366,7 @@ elseif($aktion == 'new')
|
||||
|
||||
echo '<h1>Rechnung Neu</h1>';
|
||||
echo '<form action="rechnung.php" method="GET">';
|
||||
echo '<input type="hidden" name="method" value="update"/>';
|
||||
echo '<input type="hidden" name="method" value="update" >';
|
||||
echo 'Kostenstelle: <SELECT name="kostenstelle_id">';
|
||||
|
||||
foreach($kst->result as $row)
|
||||
@@ -376,7 +374,7 @@ elseif($aktion == 'new')
|
||||
echo '<option value="'.$row->kostenstelle_id.'">'.$row->bezeichnung.' ('.$row->kurzbz.') - '.mb_strtoupper($row->oe_kurzbz).'</option>';
|
||||
}
|
||||
echo '</SELECT>';
|
||||
echo '<input type="submit" name="submit" value="Weiter" class="cursor"/>';
|
||||
echo '<input type="submit" name="submit" value="Weiter" class="cursor" >';
|
||||
echo '</form>';
|
||||
|
||||
}
|
||||
@@ -607,7 +605,10 @@ if($aktion=='update')
|
||||
<td>
|
||||
<input type="text" name="rechnungsdatum" size="10" id="rechnungsdatum" value="'.$date->formatDatum($rechnung->rechnungsdatum,'d.m.Y').'">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#rechnungsdatum" ).datepicker($.datepicker.regional["de"]);
|
||||
});
|
||||
</script>
|
||||
</td>
|
||||
<td>
|
||||
@@ -688,7 +689,10 @@ if($aktion=='update')
|
||||
Buchungsdatum (tt.mm.JJJJ)<br />
|
||||
<input type="text" name="buchungsdatum" size="10" id="buchungsdatum" value="'.$date->formatDatum($rechnung->buchungsdatum,'d.m.Y').'">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#buchungsdatum" ).datepicker($.datepicker.regional["de"]);
|
||||
});
|
||||
</script>
|
||||
<br /> <br />
|
||||
Transferdatum (tt.mm.JJJJ)<br />';
|
||||
@@ -701,7 +705,10 @@ if($aktion=='update')
|
||||
echo '
|
||||
<input type="text" name="transfer_datum" size="10" id="transfer_datum" value="'.$date->formatDatum($rechnung->transfer_datum,'d.m.Y').'">
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#transfer_datum" ).datepicker($.datepicker.regional["de"]);
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
echo '
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/mitarbeiter.class.php');
|
||||
require_once ('../include/firma.class.php');
|
||||
require_once('../include/standort.class.php');
|
||||
require_once ('../include/tags.class.php');
|
||||
|
||||
if (!$uid = get_uid())
|
||||
@@ -69,7 +70,15 @@
|
||||
if (!$sFirma->getAll($firma_search))
|
||||
exit($sFirma->errormsg."\n");
|
||||
for ($i=0;$i<count($sFirma->result);$i++)
|
||||
echo html_entity_decode($sFirma->result[$i]->name).'|'.html_entity_decode($sFirma->result[$i]->firma_id)."\n";
|
||||
{
|
||||
$standort = new standort();
|
||||
$standort->load_firma($sFirma->result[$i]->firma_id);
|
||||
if(isset($standort->result[0]))
|
||||
$kurzbz = $standort->result[0]->kurzbz;
|
||||
else
|
||||
$kurzbz = '';
|
||||
echo html_entity_decode($sFirma->result[$i]->name).($kurzbz!=''?' ('.$kurzbz.')':'').'|'.html_entity_decode($sFirma->result[$i]->firma_id)."\n";
|
||||
}
|
||||
break;
|
||||
|
||||
// Bestellung Tags
|
||||
|
||||
Reference in New Issue
Block a user