+ // Will always be 1 ;-)
+ if ($selected == 1) {
+ // Get result from a given column array and table name
+ $result = SQL_RESULT_FROM_ARRAY($table, $columns, $idColumn, $id);
+
+ // Is there one entry?
+ if (SQL_NUMROWS($result) == 1) {
+ // Load all data
+ $content = SQL_FETCHARRAY($result);
+
+ // Filter all data
+ foreach ($content as $key => $value) {
+ // Search index
+ $idx = array_search($key, $columns, true);
+
+ //Â Do we have a userid?
+ if ($key == "userid") {
+ // Add it again as raw id
+ $content['uid'] = bigintval($value);
+ } // END - if
+
+ // Handle the call in external function
+ $content[$key] = HANDLE_EXTRA_VALUES($filterFunctions[$idx], $value, $extraValues[$idx]);
+ } // END - foreach
+
+ // Add color switching
+ $content['sw'] = $SW;
+
+ // Then list it
+ $OUT .= LOAD_TEMPLATE("admin_".$listType."_".$table."_row", true, $content);
+
+ // Switch color
+ $SW = 3 - $SW;
+ } // END - if
+
+ // Free the result
+ SQL_FREERESULT($result);
+ } // END - if
+ } // END - foreach
+
+ // Load master template
+ LOAD_TEMPLATE("admin_".$listType."_".$table."", false, $OUT);
+}
+// Delete rows by given ID numbers
+function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=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))) {
+ // Shall we delete here or list for deletion?
+ if ($deleteNow) {
+ // Delete them
+ $SQL = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_%s WHERE %s IN (%s)";
+ $idList = "";
+ foreach ($IDs as $id => $sel) {
+ // Is there a userid?
+ if (isset($_POST['uid'][$id])) {
+ // 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
+ $content = SQL_FETCHARRAY($result);