]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-mem_add.php
Renamed all SQL-related functions to camel-case notation
[mailer.git] / inc / modules / admin / what-mem_add.php
index 18eda643530a46aa8af936f9e595a8ca5e64b144..e68c4ccedd6ae187e41d66410fa6f080d6986a66 100644 (file)
@@ -56,12 +56,12 @@ if (!isFormSent()) {
        $below  = array();
 
        // Get all available main menus
        $below  = array();
 
        // Get all available main menus
-       $result = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC",
+       $result = sqlQuery("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC",
                __FILE__, __LINE__);
                __FILE__, __LINE__);
-       if (!SQL_HASZERONUMS($result)) {
+       if (!ifSqlHasZeroNums($result)) {
                // Read menu structure
                // @TODO Cant this be rewritten?
                // Read menu structure
                // @TODO Cant this be rewritten?
-               while ($content = SQL_FETCHARRAY($result)) {
+               while ($content = sqlFetchArray($result)) {
                        // Menu actions
                        array_push($menus, $content['action']);
 
                        // Menu actions
                        array_push($menus, $content['action']);
 
@@ -73,7 +73,7 @@ if (!isFormSent()) {
                } // END - if
 
                // Free memory
                } // END - if
 
                // Free memory
-               SQL_FREERESULT($result);
+               sqlFreeResult($result);
 
                // Remove double eintries
                // @TODO This can be somehow rewritten to a function
 
                // Remove double eintries
                // @TODO This can be somehow rewritten to a function
@@ -97,16 +97,16 @@ if (!isFormSent()) {
 
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main) {
 
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main) {
-                       $result = SQL_QUERY_ESC("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort` ASC",
+                       $result = sqlQueryEscaped("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort` ASC",
                                array($value_main), __FILE__, __LINE__);
                                array($value_main), __FILE__, __LINE__);
-                       if (!SQL_HASZERONUMS($result)) {
+                       if (!ifSqlHasZeroNums($result)) {
                                // Initialize arrays
                                $menus[$value_main] = array();
                                $titles[$value_main] = array();
                                $below[$value_main] = array();
 
                                // Read menu structure
                                // Initialize arrays
                                $menus[$value_main] = array();
                                $titles[$value_main] = array();
                                $below[$value_main] = array();
 
                                // Read menu structure
-                               while ($content = SQL_FETCHARRAY($result)) {
+                               while ($content = sqlFetchArray($result)) {
                                        // Menu actions
                                        array_push($menus[$value_main], $content['what']);
 
                                        // Menu actions
                                        array_push($menus[$value_main], $content['what']);
 
@@ -118,7 +118,7 @@ if (!isFormSent()) {
                                } // END - while
 
                                // Free memory
                                } // END - while
 
                                // Free memory
-                               SQL_FREERESULT($result);
+                               sqlFreeResult($result);
 
                                // Remove double eintries
                                // @TODO This can be somehow rewritten to a function
 
                                // Remove double eintries
                                // @TODO This can be somehow rewritten to a function
@@ -170,7 +170,7 @@ if (!isFormSent()) {
 } elseif (!isDemoModeActive()) {
        // Insert new menu entry
        if (isPostRequestElementSet('menu')) {
 } elseif (!isDemoModeActive()) {
        // Insert new menu entry
        if (isPostRequestElementSet('menu')) {
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `what`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
+               sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `what`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
                        array(
                                postRequestElement('menu'),
                                postRequestElement('name'),
                        array(
                                postRequestElement('menu'),
                                postRequestElement('name'),
@@ -180,7 +180,7 @@ if (!isFormSent()) {
                                bigintval(postRequestElement('sort')),
                        ), __FILE__, __LINE__);
        } else {
                                bigintval(postRequestElement('sort')),
                        ), __FILE__, __LINE__);
        } else {
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s')",
+               sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s')",
                        array(
                                postRequestElement('name'),
                                postRequestElement('title'),
                        array(
                                postRequestElement('name'),
                                postRequestElement('title'),