- }
- break;
-
- case "edit": // Update banner
- foreach ($_POST['sel'] as $id => $sel)
- {
- // Secure ID
- $id = bigintval($id);
-
- // Update entry
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_refbanner SET url='%s', alternate='%s', visible='%s' WHERE id=%s LIMIT 1",
- array($_POST['url'][$id], $_POST['alternate'][$id], $_POST['visible'], $id), __FILE__, __LINE__);
- }
- break;
- }
- if (SQL_AFFECTEDROWS() == 1)
- {
- $content = "<SPAN class=\"admin_done\">".SETTINGS_SAVED."</SPAN>";
- }
- else
- {
- $content = "<SPAN class=\"admin_failed\">".SETTINGS_NOT_SAVED."</SPAN>";
+ break;
+
+ case 'edit': // Update banner
+ foreach (postRequestElement('sel') as $id => $sel) {
+ // Secure id
+ $id = bigintval($id);
+
+ // Update entry
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `url`='%s', `alternate`='%s', `visible`='%s' WHERE `id`=%s LIMIT 1",
+ array(
+ postRequestElement('url', $id),
+ postRequestElement('alternate', $id),
+ postRequestElement('visible'),
+ $id
+ ), __FILE__, __LINE__);
+ }
+ break;
+ } // END - switch
+
+ // Check if we have saved (updated)
+ if (!SQL_HASZEROAFFECTED()) {
+ // Updated!
+ $content = '{--SETTINGS_SAVED--}';
+ } else {
+ // Nothing has been updated
+ $content = '<span class="notice">{--SETTINGS_NOT_SAVED--}</span>';