. */ include("./include/include.php"); admin_header(true); if( !in_array("body_resetpassword", $_SESSION['sess_functions']) ) { echoln("You are not authorized to see this page."); }else { if( isset($_GET['confirm'] ) ) { // Remove password $query = "UPDATE `ab_bodies` SET `Password`='' WHERE `BodyCode`='".addslashes($_GET['bodycode'])."'"; if( $res=doquery($query) AND getaffected()==1 ) { echoln("Successfully removed the password of ".$_GET['bodycode']."."); echoln(""); }else { echoln("Failed removing the password of ".$_GET['bodycode']."."); } echoln("
Close window"); }else { // Ask for confirmation $query = "SELECT `BodyCode`, `BodyName`, `Email`, `Password` FROM `ab_bodies` WHERE `BodyCode`='".addslashes($_GET['bodycode'])."'"; if( @mysql_num_rows( $res=doquery($query) )==1 ) { $row = mysql_fetch_array($res); if( strlen($row['Password'])==32 ) { echoln("Are you sure you want to delete the password for ".$row['BodyName']." (".$row['BodyCode'].")?"); echoln("
Note: a new password will be send to the official e-mail address of the body (current set to ".$row['Email'].", but this will be reloaded from the main IT system before the password is send) within 24 hours. Deletion is immediate though."); }else { echoln("Cannot reset password for ".$row['BodyName'].""); echoln("
There is no password set for this body."); echoln("
Close window"); } }else { echoln("The password cannot be reset as this body does not exist."); } } } admin_footer(true); ?>