Please Login First!"; exit(1); }?> one empty line existed in user id field. all of the users is not inserted."; $ok=false; } if(strlen($pwdPieces[$i])==0) { echo "

one empty line existed in password field. all of the users is not inserted.

"; $ok=false; } if(strlen($nickPieces[$i])==0) { echo "

one empty line existed in nickname field. all of the users is not inserted.

"; $ok=false; } if (!is_valid_user_name($idPieces[$i])){ echo "

user id \"".$idPieces[$i]."\" is not valid. all of the users is not inserted.

"; $ok=false; } } if($ok) { echo ""; echo ""; echo ""; $max_length=20; for($i=0;$i<$teamnumber;$i++){ $user_id=$idPieces[$i]; $nick=$nickPieces[$i]; echo ""; $password=pwGen($pwdPieces[$i]); $email="your_own_email@internet"; $school="your_own_school"; $ip = ($_SERVER['REMOTE_ADDR']); if( !empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){ $REMOTE_ADDR = $_SERVER['HTTP_X_FORWARDED_FOR']; $tmp_ip=explode(',',$REMOTE_ADDR); $ip =(htmlentities($tmp_ip[0],ENT_QUOTES,"UTF-8")); } if(mb_strlen($nick,'utf-8')>20){ $new_len=mb_strlen($nick,'utf-8'); if($new_len>$max_length){ $max_length=$new_len; $longer="ALTER TABLE `users` MODIFY COLUMN `nick` varchar($max_length) NULL DEFAULT '' "; pdo_query($longer); } } if( $user_id == "admin" ) continue; $sql="INSERT INTO `users`("."`user_id`,`email`,`ip`,`accesstime`,`password`,`reg_time`,`nick`,`school`)". "VALUES(?,?,?,NOW(),?,NOW(),?,?)on DUPLICATE KEY UPDATE `email`=?,`ip`=?,`accesstime`=NOW(),`password`=?,`reg_time`=now(),nick=?,`school`=?"; pdo_query($sql,$user_id,$email,$ip,$password,$nick,$school,$email,$ip,$password,$nick,$school) ; } } echo "
Copy these accounts to distribute
team_namelogin_idpassword
$nick$user_id$pwdPieces[$i]

"; }else{ echo "

sorry,the sum of user id is not equal to the sum of Password or Nickname

"; } } ?>
TeamGenerator2:

the account will be replaced if Login ID exists.

Login ID:
Password:
Nickname: