Error: You must agree to the LAN rules by checking the box at the bottom. Please use your browser's back button to resubmit."); exit; } # Perform check: too many people on list already $counter=file('count.txt'); if ($counter[0] > 34) { print("

Error: Unfortunately, space has run out at the LAN party, and we can not hold any more. Please contact an officer if you feel you have a special case, or that this is a glitch in the sign up form.

"); exit; } # Perform check: no equipment was selected if ($equip[0] == "" && $equip[1]=="" && $equip[2]=="") { print("

Error: You didn't select any equipment. You must bring at least an XBox controller to be invited.

"); exit; } $fieldcount=$counter[0] * 15 + 2; print("$fieldcount"); # Perform check: user has duplicate signups # subcheck: username for ($i=2; $i <=$fieldcount; $i=$i+15) { if (trim($data[$i],"\n")==$username) { print("

Error: You can not sign up for this LAN Party twice! Your name already appears on our guest list.

"); exit; } } # Perform check: make sure user is a State student $ncsureg="false"; for ($i=0; $i <= 76922; $i++) { if ($username==trim($users[$i],"\n")) { $ncsureg="true"; $i = 76921; } } if ($ncsureg != "true") { print("

Error: According to our records, it does not appear that you are an NC State Student. Please contact an MGC officer if you think there is an error, or you would like to come from outside the school.

"); exit; } $datfile = fopen("signups.txt", 'a'); fwrite($datfile, "------------------------------------------------------------------------"); fwrite($datfile, $newline); fwrite($datfile, $username); fwrite($datfile, $newline); fwrite($datfile, $usernum); fwrite($datfile, $newline); fwrite($datfile, $firstname); fwrite($datfile, $newline); fwrite($datfile, $lastname); fwrite($datfile, $newline); fwrite($datfile, $email); fwrite($datfile, $newline); fwrite($datfile, $equip[0]); fwrite($datfile, $newline); fwrite($datfile, $equip[1]); fwrite($datfile, $newline); fwrite($datfile, $equip[2]); fwrite($datfile, $newline); fwrite($datfile, $gamesbring[0]); fwrite($datfile, $newline); fwrite($datfile, $gamesbring[1]); fwrite($datfile, $newline); fwrite($datfile, $gamesbring[2]); fwrite($datfile, $newline); fwrite($datfile, $gamesbring[3]); fwrite($datfile, $newline); fwrite($datfile, $gamesbring[4]); fwrite($datfile, $newline); fwrite($datfile, $quote); fwrite($datfile, $newline); $counter[0]=$counter[0]+1; $countinc = fopen("count.txt", 'w'); fwrite($countinc, $counter[0]); fclose($countinc); # print out sample for file print(""); print("-----------------------------------------------------------------"); print("
"); print("$username"); print("
"); print("$usernum"); print("
"); print("$firstname"); print("
"); print("$lastname"); print("
"); print("$email"); print("
"); print("$equip[0]"); print("
"); print("$equip[1]"); print("
"); print("$equip[2]"); print("
"); print("$gamesbring[0]"); print("
"); print("$gamesbring[1]"); print("
"); print("$gamesbring[2]"); print("
"); print("$gamesbring[3]"); print("
"); print("$gamesbring[4]"); print("
"); print("$quote"); print("
"); ?>

The above information was successfully written to the lan party signup list. Click here to return to the MGC homepage.