Changeset 816 for trunk/Modules/User/Registration.php
- Timestamp:
- Feb 22, 2015, 11:20:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/Registration.php
r801 r816 3 3 class PageUserRegistration extends Page 4 4 { 5 6 7 5 function ShowForm() 6 { 7 if(array_key_exists('sc', $_POST)) $Human = true; 8 8 else $Human = false; 9 10 11 12 13 14 15 16 9 if(array_key_exists('user', $_POST)) $UserName = $_POST['user']; 10 else $UserName = ''; 11 if(array_key_exists('Email', $_POST)) $Email = $_POST['Email']; 12 else $Email = ''; 13 if(array_key_exists('Team', $_POST)) $Team = $_POST['Team']; 14 else $Team = ''; 15 if(array_key_exists('Language', $_POST)) $Language = $_POST['Language']; 16 else $Language = 1; 17 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 18 $Output = '<form action="?" method="post"> 19 <fieldset><legend>'.T('New user registration').'</legend> 20 <table> 21 <tr><td colspan="2">Pozorně si přečtěte <a href="info.php">pokyny k překladu</a> a řiďte se jimi. Překládat je nutno včetně háčků a čárek!<br/><br/></td></tr> 22 <tr> 23 <td>Jsi člověk? </td>'; 24 if($Human) $Checked = ' checked="checked"'; 25 else $Checked = ''; 26 $Output .= '<td><input type="checkbox" name="sc" '.$Checked.'/></td> 27 </tr> 28 <tr> 29 <td>Jméno:</td> 30 <td><input type="text" name="user" value="'.$UserName.'"/></td> 31 </tr> 32 <tr> 33 <td>Heslo:</td> 34 <td><input type="password" name="pass" /></td> 35 </tr> 36 <tr> 37 <td>Potvrzení Hesla: </td> 38 <td><input type="password" name="pass2" /></td> 39 </tr> 40 <tr> 41 <td>Email: </td> 42 <td><input type="text" name="Email" value="'.$Email.'"/></td> 43 </tr> 44 <tr> 45 <td>Normálně budu překládat do: </td> 46 <td>'.WriteLanguages($Language).'</td> 47 </tr> 48 <tr> 49 <td>Patřím do týmu: </td>'; 50 if($Team == '') $Selected = ' selected="selected"'; 51 else $Selected = ''; 52 $Output .= '<td><select name="Team"><option value="0"'.$Selected.'>Žádného</option> 53 '; 54 $DbResult = $this->Database->query('SELECT `Name`, `Id` FROM `Team`'); 55 while($Line = $DbResult->fetch_assoc()) 56 { 57 if($Team == $Line['Id']) $Selected = ' selected="selected"'; 58 else $Selected = ''; 59 $Output .= '<option value="0'.$Line['Id'].'"'.$Selected.'>'.$Line['Name'].'</option>'; 60 } 61 $Output .= '</select></td> 62 </tr>'; 63 $Output .= '</td></tr>'. 64 '<tr><td>Upřednostněná verze klienta: </td><td>'.ClientVersionSelection('').'</td></tr>'; 65 65 66 66 $Output .= '<tr><td>'; 67 68 67 $Query = 'SELECT * FROM UserTagType'; 68 $DbResult = $this->Database->query($Query); 69 69 $Output .= 'Vyberte pravidla, kterými se při překladu chcete řídit:</td><td>'; 70 70 while ($UserTag = $DbResult->fetch_array()) { 71 71 $checked = false; 72 72 73 73 $Output .= CheckBox('Tag'.$UserTag['ID'], $checked, 'CheckBox'); … … 77 77 78 78 $Output .= '<tr> 79 80 81 82 83 79 <th><input type="submit" value="Registrovat" /></th> 80 </tr> 81 </table></fieldset></form>'; 82 return($Output); 83 } 84 84 85 85 function CheckRegistration() … … 157 157 } 158 158 159 160 161 162 163 164 159 function Show() 160 { 161 $this->Title = T('User registration'); 162 $Output = ''; 163 if(array_key_exists('user', $_POST)) 164 { 165 165 $Output .= $this->CheckRegistration(); 166 167 168 166 } else $Output .= $this->ShowForm(); 167 return($Output); 168 } 169 169 }
Note:
See TracChangeset
for help on using the changeset viewer.