X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_cats.php;h=2f50fa4f883388ca981c9b9b64b926e76f496b80;hb=def76e23a31c57bce0737f1c645cff93cf9ccef2;hp=0cd9676bc761b190e971eccb0078b629322245e4;hpb=63f159414369b5ea19a8ca75d8cd8033c45d8341;p=mailer.git diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index 0cd9676bc7..2f50fa4f88 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -53,7 +53,7 @@ if (isFormSent('add')) { array(postRequestElement('catname')), __FILE__, __LINE__); if (SQL_HASZERONUMS($result)) { // Category does not exists, we simply add it... - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (`cat`,`visible`,`sort`) VALUES ('%s','%s','%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (`cat`, `visible`, `sort`) VALUES ('%s','%s','%s')", array( postRequestElement('catname'), postRequestElement('visible'), @@ -114,17 +114,17 @@ if (isFormSent('add')) { $OUT = ''; foreach (postRequestElement('sel') as $id => $value) { // Load row template and switch colors - $OUT .= loadTemplate('admin_delete_cats_row', true, $id); + $OUT .= loadTemplate('admin_delete_cats_row', TRUE, $id); } // END - foreach // Load main template - loadTemplate('admin_delete_cats', false, $OUT); + loadTemplate('admin_delete_cats', FALSE, $OUT); } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit categories $OUT = ''; foreach (postRequestElement('sel') as $id => $value) { // Load data from the category - $result = SQL_QUERY_ESC("SELECT `id`,`visible`,`sort` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id`, `visible`, `sort` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); @@ -135,17 +135,17 @@ if (isFormSent('add')) { $content['visible_selection'] = addSelectionBox('yn', $content['visible'], 'visible', $content['id']); // Load row template and switch colors - $OUT .= loadTemplate('admin_edit_cats_row', true, $content); + $OUT .= loadTemplate('admin_edit_cats_row', TRUE, $content); } // END - foreach // Load main template - loadTemplate('admin_edit_cats', false, $OUT); + loadTemplate('admin_edit_cats', FALSE, $OUT); } else { // Init variable here $CATS = ''; // Load all categories - $result = SQL_QUERY("SELECT `id`,`cat`,`visible`,`sort` FROM `{?_MYSQL_PREFIX?}_cats` ORDER BY `sort` ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT `id`, `cat`, `visible`, `sort` FROM `{?_MYSQL_PREFIX?}_cats` ORDER BY `sort` ASC", __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { // Init variables $OUT = ''; @@ -158,21 +158,21 @@ if (isFormSent('add')) { $CATS .= ''; // Load row template and switch color - $OUT .= loadTemplate('admin_list_cats_row', true, $content); + $OUT .= loadTemplate('admin_list_cats_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load main template - loadTemplate('admin_list_cats', false, $OUT); + loadTemplate('admin_list_cats', FALSE, $OUT); } // END - if // Remember in array $content['cats'] = $CATS; // Form to add a new category - loadTemplate('admin_add_cat', false, $content); + loadTemplate('admin_add_cat', FALSE, $content); } // [EOF]