// By default show the list...
$show = true;
+// Check for 'id' element
+if ((count($_POST) > 0) && ((!isset($_POST['id'])) || (!is_array($_POST['id'])) || (count($_POST['id']) == 0))) {
+ // Not found so output message
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS'));
+
+ // Abort here
+ return;
+}
+
// Edit or delete button hit?
if (isset($_POST['edit'])) {
// Show entries for editing
ADMIN_EDIT_ENTRIES_CONFIRM(
$_POST['id'],
"surfbar_urls",
- array("id", "userid", "url", "reward", "costs"),
- array("bigintval", "ADD_MEMBER_SELECTION_BOX", "", "TRANSLATE_COMMA", "TRANSLATE_COMMA"),
- array("", array(false, true, true), "", "", "")
+ array("id", "userid", "url"),
+ array("bigintval", "ADD_MEMBER_SELECTION_BOX", ""),
+ array("", array(false, true, true), "")
);
$show = false;
} elseif (isset($_POST['do_edit'])) {
// List all URLs
$result = SQL_QUERY("SELECT id, userid, url, views_total, status, UNIX_TIMESTAMP(registered) AS registered, UNIX_TIMESTAMP(last_locked) AS last_locked, lock_reason
-FROM "._MYSQL_PREFIX."_surfbar_urls
-ORDER BY id ASC", __FILE__, __LINE__);
+FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
+ORDER BY `id` ASC", __FILE__, __LINE__);
// Do we have some URLs left?
if (SQL_NUMROWS($result) > 0) {
LOAD_TEMPLATE("admin_list_surfbar_urls", false, $OUT);
} else {
// No URLs in surfbar
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_NO_URLS_FOUND);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND'));
}
// Free result