$value) { $err = false; if ((int)$key && 'on' == $value) { // Set query string. $q_str = "DELETE FROM `moderators` WHERE `id` = $key;"; // Delete moderator via query. $res = db_res($q_str); if (!res) { $err = true; break; } } // Set status string. if (!$err) { $status_text = 'Deleted successfully'; } else { $status_text = 'Failed to delete'; } } } // 'Add' transaction. if (!$demo_mode && $_POST['add_moderator']) { // Add new moderator to database. $mod_name = process_db_input( $_POST['name'] ); $mod_email = process_db_input( $_POST['email'] ); $mod_password = md5( $_POST['password'] ); $mod_status = process_db_input( $_POST['status'] ); // Set query string -- get moderator prop values via $_POST variable. $q_str = <<
$status_text

\n"; ?>
No moderators'; } else { ?>
 ID   Name   E-Mail   Status    
 Check all / Uncheck all  Selected partners:
 ID   Name   E-Mail   Password   Status 

 Name   E-Mail   Password   Status