]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-del_holiday.php
Added update_year.sh (still not fully flexible) and updated all years with it.
[mailer.git] / inc / modules / admin / what-del_holiday.php
index 39069e12b5034663c849a14079f6c4348a683bee..861f91bf9d6d4ea2f54b15184cdbc4b0a701bcff 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2015 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -49,7 +49,7 @@ if (ifPostContainsSelections()) {
        $count = '0';
        foreach (postRequestElement('sel') as $id => $sel) {
                // Get the userid
-               $result = SQL_QUERY_ESC("SELECT
+               $result = sqlQueryEscaped("SELECT
        `userid`,
        `holiday_start`,
        `holiday_end`
@@ -58,12 +58,12 @@ FROM
 WHERE
        `id`=%s
 LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
-               if (SQL_NUMROWS($result) == 1) {
+               if (sqlNumRows($result) == 1) {
                        // Load data and free memory
-                       $content = SQL_FETCHARRAY($result);
+                       $content = sqlFetchArray($result);
 
                        // Update user's account
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
+                       sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data`
 SET
        `holiday_active`='N',
        `holiday_activated`=0
@@ -72,7 +72,7 @@ WHERE
 LIMIT 1", array(bigintval($content['userid'])), __FILE__, __LINE__);
 
                        // Remove holiday
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM
+                       sqlQueryEscaped("DELETE LOW_PRIORITY FROM
        `{?_MYSQL_PREFIX?}_user_holidays`
 WHERE
        `id`=%s
@@ -89,7 +89,7 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
                } // END - if
 
                // Free result
-               SQL_FREERESULT($result);
+               sqlFreeResult($result);
        } // END - foreach
 
        // Display final message
@@ -99,7 +99,7 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
        $message = '{--ADMIN_HOLIDAY_SINGLE_404--}';
 
        // Fetch data
-       $result_load = SQL_QUERY_ESC("SELECT
+       $result_load = sqlQueryEscaped("SELECT
        `holiday_start` AS `start`,
        `holiday_end` AS `end`
 FROM
@@ -108,12 +108,12 @@ WHERE
        `userid`=%s
 LIMIT 1",
                array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result_load) == 1) {
+       if (sqlNumRows($result_load) == 1) {
                // Load data
-               $content = SQL_FETCHARRAY($result_load);
+               $content = sqlFetchArray($result_load);
 
                // Delete one holiday request (for task)
-               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM
+               sqlQueryEscaped("DELETE LOW_PRIORITY FROM
        `{?_MYSQL_PREFIX?}_user_holidays`
 WHERE
        `userid`=%s
@@ -128,7 +128,7 @@ LIMIT 1", array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
        } // END - if
 
        // Free memory
-       SQL_FREERESULT($result_load);
+       sqlFreeResult($result_load);
 
        // Output message
        displayMessage($message);