--- a/fhiiqm/form/info_form.inc.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/form/info_form.inc.php Fri Oct 07 11:37:29 2011 +0200
@@ -14,7 +14,10 @@
?>
<div align="center">
<?php
- if (strpos($_SERVER['PHP_SELF'],"ins") > -1) $text = "Eingabe"; else $text="Ändern / Löschen";
+ if (!is_null($_SESSION["recht"]) && !in_array("ie",$_SESSION["recht"]))
+ $text = "";
+ else
+ if (strpos($_SERVER['PHP_SELF'],"ins") > -1) $text = "Eingabe"; else $text="Ändern / Löschen";
?>
<h3><font face="Verdana, Arial, Helvetica, sans-serif"><?php echo $text;?> Informationen </font></h3>
<h5>* - Felder sind erforderlich!</h5>
--- a/fhiiqm/form/login_form.inc.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/form/login_form.inc.php Fri Oct 07 11:37:29 2011 +0200
@@ -3,14 +3,14 @@
/**
* @author Bettina Schwarzer, Fritz-Haber-Institut
* @copyright 08/2011
+ *
+ * Login-Form
*/
-
-
?>
<div align="center">
<h3>Anmeldung fhiiqm <?php echo $headl; ?></h3>
-<h5></h5>
+<p>Bitte melden Sie sich mit Ihrer Nutzerkennung an. Das Passwort ist leer, solange Sie es nicht neu setzen.</p>
</div>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="application/x-www-form-urlencoded" name="flogin">
<div align="center">
--- a/fhiiqm/form/ma_fkt_form.inc.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/form/ma_fkt_form.inc.php Fri Oct 07 11:37:29 2011 +0200
@@ -19,7 +19,7 @@
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" enctype="application/x-www-form-urlencoded" name="fmafkt">
<div align="center">
<table border="0" cellspacing="3" cellpadding="3">
- <div class="ui-widget">
+<!-- <div class="ui-widget"> -->
<tr><td>Mitarbeiter *</td>
<td valign="top"><input class="long20" type="text" name="fkt[persknr]" id="persknr" value="<?php echo $fkt['persknr']; ?>"/>
</td>
@@ -60,14 +60,24 @@
<td valign="top"><textarea name="fkt[bem]" id="bem" rows="3" cols="33"><?php echo $fkt['bem']; ?></textarea>
</td>
</tr>
- <tr><td> </td>
- <td><input class="button" type="submit" name="eintragen" value=" eintragen " />
- <!-- <input type="submit" name="abbrechen" value="abbrechen"> -->
- </td>
- </tr>
- </div>
+ <?php
+ if (!is_null($_SESSION["recht"]) && in_array("fme",$_SESSION["recht"]))
+ {
+ ?>
+ <tr><td> </td>
+ <td><input class="button" type="submit" name="eintragen" value=" eintragen " /></td>
+ </tr>
+ <?php
+ }
+ ?>
+<!-- </div> -->
</table>
<input type="hidden" name="fkt[pid]" id="pid" value="<?php echo $fkt['pid']; ?>"/>
<input type="hidden" name="fkt[fid]" id="fid" value="<?php echo $fkt['fid']; ?>"/>
-</form>
-</div>
\ No newline at end of file
+
+<?php
+ echo "</div>\n";
+ if (!is_null($_SESSION["recht"]) && !in_array("fme", $_SESSION["recht"]))
+ echo "<p> <a href=\"ma_fkt_flist.php\" target=\"_self\" title=\"Funktionen\">Zur Funktionenliste</a></p>\n";
+ echo "</form>\n";
+?>
\ No newline at end of file
--- a/fhiiqm/form/produkt_form.inc.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/form/produkt_form.inc.php Fri Oct 07 11:37:29 2011 +0200
@@ -14,7 +14,10 @@
?>
<div align="center">
<?php
- if (strpos($_SERVER['PHP_SELF'],"ins") > -1) $text = "Eingabe"; else $text="Ändern";
+ if (!is_null($_SESSION["recht"]) && !in_array("pe",$_SESSION["recht"]))
+ $text="";
+ else
+ if (strpos($_SERVER['PHP_SELF'],"ins") > -1) $text = "Eingabe"; else $text="Ändern";
?>
<h3><font face="Verdana, Arial, Helvetica, sans-serif"><?php echo $text;?> Produkt</font></h3>
<h5>* - Felder sind erforderlich!</h5>
--- a/fhiiqm/form/raum_form.inc.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/form/raum_form.inc.php Fri Oct 07 11:37:29 2011 +0200
@@ -14,7 +14,10 @@
?>
<div align="center">
<?php
- if (strpos($_SERVER['PHP_SELF'],"ins") > -1) $text = "Eingabe"; else $text="Ändern";
+ if (!is_null($_SESSION["recht"]) && !in_array("re",$_SESSION["recht"]))
+ $text="";
+ else
+ if (strpos($_SERVER['PHP_SELF'],"ins") > -1) $text = "Eingabe"; else $text="Ändern";
?>
<h3><font face="Verdana, Arial, Helvetica, sans-serif"><?php echo $text;?> Räume</font></h3>
<h5>* - Felder sind erforderlich!</h5>
--- a/fhiiqm/inc/func_lib.inc.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/inc/func_lib.inc.php Fri Oct 07 11:37:29 2011 +0200
@@ -11,7 +11,7 @@
{
/** beliebige Tabellenspalte mit Sortier-/Filtersymbolen und Links generieren
* Parameter
- * $colnum SpaltenNr.
+ * $colnum SpaltenNr. in SELECT-Statement
* $bez Spaltenbezeichnung
* $sort aktuelle SortspaltenNr.
* $dir Sortrichtung (ASC/DESC)
--- a/fhiiqm/info_flist.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/info_flist.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 08/2011
+ *
+ * Liste Infos
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("ir",$_SESSION["recht"]) && !in_array("ie",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -10,19 +36,14 @@
</head>
<body onload="document.ffilter.filter.focus();">
- <div class="float-r"><img src="img/document_image_ver.png" border="0" alt="Infodaten" title="Infodaten"/></div>
-
+
<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/document_image_ver.png\" border=\"0\" alt=\"Infodaten\" title=\"Infodaten\"/></div>\n";
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 08/2011
- *
- * Liste Infos
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
-
// Felder, nach denen gefiltert werden kann
$fields = array(2=>"Titel",4=>"Info-Typ",5=>"Produkt",6=>"Adressat");
@@ -51,7 +72,7 @@
if (!isset($dir) && !$dir) $dir = "";
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
- include ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
+ include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
$dbc = new dbconnection();
@@ -190,7 +211,8 @@
}
$dbc -> close();
- echo "<p> <a href=\"info_ins.php\" target=\"_self\" title=\"Info erfassen\" class=\"sc\">Weitere Info erfassen</a></p>\n";
+ if (!is_null($_SESSION["recht"]) && in_array("ie",$_SESSION["recht"]))
+ echo "<p> <a href=\"info_ins.php\" target=\"_self\" title=\"Info erfassen\" class=\"sc\">Weitere Info erfassen</a></p>\n";
?>
</body>
--- a/fhiiqm/info_ins.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/info_ins.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 08/2011
+ *
+ * INSERT Informationen
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("ie",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -9,19 +35,14 @@
</head>
<body>
- <div class="float-r"><img src="img/document_image_ver.png" border="0" alt="Informationen eingeben" title="Informationen eingeben"/></div>
<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/document_image_ver.png\" border=\"0\" alt=\"Informationen eingeben\" title=\"Informationen eingeben\"/></div>\n";
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 08/2011
- *
- * INSERT Informationen
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
-
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
//$dbc = new dbconnection();
--- a/fhiiqm/info_upd.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/info_upd.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 08/2011
+ *
+ * INSERT Informationen
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("ir",$_SESSION["recht"]) && !in_array("ie",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -9,19 +35,14 @@
</head>
<body>
- <div class="float-r"><img src="img/document_image_ver.png" border="0" alt="Informationen eingeben" title="Informationen eingeben"/></div>
<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/document_image_ver.png\" border=\"0\" alt=\"Infodaten ändern\" title=\"Infodaten ändern\"/></div>\n";
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 08/2011
- *
- * INSERT Informationen
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
-
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
$dbc = new dbconnection();
@@ -107,14 +128,19 @@
echo "></td>\n</tr>\n";
}
- echo "<tr>\n";
- echo "
- <td> </td>
- <td><input class=\"button\" type=\"submit\" value=\"ändern\" name=\"upd\" title=\"update\" />
- <input class=\"button\" type=\"submit\" value=\"löschen\" name=\"del\" title=\"delete\" /></td>\n";
- echo "</tr>\n";
+ if (!is_null($_SESSION["recht"]) && in_array("ie",$_SESSION["recht"]))
+ {
+ echo "<tr>\n";
+ echo "
+ <td> </td>
+ <td><input class=\"button\" type=\"submit\" value=\"ändern\" name=\"upd\" title=\"update\" />
+ <input class=\"button\" type=\"submit\" value=\"löschen\" name=\"del\" title=\"delete\" /></td>\n";
+ echo "</tr>\n";
+ }
echo "</table>\n";
echo "</div>\n";
+ if (!is_null($_SESSION["recht"]) && !in_array("ie",$_SESSION["recht"]))
+ echo "<p> <a href=\"info_flist.php\" target=\"_self\" title=\"Infoliste\">Zurück zur Infoliste</a></p>\n";
echo "</form>\n";
--- a/fhiiqm/ma_fkt_ed.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/ma_fkt_ed.php Fri Oct 07 11:37:29 2011 +0200
@@ -7,6 +7,20 @@
error_reporting(E_ALL ^ E_NOTICE);
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("fmr",$_SESSION["recht"]) && !in_array("fme",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
include_once($_SERVER["DOCUMENT_ROOT"]."/fhiiqm/inc/dbconnect.inc.php");
if (!isset($dbc) || !$dbc) $dbc = new dbconnection();
?>
@@ -24,7 +38,15 @@
</head>
<body>
- <div class="float-r"><img src="img/reseller_account_template.png" border="0" alt="Mitarbeiter-Funktion" title="Mitarbeiter-Funktion"/></div>
+
+<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/reseller_account_template.png\" border=\"0\" alt=\"Mitarbeiter-Funktion\" title=\"Mitarbeiter-Funktion\"/></div>\n";
+?>
+
<div align='center'>
<!-- <style type="text/css">
.ui-datepicker {
@@ -145,7 +167,7 @@
$stmt -> bind_param('ssss',$fkt["ber"], $fvon, $fbis, $fkt["bem"]);
$res = $stmt -> execute();
// print_r($stmt);
- if ($dbc->error) echo "error: " . $dbc->errno." -> ".$dbc->error . "<br><br>\n";
+ if ($stmt->error) echo "error: " . $stmt->errno." -> ".$stmt->error . "<br><br>\n";
if ($res)
echo "<p class='green'><b>UPDATE: Daten zu '".$fkt["persknr"]."' und '".$fkt["func"]."' wurde erfolgreich gespeichert.</b></p>\n";
else
@@ -155,21 +177,22 @@
else
{ // INSERT
$stmt = $dbc -> stmtinit();
- if (is_object($stmt))
- {
- $stmt -> prepare("INSERT INTO fhiiqm.MA_Funktion (persknr,fkt_ID,fkt_bereich,fkt_von,fkt_bis,fkt_bem) VALUES(?,?,?,?,?,?)");
- $stmt -> bind_param('isssss',$fkt["pid"],$fkt["fid"],$fkt["ber"], $fvon, $fbis, $fkt["bem"]);
- $res = $stmt -> execute();
- if ($dbc->error) echo "error: " . $dbc->errno." -> ".$dbc->error . "<br><br>\n";
- if ($res)
- echo "<p class='green'><b>INSERT: Zuordnung von '".$fkt["func"]."' zu '".$fkt["persknr"]."' wurde erfolgreich gespeichert.</b></p>\n";
- else
- echo "<p class='red'><b>INSERT: Zuordnung von '".$fkt["func"]."' zu '".$fkt["persknr"]."' konnte nicht gespeichert werden!</b></p>\n";
- }
+ if (is_object($stmt))
+ {
+ $stmt -> prepare("INSERT INTO fhiiqm.MA_Funktion (persknr,fkt_ID,fkt_bereich,fkt_von,fkt_bis,fkt_bem) VALUES(?,?,?,?,?,?)");
+ $stmt -> bind_param('isssss',$fkt["pid"],$fkt["fid"],$fkt["ber"], $fvon, $fbis, $fkt["bem"]);
+ $res = $stmt -> execute();
+ if ($stmt->error) echo "error: " . $stmt->errno." -> ".$stmt->error . "<br><br>\n";
+ if ($res)
+ echo "<p class='green'><b>INSERT: Zuordnung von '".$fkt["func"]."' zu '".$fkt["persknr"]."' wurde erfolgreich gespeichert.</b></p>\n";
+ else
+ echo "<p class='red'><b>INSERT: Zuordnung von '".$fkt["func"]."' zu '".$fkt["persknr"]."' konnte nicht gespeichert werden!</b></p>\n";
+ }
}
}
echo "</div>\n";
+ echo "<p> <a href=\"ma_fkt_flist.php\" target=\"_self\" title=\"Funktionen\">Zur Funktionenliste</a></p>\n";
echo "<p> <a href=\"ma_fkt_ed.php\" target=\"_self\" title=\"Information erfassen\">Weitere Funktion erfassen/editieren</a></p>\n";
}
?>
--- a/fhiiqm/ma_fkt_flist.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/ma_fkt_flist.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 09/2011
+ *
+ * Liste Mitarbeiter - Funktion
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("fmr",$_SESSION["recht"]) && !in_array("fme",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -10,19 +36,14 @@
</head>
<body onload="document.ffilter.filter.focus();">
- <div class="float-r"><img src="img/reseller_account_template.png" border="0" alt="Mitarbeiter-Funktion" title="Mitarbeiter-Funktion"/></div>
-
+
<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/reseller_account_template.png\" border=\"0\" alt=\"Mitarbeiter-Funktion\" title=\"Mitarbeiter-Funktion\"/></div>\n";
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 09/2011
- *
- * Liste Mitarbeiter - Funktion
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
-
// Felder, nach denen gefiltert werden kann
$fields = array(2=>"Name",4=>"Funktion");
@@ -67,7 +88,7 @@
$bg = "#FFFFFF";
echo "<div align='center'>\n";
- echo "<p><b>Liste Miarbeiter - Funktion</b></p>\n";
+ echo "<p><b>Liste Mitarbeiter - Funktion</b></p>\n";
echo "<table border='0' cellspacing='0'>\n";
echo "<tr><td class='bigger'>Mittels '<img src='/fhiiqm/img/auf.gif' border='0' width='11' hight='11' />' / '<img src='/fhiiqm/img/ab.gif' border='0' width='11' hight='11' />'
@@ -162,8 +183,8 @@
}
$dbc -> close();
-
- echo "<p> <a href=\"/fhiiqm/ma_fkt_ed.php\" target=\"_self\" title=\"MA-Funktion erfassen\" class=\"sc\">Weiterem Mitarbeiter Funktion zuordnen</a></p>\n";
+ if (!is_null($_SESSION["recht"]) && in_array("fme",$_SESSION["recht"]))
+ echo "<p> <a href=\"/fhiiqm/ma_fkt_ed.php\" target=\"_self\" title=\"MA-Funktion erfassen\" class=\"sc\">Weiterem Mitarbeiter Funktion zuordnen</a></p>\n";
?>
</body>
--- a/fhiiqm/prod_hier.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/prod_hier.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 06/2011
+ *
+ * Suche und Anzeige Produkthierarchien
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("pr",$_SESSION["recht"]) && !in_array("pe",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -9,19 +35,14 @@
</head>
<body>
- <div class="float-r"><img src="img/node-tree.png" border="0" alt="Produkte" title="Produkte"/></div>
-
+
<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/node-tree.png\" border=\"0\" alt=\"Produkte\" title=\"Produkte\"/></div>\n";
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 06/2011
- *
- * Suche und Anzeige Produkthierarchien
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
-
$prods = $_POST['prods'];
$submit = $_POST['search'];
@@ -144,7 +165,8 @@
}
echo "</div>\n";
echo "<p> <a href=\"prod_hier.php\" target=\"_self\" title=\"Produkthierarchie\">neue Suche Produkthierarchie</a></p>\n";
- echo "<p> <a href=\"produkt_ins.php\" target=\"_self\" title=\"Produkt erfassen\">Produkt erfassen</a></p>\n";
+ if (!is_null($_SESSION["recht"]) && in_array("pe",$_SESSION["recht"]))
+ echo "<p> <a href=\"produkt_ins.php\" target=\"_self\" title=\"Produkt erfassen\">Produkt erfassen</a></p>\n";
}
?>
--- a/fhiiqm/produkt_ins.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/produkt_ins.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 07/2011
+ *
+ * INSERT Produkt
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("pe",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -9,19 +35,14 @@
</head>
<body>
- <div class="float-r"><img src="img/node-tree.png" border="0" alt="Produktdaten eingeben" title="Produktdaten eingeben"/></div>
-
+
<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/node-tree.png\" border=\"0\" alt=\"Produktdaten eingeben\" title=\"Produktdaten eingeben\"/></div>\n";
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 07/2011
- *
- * INSERT Produkt
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
-
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
//$dbc = new dbconnection();
--- a/fhiiqm/produkt_upd.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/produkt_upd.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 07/2011
+ *
+ * UPDATE Produkt
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("pr",$_SESSION["recht"]) && !in_array("pe",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -9,18 +35,14 @@
</head>
<body>
- <div class="float-r"><img src="img/node-tree.png" border="0" alt="Produktdaten bearbeiten" title="Produktdaten bearbeiten"/></div>
+
<?php
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/node-tree.png\" border=\"0\" alt=\"Produktdaten bearbeiten\" title=\"Produktdaten bearbeiten\"/></div>\n";
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 07/2011
- *
- * UPDATE Produkt
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
-
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
$dbc = new dbconnection();
@@ -67,13 +89,18 @@
echo "></td>\n</tr>\n";
}
- echo "<tr>\n";
- echo "
- <td> </td>
- <td align=\"left\"><input class=\"button\" type=\"submit\" value=\"ändern\" name=\"upd\" title=\"update\" /></td>\n";
- echo "</tr>\n";
+ if (!is_null($_SESSION["recht"]) && in_array("pe",$_SESSION["recht"]))
+ {
+ echo "<tr>\n";
+ echo "
+ <td> </td>
+ <td align=\"left\"><input class=\"button\" type=\"submit\" value=\"ändern\" name=\"upd\" title=\"update\" /></td>\n";
+ echo "</tr>\n";
+ }
echo "</table>\n";
echo "</div>\n";
+ if (!is_null($_SESSION["recht"]) && !in_array("pe",$_SESSION["recht"]))
+ echo "<p> <a href=\"prod_hier.php\" target=\"_self\" title=\"Produkthierarchie\">Zur Produkthierarchie</a></p>\n";
echo "</form>\n";
}
--- a/fhiiqm/raum_flist.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/raum_flist.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 07/2011
+ *
+ * Liste Raeume
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("rr",$_SESSION["recht"]) && !in_array("re",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -10,18 +36,13 @@
</head>
<body onload="document.ffilter.filter.focus();">
- <div class="float-r"><img src="img/house.png" border="0" alt="Raumdaten" title="Raumdaten"/></div>
-
+
<?php
-
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 07/2011
- *
- * Liste Raeume
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/house.png\" border=\"0\" alt=\"Raumdaten\" title=\"Raumdaten\"/></div>\n";
// Felder, nach denen gefiltert werden kann
$fields = array(4=>"Gebäude",5=>"Raum-Typ");
@@ -58,7 +79,7 @@
ORDER BY geb_ID, raum_nr LIMIT $start,20 ";
*/
- include ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
+ include_once ($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/func_lib.inc.php");
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
$dbc = new dbconnection();
@@ -169,7 +190,8 @@
}
$dbc -> close();
- echo "<p> <a href=\"raum_ins.php\" target=\"_self\" title=\"Raum erfassen\" class=\"sc\">Weiteren Raum erfassen</a></p>\n";
+ if (!is_null($_SESSION["recht"]) && in_array("re",$_SESSION["recht"]))
+ echo "<p> <a href=\"raum_ins.php\" target=\"_self\" title=\"Raum erfassen\" class=\"sc\">Weiteren Raum erfassen</a></p>\n";
?>
</body>
--- a/fhiiqm/raum_ins.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/raum_ins.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 07/2011
+ *
+ * INSERT Raumdaten
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("re",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -9,18 +35,13 @@
</head>
<body>
- <div class="float-r"><img src="img/house.png" border="0" alt="Raumdaten eingeben" title="Raumdaten eingeben"/></div>
-
+
<?php
-
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 07/2011
- *
- * INSERT Raumdaten
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/house.png\" border=\"0\" alt=\"Raumdaten eingeben\" title=\"Raumdaten eingeben\"/></div>\n";
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
//$dbc = new dbconnection();
--- a/fhiiqm/raum_upd.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/raum_upd.php Fri Oct 07 11:37:29 2011 +0200
@@ -1,3 +1,29 @@
+<?php
+
+/**
+ * @author Bettina Schwarzer, Fritz-Haber-Institut
+ * @copyright 07/2011
+ *
+ * UPDATE(/DELETE) Raumdaten
+ */
+
+ error_reporting(E_ALL ^ E_NOTICE);
+
+ session_start();
+ if (! isset($_SESSION["userid"]))
+ {
+ include_once ("inc/func_lib.inc.php");
+ login($_SERVER["PHP_SELF"]);
+ exit;
+ }
+
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("rr",$_SESSION["recht"]) && !in_array("re",$_SESSION["recht"])))
+ {
+ header("Location: start.php");
+ exit;
+ }
+
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -9,18 +35,13 @@
</head>
<body>
- <div class="float-r"><img src="img/house.png" border="0" alt="Raumdaten bearbeiten" title="Raumdaten bearbeiten"/></div>
-
+
<?php
-
-/**
- * @author Bettina Schwarzer, Fritz-Haber-Institut
- * @copyright 07/2011
- *
- * UPDATE(/DELETE) Raumdaten
- */
-
- error_reporting(E_ALL ^ E_NOTICE);
+ echo " ";
+ echo "<div class=\"float-br smaller\" valign='top'>";
+ echo " user: " . $_SESSION["userid"];
+ echo " <a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
+ echo "<div class=\"float-r\"><img src=\"img/house.png\" border=\"0\" alt=\"Raumdaten bearbeiten\" title=\"Raumdaten bearbeiten\"/></div>\n";
include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
$dbc = new dbconnection();
@@ -83,14 +104,19 @@
echo "></td>\n</tr>\n";
}
- echo "<tr>\n";
- echo "
- <td> </td>
- <td><input class=\"button\" type=\"submit\" value=\"ändern\" name=\"upd\" title=\"update\" />
- <input class=\"button\" type=\"submit\" value=\"löschen\" name=\"del\" title=\"delete\" /></td>\n";
- echo "</tr>\n";
+ if (!is_null($_SESSION["recht"]) && in_array("re", $_SESSION["recht"]))
+ {
+ echo "<tr>\n";
+ echo "
+ <td> </td>
+ <td><input class=\"button\" type=\"submit\" value=\"ändern\" name=\"upd\" title=\"update\" />
+ <input class=\"button\" type=\"submit\" value=\"löschen\" name=\"del\" title=\"delete\" /></td>\n";
+ echo "</tr>\n";
+ }
echo "</table>\n";
echo "</div>\n";
+ if (!is_null($_SESSION["recht"]) && !in_array("re", $_SESSION["recht"]))
+ echo "<p> <a href=\"raum_flist.php$liste\" target=\"_self\" title=\"Raumliste\">Zurück zur Raumliste</a></p>\n";
echo "</form>\n";
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fhiiqm/test/start_without_right.php Fri Oct 07 11:37:29 2011 +0200
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
+ <link href="css/db.css" rel="STYLESHEET" type="TEXT/CSS" />
+ <link href="css/navio.css" rel="STYLESHEET" type="TEXT/CSS" />
+ <meta name="author" content="Bettina Schwarzer, FHI" />
+
+ <title>FHI Administration</title>
+</head>
+
+<body>
+<div id="navi">
+<h3> Datenbank für die Administration und Infrastruktur im FHI</h3>
+
+<?php
+ include_once($_SERVER["DOCUMENT_ROOT"] . "/fhiiqm/inc/menu.inc.html");
+// session_start();
+// print_r ($_SESSION['recht']);
+?>
+</div>
+<div id="renavi" align="right"><img src="img/fhi.jpg" border="0" alt="FHI" width="100%"/> </div>
+
+</body>
+</html>
\ No newline at end of file
--- a/fhiiqm/vertrag_flist1.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/vertrag_flist1.php Fri Oct 07 11:37:29 2011 +0200
@@ -85,7 +85,8 @@
echo "<div align='center'>\n";
//echo "$sort, $dir, $fnum, $filter<br><br>\n";
- $sql = "CALL fhiiqm.vertrag_flist1(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "',$start,$zeil, @anz)";
+// $sql = "CALL fhiiqm.vertrag_flist1(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "',$start,$zeil, @anz)";
+ $sql = "CALL fhiiqm.vertrag_flist1_1(" . $sort . ",'" . $dir . "', " . $fnum . ", '" . $filter . "',$start,$zeil, @anz)";
// Parameter: Nr. Sortfelf, Sortierrichtung, Nr. Filterfeld, Filterbegriff, Start bei DS $start+1, Anzahl DS/Seite, Anzahl gefundener Vertraege
// liefert Felder: contract_ID,cname,clong,bearb,doc,typ,prod
$result = $dbc -> queryObjectArray($sql);
@@ -145,17 +146,21 @@
echo "<tr bgcolor='#68ACBF'>";
tab_column(2,"Bezeichnung",$sort,$dir,2,$fnum,$filter,$start,$zeil);
tab_column(3,"Beschreibung",$sort,$dir,0,$fnum,$filter,$start,$zeil);
+ tab_column(6,"Typ",$sort,$dir,6,$fnum,$filter,$start,$zeil);
+ tab_column(7,"zu Produkt",$sort,$dir,7,$fnum,$filter,$start,$zeil);
+ tab_column(8,"Partner",$sort,$dir,8,$fnum,$filter,$start,$zeil);
tab_column(4,"Bearbeiter",$sort,$dir,4,$fnum,$filter,$start,$zeil);
tab_column(5,"Dokument",$sort,$dir,0,$fnum,$filter,$start,$zeil);
- tab_column(6,"Typ",$sort,$dir,6,$fnum,$filter,$start,$zeil);
- tab_column(7,"zu Produkt",$sort,$dir,7,$fnum,$filter,$start,$zeil);
echo "<th> </th></tr>\n";
foreach ($result as $row)
{
if ($bg == $bg1) $bg = $bg2; else $bg = $bg1;
- echo "<tr bgcolor='" . $bg . "'><td><b>$row->cname</b></td>";
+ echo "<tr bgcolor='" . $bg . "'><td width='17%'><b>$row->cname</b></td>";
// echo "<td>$row->contract_s</td>";
- echo "<td>" . nl2br($row->clong) . "</td>";
+ echo "<td width='22%'>" . nl2br($row->clong) . "</td>";
+ echo "<td>$row->typ</td>";
+ echo "<td>$row->prod</td>";
+ echo "<td>$row->partfirma</td>";
echo "<td>$row->bearb</td>";
if (file_exists("documents/".$row->doc))
{
@@ -164,8 +169,6 @@
}
else
echo "<td>$row->doc</td>";
- echo "<td>$row->typ</td>";
- echo "<td>$row->prod</td>";
echo "<td><a href='/fhiiqm/vertrag_upd.php?uid=$row->contract_ID'><img src=\"/fhiiqm/img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
}
echo "</table></div>\n";
--- a/fhiiqm/vertrag_flist2.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/vertrag_flist2.php Fri Oct 07 11:37:29 2011 +0200
@@ -120,7 +120,7 @@
tab_column(9,"Ende",$sort,$dir,0,$fnum,$filter,$start,$zeil);
tab_column(10,"Verläng.",$sort,$dir,0,$fnum,$filter,$start,$zeil);
tab_column(11,"Künd.frist (mon)",$sort,$dir,0,$fnum,$filter,$start,$zeil);
- tab_column(12,"Partner",$sort,$dir,0,$fnum,$filter,$start,$zeil);
+// tab_column(12,"Partner",$sort,$dir,0,$fnum,$filter,$start,$zeil);
echo "<th>Kosten/Jahr(€)</th>";
echo "<th>Bemerkung</th>";
@@ -131,7 +131,7 @@
if ($row->contract_ID != $cid && $cid != 0)
{ // nicht beim 1. Datensatz
echo "</td>";
- echo "<td>$bem</td>";
+ echo "<td width='30%'>$bem</td>";
echo "<td><a href='vertrag_upd.php?uid=$cid'><img src=\"img/edit.gif\" alt='edit' title='edit' border='0'/></a></td></tr>\n";
}
if ($row->contract_ID != $cid)
@@ -153,7 +153,7 @@
else echo "<td> </td>";
if ($row->cautoend) echo "<td>automatisch</td>"; else echo "<td> </td>";
echo "<td class='center'>$row->kmon</td>";
- echo "<td>$row->partfirma</td>";
+// echo "<td>$row->partfirma</td>";
echo "<td>";
$bem = nl2br($row->bem);
}
--- a/fhiiqm/vertrag_ins.php Wed Oct 05 16:46:09 2011 +0200
+++ b/fhiiqm/vertrag_ins.php Fri Oct 07 11:37:29 2011 +0200
@@ -17,7 +17,7 @@
exit;
}
- if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("vr",$_SESSION["recht"])))
+ if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("ve",$_SESSION["recht"])))
{
header("Location: start.php");
exit;
@@ -158,7 +158,7 @@
$stmt -> bind_param('ssissiiss',$vtr["cname"],$vtr["clong"],$vtr['vtyp'],$vbegin,$vend,$vtr['cautoend'],$vtr['cnot'],$cfile,$vtr['cbem']);
$result = $stmt -> execute();
}
- if ($dbc->error) echo "error: " . $dbc->error . "<br><br>\n";
+ if ($stmt->error) echo "INSERT Vertrag, error: " . $stmt->errno . " - ". $stmt->error . "<br><br>\n";
if ($result)
{ // INSERT o.k.
// contract_ID ermitteln