Mercurial > hg > fapweb
comparison pages/register.inc.php @ 1096:bbc0a3d0b51e
Major renaming / refactor of site messages. Some that were previously
modifiable from admin interface are now "hardcoded" in the configuration
file. Having these settings made modifiable from there made no sense
and just took space in the UI.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Jan 2017 22:15:06 +0200 |
parents | 7e497188e4c6 |
children | 51f24cb35fc8 |
comparison
equal
deleted
inserted
replaced
1095:faa835271dfd | 1096:bbc0a3d0b51e |
---|---|
141 | 141 |
142 | 142 |
143 // Check if registration is enabled | 143 // Check if registration is enabled |
144 if (!stChkSetting("allowRegister")) | 144 if (!stChkSetting("allowRegister")) |
145 { | 145 { |
146 echo stGetSetting("registerNotEnabled"); | 146 echo stGetSetting("msgRegisterNotEnabled"); |
147 } | 147 } |
148 else | 148 else |
149 if ($maxAttendeesHard > 0 && $numAttendees >= $maxAttendeesHard) | 149 if ($maxAttendeesHard > 0 && $numAttendees >= $maxAttendeesHard) |
150 { | 150 { |
151 echo stGetSetting("registerLimitExceeded"); | 151 echo stGetSetting("msgRegisterLimitExceeded"); |
152 } | 152 } |
153 else | 153 else |
154 if ($mode == "start") | 154 if ($mode == "start") |
155 { | 155 { |
156 // | 156 // |
163 intValueToHash(rand(1,5)). | 163 intValueToHash(rand(1,5)). |
164 $botCheckOPs[rand(0,2)]. | 164 $botCheckOPs[rand(0,2)]. |
165 intValueToHash(5 * rand(1,5)); | 165 intValueToHash(5 * rand(1,5)); |
166 | 166 |
167 echo | 167 echo |
168 stGetSetting("registerPageBlurb")."\n". | 168 stGetSetting("msgRegisterPageBlurb")."\n". |
169 stGetFormStart("register", "register"). | 169 stGetFormStart("register", "register"). |
170 " ".stGetFormHiddenInput("mode", "check")."\n". | 170 " ".stGetFormHiddenInput("mode", "check")."\n". |
171 " ".stGetFormHiddenInput("hash", $botCheckHash)."\n". | 171 " ".stGetFormHiddenInput("hash", $botCheckHash)."\n". |
172 " <table class=\"register\">\n"; | 172 " <table class=\"register\">\n"; |
173 stPrintFormTextInput("Handle:", "(who you are)", 20, SET_LEN_USERNAME, "name"); | 173 stPrintFormTextInput("Handle:", "(who you are)", 20, SET_LEN_USERNAME, "name"); |
174 stPrintFormTextInput("Group(s):", "(duh)", 30, SET_LEN_GROUPS, "groups"); | 174 stPrintFormTextInput("Group(s):", "(duh)", 30, SET_LEN_GROUPS, "groups"); |
175 stPrintFormTextInput("E-mail:", stCheckRequireEmail() ? "(required)" : "", 30, SET_LEN_EMAIL, "email"); | 175 stPrintFormTextInput("E-mail:", stCheckRequireEmail() ? "(required)" : "", 30, SET_LEN_EMAIL, "email"); |
176 stPrintFormTextInput("Oneliner:", "(leave a message here)", 30, SET_LEN_ONELINER, "oneliner"); | 176 stPrintFormTextInput("Oneliner:", "(leave a message here)", 30, SET_LEN_ONELINER, "oneliner"); |
177 stPrintFormTextInput(hashToCheckStr($botCheckHash)." = ", "(I.Q. / robot check". | 177 stPrintFormTextInput(hashToCheckStr($botCheckHash)." = ", "(I.Q. / robot check". |
178 //" [".hashToAnswer($botCheckHash)."]". | 178 //" [".hashToAnswer($botCheckHash)."]". |
179 ")", 20, 20, "botcheck", "autocomplete=\"off\""); | 179 ")", 20, 20, "botcheck", "autocomplete=\"off\""); |
180 echo | 180 echo |
181 " <tr><td colspan=\"2\"></td><td>".stGetFormSubmitInput("register", "Continue")."</td></tr>\n". | 181 " <tr><td colspan=\"2\"></td><td>".stGetFormSubmitInput("register", "Continue")."</td></tr>\n". |
182 " </table>\n". | 182 " </table>\n". |
183 "</form>\n"; | 183 "</form>\n"; |
184 | 184 |
185 echo stGetSetting("registerInfoText"); | 185 echo stGetSetting("msgRegisterInfoText"); |
186 } | 186 } |
187 else | 187 else |
188 if ($mode == "check" || $mode == "register") | 188 if ($mode == "check" || $mode == "register") |
189 { | 189 { |
190 // | 190 // |
210 { | 210 { |
211 // Data ok, registration mode | 211 // Data ok, registration mode |
212 $sql = stGetAttendeeRegistrationSQL(); | 212 $sql = stGetAttendeeRegistrationSQL(); |
213 if (stExecSQL($sql) !== FALSE) | 213 if (stExecSQL($sql) !== FALSE) |
214 { | 214 { |
215 echo stGetSetting("registerPostText"); | 215 echo stGetSetting("msgRegisterPostText"); |
216 | 216 |
217 if (strlen(stGetRequestItem("email")) < 4) | 217 if (strlen(stGetRequestItem("email")) < 4) |
218 echo stGetSetting("registerPostNoEmail"); | 218 echo stGetSetting("msgRegisterPostNoEmail"); |
219 } | 219 } |
220 else | 220 else |
221 { | 221 { |
222 stError("Oh noes! SQL error happenstance!"); | 222 stError("Oh noes! SQL error happenstance!"); |
223 } | 223 } |