comparison dbdefs.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 563fc90de965
children c731092a83b7
comparison
equal deleted inserted replaced
1095:faa835271dfd 1096:bbc0a3d0b51e
3 $dbVersion = 31; 3 $dbVersion = 31;
4 4
5 // 5 //
6 // Site settings and defaults we put in 6 // Site settings and defaults we put in
7 // 7 //
8 $siteSettingsGroups = array( 8 $siteSettingsGroups = [
9 "general" => array("General", "General settings"), 9 "general" => ["General", "General settings"],
10 "html" => array("Site HTML", "Global HTML blurbs"), 10 "news" => ["News", "News related settings"],
11 "news" => array("News", "News related settings"), 11 "event" => ["Event / Schedule", "Event and schedule related settings"],
12 "register" => array("Registration", "Visitor registration"), 12 "compos" => ["Compos", "Compo related settings"],
13 "event" => array("Event / Schedule", "Event and schedule related settings"), 13 ];
14 "compos" => array("Compos", "Compo related settings"), 14
15 "voting" => array("Voting", "Voting related settings"), 15
16 ); 16 $siteDefaultSettings = [
17
18
19 $siteDefaultSettings = array(
20 17
21 // 18 //
22 // General site settings 19 // General site settings
23 // 20 //
24 "general" => array( 21 "general" => [
25 "maxAttendeesHard" => array(VT_INT, 60, "Maximum attendees (HARD limit, <= 0 means no limit)"), 22 "maxAttendeesHard" => [VT_INT, 60, "Maximum attendees (HARD limit, <= 0 means no limit)"],
26 "maxAttendeesSoft" => array(VT_INT, 50, "Maximum attendees (soft limit, <= 0 means no limit)"), 23 "maxAttendeesSoft" => [VT_INT, 50, "Maximum attendees (soft limit, <= 0 means no limit)"],
27 24
28 "userTimeout" => array(VT_INT, 120, "User pages (voting) timeout in minutes"), 25 "userTimeout" => [VT_INT, 120, "User pages (voting) timeout in minutes"],
29 "admTimeout" => array(VT_INT, 15, "Administration interface timeout in minutes"), 26 "admTimeout" => [VT_INT, 15, "Administration interface timeout in minutes"],
30 27
31 "showAdmin" => array(VT_BOOL, false, "Always show administration interface link on the menu"), 28 "showAdmin" => [VT_BOOL, false, "Always show administration interface link on the menu"],
32 "showAttendees" => array(VT_BOOL, true, "Show attendees list"), 29 "showAttendees" => [VT_BOOL, true, "Show attendees list"],
33 30
34 "showResults" => array(VT_BOOL, false, "Enable results page"), 31 "showResults" => [VT_BOOL, false, "Enable results page"],
35 32
36 "showInfoTextOnAbout" => array(VT_BOOL, false, "Show site info HTML on About page"), 33 "showInfoTextOnAbout" => [VT_BOOL, false, "Show site info HTML on About page"],
37 34
38 "requireEMail" => array(VT_BOOL, false, "Require e-mail address in registrations"), 35 "requireEMail" => [VT_BOOL, false, "Require e-mail address in registrations"],
39 "allowRegister" => array(VT_BOOL, false, "Enable event registration"), 36 "allowRegister" => [VT_BOOL, false, "Enable event registration"],
40 37
41 "allowVoting" => array(VT_BOOL, false, "Enable voting (individual compos must be enabled as well)"), 38 "allowVoting" => [VT_BOOL, false, "Enable voting (individual compos must be enabled as well)"],
42 ), 39 ],
43
44 "html" => array(
45 "siteMenuHeader" => array(VT_TEXT, "<div>13.FAP:&gt; <span class=\"mblink\">&#9632;</span></div>", "Site menu header text"),
46 "siteMenuFooter" => array(VT_TEXT, "", "Site menu footer text"),
47 "siteExtraHTML" => array(VT_TEXT, "<div id=\"sponsors\">Gentle Eye</div>", "Extra global HTML code (f.e. sponsors box)"),
48
49 "siteInfoText" => array(VT_TEXT, "
50 <a href=\"about\">
51 <img src=\"img/fapsm.png\" alt=\"Finnish Amiga Party 2014\" class=\"logo\" /></a>
52 <div id=\"date\">
53 5.-8.12.2014<br />
54 Helsinki, Finland<br />
55 @ old location<br />
56 <span class=\"notice\">Entry 15 EUR + prod</span>
57 </div>", "Site header text"),
58
59 "aboutDescription" => array(VT_TEXT, "
60 <div style=\"text-align: center;\">
61 <img src=\"img/fap.png\" alt=\"FAP\" />
62 <p>
63 Pure Amiga demoscene party, all traditional Amiga compos and purely Amiga-oriented program.
64 <br />
65 <span class=\"notice\">
66 YOU <b>MUST</b> HAVE AT LEAST ONE ENTRY TO COMPETITIONS IF YOU COME TO THE PARTY.
67 </span>
68 </p>
69 </div>",
70 "About page text"),
71
72 ),
73 40
74 // 41 //
75 // News related 42 // News related
76 // 43 //
77 "news" => array( 44 "news" => [
78 "showNews" => array(VT_BOOL, true, "Enable News link on main menu + News page"), 45 "showNews" => [VT_BOOL, true, "Enable News link on main menu + News page"],
79 "showNewsOnAbout" => array(VT_BOOL, true, "Show latest news item on About page"), 46 "showNewsOnAbout" => [VT_BOOL, true, "Show latest news item on About page"],
80 "newsHeader" => array(VT_TEXT, "", "News page header text"), 47 ],
81 ), 48
82
83 //
84 // Attendee/visitor registration
85 //
86 "register" => array(
87 "visitorsPageRegLink" => array(VT_TEXT, "
88 <div class=\"reglink\">
89 To register, use <a href=\"register\">this form</a>.
90 </div>
91 ", "Visitors page registration link blurb"),
92
93 "registerPageBlurb" => array(VT_TEXT, "
94 <h1>Registration</h1>
95 ", "Registration page header"),
96
97 "registerInfoText" => array(VT_TEXT, "<p>
98 Only your <b>handle</b> and the answer to the botcheck are strictly required.
99 If you plan on joining the IRC channel
100 (<a href=\"irc://#fap2014@ircnet\">#fap2014 @ IRCNet</a>) or staying up to date by other means,
101 <b>e-mail</b> is not required either.
102 </p>", "Registration page info text"),
103
104 "registerPostText" => array(VT_TEXT, "
105 <h1>Registration successful</h1>
106 <p>Now go make a demo about it!</p>",
107 "Successful post-registration note text"),
108
109 "registerLimitExceeded" => array(VT_TEXT, "
110 <h1>Sorry, registration disabled!</h1>
111 <p>
112 Registration to the event is not available at this time due to
113 number of attendees limit having been reached. <b>:(</b>
114 </p>
115 ",
116 "Registration attendee limit exceeded note text"),
117
118 "registerNotEnabled" => array(VT_TEXT, "
119 <h1>Sorry, registration disabled!</h1>
120 <p>
121 Registration to the event is not enabled at this time.
122 </p>
123 ",
124 "Registration not enabled note text"),
125
126 "registerPostNoEmail" => array(VT_TEXT, "
127 <h2>By the way ...</h2>
128 <p>As you did not specify an e-mail contact address, you'll have to get updates
129 and information about the location (if you don't already know it) by
130 some other means (IRC, for example.)</p>
131 ", "No e-mail address registration note"),
132
133 ),
134
135 // 49 //
136 // Event / schedule information 50 // Event / schedule information
137 // 51 //
138 "event" => array( 52 "event" => [
139 "showSchedule" => array(VT_BOOL, true, "Enable Schedule link on main menu + Schedule page"), 53 "showSchedule" => [VT_BOOL, true, "Enable Schedule link on main menu + Schedule page"],
140 54
141 "eventDescription" => array(VT_TEXT, " 55 "msgEventDescription" => [VT_TEXT, "
142 <h1>Event program &amp; schedule</h1> 56 <h1>Event program &amp; schedule</h1>
143 <ul> 57 <ul>
144 <li><b>Aegis</b> of DSS and FAG will be performing a DJ gig.</li> 58 <li><b>Aegis</b> of DSS and FAG will be performing a DJ gig.</li>
145 <li>.. and possible additional live acts. More info to come.</li> 59 <li>.. and possible additional live acts. More info to come.</li>
146 </ul> 60 </ul>
162 76
163 <h2>Sunday 2.12.</h2> 77 <h2>Sunday 2.12.</h2>
164 <ul> 78 <ul>
165 <li><b>12:00</b> - Party over?</li> 79 <li><b>12:00</b> - Party over?</li>
166 </ul> 80 </ul>
167 ", "Event general description / timetables etc."), 81 ", "Event general description / timetables etc."],
168 82
169 ), 83 ],
170 84
171 // 85 //
172 // Competitions 86 // Competitions
173 // 87 //
174 "compos" => array( 88 "compos" => [
175 "showCompos" => array(VT_BOOL, true, "Enable Compos link on main menu + Compos page"), 89 "showCompos" => [VT_BOOL, true, "Enable Compos link on main menu + Compos page"],
176 90
177 "compoDescription" => array(VT_TEXT, " 91 "msgCompoDescription" => [VT_TEXT, "
178 <h1>General</h1> 92 <h1>General</h1>
179 <p class=\"notice\"> 93 <p class=\"notice\">
180 YOU <b>MUST</b> HAVE AT LEAST ONE ENTRY TO COMPETITIONS IF YOU COME TO THE PARTY. 94 YOU <b>MUST</b> HAVE AT LEAST ONE ENTRY TO COMPETITIONS IF YOU COME TO THE PARTY.
181 </p> 95 </p>
182 96
191 RAM</b>. An <b>A500 1.3 512k/512k</b> will also be available if your 105 RAM</b>. An <b>A500 1.3 512k/512k</b> will also be available if your
192 prod is not AGA compatible. 106 prod is not AGA compatible.
193 </p> 107 </p>
194 108
195 <h1>Compos</h1> 109 <h1>Compos</h1>
196 ", "Compo general description"), 110 ", "Compo general description"],
197 ), 111 ],
198 112
199 // 113 ];
200 // Voting
201 //
202 "voting" => array(
203
204 "voteFinishedText" => array(VT_TEXT, "
205 <h1>Yay, you have voted!</h1>
206 <p>Now go FAP some more! And make a demo about it.</p>
207 <p>Or perhaps <a href=\"vote\">vote again!</a></p>
208 ",
209 "Message shown after successful voting"),
210
211 "votingDisabled" => array(VT_TEXT, "
212 <h1>Sorry, voting disabled!</h1>
213 <p>Voting functionality not available at this time.</p>
214 ",
215 "Error message for voting disabled"),
216
217 "voteAuthError" => array(VT_TEXT, "
218 <h1>Not authenticated to vote</h1>
219 <p>
220 You are not authenticated currently. <a href=\"vote\">Try to login again.</a>
221 </p>
222 ",
223 "Error message for vote auth failure"),
224 ),
225 );
226 114
227 115
228 // 116 //
229 // Database table definitions 117 // Database table definitions
230 // 118 //
231 $sqlTables = array( 119 $sqlTables = [
232 // Site settings 120 // Site settings
233 "settings_groups" => array( 121 "settings_groups" => [
234 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 122 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
235 array("name" , "VARCHAR(64)"), 123 ["name" , "VARCHAR(64)"],
236 array("description" , "VARCHAR(128)"), 124 ["description" , "VARCHAR(128)"],
237 ), 125 ],
238 126
239 "settings" => array( 127 "settings" => [
240 array("key" , "VARCHAR(32)", "PRIMARY KEY"), 128 ["key" , "VARCHAR(32)", "PRIMARY KEY"],
241 array("vtype" , "INT"), 129 ["vtype" , "INT"],
242 array("vstr" , "VARCHAR(128)"), 130 ["vstr" , "VARCHAR(128)"],
243 array("vtext" , "TEXT"), 131 ["vtext" , "TEXT"],
244 array("vint" , "INT"), 132 ["vint" , "INT"],
245 array("sdesc" , "VARCHAR(128)"), 133 ["sdesc" , "VARCHAR(128)"],
246 array("vgroup" , "INT"), 134 ["vgroup" , "INT"],
247 ), 135 ],
248 136
249 "news" => array( 137 "news" => [
250 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 138 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
251 array("utime" , "INT"), 139 ["utime" , "INT"],
252 array("title" , "VARCHAR(".SET_LEN_NEWS_TITLE.")"), 140 ["title" , "VARCHAR(".SET_LEN_NEWS_TITLE.")"],
253 array("text" , "VARCHAR(".SET_LEN_NEWS_TEXT.")"), 141 ["text" , "VARCHAR(".SET_LEN_NEWS_TEXT.")"],
254 array("author" , "VARCHAR(".SET_LEN_NEWS_AUTHOR.")"), 142 ["author" , "VARCHAR(".SET_LEN_NEWS_AUTHOR.")"],
255 array("persist" , "INT", "DEFAULT 0"), 143 ["persist" , "INT", "DEFAULT 0"],
256 ), 144 ],
257 145
258 "compos" => array( 146 "compos" => [
259 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 147 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
260 array("name" , "VARCHAR(".SET_LEN_COMPO_NAME.")"), 148 ["name" , "VARCHAR(".SET_LEN_COMPO_NAME.")"],
261 array("description" , "VARCHAR(".SET_LEN_COMPO_DESC.")"), 149 ["description" , "VARCHAR(".SET_LEN_COMPO_DESC.")"],
262 array("notes" , "VARCHAR(".SET_LEN_COMPO_NOTES.")"), 150 ["notes" , "VARCHAR(".SET_LEN_COMPO_NOTES.")"],
263 array("visible" , "INT", "DEFAULT 0"), 151 ["visible" , "INT", "DEFAULT 0"],
264 array("voting" , "INT", "DEFAULT 0"), 152 ["voting" , "INT", "DEFAULT 0"],
265 153
266 // Default preview type (see EFILE_* in msite.inc.php) for this compo. 154 // Default preview type (see EFILE_* in msite.inc.php) for this compo.
267 // Global for the compo (entry-specific overrides if it is != EFILE_NONE) 155 // Global for the compo (entry-specific overrides if it is != EFILE_NONE)
268 array("preview_type" , "INT", "DEFAULT 0"), 156 ["preview_type" , "INT", "DEFAULT 0"],
269 157
270 array("show_authors" , "INT", "DEFAULT 0"), 158 ["show_authors" , "INT", "DEFAULT 0"],
271 // Show author(s) on compo main screen/voting page for COMPO_NORMAL compos 159 // Show author(s) on compo main screen/voting page for COMPO_NORMAL compos
272 // For COMPO_POINTS and COMPO_ASSIGN, show on results page or not 160 // For COMPO_POINTS and COMPO_ASSIGN, show on results page or not
273 161
274 array("ctype" , "INT", "DEFAULT 0"), 162 ["ctype" , "INT", "DEFAULT 0"],
275 array("cpath" , "VARCHAR(".SET_LEN_COMPO_PATH.")"), 163 ["cpath" , "VARCHAR(".SET_LEN_COMPO_PATH.")"],
276 ), 164 ],
277 165
278 "entries" => array( 166 "entries" => [
279 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 167 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
280 array("show_id" , "INT", "DEFAULT 0"), 168 ["show_id" , "INT", "DEFAULT 0"],
281 array("name" , "VARCHAR(".SET_LEN_ENTRY_NAME.")"), 169 ["name" , "VARCHAR(".SET_LEN_ENTRY_NAME.")"],
282 array("author" , "VARCHAR(".SET_LEN_ENTRY_AUTHOR.")"), 170 ["author" , "VARCHAR(".SET_LEN_ENTRY_AUTHOR.")"],
283 array("compo_id" , "INT", "DEFAULT 0"), 171 ["compo_id" , "INT", "DEFAULT 0"],
284 array("info" , "VARCHAR(".SET_LEN_ENTRY_INFO.")", "DEFAULT NULL"), 172 ["info" , "VARCHAR(".SET_LEN_ENTRY_INFO.")", "DEFAULT NULL"],
285 array("notes" , "VARCHAR(".SET_LEN_ENTRY_NOTES.")", "DEFAULT NULL"), 173 ["notes" , "VARCHAR(".SET_LEN_ENTRY_NOTES.")", "DEFAULT NULL"],
286 array("flags" , "INT", "DEFAULT 0"), 174 ["flags" , "INT", "DEFAULT 0"],
287 array("evalue" , "INT", "DEFAULT 0"), 175 ["evalue" , "INT", "DEFAULT 0"],
288 array("file_id" , "INT", "DEFAULT 0"), // uploaded file id from "files" table 176 ["file_id" , "INT", "DEFAULT 0"], // uploaded file id from "files" table
289 array("preview_id" , "INT", "DEFAULT 0"), // uploaded preview file id from "files" table 177 ["preview_id" , "INT", "DEFAULT 0"], // uploaded preview file id from "files" table
290 array("preview_type" , "INT", "DEFAULT 0"), // see EFILE_*, overrides compo's general type if != 0 178 ["preview_type" , "INT", "DEFAULT 0"], // see EFILE_*, overrides compo's general type if != 0
291 array("utime" , "INT", "DEFAULT 0"), 179 ["utime" , "INT", "DEFAULT 0"],
292 array("owner_id" , "INT", "DEFAULT 0"), // 0 = admin, otherwise userkey id 180 ["owner_id" , "INT", "DEFAULT 0"], // 0 = admin, otherwise userkey id
293 ), 181 ],
294 182
295 "files" => array( 183 "files" => [
296 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 184 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
297 array("filename" , "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"), // stored filename 185 ["filename" , "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"], // stored filename
298 array("origname" , "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"), // original uploaded filename 186 ["origname" , "VARCHAR(".SET_LEN_ENTRY_FILENAME.")", "DEFAULT NULL"], // original uploaded filename
299 array("filetype" , "VARCHAR(32)", "DEFAULT NULL"), // type of the file, if any, as key from $fileTypeData 187 ["filetype" , "VARCHAR(32)", "DEFAULT NULL"], // type of the file, if any, as key from $fileTypeData
300 array("uploadtype" , "VARCHAR(32)", "DEFAULT NULL"), // "preview", "entry" 188 ["uploadtype" , "VARCHAR(32)", "DEFAULT NULL"], // "preview", "entry"
301 array("filesize" , "INT", "DEFAULT 0"), // uploaded size 189 ["filesize" , "INT", "DEFAULT 0"], // uploaded size
302 array("entry_id" , "INT", "DEFAULT 0"), // belongs to this entry (0 = none) 190 ["entry_id" , "INT", "DEFAULT 0"], // belongs to this entry (0 = none)
303 array("uploader_id" , "INT", "DEFAULT 0"), // 0 = admin, otherwise userkey id 191 ["uploader_id" , "INT", "DEFAULT 0"], // 0 = admin, otherwise userkey id
304 array("deleted" , "INT", "DEFAULT 0"), // 1 = to be deleted 192 ["deleted" , "INT", "DEFAULT 0"], // 1 = to be deleted
305 array("utime" , "INT", "DEFAULT 0"), 193 ["utime" , "INT", "DEFAULT 0"],
306 ), 194 ],
307 195
308 "attendees" => array( 196 "attendees" => [
309 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 197 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
310 array("regtime" , "INT"), 198 ["regtime" , "INT"],
311 array("name" , "VARCHAR(".SET_LEN_USERNAME.")"), 199 ["name" , "VARCHAR(".SET_LEN_USERNAME.")"],
312 array("groups" , "VARCHAR(".SET_LEN_GROUPS.")"), 200 ["groups" , "VARCHAR(".SET_LEN_GROUPS.")"],
313 array("oneliner" , "VARCHAR(".SET_LEN_ONELINER.")"), 201 ["oneliner" , "VARCHAR(".SET_LEN_ONELINER.")"],
314 array("email" , "VARCHAR(".SET_LEN_EMAIL.")"), 202 ["email" , "VARCHAR(".SET_LEN_EMAIL.")"],
315 array("reghost" , "VARCHAR(".SET_LEN_REGHOST.")", "DEFAULT NULL"), 203 ["reghost" , "VARCHAR(".SET_LEN_REGHOST.")", "DEFAULT NULL"],
316 array("key_id" , "INT", "DEFAULT NULL"), 204 ["key_id" , "INT", "DEFAULT NULL"],
317 array("usr_flags" , "INT", "DEFAULT 0"), 205 ["usr_flags" , "INT", "DEFAULT 0"],
318 array("adm_flags" , "INT", "DEFAULT 0"), 206 ["adm_flags" , "INT", "DEFAULT 0"],
319 ), 207 ],
320 208
321 "userkeys" => array( 209 "userkeys" => [
322 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 210 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
323 array("key" , "VARCHAR(".SET_LEN_USERKEY.")"), 211 ["key" , "VARCHAR(".SET_LEN_USERKEY.")"],
324 array("active" , "INT", "DEFAULT 0"), 212 ["active" , "INT", "DEFAULT 0"],
325 ), 213 ],
326 214
327 "votes" => array( 215 "votes" => [
328 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 216 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
329 array("entry_id" , "INT", "DEFAULT NULL"), 217 ["entry_id" , "INT", "DEFAULT NULL"],
330 array("key_id" , "INT", "DEFAULT 0"), 218 ["key_id" , "INT", "DEFAULT 0"],
331 array("value" , "INT", "DEFAULT 0"), 219 ["value" , "INT", "DEFAULT 0"],
332 array("utime" , "INT", "DEFAULT 0"), 220 ["utime" , "INT", "DEFAULT 0"],
333 ), 221 ],
334 222
335 223
336 // Party information system tables 224 // Party information system tables
337 "display_vars" => array( 225 "display_vars" => [
338 array("key" , "VARCHAR(32)", "PRIMARY KEY"), 226 ["key" , "VARCHAR(32)", "PRIMARY KEY"],
339 array("vtype" , "INT"), 227 ["vtype" , "INT"],
340 array("vstr" , "VARCHAR(128)"), 228 ["vstr" , "VARCHAR(128)"],
341 array("vtext" , "TEXT"), 229 ["vtext" , "TEXT"],
342 array("vint" , "INT"), 230 ["vint" , "INT"],
343 array("sdesc" , "VARCHAR(128)"), 231 ["sdesc" , "VARCHAR(128)"],
344 ), 232 ],
345 233
346 "display_slides" => array( 234 "display_slides" => [
347 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 235 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
348 array("title" , "VARCHAR(".SET_LEN_DISP_SLIDE_TITLE.")"), 236 ["title" , "VARCHAR(".SET_LEN_DISP_SLIDE_TITLE.")"],
349 array("text" , "VARCHAR(".SET_LEN_DISP_SLIDE_TEXT.")"), 237 ["text" , "VARCHAR(".SET_LEN_DISP_SLIDE_TEXT.")"],
350 ), 238 ],
351 239
352 "rot_list_data" => array( 240 "rot_list_data" => [
353 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 241 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
354 array("name" , "VARCHAR(".SET_LEN_ROT_LIST_NAME.")"), 242 ["name" , "VARCHAR(".SET_LEN_ROT_LIST_NAME.")"],
355 ), 243 ],
356 244
357 "rot_list_slides" => array( 245 "rot_list_slides" => [
358 array("id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"), 246 ["id" , "INTEGER", "PRIMARY KEY", "AUTOINCREMENT"],
359 array("list_id" , "INT", "DEFAULT 0"), 247 ["list_id" , "INT", "DEFAULT 0"],
360 array("slide_id" , "INT", "DEFAULT 0"), 248 ["slide_id" , "INT", "DEFAULT 0"],
361 array("order_num" , "INT", "DEFAULT 0"), 249 ["order_num" , "INT", "DEFAULT 0"],
362 ), 250 ],
363 ); 251 ];
364 252
365 253
366 // 254 //
367 // Party information system settings / data 255 // Party information system settings / data
368 // 256 //
369 $siteDisplayVars = array( 257 $siteDisplayVars = [
370 "showMode" => array(VT_INT, 0, "Currently active display mode"), 258 "showMode" => [VT_INT, 0, "Currently active display mode"],
371 "rotateDuration" => array(VT_INT, 15, "Slide rotation time per slide (seconds)"), 259 "rotateDuration" => [VT_INT, 15, "Slide rotation time per slide (seconds)"],
372 260
373 "tempDuration" => array(VT_INT, 5, "Temporary slide display time (minutes)"), 261 "tempDuration" => [VT_INT, 5, "Temporary slide display time (minutes)"],
374 "tempSlide" => array(VT_INT, 0, "Temporary slide ID"), 262 "tempSlide" => [VT_INT, 0, "Temporary slide ID"],
375 263
376 "compoID" => array(VT_INT, 0, "Compo ID of current compo"), 264 "compoID" => [VT_INT, 0, "Compo ID of current compo"],
377 "compoPrevEntry" => array(VT_INT, 0, "Previously shown compo entry"), 265 "compoPrevEntry" => [VT_INT, 0, "Previously shown compo entry"],
378 "compoCurrEntry" => array(VT_INT, 0, "Current / next compo entry to be shown"), 266 "compoCurrEntry" => [VT_INT, 0, "Current / next compo entry to be shown"],
379 267
380 // Not user-manageable 268 // Not user-manageable
381 "tempSlideSet" => array(VT_BOOL, false, "Temporary slide set"), 269 "tempSlideSet" => [VT_BOOL, false, "Temporary slide set"],
382 270
383 "activeSlideMode" => array(VT_INT, 0, "Current active slide display mode"), 271 "activeSlideMode" => [VT_INT, 0, "Current active slide display mode"],
384 "activeSlide" => array(VT_INT, 0, "Current active slide"), 272 "activeSlide" => [VT_INT, 0, "Current active slide"],
385 "activeSlideExpire" => array(VT_INT, 0, "Expiration timestamp of current slide"), 273 "activeSlideExpire" => [VT_INT, 0, "Expiration timestamp of current slide"],
386 274
387 "rotateList" => array(VT_INT, 0, "Current rotation list ID"), 275 "rotateList" => [VT_INT, 0, "Current rotation list ID"],
388 "rotateListIndex" => array(VT_INT, 0, "Current index in rotation list"), 276 "rotateListIndex" => [VT_INT, 0, "Current index in rotation list"],
389 277
390 "lastUpdate" => array(VT_INT, 0, "Timestamp of last slide update"), 278 "lastUpdate" => [VT_INT, 0, "Timestamp of last slide update"],
391 279
392 "screenCmd" => array(VT_STR, "", "Off-channel showscreen command"), 280 "screenCmd" => [VT_STR, "", "Off-channel showscreen command"],
393 "screenCmdSet" => array(VT_BOOL, false, "Off-channel showscreen command has been set"), 281 "screenCmdSet" => [VT_BOOL, false, "Off-channel showscreen command has been set"],
394 ); 282 ];
395 283
396 284
397 // 285 //
398 // Some premade test data 286 // Some premade test data
399 // 287 //
400 $siteTestData = array( 288 $siteTestData = [
401 "news" => array( 289 "news" => [
402 "utime,title,text,author", 290 "utime,title,text,author",
403 time().",%s,%s,%s", 291 time().",%s,%s,%s",
404 array("Today's news", "We. Are. Back.", "orgaz"), 292 ["Today's news", "We. Are. Back.", "orgaz"],
405 array("Good news, everybody!", "...", "The Professor"), 293 ["Good news, everybody!", "...", "The Professor"],
406 ), 294 ],
407 295
408 "userkeys" => array( 296 "userkeys" => [
409 "key", 297 "key",
410 "%s", 298 "%s",
411 array("test1"), 299 ["test1"],
412 array("test2"), 300 ["test2"],
413 array("7jjnqt5z"), 301 ["test1"],
414 array("c7jcfk1G"), 302 ["test2"],
415 ), 303 ],
416 304
417 "attendees" => array( 305 "attendees" => [
418 "regtime,name,groups,oneliner,email", 306 "regtime,name,groups,oneliner,email",
419 "%d,%s,%s,%s,%s", 307 "%d,%s,%s,%s,%s",
420 array(time()-0, "man with no alias", "supergroup", "foo-bar", "c@supergroup.com"), 308 [time()-0, "man with no alias", "supergroup", "foo-bar", "c@supergroup.com"],
421 array(time()-15, "man with alias", "supergroup", "hi!", "c@supergroup.com"), 309 [time()-15, "man with alias", "supergroup", "hi!", "c@supergroup.com"],
422 array(time()-30, "alias with a man", "supergroup", "mega super kewl rulets", "x@microsoft.com"), 310 [time()-30, "alias with a man", "supergroup", "mega super kewl rulets", "x@microsoft.com"],
423 ), 311 ],
424 312
425 "compos" => array( 313 "compos" => [
426 "name,description,visible,voting", 314 "name,description,visible,voting",
427 "%s,%s,1,1", 315 "%s,%s,1,1",
428 array("Graphics", "Anything in standard resolutions."), 316 ["Graphics", "Anything in standard resolutions."],
429 array("Protracker music", "Standard 4-channel Protracker MOD music."), 317 ["Protracker music", "Standard 4-channel Protracker MOD music."],
430 array("4k intro", "4k intro competition"), 318 ["4k intro", "4k intro competition"],
431 ), 319 ],
432 320
433 "entries" => array( 321 "entries" => [
434 "name,author,compo_id,filename,info", 322 "name,author,compo_id,filename,info",
435 "%s,%s,%d,%s,%s", 323 "%s,%s,%d,%s,%s",
436 array("Donkey Dong", "electric/extend", 1, "donkey.lbm", "amigaaaah!"), 324 ["Donkey Dong", "electric/extend", 1, "donkey.lbm", "amigaaaah!"],
437 array("Your kondom", "ccr/TNSP", 1, "kondom.lbm", "oh my god, it's full of cocks!"), 325 ["Your kondom", "ccr/TNSP", 1, "kondom.lbm", "oh my god, it's full of cocks!"],
438 array("Penis song", "reed/flt", 2, "penis.mod", "laulu rakkaudelle"), 326 ["Penis song", "reed/flt", 2, "penis.mod", "laulu rakkaudelle"],
439 array("jenkka", "aegis", 2, "jenkka.mod", ""), 327 ["jenkka", "aegis", 2, "jenkka.mod", ""],
440 array("Fungiform 2", "mfx", 3, "mfx-fungiform2.lzh", "OCS-only"), 328 ["Fungiform 2", "mfx", 3, "mfx-fungiform2.lzh", "OCS-only"],
441 ), 329 ],
442 330
443 "display_slides" => array( 331 "display_slides" => [
444 "title,text", 332 "title,text",
445 "%s,%s", 333 "%s,%s",
446 array("Next Up 4k", "<h1>Next up: 4k intro</h1><h2>4k intro compo is about to begin</h2>... in about 10 minutes."), 334 ["Next Up 4k", "<h1>Next up: 4k intro</h1><h2>4k intro compo is about to begin</h2>... in about 10 minutes."],
447 array("Astu to infodesk", "<b>Astu</b> - please come to info desk!"), 335 ["Astu to infodesk", "<b>Astu</b> - please come to info desk!"],
448 array("Gentle Eye mainos", "<b>Buy Amiga stuff!</b><br />Gentle Eye Oy is selling Amiga-related stuff near organizer desk!"), 336 ["Gentle Eye mainos", "<b>Buy Amiga stuff!</b><br />Gentle Eye Oy is selling Amiga-related stuff near organizer desk!"],
449 ), 337 ],
450 338
451 "rot_list_data" => array( 339 "rot_list_data" => [
452 "name", 340 "name",
453 "%s", 341 "%s",
454 array("Main rotation"), 342 ["Main rotation"],
455 array("Next Up"), 343 ["Next Up"],
456 ), 344 ],
457 345
458 "rot_list_slides" => array( 346 "rot_list_slides" => [
459 "list_id,slide_id", 347 "list_id,slide_id",
460 "%d,%d", 348 "%d,%d",
461 array(1,2), 349 [1,2],
462 array(1,3), 350 [1,3],
463 array(2,1), 351 [2,1],
464 ), 352 ],
465 ); 353 ];
466 354
467 355
468 $upgradeMappings = array( 356 $upgradeMappings = [
469 // "" => array("key" => "", value => ""), 357 // "" => ["key" => "", value => ""],
470 12 => array( 358 12 => [
471 "show_authors" => array("key" => "showAuthors"), 359 "show_authors" => ["key" => "showAuthors"],
472 "display_vars" => array("table" => "displayVars"), 360 "display_vars" => ["table" => "displayVars"],
473 "display_slides" => array("table" => "displaySlides"), 361 "display_slides" => ["table" => "displaySlides"],
474 "rot_list_data" => array("table" => "rotationListData"), 362 "rot_list_data" => ["table" => "rotationListData"],
475 "rot_list_slides" => array("table" => "rotationListSlides"), 363 "rot_list_slides" => ["table" => "rotationListSlides"],
476 ), 364 ],
477 365
478 14 => array( 366 14 => [
479 "settings_groups" => array("table" => FALSE), 367 "settings_groups" => ["table" => FALSE],
480 ), 368 ],
481 369
482 17 => array( 370 17 => [
483 "ctype" => array("key" => "type"), 371 "ctype" => ["key" => "type"],
484 "cpath" => array("key" => "path"), 372 "cpath" => ["key" => "path"],
485 ), 373 ],
486 374
487 31 => array( 375 31 => [
488 "userkeys" => array("table" => "votekeys"), 376 "userkeys" => ["table" => "votekeys"],
489 ), 377 "msgEventDescription" => ["key" => "eventDescription"],
490 ); 378 "msgCompoDescription" => ["key" => "compoDescription"],
379 ],
380 ];
491 381
492 382
493 ?> 383 ?>