Subversion Repositories personal-webbase

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. <?php
  2.  
  3. if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
  4.  
  5. if (($aktion == 'new') || ($aktion == 'edit'))
  6. {
  7.         echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'name\').focus();"', $header);
  8.  
  9.         if ($aktion == 'new') echo '<h1>Neuer Eintrag</h1>';
  10.         if ($aktion == 'edit') echo '<h1>Eintrag bearbeiten</h1>';
  11.  
  12.         if ($aktion == 'edit')
  13.         {
  14.                 $res = db_query("SELECT * FROM `".$WBConfig->getMySQLPrefix()."fatalvortex` WHERE `id` = '".db_escape($id)."' AND `user_cnid` = '".$benutzer['id']."'");
  15.                 if (db_num($res) == 0)
  16.                         die($header.'Auf diesen Datensatz kann nicht zugegriffen werden. Entweder ist er nicht mehr verf&uuml;gbar, oder die Zugriffsberechtigungen sind falsch.'.$footer);
  17.                 $row = db_fetch($res);
  18.  
  19.                 $name = (isset($row['name'])) ? $row['name'] : '';
  20.                 $username = (isset($row['username'])) ? $row['username'] : '';
  21.                 $fpassword = (isset($row['password'])) ? $row['password'] : '';
  22.                 $auszuwaehlen = (isset($row['folder_cnid'])) ? $row['folder_cnid'] : '';
  23.         }
  24.         else
  25.         {
  26.                 $name = '';
  27.                 $username = '';
  28.                 $fpassword = '';
  29.                 $auszuwaehlen = (isset($folder)) ? $folder : 0;
  30.         }
  31.  
  32. echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'">
  33. <input type="hidden" name="seite" value="operate">
  34. <input type="hidden" name="aktion" value="'.$aktion.'">
  35. <input type="hidden" name="modul" value="'.$modul.'">';
  36.  
  37. if ($aktion == 'edit')
  38.         echo '<input type="hidden" name="id" value="'.$id.'">';
  39.  
  40. echo '<table cellspacing="0" cellpadding="0" border="0">
  41. <tr>
  42.         <td colspan="2"><b>Allgemeine Informationen</b><br><br></td>
  43. </tr>
  44. <tr>
  45.         <td valign="top">Name:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
  46.         <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="name" id="name" value="'.$name.'" size="50"></td>
  47. </tr>
  48. <tr>
  49.         <td valign="top">In Ordner:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
  50.         <td valign="top">';
  51.  
  52.         gfx_zeichneordnerbox($modul, 0, 0, $auszuwaehlen);
  53.  
  54.         if (!isset($danach)) $danach = 'A';
  55.  
  56.         echo '</td>
  57. </tr>
  58. <tr>
  59.         <td colspan="2"><br><b>Kontoinformationen</b><br><br></td>
  60. </tr>
  61. <tr>
  62.         <td valign="top">Benutzername:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
  63.         <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="username" value="'.$username.'" size="50"></td>
  64. </tr>
  65. <tr>
  66.         <td valign="top">Passwort:<img src="designs/spacer.gif" height="1" width="35" alt=""></td>
  67.         <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fpassword" value="'.$fpassword.'" size="50"></td>
  68. </tr>
  69. <tr>
  70.         <td colspan="2"><br><b>Nach Speicherung</b><br><br></td>
  71. </tr>
  72. <tr>
  73.         <td valign="top">Aktion: </td>
  74.         <td><select name="danach">
  75.                 <option value="A"'; if ($danach == 'A') echo ' selected'; echo '>Zur&uuml;ck zum Hauptmen&uuml;</option>
  76.                 <option value="B"'; if ($danach == 'B') echo ' selected'; echo '>Neuer Eintrag in Kategorie</option>
  77.                 <option value="C"'; if ($danach == 'C') echo ' selected'; echo '>Neuer Eintrag im Ordner</option>
  78.         </select></td>
  79. </tr>
  80. </table><br>
  81. <a href="javascript:document.mainform.submit();">';
  82.  
  83. if ($aktion == 'new') echo 'Eintragung hinzuf&uuml;gen';
  84. if ($aktion == 'edit') echo 'Eintragung aktualisieren';
  85.  
  86. echo '</a>&nbsp;|&nbsp;<a href="'.$_SERVER['PHP_SELF'].'?seite=main&amp;modul='.$modul.'">Zur&uuml;ck</a>
  87.  
  88. </form>';
  89.  
  90.         echo $footer;
  91. }
  92.  
  93. ?>