// Free memory
SQL_FREERESULT($result);
- // Remeber options in constant
- define('_MEMBER_SELECTION', $OUT);
-
if (!$return) {
+ // Remeber options in constant
+ define('_MEMBER_SELECTION', $OUT);
+
// Display selection box
define('__LANG_VALUE', GET_LANGUAGE());
$content = SQL_FETCHARRAY($result);
// Filter all data
- foreach ($content as $key=>$value) {
+ 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 again...
+ // 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);
$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);
+
+ // Free the result
+ SQL_FREERESULT($result);
+
+ // Do we have a *real* userid?
+ if ($_POST['uid'][$id] > 0) {
+ // Generate subject
+ $eval = "\$subject = MEMBER_DEL_".strtoupper($table)."_SUBJECT;";
+ eval($eval);
+
+ // Load email template
+ $mail = LOAD_EMAIL_TEMPLATE("member_del_".$table, $content);
+
+ // Send email out
+ SEND_EMAIL($_POST['uid'][$id], $subject, $mail);
+ } // END - if
+
+ // Generate subject
+ $eval = "\$subject = ADMIN_DEL_".strtoupper($table)."_SUBJECT;";
+ eval($eval);
+
+ // Send admin notification out
+ SEND_ADMIN_NOTIFICATION($subject, "admin_del_".$table, $content, $_POST['uid'][$id]);
+ } // END - if
+
+ // Add id number
$idList .= $id.",";
} // END - if