X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-admin_add.php;h=e4baa04123417350309e6557b2f4b3d3b950eaf4;hb=bb70f91b5535a0e21dba8098ba8f9af83ada9073;hp=eaae702d3dfa8cb2b46993b838ac5c13ded5c8f5;hpb=636d4abe1adefffc30744c179798adcc49502c2a;p=mailer.git diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index eaae702d3d..e4baa04123 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -55,11 +55,11 @@ if (!isFormSent()) { $below = array(); // Get all available main menus - $result = SQL_QUERY("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__); - if (!SQL_HASZERONUMS($result)) { + $result = sqlQuery("SELECT `action`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__); + if (!ifSqlHasZeroNums($result)) { // Read menu structure // @TODO Cant this be rewritten? - while ($content = SQL_FETCHARRAY($result)) { + while ($content = sqlFetchArray($result)) { // Menu actions array_push($menus, $content['action']); @@ -71,7 +71,7 @@ if (!isFormSent()) { } // END - while // Free memory - SQL_FREERESULT($result); + sqlFreeResult($result); // Remove double eintries // @TODO This can be somehow rewritten to a function @@ -93,16 +93,16 @@ if (!isFormSent()) { // Load sub menus :) foreach ($menus as $key_main => $value_main) { - $result = SQL_QUERY_ESC("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC", + $result = sqlQueryEscaped("SELECT `what`, `title`, `sort` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC", array($value_main), __FILE__, __LINE__); - if (!SQL_HASZERONUMS($result)) { + if (!ifSqlHasZeroNums($result)) { // Init 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']); @@ -114,7 +114,7 @@ if (!isFormSent()) { } // END - while // Free memory - SQL_FREERESULT($result); + sqlFreeResult($result); // Remove double eintries // @TODO This can be somehow rewritten to a function @@ -165,7 +165,7 @@ if (!isFormSent()) { // Insert new menu entry if (isPostRequestElementSet('menu')) { // Add sub menu - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`, `what`, `title`, `descr`, `sort`) VALUES ('%s','%s','%s','%s','%s')", + sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`, `what`, `title`, `descr`, `sort`) VALUES ('%s','%s','%s','%s','%s')", array( postRequestElement('menu'), postRequestElement('name'), @@ -176,7 +176,7 @@ if (!isFormSent()) { ); } else { // Add main menu - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", + sqlQueryEscaped("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", array( postRequestElement('name'), postRequestElement('title'),