]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/admins_functions.php
Fixed logfile writing in installation phase, .revision is now ignored
[mailer.git] / inc / libs / admins_functions.php
index 6b6e03595cfb7fcd983ec59caf08855cdfe2ef79..402f259018433369fabcadcaa71cda3b17b27915 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Funktionen fuer die admins-Erweiterung           *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009)              $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: stelzi                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
@@ -130,16 +135,14 @@ function ADMINS_CHECK_ACL($act, $wht) {
 
 // Create email link to admins's account
 function ADMINS_CREATE_EMAIL_LINK ($email, $mod="admin") {
-       $locked = " AND `status`='CONFIRMED'";
-       if (IS_ADMIN()) $locked = "";
        if (strpos("@", $email) > 0) {
                // Create email link
                $result = SQL_QUERY_ESC("SELECT id
 FROM `{!_MYSQL_PREFIX!}_admins`
-WHERE email='%s'".$locked." LIMIT 1",
- array($email), __FUNCTION__, __LINE__);
+WHERE email='%s' LIMIT 1",
                      array($email), __FUNCTION__, __LINE__);
 
-               // Is there an entry?
+               // Is there an entry?
                if (SQL_NUMROWS($result) == 1) {
                        // Load userid
                        list($uid) = SQL_FETCHROW($result);
@@ -150,7 +153,7 @@ WHERE email='%s'".$locked." LIMIT 1",
 
                // Free memory
                SQL_FREERESULT($result);
-       } elseif (bigintval($email) > 0) {
+       } elseif ((is_int($email)) && ($email > 0)) {
                // Direct ID given
                $email = "{!URL!}/modules.php?module=".$mod."&what=admins_contct&admin=".bigintval($email);
        }
@@ -259,7 +262,7 @@ function ADMINS_EDIT_ADMIN_ACCOUNTS ($POST) {
        $currMode = GET_ADMIN_DEFAULT_ACL(GET_CURRENT_ADMIN_ID());
 
        // Begin the edit loop
-       $SW = 2; $OUT = "";
+       $OUT = ""; $SW = 2;
        foreach ($POST['sel'] as $id => $selected) {
                // Secure ID number
                $id = bigintval($id);
@@ -305,7 +308,7 @@ function ADMINS_DELETE_ADMIN_ACCOUNTS ($POST) {
        SQL_FREERESULT($result_main);
        if ($accounts > 1) {
                // Delete accounts
-               $SW = 2; $OUT = "";
+               $OUT = ""; $SW = 2;
                foreach ($POST['sel'] as $id => $selected) {
                        // Secure ID number
                        $id = bigintval($id);
@@ -371,7 +374,7 @@ function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) {
 function ADMINS_LIST_ADMIN_ACCOUNTS() {
        // Select all admin accounts
        $result = SQL_QUERY("SELECT id, login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY login ASC", __FUNCTION__, __LINE__);
-       $SW = 2; $OUT = "";
+       $OUT = ""; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Compile some variables
                $content['mode'] = constant('ADMINS_'.strtoupper($content['mode']).'_MODE');