Add some bots
[infodrom.org/www.zeitungsliste.de] / lib / login.inc
index 0e7559e..80f1c1c 100644 (file)
@@ -5,7 +5,6 @@ include_once('extern/rfc822.php');
 function account_exists($login)
 {
   global $cfg;
-  global $_SESSION;
 
   $query = sprintf("SELECT id FROM users WHERE lower(nickname) = lower('%s')",
                   pg_escape_string($login));
@@ -65,7 +64,6 @@ function is_valid_realname($name)
 
 function check_account_data()
 {
-  global $_POST;
   global $zlist;
 
   $zlist['replace'] = array('nickname' => $_POST['nickname'],
@@ -97,8 +95,6 @@ function check_account_data()
 
 function check_passwd()
 {
-  global $_POST;
-
   if (!strlen($_POST['passwd']) || !strlen($_POST['pwcopy']))
     return 'Sie müssen alle Pflichtfelder ausfüllen! Siehe Beschreibung unten.';
 
@@ -178,7 +174,6 @@ function account_activate($code)
 function send_activation($email, $user, $code)
 {
   global $cfg;
-  global $_SERVER;
 
   $url = sprintf('%sactivate.html?code=%s', $cfg['home'], urlencode($code));
   $subject = 'Aktivierung Account Zeitungsliste';
@@ -202,14 +197,12 @@ Ihren Browser ein:
 
 function process_activate()
 {
-  global $_GET;
-
   if (($try = account_activate($_GET['code'])) !== true) {
     $ret = warning($try);
     } else {
       $ret = information('Ihr Account ist aktiviert.');
       $ret .= '<h3>Willkommen!</h3><p class="info">'.
-       'Sie werden automatisch zur <a href="login.html">Login-Seite</a> weitergeleitet. '.
+       'Sie werden automatisch zur <a href="login.html"><span style="color: red;">Login-Seite</span></a> weitergeleitet. '.
        'Bitte melden Sie sich dort an.</p>';
       $zlist['redirect'] = 'login.html';
     }
@@ -219,7 +212,6 @@ function process_activate()
 function process_account_new()
 {
   global $cfg;
-  global $_POST;
 
   if (($try = check_account_data()) !== true)
     return $try;
@@ -274,8 +266,6 @@ function process_account_new()
 
 function update_account()
 {
-  global $_POST;
-  global $_SESSION;
   global $zlist;
 
   $query = sprintf("UPDATE users SET nickname='%s',realname='%s',email='%s',url='%s' ".
@@ -299,9 +289,6 @@ function update_account()
 
 function update_passwd()
 {
-  global $_POST;
-  global $_SESSION;
-
   $hash = passwd($_SESSION['nickname'], $_POST['passwd']);
 
   $query = sprintf("UPDATE users SET passwd='%s' WHERE id = %d",
@@ -342,9 +329,6 @@ function checkpass($nickname, $passwd)
 function login_user($nickname, $passwd)
 {
   global $cfg;
-  global $_SERVER;
-  global $_POST;
-  global $_SESSION;
 
   $query = sprintf("SELECT id,nickname,realname,email,url,passwd FROM users " .
                   "WHERE lower(nickname) = lower('%s') AND status = 1",
@@ -458,8 +442,6 @@ Bitte ändern Sie es beim nächsten Einloggen.
 
 function process_login_request()
 {
-  global $_POST;
-
   if (isset($_POST['new'])) {
     $try = process_account_new();
     if ($try === true)
@@ -507,7 +489,6 @@ function process_login_request()
 function last_activity()
 {
   global $cfg;
-  global $_SESSION;
 
   $query = sprintf("SELECT DISTINCT topics.id,topics.topic FROM article " .
                   "JOIN topics ON article.topic=topics.id " .
@@ -536,10 +517,6 @@ function last_activity()
 
 function process_login()
 {
-  global $_GET;
-  global $_SERVER;
-  global $_SESSION;
-
   if (isset($_GET['from'])) {
     if ($_GET['from'] == 'article')
       $ret .= warning('Um an einer Diskussion teilzunehmen, müssen Sie angemeldet sein.');
@@ -576,8 +553,6 @@ function process_login()
 
 function process_passwd()
 {
-  global $_SESSION;
-  global $_SERVER;
   global $zlist;
   global $cfg;
 
@@ -609,9 +584,6 @@ function logout()
 
 function process_options()
 {
-  global $_SESSION;
-  global $_SERVER;
-  global $_POST;
   global $zlist;
   global $cfg;
 
@@ -654,16 +626,10 @@ function process_options()
 
 function ajax_passwd_check()
 {
-  global $_POST;
-
   return checkpass($_POST['nickname'], $_POST['passwd']);
 }
 
 function ajax_nickname_check()
 {
-  global $_POST;
-
   return account_exists($_POST['nickname']);
 }
-
-?>