]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Surfbar URL status translation added, member template name fixed
[mailer.git] / inc / mysql-manager.php
index ef2e46d8c7e44e07211b050dd9bb6571f67213df..4be52eb6d64ad6284509abd822d8a45170a6ad60 100644 (file)
@@ -364,7 +364,7 @@ function ADD_MENU($MODE, $act, $wht) {
                        } else {
                                // This is a menu block... ;-)
                                $BLOCK_MODE = true;
-                               $INC_BLOCK = sprintf(PATH."inc/modules/%s/action-%s.php", $MODE, $main_action);
+                               $INC_BLOCK = sprintf("%sinc/modules/%s/action-%s.php", PATH, $MODE, $main_action);
                                if ((file_exists($INC_BLOCK)) && (is_readable($INC_BLOCK))) {
                                        // Load include file
                                        if ((!EXT_IS_ACTIVE($main_action)) || ($main_action == "online")) OUTPUT_HTML("<TR>
@@ -827,11 +827,7 @@ function SEND_MODE_MAILS($mod, $modes)
        if (empty($content)) {
                if ((!empty($sub_adm)) && (!empty($msg_admin))) {
                        // Send admin mail
-                       if (GET_EXT_VERSION("admins") >= "0.4.1") {
-                               SEND_ADMIN_EMAILS_PRO($sub_adm, $msg_admin, $content, $GLOBALS['userid']);
-                       } else {
-                               SEND_ADMIN_EMAILS($sub_adm, LOAD_EMAIL_TEMPLATE($msg_admin, $content, $GLOBALS['userid']));
-                       }
+                       SEND_ADMIN_NOTIFICATION($sub_adm, $msg_admin, $content, $GLOBALS['userid']);
                } elseif ($_CONFIG['admin_notify'] == "Y") {
                        // Cannot send mails to admin!
                        $content = CANNOT_SEND_ADMIN_MAILS;
@@ -919,39 +915,48 @@ function GET_ACTION ($MODE, &$wht)
        return $ret;
 }
 //
-function GET_CATEGORY ($cid)
-{
+function GET_CATEGORY ($cid) {
+       // Default is not found
        $ret = _CATEGORY_404;
-       $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%d LIMIT 1", array($cid), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1)
-       {
+
+       // Lookup the category
+       $result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%d LIMIT 1",
+               array(bigintval($cid)), __FILE__, __LINE__);
+       if (SQL_NUMROWS($result) == 1) {
                // Category found... :-)
                list($ret) = SQL_FETCHROW($result);
-               SQL_FREERESULT($result);
-       }
+       } // END - if
+
+       // Free result
+       SQL_FREERESULT($result);
+
+       // Return result
        return $ret;
 }
 //
-function GET_PAYMENT ($pid, $full=false)
-{
+function GET_PAYMENT ($pid, $full=false) {
+       // Default is not found
        $ret = _PAYMENT_404;
-       $result = SQL_QUERY_ESC("SELECT mail_title, price FROM "._MYSQL_PREFIX."_payments WHERE id=%d LIMIT 1", array($pid), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1)
-       {
+
+       // Load payment data
+       $result = SQL_QUERY_ESC("SELECT mail_title, price FROM "._MYSQL_PREFIX."_payments WHERE id=%d LIMIT 1",
+               array(bigintval($pid)), __FILE__, __LINE__);
+       if (SQL_NUMROWS($result) == 1) {
                // Payment type found... :-)
-               if (!$full)
-               {
+               if (!$full) {
                        // Return only title
                        list($ret) = SQL_FETCHROW($result);
-                       SQL_FREERESULT($result);
-               }
-                else
-               {
+               } else {
                        // Return title and price
                        list($t, $p) = SQL_FETCHROW($result);
                        $ret = $t." / ".TRANSLATE_COMMA($p)." ".POINTS;
                }
        }
+
+       // Free result
+       SQL_FREERESULT($result);
+
+       // Return result
        return $ret;
 }
 //
@@ -1039,7 +1044,7 @@ function GET_TOTAL_DATA($search, $tableName, $lookFor, $whereStatement="userid",
  * uid         = Referral ID wich should receive...
  * points      = ... xxx points
  * send_notify = shall I send the referral an email or not?
- * refid       = inc/modules/guest/what-confirm.php need this
+ * rid         = inc/modules/guest/what-confirm.php need this
  * locked      = Shall I pay it to normal (false) or locked (true) points ammount?
  * add_mode    = Add points only to $uid or also refs? (WARNING! Changing "ref" to "direct"
  *               will cause no referral will get points ever!!!)