fhiiqm/produkt_upd.php
changeset 14 32203b8f40ee
parent 1 6288d5685bff
child 16 3ebe66308a00
equal deleted inserted replaced
13:741b35e9ebbe 14:32203b8f40ee
       
     1 <?php
       
     2 
       
     3 /**
       
     4  * @author Bettina Schwarzer, Fritz-Haber-Institut
       
     5  * @copyright 07/2011
       
     6  * 
       
     7  * UPDATE Produkt
       
     8  */
       
     9 
       
    10     error_reporting(E_ALL ^ E_NOTICE);
       
    11     
       
    12     session_start();
       
    13     if (! isset($_SESSION["userid"]))
       
    14     { 
       
    15         include_once ("inc/func_lib.inc.php");	
       
    16         login($_SERVER["PHP_SELF"]);
       
    17         exit;
       
    18     }
       
    19     
       
    20     if (is_null($_SESSION["recht"]) || (!is_null($_SESSION["recht"]) && !in_array("pr",$_SESSION["recht"]) && !in_array("pe",$_SESSION["recht"])))
       
    21     {
       
    22         header("Location: start.php");
       
    23         exit;
       
    24     }    
       
    25     
       
    26 ?>
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    27 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    28 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     3 
    29 
     4 <head>
    30 <head>
     5 	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    31 	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
     7 
    33 
     8 	<title>Aktualisieren Produkte</title>
    34 	<title>Aktualisieren Produkte</title>
     9 </head>
    35 </head>
    10 
    36 
    11 <body>
    37 <body>
    12     <div class="float-r"><img src="img/node-tree.png" border="0" alt="Produktdaten bearbeiten" title="Produktdaten bearbeiten"/></div>
    38     
    13 <?php
    39 <?php
       
    40     echo "&nbsp;";  
       
    41     echo "<div class=\"float-br smaller\" valign='top'>";
       
    42     echo "&nbsp;&nbsp;&nbsp;user: " . $_SESSION["userid"];
       
    43     echo "&nbsp;&nbsp;&nbsp;<a class='sc' href='/fhiiqm/logout.php' title='Session beenden'>logout</a></div>\n";
       
    44     echo "<div class=\"float-r\"><img src=\"img/node-tree.png\" border=\"0\" alt=\"Produktdaten bearbeiten\" title=\"Produktdaten bearbeiten\"/></div>\n";
    14 
    45 
    15 /**
       
    16  * @author Bettina Schwarzer, Fritz-Haber-Institut
       
    17  * @copyright 07/2011
       
    18  * 
       
    19  * UPDATE Produkt
       
    20  */
       
    21 
       
    22     error_reporting(E_ALL ^ E_NOTICE);
       
    23     
       
    24 	include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
    46 	include_once($_SERVER['DOCUMENT_ROOT'] ."/fhiiqm/inc/dbconnect.inc.php");
    25 	$dbc = new dbconnection();
    47 	$dbc = new dbconnection();
    26 
    48 
    27     $pid    = $_GET["uid"];
    49     $pid    = $_GET["uid"];
    28     if (!$pid) $pid=1;
    50     if (!$pid) $pid=1;
    65 			         <td align=\"left\"><input type=\"checkbox\" name=\"ok\" value=\"1\"";
    87 			         <td align=\"left\"><input type=\"checkbox\" name=\"ok\" value=\"1\"";
    66 			        if ($ok)  echo "checked"; 
    88 			        if ($ok)  echo "checked"; 
    67 			echo "></td>\n</tr>\n"; 
    89 			echo "></td>\n</tr>\n"; 
    68 		}
    90 		}
    69 		
    91 		
    70 		echo "<tr>\n";
    92         if (!is_null($_SESSION["recht"]) && in_array("pe",$_SESSION["recht"]))
    71 		echo "
    93         {
    72 		  <td>&nbsp;</td>
    94     		echo "<tr>\n";
    73 		  <td align=\"left\"><input class=\"button\" type=\"submit\" value=\"&auml;ndern\" name=\"upd\" title=\"update\" /></td>\n";
    95     		echo "
    74 		echo "</tr>\n";
    96     		  <td>&nbsp;</td>
       
    97     		  <td align=\"left\"><input class=\"button\" type=\"submit\" value=\"&auml;ndern\" name=\"upd\" title=\"update\" /></td>\n";
       
    98     		echo "</tr>\n";
       
    99         }
    75         echo "</table>\n";
   100         echo "</table>\n";
    76         echo "</div>\n";
   101         echo "</div>\n";
       
   102         if (!is_null($_SESSION["recht"]) && !in_array("pe",$_SESSION["recht"]))
       
   103             echo "<p>&nbsp;&nbsp;&nbsp;<a href=\"prod_hier.php\" target=\"_self\" title=\"Produkthierarchie\">Zur Produkthierarchie</a></p>\n";    
    77         echo "</form>\n";	
   104         echo "</form>\n";	
    78 
   105 
    79     }
   106     }
    80     else
   107     else
    81     {   // Daten o.k. -> speichern
   108     {   // Daten o.k. -> speichern