64) { $err_str .= $ERR_MSG[40]; $err_cnt++; $emailflg="no"; } } if(login() and $emailflg="ok"){ }else{ //文字に不成功 include_once("login.php"); exit; } // 以下、ログインに成功したときの処理 if($_REQUEST['image_key']){ $con = db_connect(); $sql_user = "SELECT * FROM m_rkn_personal WHERE user_id = '{$email}' AND delflg = 'false'"; //$sql_user = "SELECT * FROM m_rkn_personal WHERE user_id iLike '%{$email}%' AND delflg = 'false'"; $result0 = db_query($con,$sql_user); if($result0['rows']>0){ //パスワードリセットテーブルを更新する。 $passcode=makePassword(32); $passresetid = db_get_nextval($con,'seq_passreset'); $Now = date("Y-m-d h:m:s"); $sql= " insert into passreset ( passresetid, passresetcode, email, delflg, insdate ) values ( $passresetid, '$passcode', '$email', 0, '$Now' ) "; $result1 = db_query_upd($con,$sql); if($result1<=0){ $trans = db_transactions($con,"ROLLBACK;"); db_disconnect($con); //管理者にエラーメッセージを送信 $message = "passreset_err_insert_passreset=".$email."\n"; //-------------------- mail 発送 ----------------------------------------------// $mail = trim($preuseremail[$y]); mb_language("Ja") ; mb_internal_encoding("EUC-JP") ; $mlfr = 'maekawak@gsc.riken.jp'; $mlto = 'maekawak@gsc.riken.jp'; $mlsb = 'ISGO Error'; $mlms = $message; $headers = "From: $mlfr"; $rcd = mb_send_mail('maekawak@gsc.riken.jp', $mlsb, $mlms, $headers); include_once("login.php"); exit; } //E-mailを送信する $message = $message. "To initiate the process for resetting the password for your"."\n". $email." ISGO Membership Account, visit the link below"."\n". "http://www.isgo.org/passreset/passreset_ins.php?passcode=$passcode"."\n". "If clicking the link above does not work, copy and paste the URL in a new browser window instead."."\n". $message = $message."Sincerely,"."\n"."\n". "ISGO"."\n"; $mlfr="info@isgo.org"; //$mail = trim($preuseremail[1]); mb_language("Ja") ; mb_internal_encoding("EUC-JP") ; $mlfr = 'info@isgo.org'; $mlto = $email; $mlsb = 'ISGO Membership Password Assistance'; $mlms = $message; $headers = "From: $mlfr"; $rcd = mb_send_mail($mlto, $mlsb, $mlms, $headers); $mlms = $message; header("Location:passreset_end.php?endflg=1"); exit; //E-MAILアドレスが存在しない場合、元ファイルへ遷移 }else{ //管理者にエラーメッセージを送信 $message = "passreset_err_insert_passreset=".$email."\n"; //-------------------- mail 発送 ----------------------------------------------// $mail = trim($preuseremail[$y]); mb_language("Ja") ; mb_internal_encoding("EUC-JP") ; $mlfr = 'maekawak@gsc.riken.jp'; $mlto = 'maekawak@gsc.riken.jp'; $mlsb = 'ISGO Error'; $mlms = $message; $headers = "From: $mlfr"; $rcd = mb_send_mail('maekawak@gsc.riken.jp', $mlsb, $mlms, $headers); include_once("login.php"); exit; } db_disconnect($con); } ?>