|
reSIProcate/repro
9694
|
00001 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 00002 00003 <!-- 00004 System: Repro 00005 File: createaccount.php 00006 Purpose: Collect information necessary to enroll a new user. 00007 Author: S. Chanin 00008 --> 00009 00010 <html> 00011 <head> 00012 <link rel="stylesheet" type="text/css" href="repro_style.css" /> 00013 <title>Create Account</title> 00014 </head> 00015 00016 <body> 00017 <h1 class="title">Repro</h1> 00018 <h1>Create Account</h1> 00019 <hr /> 00020 00021 <!-- if we've looped back due to an error, show the message --> 00022 <?php 00023 if (isset($_GET["error"])) { 00024 echo '<p class="error">' . $_GET["error"] . "</p>\n"; 00025 } 00026 ?> 00027 00028 <?php 00029 // create an image of a random string of characters to use to ensure that a person 00030 // is creating the account. 00031 00032 $image = imagecreate(120,30); 00033 00034 $white = imagecolorallocate($image,0xFF, 0xFF, 0xFF); 00035 $gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0); 00036 $darkgray = imagecolorallocate($image, 0x50, 0x50, 0x50); 00037 00038 srand((double)microtime()*1000000); 00039 00040 for ($i=0; $i<30; $i++) { 00041 $x1 = rand(0,120); 00042 $y1 = rand(0,30); 00043 $x2 = rand(0,120); 00044 $y2 = rand(0,30); 00045 00046 imageline($image, $x1, $y1, $x2, $y2, $gray); 00047 } 00048 00049 for ($i=0; $i < 5; $i++) { 00050 $type = rand(0,2); 00051 00052 if (0 == $type) { 00053 // generate a lower case letter 00054 $cnum[$i] = chr(rand(97,122)); 00055 } else if (1 == $type) { 00056 // generate an upper case letter 00057 $cnum[$i] = chr(rand(65,90)); 00058 } else { 00059 // generate a number 00060 $cnum[$i] = chr(rand(48,57)); 00061 } 00062 } 00063 00064 $x = 0; 00065 for ($i=0; $i<5; $i++) { 00066 $fnt = rand(3,5); 00067 $x = $x + rand(12,20); 00068 $y = rand(7,12); 00069 00070 imagestring($image,$fnt, $x, $y, $cnum[$i], $darkgray); 00071 } 00072 00073 $string = "$cnum[0]$cnum[1]$cnum[2]$cnum[3]$cnum[4]"; 00074 $stringMD5 = md5($string); 00075 $stringfile = "images/" . $stringMD5 . ".pgn"; 00076 00077 imagepng($image,$stringfile); 00078 imagedestroy($image); 00079 00080 ?> 00081 00082 <form method="POST" action="emailactivationnotice.php"> 00083 <table> 00084 <tr> 00085 <td>Username</td> 00086 <td><input type="text" id="username" name="username" value="<?php echo $_GET["username"]?>" /></td> 00087 </tr> 00088 <tr> 00089 <td>Password</td> 00090 <td><input type="password" id="password" name="password" /></td> 00091 </tr> 00092 <tr> 00093 <td>Retype Password</td> 00094 <td><input type="password" id="password2" name="password2" /></td> 00095 </tr> 00096 <tr> 00097 <td>Full Name</td> 00098 <td><input type="text" id="fullname" name="fullname" value="<?php echo $_GET["fullname"]?>"/></td> 00099 </tr> 00100 <tr> 00101 <td>Domain</td> 00102 <td><input type="text" id="domain" name="domain" readonly="readonly" value="XXX" class="readonly"/></td> 00103 </tr> 00104 <tr> 00105 <td>Email</td> 00106 <td><input type="text" id="email" name="email" value="<?php echo $_GET["email"]?>"/></td> 00107 </tr> 00108 <tr> 00109 <td>Retype Email</td> 00110 <td><input type="text" id="email2" name="email2" value="<?php echo $_GET["email2"]?>" /></td> 00111 </tr> 00112 <tr> 00113 <td>Retype the characters displayed below</td> 00114 </tr> 00115 <tr> 00116 <td><img width=120 height=30 src="<?php echo $stringfile ?>" border="1" /></td> 00117 <td><input type="text" size="5" maxlength="5" name="userkey" id="userkey" value=""/> 00118 <input type="hidden" name="keyvalue" id="keyvalue" value="<?php echo $stringMD5 ?>" /> 00119 </td> 00120 </tr> 00121 <tr> 00122 <td> </td> 00123 <td align="right"> 00124 <input type="submit" id="submit" name="submit" value="Create" /> 00125 <input type="reset" id="reset" name="reset" value="Reset" /> 00126 </td> 00127 <tr> 00128 </table> 00129 </form> 00130 <hr /> 00131 <a href="index.php">Return to Welcome Page</a> 00132 <br /> 00133 00134 </body> 00135 </html>
1.7.5.1