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. echo str_replace('<body', '<body onload="self.focus();document.getElementById(\'rusername\').focus();"', $header);
  6.  
  7. echo '<h1>'.htmlentities($module_information->caption).'</h1>';
  8.  
  9. $res = db_query("SELECT * FROM `".$WBConfig->getMySQLPrefix()."users` WHERE `creator_ip` = '".$_SERVER['REMOTE_ADDR']."' AND `created_database` >= DATE_SUB(NOW(), INTERVAL ".db_escape($configuration[$modul]['sperrdauer'])." MINUTE)");
  10. if (db_num($res))
  11.         die($footer.'<span class="red">Sie k&ouml;nnen mit dieser IP-Adresse nur jede '.$configuration[$modul]['sperrdauer'].' Minuten ein neues Konto er&ouml;ffnen!</span>'.$header);
  12.  
  13. if ($configuration[$modul]['enable_userreg'])
  14. {
  15.         $ok = true;
  16.         if (isset($reg) && ($reg == '1'))
  17.         {
  18.                 $ok = false;
  19.                 if (($rusername == '') || ($rpersonal_name == '') || ($rpassword == '') || ($rpassword2 == ''))
  20.                 {
  21.                         echo '<span class="red"><b>Fehler:</b> Sie m&uuml;ssen die erforderlichen Fehler ausf&uuml;llen, um sich zu registrieren.</span><br><br>';
  22.                         $ok = true;
  23.                 }
  24.                 else
  25.                 {
  26.                         if ($rpassword != $rpassword2)
  27.                         {
  28.                                  echo '<span class="red"><b>Fehler:</b> Die zwei Passw&ouml;rter stimmen nicht &uuml;berein.</span><br><br>';
  29.                                  $ok = true;
  30.                         }
  31.                         else
  32.                         {
  33.                                 $res = db_query("SELECT `id` FROM `".$WBConfig->getMySQLPrefix()."users` WHERE `username` = '".db_escape($rusername)."'");
  34.                                 if (db_num($res) > 0)
  35.                                 {
  36.                                         echo '<span class="red"><b>Fehler:</b> Der Benutzername &quot;'.$rusername.'&quot; ist bereits vergeben.</span><br><br>';
  37.                                         $ok = true;
  38.                                 }
  39.                                 else
  40.                                 {
  41.                                         db_query("INSERT INTO `".$WBConfig->getMySQLPrefix()."users` (`username`, `personal_name`, `password`, `email`, `created_database`, `creator_ip`) VALUES ('".db_escape($rusername)."', '".db_escape($rpersonal_name)."', '".md5($rpassword)."', '".db_escape($remail)."', NOW(), '".$_SERVER['REMOTE_ADDR']."')");
  42.                                         echo '<b>Sie haben Ihr Konto auf diesem Personal WebBase-Server erfolgreich registriert.</b><br><br>Das Konto ist sofort verwendbar. Wir w&uuml;nschen Ihnen viel Freude mit Personal WebBase!';
  43.                                 }
  44.                         }
  45.                 }
  46.         }
  47.         if ($ok)
  48.         {
  49.  
  50.                 if (!isset($rusername)) $rusername = '';
  51.                 if (!isset($rpersonal_name)) $rpersonal_name = '';
  52.                 if (!isset($rpassword)) $rpassword = '';
  53.                 if (!isset($rpassword2)) $rpassword2 = '';
  54.                 if (!isset($remail)) $remail = '';
  55.  
  56.                 echo '<b>Hier k&ouml;nnen Sie sich ein Konto auf diesem Personal WebBase-Server errichten.</b><br><br>
  57.  
  58. Die Angabe einer E-Mail-Adresse ist optional.<br><br>
  59.  
  60. <form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="frm">
  61. <input type="hidden" name="seite" value="'.$seite.'">
  62. <input type="hidden" name="modul" value="'.$modul.'">
  63. <input type="hidden" name="reg" value="1">
  64.  
  65. <table cellspacing="0" cellpadding="2" border="0">
  66. <tr>
  67.         <td>Benutzername:</td>
  68.         <td><img src="designs/spacer.gif" alt="" width="5" height="1"></td>
  69.         <td><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="rusername" id="rusername" value="'.$rusername.'"></td>
  70. </tr>
  71. <tr>
  72.         <td>Personenname:</td>
  73.         <td><img src="designs/spacer.gif" alt="" width="5" height="1"></td>
  74.         <td><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="rpersonal_name" value="'.$rpersonal_name.'"></td>
  75. </tr>
  76. <tr>
  77.         <td>Passwort:</td>
  78.         <td><img src="designs/spacer.gif" alt="" width="5" height="1"></td>
  79.         <td><input type="password" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="rpassword" value="'.$rpassword.'"></td>
  80. </tr>
  81. <tr>
  82.         <td>Wiederholung:</td>
  83.         <td><img src="designs/spacer.gif" alt="" width="5" height="1"></td>
  84.         <td><input type="password" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="rpassword2" value="'.$rpassword2.'"></td>
  85. </tr>
  86. <tr>
  87.         <td>E-Mail-Adresse:</td>
  88.         <td><img src="designs/spacer.gif" alt="" width="5" height="1"></td>
  89.         <td><input type="text" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';" name="remail" value="'.$remail.'"></td>
  90. </tr>
  91. </table><br>
  92.  
  93. <input type="submit" class="button" onmouseover="this.className=\'button_act\';" onmouseout="this.className=\'button\';" value="Registrieren">
  94.  
  95. </form>';
  96.         }
  97. }
  98. else
  99. {
  100.         echo '<span class="red">Das Registrieren bei Personal WebBase wurde von dem Administrator nicht aktiviert.</span>';
  101. }
  102.  
  103.         echo $footer;
  104.  
  105. ?>