Admin Forum functions
| > Module written by Matt Mecham
| > Date started: 1st march 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "
Incorrect access
You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_member {
var $base_url;
var $modules = "";
function auto_run()
{
global $ibforums, $DB, $std;
//-----------------------------------------
// Get the sync module
//-----------------------------------------
if ( USE_MODULES == 1 )
{
require ROOT_PATH."modules/ipb_member_sync.php";
$this->modules = new ipb_member_sync();
}
//-----------------------------------------
// Kill globals - globals bad, Homer good.
//-----------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
$ibforums->admin->nav[] = array( 'act=mem&code=edit', 'Edit Member Search Form' );
//-----------------------------------------
switch($ibforums->input['code'])
{
case 'doform':
$this->member_do_edit_form();
break;
case 'doedit':
$this->member_do_edit();
break;
//-----------------------------------------
case 'unsuspend':
$this->member_unsuspend();
break;
//-----------------------------------------
case 'add':
$this->member_add_form();
break;
case 'doadd':
$this->member_do_add();
break;
//-----------------------------------------
case 'doprune':
$this->member_doprune();
break;
//-----------------------------------------
// ranks / titles
//-----------------------------------------
case 'title':
$this->titles_start();
break;
case 'rank_edit':
$this->titles_rank_setup('edit');
break;
case 'rank_add':
$this->titles_rank_setup('add');
break;
case 'do_add_rank':
$this->titles_add_rank();
break;
case 'do_rank_edit':
$this->titles_edit_rank();
break;
case 'rank_delete':
$this->titles_delete_rank();
break;
//-----------------------------------------
case 'mod':
$this->view_mod();
break;
case 'domod':
$this->domod();
break;
//-----------------------------------------
case 'changename':
$this->member_change_name_start();
break;
case 'dochangename':
$this->member_change_name_complete();
break;
//-----------------------------------------
case 'banmember':
$this->member_suspend_start();
break;
case 'dobanmember':
$this->member_suspend_complete();
break;
//-----------------------------------------
// Change Passy
//-----------------------------------------
case 'changepassword':
$this->member_password_start();
break;
case 'dochangepassword':
$this->member_password_complete();
break;
//-----------------------------------------
// Member search
//-----------------------------------------
case 'search':
$this->search_form();
break;
case 'searchresults':
$this->search_results();
break;
//-----------------------------------------
// Delete / Prune
//-----------------------------------------
case 'member_delete':
$this->member_delete();
break;
default:
$this->search_form();
break;
}
}
//-----------------------------------------
//
// PASS: START
//
//-----------------------------------------
function member_password_complete()
{
global $ibforums, $DB, $std;
if ( ! $ibforums->input['password'] )
{
$ibforums->main_msg = "You must enter a password!";
$this->member_password_start();
}
$salt = $ibforums->converge->generate_password_salt(5);
$salt = str_replace( '\\', "\\\\", $salt );
$key = $ibforums->converge->generate_auto_log_in_key();
$md5_once = md5( trim($ibforums->input['password']) );
$converge = $DB->simple_exec_query( array( 'select' => '*', 'from' => 'members_converge', 'where' => 'converge_id='.$ibforums->input['id'] ) );
$save_array = array();
if ( $ibforums->input['newsalt'] )
{
$save_array['converge_pass_salt'] = $salt;
$save_array['converge_pass_hash'] = md5( md5($salt) . $md5_once );
}
else
{
$save_array['converge_pass_hash'] = md5( md5( $converge['converge_pass_salt'] ) . $md5_once );
}
$DB->do_update( 'members_converge', $save_array, 'converge_id='.$ibforums->input['id'] );
if ( $ibforums->input['newkey'] )
{
$DB->do_update( 'members', array( 'member_login_key' => $key ), 'id='.$ibforums->input['id'] );
}
//-----------------------------------------
// Redirect
//-----------------------------------------
$page_query = "";
foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit )
{
$page_query .= '&'.$bit.'='.trim($ibforums->input[ $bit ]);
}
$ibforums->admin->save_log("Members Password Changed ( id: {$ibforums->input['id']} )");
$ibforums->admin->done_screen("Password Changed", "Member Search", "act=mem".$page_query, "redirect" );
}
//-----------------------------------------
//
// PASS: START
//
//-----------------------------------------
function member_password_start()
{
global $ibforums, $DB, $std;
//-----------------------------------------
// Redirect
//-----------------------------------------
$page_array = array( 1 => array( 'code' , 'dochangepassword' ),
2 => array( 'act' , 'mem' ),
3 => array( 'id' , $ibforums->input['id'] ),
);
foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit )
{
$page_array[] = array( $bit, trim($ibforums->input[ $bit ]) );
}
$ibforums->html .= $ibforums->adskin->start_form( $page_array );
//-----------------------------------------
// Get member
//-----------------------------------------
$member = $DB->simple_exec_query( array( 'select' => '*', 'from' => 'members', 'where' => 'id='.$ibforums->input['id'] ) );
$ibforums->adskin->td_header[] = array( " " , "40%" );
$ibforums->adskin->td_header[] = array( " " , "60%" );
//-----------------------------------------
$ibforums->html .= $ibforums->adskin->start_table( "Change password for member: {$member['name']}" );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Enter the new password" ,
$ibforums->adskin->form_input('password' ),
) );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Create new password salt?
If set to 'yes', a new password salt will be generated. Useful if a member is having trouble logging in.
" ,
$ibforums->adskin->form_yes_no( "newsalt", 1 )
) );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Create new log in key?
If set to 'yes', a new cookie log in key will be generated. Useful if a member is having trouble logging in. Any current cookies will not work.
" ,
$ibforums->adskin->form_yes_no( "newkey", 1 )
) );
$ibforums->html .= $ibforums->adskin->end_form("Change Password");
$ibforums->html .= $ibforums->adskin->end_table();
$ibforums->admin->output();
}
/*-------------------------------------------------------------------------*/
//
// TEMP BANNING
//
/*-------------------------------------------------------------------------*/
function member_suspend_start()
{
global $ibforums, $DB, $std;
$ibforums->admin->page_title = "Account Suspension";
$ibforums->admin->page_detail = "Automated temporary member suspension. Simply choose the duration of the suspension and submit the form below";
$contents = "{membername},\nYour member account at {$ibforums->vars['board_name']} has been temporarily suspended.\n\nYour account will not be functional until {date_end} (depending on your timezone). This is an automated process and you do not need to do anything to expediate the unsuspension process.\n\nBoard Address: {$ibforums->vars['board_url']}/index.php";
if ($ibforums->input['mid'] == "")
{
$ibforums->admin->error("You must specify a valid member id, please go back and try again");
}
$DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($ibforums->input['mid']) ) );
$DB->simple_exec();
if ( ! $member = $DB->fetch_row() )
{
$ibforums->admin->error("We could not match that ID in the members database");
}
//-----------------------------------------
// Redirect
//-----------------------------------------
$page_array = array( 1 => array( 'code' , 'dobanmember' ),
2 => array( 'act' , 'mem' ),
3 => array( 'mid' , $ibforums->input['mid'] ),
) ;
foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit )
{
$page_array[] = array( $bit, trim($ibforums->input[ $bit ]) );
}
$ibforums->html .= $ibforums->adskin->start_form( $page_array );
$ban = $std->hdl_ban_line( $member['temp_ban'] );
$units = array( 0 => array( 'h', 'Hours' ), 1 => array( 'd', 'Days' ) );
//-----------------------------------------
// Start form
//-----------------------------------------
$ibforums->adskin->td_header[] = array( " " , "40%" );
$ibforums->adskin->td_header[] = array( " " , "60%" );
$ibforums->html .= $ibforums->adskin->start_table( "Member Account Suspension", "Note: If this member is already suspended, any new setting will restart the ban" );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Suspend {$member['name']} for..." ,
$ibforums->adskin->form_input('timespan', $ban['timespan'], "text", "", '5' ) . ' ' . $ibforums->adskin->form_dropdown('units', $units, $ban['units'] ),
) );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Email notification to this member? (If so, you may edit the email below)" ,
$ibforums->adskin->form_yes_no( "send_email", 0 )
) );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Email contents (Tags: {membername} = member's name, {date_end} = ban end)" ,
$ibforums->adskin->form_textarea( "email_contents", $contents )
), "", 'top' );
$ibforums->html .= $ibforums->adskin->end_form("Suspend This Account");
$ibforums->html .= $ibforums->adskin->end_table();
$ibforums->admin->output();
}
/*-------------------------------------------------------------------------*/
//
// SUSPEND COMPLETE
//
/*-------------------------------------------------------------------------*/
function member_suspend_complete()
{
global $ibforums, $DB, $std, $HTTP_POST_VARS;
$ibforums->admin->page_title = "Account Suspension";
$ibforums->admin->page_detail = "Automated temporary member suspension. Confirmation and information";
$ibforums->input['mid'] = intval($ibforums->input['mid']);
if ($ibforums->input['mid'] == "")
{
$ibforums->admin->error("You must specify a valid member id, please go back and try again");
}
$DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($ibforums->input['mid']) ) );
$DB->simple_exec();
if ( ! $member = $DB->fetch_row() )
{
$ibforums->admin->error("We could not match that ID in the members database");
}
//-----------------------------------------
// Work out end date
//-----------------------------------------
$ibforums->input['timespan'] = intval($ibforums->input['timespan']);
if ( $ibforums->input['timespan'] == "" )
{
$new_ban = "";
}
else
{
$new_ban = $std->hdl_ban_line( array( 'timespan' => intval($ibforums->input['timespan']), 'unit' => $ibforums->input['units'] ) );
}
$show_ban = $std->hdl_ban_line( $new_ban );
//-----------------------------------------
// Update and show confirmation
//-----------------------------------------
$DB->do_update( 'members', array( 'temp_ban' => $new_ban ), "id=".$ibforums->input['mid'] );
// I say, did we choose to email 'dis member?
if ($ibforums->input['send_email'] == 1)
{
// By golly, we did!
require "./sources/classes/class_email.php";
$this->email = new emailer();
$msg = trim($std->txt_stripslashes($_POST['email_contents']));
$msg = str_replace( "{membername}", $member['name'] , $msg );
$msg = str_replace( "{date_end}" , $ibforums->admin->get_date( $show_ban['date_end'], 'LONG') , $msg );
$this->email->message = $this->email->clean_message($msg);
$this->email->subject = "Account Suspension Notification";
$this->email->to = $member['email'];
$this->email->send_mail();
}
//-----------------------------------------
// Redirect
//-----------------------------------------
$page_query = "";
foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit )
{
$page_query .= '&'.$bit.'='.trim($ibforums->input[ $bit ]);
}
$ibforums->admin->save_log("Suspended Member(s) ( {$member['name']} )");
$ibforums->admin->done_screen("Suspended Member(s)", "Member Search", "act=mem".$page_query, "redirect" );
}
/*-------------------------------------------------------------------------*/
//
// Unsuspend
//
/*-------------------------------------------------------------------------*/
function member_unsuspend()
{
global $ibforums, $DB, $std;
if ($ibforums->input['mid'] == "")
{
$ibforums->admin->error("You must specify a valid member id, please go back and try again");
}
if ($ibforums->input['mid'] == 'all')
{
$DB->do_update( 'members', array( 'temp_ban' => $new_ban ), "" );
$ibforums->admin->save_log("Unsuspended all member accounts");
$msg = "All Accounts Unsuspended";
}
else
{
$mid = intval($ibforums->input['mid']);
$DB->do_update( 'members', array( 'temp_ban' => $new_ban ), "id=$mid" );
$DB->simple_construct( array( 'select' => 'name', 'from' => 'members', 'where' => "id=$mid" ) );
$DB->simple_exec();
$member = $DB->fetch_row();
$ibforums->admin->save_log("Unsuspended {$member['name']}");
$msg = "{$member['name']} Unsuspended";
}
//-----------------------------------------
// Redirect
//-----------------------------------------
$page_query = "";
foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit )
{
$page_query .= '&'.$bit.'='.trim($ibforums->input[ $bit ]);
}
$ibforums->admin->done_screen($msg, "Member Search", "act=mem".$page_query, "redirect" );
}
/*-------------------------------------------------------------------------*/
//
// CHANGE MEMBER NAME
//
/*-------------------------------------------------------------------------*/
function member_change_name_complete()
{
global $ibforums, $DB, $std, $HTTP_POST_VARS;
$ibforums->input['new_name'] = str_replace( '|', '|', $ibforums->input['new_name'] );
//-----------------------------------------
// Check
//-----------------------------------------
if ($ibforums->input['mid'] == "")
{
$ibforums->admin->error("You must specify a valid member id, please go back and try again");
}
if ($ibforums->input['new_name'] == "")
{
$this->change_name_start("You must enter a new name for this member");
exit();
}
//-----------------------------------------
// Select
//-----------------------------------------
$DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($ibforums->input['mid']) ) );
$DB->simple_exec();
if ( ! $member = $DB->fetch_row() )
{
$ibforums->admin->error("We could not match that ID in the members database");
}
$mid = $ibforums->input['mid']; // Save me poor ol' carpels
if ($ibforums->input['new_name'] == $member['name'])
{
$this->member_change_name_start("The new name is the same as the old name, that is illogical captain");
exit();
}
//-----------------------------------------
// Check to ensure that his member name hasn't already been taken.
//-----------------------------------------
$new_name = trim($ibforums->input['new_name']);
$DB->cache_add_query( 'login_getmember', array( 'username' => strtolower($new_name) ) );
$DB->cache_exec_query();
if ( $DB->get_num_rows() )
{
$this->member_change_name_start("The name '$new_name' already exists, please choose another");
exit();
}
//-----------------------------------------
// If one gets here, one can assume that the new name is correct for one, er...one.
// So, lets do the converteroo
//-----------------------------------------
$DB->do_update( 'members' , array( 'name' => $new_name ), "id=" .$mid );
$DB->do_update( 'contacts' , array( 'contact_name' => $new_name ), "contact_id=" .$mid );
$DB->do_update( 'forums' , array( 'last_poster_name' => $new_name ), "last_poster_id=".$mid );
$DB->do_update( 'moderator_logs', array( 'member_name' => $new_name ), "member_id=" .$mid );
$DB->do_update( 'moderators' , array( 'member_name' => $new_name ), "member_id=" .$mid );
$DB->do_update( 'posts' , array( 'author_name' => $new_name ), "author_id=" .$mid );
$DB->do_update( 'sessions' , array( 'member_name' => $new_name ), "member_id=" .$mid );
$DB->do_update( 'topics' , array( 'starter_name' => $new_name ), "starter_id=" .$mid );
$DB->do_update( 'topics' , array( 'last_poster_name' => $new_name ), "last_poster_id=".$mid );
//-----------------------------------------
// Recache moderators
//-----------------------------------------
require_once( ROOT_PATH .'sources/admin/ad_moderator.php' );
$admod = new ad_moderator();
$admod->rebuild_moderator_cache();
//-----------------------------------------
// I say, did we choose to email 'dis member?
//-----------------------------------------
if ($ibforums->input['send_email'] == 1)
{
//-----------------------------------------
// By golly, we did!
//-----------------------------------------
require "./sources/classes/class_email.php";
$this->email = new emailer();
$msg = trim($HTTP_POST_VARS['email_contents']);
$msg = str_replace( "{old_name}", $member['name'], $msg );
$msg = str_replace( "{new_name}", $new_name , $msg );
$this->email->message = $this->email->clean_message($msg);
$this->email->subject = "Member Name Change Notification";
$this->email->to = $member['email'];
$this->email->send_mail();
}
$ibforums->admin->save_log("Changed Member Name '{$member['name']}' to '$new_name'");
if ( USE_MODULES == 1 )
{
$this->modules->register_class(&$this);
$this->modules->on_name_change($mid, $new_name );
}
//-----------------------------------------
// Redirect
//-----------------------------------------
$page_query = "";
$ibforums->input['name'] = $new_name;
foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit )
{
$page_query .= '&'.$bit.'='.trim($ibforums->input[ $bit ]);
}
$ibforums->admin->done_screen("Member's Name Changed", "Member Search", "act=mem".$page_query, "redirect" );
}
/*-------------------------------------------------------------------------*/
//
// Change name complete
//
/*-------------------------------------------------------------------------*/
function member_change_name_start($message="")
{
global $ibforums, $DB, $std;
$ibforums->admin->page_title = "Change Member Name";
$ibforums->admin->page_detail = "You may enter a new name for this member.";
//-----------------------------------------
// check
//-----------------------------------------
if ($ibforums->input['mid'] == "")
{
$ibforums->admin->error("You must specify a valid member id, please go back and try again");
}
$DB->simple_construct( array( 'select' => '*', 'from' => 'members', 'where' => "id=".intval($ibforums->input['mid']) ) );
$DB->simple_exec();
if ( ! $member = $DB->fetch_row() )
{
$ibforums->admin->error("We could not match that ID in the members database");
}
$contents = "{old_name},\nAn administrator has changed your member name on {$ibforums->vars['board_name']}.\n\nYour new name is: {new_name}\n\nPlease remember this as you may need to use this new name when you log in next time.\nBoard Address: {$ibforums->vars['board_url']}/index.php";
//-----------------------------------------
// Redirect
//-----------------------------------------
$page_array = array( 1 => array( 'code' , 'dochangename' ),
2 => array( 'act' , 'mem' ),
3 => array( 'mid' , $ibforums->input['mid'] ),
);
foreach( array('name','email','ip_address','aim_name','icq_number','yahoo','signature','posts','suspended', 'registered_first', 'registered_last','last_post_first', 'last_post_last', 'last_activity_first', 'last_activity_last','mgroup','namewhere','gotcount', 'fromdel') as $bit )
{
$page_array[] = array( $bit, trim($ibforums->input[ $bit ]) );
}
$ibforums->html .= $ibforums->adskin->start_form( $page_array );
//-----------------------------------------
// start form
//-----------------------------------------
$ibforums->adskin->td_header[] = array( " " , "40%" );
$ibforums->adskin->td_header[] = array( " " , "60%" );
$ibforums->html .= $ibforums->adskin->start_table( "Change Member Name" );
if ($message != "")
{
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Error Message:" ,
"$message",
) );
}
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Current Member's Name" ,
$member['name'],
) );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "New Members Name" ,
$ibforums->adskin->form_input( "new_name", $ibforums->input['new_name'] )
) );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Email notification to this member? (If so, you may edit the email below)" ,
$ibforums->adskin->form_yes_no( "send_email", 1 )
) );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Email contents (Tags: {old_name} = current name, {new_name} = new name)" ,
$ibforums->adskin->form_textarea( "email_contents", $contents )
) );
$ibforums->html .= $ibforums->adskin->end_form("Change this members name");
$ibforums->html .= $ibforums->adskin->end_table();
$ibforums->admin->output();
}
//-----------------------------------------
//
// Moderation control...
//
//-----------------------------------------
function domod()
{
global $ibforums, $DB, $std;
$ids = array();
foreach ($ibforums->input as $k => $v)
{
if ( preg_match( "/^mid_(\d+)$/", $k, $match ) )
{
if ($ibforums->input[ $match[0] ])
{
$ids[] = $match[1];
}
}
}
//-----------------------------------------
if ( count($ids) < 1 )
{
$ibforums->admin->error("You did not select any members to approve or delete");
}
//-----------------------------------------
if ($ibforums->input['type'] == 'approve')
{
//-----------------------------------------
require ROOT_PATH."sources/classes/class_email.php";
$email = new emailer();
$email->get_template("complete_reg");
$email->build_message( "" );
//-----------------------------------------
$DB->cache_add_query( 'member_domod', array( 'ids' => $ids ) );
$main = $DB->cache_exec_query();
while( $row = $DB->fetch_row( $main ) )
{
if ($row['mgroup'] != $ibforums->vars['auth_group'])
{
continue;
}
if ($row['real_group'] == "")
{
$row['real_group'] = $ibforums->vars['member_group'];
}
$DB->do_update( 'members', array( 'mgroup' => $row['real_group'] ), "id=".$row['id'] );
$email->subject = "Account validated at ".$ibforums->vars['board_name'];
$email->to = $row['email'];
$email->send_mail();
if ( USE_MODULES == 1 )
{
$this->modules->register_class(&$this);
$this->modules->on_group_change($row['id'], $row['real_group']);
}
}
$DB->simple_exec_query( array( 'delete' => 'validating', 'where' => "member_id IN(".implode( ",",$ids ).")" ) );
$DB->simple_construct( array( 'select' => 'id, name',
'from' => 'members',
'where' => "mgroup <> ".$ibforums->vars['auth_group'],
'order' => 'id DESC',
'limit' => array( 0,1 ) ) );
$DB->simple_exec();
$r = $DB->fetch_row();
$ibforums->admin->save_log("Approved Queued Registrations");
$ibforums->admin->done_screen( count($ids)." Members Approved", "Manage Registrations", "act=mem&code=mod" );
}
else
{
$DB->simple_exec_query( array( 'delete' => 'members' , 'where' => "id IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'member_extra' , 'where' => "id IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'message_text' , 'where' => "msg_author_id IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'message_topics' , 'where' => "mt_owner_id IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'contacts' , 'where' => "member_id IN(".implode( ",",$ids ).") or contact_id IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'validating' , 'where' => "member_id IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'pfields_content', 'where' => "member_id IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'warn_logs' , 'where' => "wlog_mid IN(".implode( ",",$ids ).")" ) );
$DB->simple_exec_query( array( 'delete' => 'members_converge', 'where' => "converge_id IN(".implode( ",",$ids ).")" ) );
$DB->do_update( 'posts' , array( 'author_id' => 0 ), "author_id IN(".implode( ",",$ids ).")" );
$DB->do_update( 'topics', array( 'starter_id' => 0 ), "starter_id IN(".implode( ",",$ids ).")" );
if ( USE_MODULES == 1 )
{
$this->modules->register_class(&$this);
$this->modules->on_delete($ids);
}
$ibforums->admin->save_log("Denied Queued Registrations");
$ibforums->admin->done_screen( count($ids)." Members Removed", "Manage Registrations", "act=mem&code=mod" );
}
}
//-----------------------------------------
function view_mod()
{
global $ibforums, $DB, $std;
$ibforums->admin->page_title = "Manage User Registration/Email Change Queues";
$ibforums->admin->page_detail = "This section allows you to allow or deny registrations where you have requested that an administrator previews new accounts before allowing full membership. It will also allow you to complete or deny new email address changes.
Member will appear to be a member of this group to others
" ,
$ibforums->adskin->form_dropdown( "mgroup", $mem_group, $mem['mgroup'] )
) );
$arr = explode( ",", $mem['mgroup_others'] );
$ibforums->html .= $ibforums->adskin->add_td_row( array( "Secondary Member Groups You can select more than one other group.
Member will inherit 'better' permissions of all secondary groups and will inherit permission masks of all secondary groups in positive favor.