Subversion Repositories personal-webbase

Rev

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

  1. <?php
  2.  
  3. if (!defined('IBLEGAL')) 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(\'fserver\').focus();"', $header);
  8.  
  9.   if ($aktion == 'new') echo '<h1>Neues Confixx-Konto</h1>';
  10.   if ($aktion == 'edit') echo '<h1>Confixx-Konto bearbeiten</h1>';
  11.  
  12.   if ($aktion == 'edit')
  13.   {
  14.     $res = db_query("SELECT * FROM `".$mysql_zugangsdaten['praefix']."confixx` WHERE `id` = '".db_escape($id)."' AND `user` = '".$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.     $auszuwaehlen = (isset($row['folder'])) ? $row['folder'] : '';
  20.     $fusername = (isset($row['username'])) ? $row['username'] : '';
  21.     $fpasswort = (isset($row['passwort'])) ? $row['passwort'] : '';
  22.     $fserver = (isset($row['server'])) ? $row['server'] : '';
  23.   }
  24.   else
  25.   {
  26.     $auszuwaehlen = (isset($folder)) ? $folder : '';
  27.     $fusername = '';
  28.     $fpasswort = '';
  29.     $fserver = '';
  30.   }
  31.  
  32. echo '<form method="POST" name="mainform" action="'.$_SERVER['PHP_SELF'].'">
  33. <input type="hidden" name="seite" value="kraftsetzung">
  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">In Ordner:<img src="design/spacer.gif" height="1" width="35" alt=""></td>
  46.  <td valign="top">';
  47.  
  48.   gfx_zeichneordnerbox($modul, 'ORDER BY id', 0, 0, $auszuwaehlen);
  49.  
  50.   if (!isset($danach)) $danach = 'A';
  51.  
  52.   echo '</td>
  53. </tr>
  54. <tr>
  55.  <td colspan="2"><br><b>Zugangsdaten</b><br><br></td>
  56. </tr>
  57. <tr>
  58.  <td valign="top">Server:<img src="design/spacer.gif" height="1" width="35" alt=""></td>
  59.  <td valign="top"><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="fserver" id="fserver" value="'.$fserver.'" size="50"></td>
  60. </tr>
  61. <tr>
  62.  <td valign="top">Benutzername:<img src="design/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="fusername" value="'.$fusername.'" size="50"></td>
  64. </tr>
  65. <tr>
  66.  <td valign="top">Passwort:<img src="design/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="fpasswort" value="'.$fpasswort.'" 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=inhalt&amp;modul='.urlencode($modul).'">Zur&uuml;ck</a>
  87.  
  88. </form>';
  89.  
  90.   echo $footer;
  91.  
  92. }
  93.  
  94. ?>
  95.