+ // Add affected rows
+ $affected += SQL_AFFECTEDROWS();
+
+ // Load all data from that id
+ $result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1",
+ array($table, $idColumn, $id), __FILE__, __LINE__);
+
+ // Fetch the data
+ global $DATA;
+ $DATA = SQL_FETCHARRAY($result);
+
+ // Free the result
+ SQL_FREERESULT($result);
+
+ // Send "build mails" out
+ ADMIN_SEND_BUILD_MAILS("edit", $table, $content, $id);
+ } // END - foreach
+
+ // Was this fine?
+ if ($affected == count($IDs)) {
+ // All deleted
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ALL_ENTRIES_EDITED);
+ } else {
+ // Some are still there :(
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_SOME_ENTRIES_NOT_EDITED, $affected, count($IDs)));
+ }
+ } else {
+ // List for editing
+ ADMIN_BUILD_LIST("edit", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
+ }
+ } // END - if
+}
+// Un-/lock rows by given ID numbers
+function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn="userid") {
+ // All valid entries? (We hope so here!)
+ if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) {
+ // Shall we un-/lock here or list for locking?
+ if ($lockNow) {
+ // Un-/lock entries
+ ADMIN_BUILD_STATUS_HANDLER("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
+ } else {
+ // List for editing
+ ADMIN_BUILD_LIST("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
+ }
+ } // END - if
+}
+// Undelete rows by given ID numbers
+function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn="userid") {
+ // All valid entries? (We hope so here!)
+ if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) {
+ // Shall we un-/lock here or list for locking?
+ if ($lockNow) {
+ // Undelete entries
+ ADMIN_BUILD_STATUS_HANDLER("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray);
+ } else {
+ // List for editing
+ ADMIN_BUILD_LIST("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);