· 9 years ago · Jan 21, 2017, 11:50 AM
1CREATE TABLE IF NOT EXISTS `ads` (
2 `id` int(11) NOT NULL AUTO_INCREMENT,
3 `board` varchar(10) NOT NULL,
4 `position` varchar(10) NOT NULL,
5 `text` text NOT NULL,
6 `show` int(1) NOT NULL,
7 PRIMARY KEY (`id`)
8);
9
10CREATE TABLE IF NOT EXISTS `announcements` (
11 `id` int(11) NOT NULL AUTO_INCREMENT,
12 `date` int(30) NOT NULL,
13 `who` varchar(40) NOT NULL,
14 `title` varchar(80) NOT NULL,
15 `text` text NOT NULL,
16 `mod_id` int(10) NOT NULL,
17 PRIMARY KEY (`id`)
18);
19
20CREATE TABLE IF NOT EXISTS `appeals` (
21 `id` int(30) NOT NULL AUTO_INCREMENT,
22 `created` int(30) NOT NULL,
23 `ban_id` int(30) NOT NULL,
24 `ip` varchar(50) NOT NULL,
25 `msg` text NOT NULL,
26 `email` varchar(70) NOT NULL,
27 `rangeban` int(1) NOT NULL,
28 PRIMARY KEY (`id`),
29 UNIQUE KEY `ban` (`ban_id`, `rangeban`)
30);
31
32CREATE TABLE IF NOT EXISTS `bans` (
33 `id` int(30) NOT NULL AUTO_INCREMENT,
34 `ip` varchar(50) NOT NULL,
35 `mod_id` int(10) NOT NULL,
36 `reason` text NOT NULL,
37 `note` text NOT NULL,
38 `created` int(30) NOT NULL,
39 `expires` int(30) NOT NULL,
40 `appeal` int(30) NOT NULL,
41 `boards` text NOT NULL,
42 `seen` int(1) NOT NULL,
43 PRIMARY KEY (`id`)
44);
45
46CREATE TABLE IF NOT EXISTS `ban_requests` (
47 `id` int(30) NOT NULL AUTO_INCREMENT,
48 `ip` varchar(50) NOT NULL,
49 `mod_id` int(10) NOT NULL,
50 `reason` varchar(80) NOT NULL,
51 `note` text NOT NULL,
52 `created` int(30) NOT NULL,
53 `board` varchar(10) NOT NULL,
54 `post` int(20) NOT NULL,
55 `append` int(1) NOT NULL,
56 PRIMARY KEY (`id`)
57);
58
59CREATE TABLE IF NOT EXISTS `bbcodes` (
60 `name` varchar(100) NOT NULL,
61 `code` text NOT NULL,
62 UNIQUE KEY `name` (`name`)
63);
64
65CREATE TABLE IF NOT EXISTS `boards` (
66 `short` varchar(10) NOT NULL,
67 `type` varchar(60) NOT NULL,
68 `name` varchar(100) NOT NULL,
69 `des` varchar(100) NOT NULL,
70 `message` text NOT NULL,
71 `bumplimit` int(9) NOT NULL,
72 `spoilers` int(1) NOT NULL,
73 `noname` int(1) NOT NULL,
74 `ids` int(1) NOT NULL,
75 `embeds` int(1) NOT NULL,
76 `bbcode` int(1) NOT NULL,
77 `time_between_posts` int(20) NOT NULL,
78 `time_between_threads` int(20) NOT NULL,
79 `time_to_delete` int(20) NOT NULL,
80 `filesize` int(20) NOT NULL,
81 `pages` int(4) NOT NULL,
82 `hidden` int(1) NOT NULL,
83 `unlisted` int(1) NOT NULL,
84 `nodup` int(1) NOT NULL,
85 `nofile` int(1) NOT NULL,
86 `maxchars` int(8) NOT NULL,
87 `multifile` int(2) NOT NULL,
88 `anonymous` varchar(60) NOT NULL,
89 `extensions` text NOT NULL,
90 `catalog` int(1) NOT NULL,
91 `captcha` int(1) NOT NULL,
92 `overboard_boards` text NOT NULL,
93 `allow_replies` int(1) NOT NULL,
94 `file_replies` int(1) NOT NULL,
95 `links` text NOT NULL,
96 `files` int(4) NOT NULL,
97 PRIMARY KEY (`short`),
98 `allow_all_sites` int(1) NOT NULL
99);
100
101CREATE TABLE IF NOT EXISTS `bruteforce_tries` (
102 `ip` varchar(50) NOT NULL,
103 `mod_id` int(10) NOT NULL,
104 `tries` int(30) NOT NULL,
105 `lasttry` int(30) NOT NULL,
106 PRIMARY KEY (`ip`)
107);
108
109CREATE TABLE IF NOT EXISTS `config` (
110 `name` varchar(100) NOT NULL,
111 `value` text NOT NULL,
112 UNIQUE KEY `name` (`name`)
113);
114
115CREATE TABLE IF NOT EXISTS `embeds` (
116 `name` varchar(50) NOT NULL,
117 `regex` varchar(100) NOT NULL,
118 `code` text NOT NULL,
119 UNIQUE KEY `name` (`name`)
120);
121
122CREATE TABLE IF NOT EXISTS `extensions` (
123 `ext` varchar(8) NOT NULL,
124 `name` varchar(100) NOT NULL,
125 `mimetype` varchar(100) NOT NULL,
126 `image` text NOT NULL,
127 `default` int(1) NOT NULL,
128 UNIQUE KEY `mimetype` (`mimetype`)
129);
130
131CREATE TABLE IF NOT EXISTS `group_permissions` (
132 `gid` int(10) NOT NULL,
133 `pid` int(10) NOT NULL,
134 UNIQUE KEY `rule` (`gid`, `pid`)
135);
136
137CREATE TABLE IF NOT EXISTS `groups` (
138 `id` int(10) NOT NULL AUTO_INCREMENT,
139 `name` varchar(60) NOT NULL,
140 `capcode` varchar(60) NOT NULL,
141 `capcode_style` varchar(60) NOT NULL,
142 `capcode_icon` varchar(100) NOT NULL,
143 PRIMARY KEY (`id`),
144 UNIQUE KEY `name` (`name`)
145);
146
147CREATE TABLE IF NOT EXISTS `ip_notes` (
148 `id` int(30) NOT NULL AUTO_INCREMENT,
149 `ip` varchar(50) NOT NULL,
150 `text` text NOT NULL,
151 `created` int(30) NOT NULL,
152 `mod_id` int(10) NOT NULL,
153 PRIMARY KEY (`id`)
154);
155
156CREATE TABLE IF NOT EXISTS `links` (
157 `id` int(5) NOT NULL AUTO_INCREMENT,
158 `parent` int(5) NOT NULL,
159 `url` varchar(100) NOT NULL,
160 `relative` int(1) NOT NULL,
161 `title` varchar(40) NOT NULL,
162 `short` varchar(10) NOT NULL,
163 PRIMARY KEY (`id`)
164);
165
166CREATE TABLE IF NOT EXISTS `link` (
167 `name` varchar(50) NOT NULL,
168 `regex` varchar(200) NOT NULL,
169 `parser` varchar(200) NOT NULL,
170 UNIQUE KEY `name` (`name`)
171);
172
173CREATE TABLE IF NOT EXISTS `log` (
174 `id` int(50) NOT NULL AUTO_INCREMENT,
175 `date` int(30) NOT NULL,
176 `event` varchar(300) NOT NULL,
177 `mod_id` int(10) NOT NULL,
178 PRIMARY KEY (`id`)
179);
180
181CREATE TABLE IF NOT EXISTS `module_boardconfig` (
182 `namespace` varchar(100) NOT NULL,
183 `name` varchar(200) NOT NULL,
184 `description` text NOT NULL,
185 `default_value` text NOT NULL,
186 `value` text NOT NULL,
187 PRIMARY KEY `name` (`namespace`, `name`)
188);
189
190CREATE TABLE IF NOT EXISTS `module_classes` (
191 `namespace` varchar(200) NOT NULL,
192 `name` varchar(200) NOT NULL,
193 `file` varchar(200) NOT NULL,
194 `class` varchar(200) NOT NULL,
195 PRIMARY KEY `name` (`name`)
196);
197
198CREATE TABLE IF NOT EXISTS `module_config` (
199 `namespace` varchar(100) NOT NULL,
200 `name` varchar(200) NOT NULL,
201 `description` text NOT NULL,
202 `default_value` text NOT NULL,
203 `value` text NOT NULL,
204 PRIMARY KEY `name` (`namespace`, `name`)
205);
206
207CREATE TABLE IF NOT EXISTS `module_events` (
208 `namespace` varchar(100) NOT NULL,
209 `event` varchar(200) NOT NULL,
210 `file` varchar(200) NOT NULL,
211 `class` varchar(200) NOT NULL,
212 `method` varchar(200) NOT NULL,
213 PRIMARY KEY `namespace` (`namespace`, `event`)
214);
215
216CREATE TABLE IF NOT EXISTS `module_fields` (
217 `namespace` varchar(100) NOT NULL,
218 `name` varchar(200) NOT NULL,
219 `type` varchar(200) NOT NULL,
220 PRIMARY KEY `namespace` (`namespace`, `name`, `type`)
221);
222
223CREATE TABLE IF NOT EXISTS `module_pages` (
224 `namespace` varchar(100) NOT NULL,
225 `url` varchar(200) NOT NULL,
226 `file` varchar(200) NOT NULL,
227 `class` varchar(200) NOT NULL,
228 `method` varchar(200) NOT NULL,
229 PRIMARY KEY `url` (`url`)
230);
231
232CREATE TABLE IF NOT EXISTS `modules` (
233 `namespace` varchar(100) NOT NULL,
234 `name` varchar(200) NOT NULL,
235 `description` text NOT NULL,
236 `author` varchar(100) NOT NULL,
237 `version` varchar(50) NOT NULL,
238 PRIMARY KEY `namespace` (`namespace`)
239);
240
241CREATE TABLE IF NOT EXISTS `news` (
242 `id` int(11) NOT NULL AUTO_INCREMENT,
243 `date` int(30) NOT NULL,
244 `who` varchar(40) NOT NULL,
245 `title` varchar(80) NOT NULL,
246 `text` text NOT NULL,
247 `mod_id` int(10) NOT NULL,
248 PRIMARY KEY (`id`)
249);
250
251CREATE TABLE IF NOT EXISTS `notes` (
252 `id` int(15) NOT NULL AUTO_INCREMENT,
253 `mod_id` int(10) NOT NULL,
254 `note` text NOT NULL,
255 `created` int(30) NOT NULL,
256 PRIMARY KEY (`id`)
257);
258
259CREATE TABLE IF NOT EXISTS `pages` (
260 `name` varchar(60) NOT NULL,
261 `title` varchar(200) NOT NULL,
262 `text` text NOT NULL,
263 `raw` int(1) NOT NULL,
264 PRIMARY KEY (`name`)
265);
266
267CREATE TABLE IF NOT EXISTS `permissions_categories` (
268 `id` int(10) NOT NULL,
269 `name` varchar(60) NOT NULL,
270 `description` varchar(60) NOT NULL,
271 PRIMARY KEY (`id`),
272 UNIQUE KEY `name` (`name`)
273);
274
275CREATE TABLE IF NOT EXISTS `permissions` (
276 `id` int(10) NOT NULL,
277 `name` varchar(60) NOT NULL,
278 `description` varchar(60) NOT NULL,
279 `category` int(10) NOT NULL,
280 PRIMARY KEY (`id`),
281 UNIQUE KEY `name` (`name`)
282);
283
284CREATE TABLE IF NOT EXISTS `pm` (
285 `id` int(11) NOT NULL AUTO_INCREMENT,
286 `created` int(30) NOT NULL,
287 `from_user` int(10) NOT NULL,
288 `to_user` int(10) NOT NULL,
289 `title` varchar(70) NOT NULL,
290 `text` text NOT NULL,
291 `read_msg` int(1) NOT NULL,
292 `resto` int(11) NOT NULL,
293 PRIMARY KEY (`id`)
294);
295
296CREATE TABLE IF NOT EXISTS `posts` (
297 `board` varchar(10) NOT NULL,
298 `id` int(20) NOT NULL AUTO_INCREMENT,
299 `date` int(30) NOT NULL,
300 `name` varchar(60) NOT NULL,
301 `trip` varchar(30) NOT NULL,
302 `strip` varchar(11) NOT NULL,
303 `poster_id` varchar(8) NOT NULL,
304 `email` varchar(60) NOT NULL,
305 `subject` varchar(100) NOT NULL,
306 `comment` text NOT NULL,
307 `password` varchar(100) NOT NULL,
308 `orig_filename` text NOT NULL,
309 `filename` text NOT NULL,
310 `resto` int(20) NOT NULL,
311 `ip` varchar(50) NOT NULL,
312 `lastbumped` int(20) NOT NULL,
313 `filehash` text NOT NULL,
314 `orig_filesize` text NOT NULL,
315 `filesize` text NOT NULL,
316 `imagesize` text NOT NULL,
317 `mimetype` text NOT NULL,
318 `t_w` text NOT NULL,
319 `t_h` text NOT NULL,
320 `sticky` int(1) NOT NULL,
321 `sage` int(1) NOT NULL,
322 `locked` int(1) NOT NULL,
323 `raw` int(1) NOT NULL,
324 `capcode_style` varchar(60) NOT NULL,
325 `capcode_text` varchar(60) NOT NULL,
326 `capcode_icon` varchar(100) NOT NULL,
327 `deleted` int(30) NOT NULL,
328 PRIMARY KEY (`board`, `id`)
329) ENGINE=MyISAM;
330
331CREATE TABLE IF NOT EXISTS `rangebans` (
332 `id` int(30) NOT NULL AUTO_INCREMENT,
333 `ip` varchar(50) NOT NULL,
334 `mod_id` int(10) NOT NULL,
335 `reason` text NOT NULL,
336 `note` text NOT NULL,
337 `created` int(30) NOT NULL,
338 `expires` int(30) NOT NULL,
339 `appeal` int(30) NOT NULL,
340 `boards` text NOT NULL,
341 PRIMARY KEY (`id`)
342);
343
344CREATE TABLE IF NOT EXISTS `reports` (
345 `id` int(11) NOT NULL AUTO_INCREMENT,
346 `reporter_ip` varchar(50) NOT NULL,
347 `reported_post` int(20) NOT NULL,
348 `reason` text NOT NULL,
349 `created` int(30) NOT NULL,
350 `board` varchar(6) NOT NULL,
351 PRIMARY KEY (`id`)
352);
353
354CREATE TABLE IF NOT EXISTS `spamfilter` (
355 `id` int(10) NOT NULL AUTO_INCREMENT,
356 `search` varchar(100) NOT NULL,
357 `reason` varchar(100) NOT NULL,
358 `boards` text NOT NULL,
359 `expires` varchar(90) NOT NULL,
360 `active` int(1) NOT NULL,
361 `regex` int(1) NOT NULL,
362 PRIMARY KEY (`id`)
363);
364
365CREATE TABLE IF NOT EXISTS `styles` (
366 `id` int(11) NOT NULL AUTO_INCREMENT,
367 `name` varchar(20) NOT NULL,
368 `path` varchar(60) NOT NULL,
369 `relative` int(1) NOT NULL,
370 `default` int(1) NOT NULL,
371 PRIMARY KEY (`id`)
372);
373
374CREATE TABLE IF NOT EXISTS `tripcodes` (
375 `id` int(10) NOT NULL AUTO_INCREMENT,
376 `hash` varchar(11) NOT NULL,
377 `replace` varchar(30) NOT NULL,
378 `secure` int (1) NOT NULL,
379 PRIMARY KEY (`id`),
380 UNIQUE KEY `hash` (`hash`, `secure`)
381);
382
383CREATE TABLE IF NOT EXISTS `users` (
384 `id` int(10) NOT NULL AUTO_INCREMENT,
385 `username` varchar(40) NOT NULL,
386 `password` varchar(130) NOT NULL,
387 `salt` varchar(20) NOT NULL,
388 `group` int(10) NOT NULL,
389 `boards` text NOT NULL,
390 PRIMARY KEY (`id`),
391 UNIQUE KEY `username` (`username`)
392);
393
394CREATE TABLE IF NOT EXISTS `warnings` (
395 `id` int(30) NOT NULL AUTO_INCREMENT,
396 `ip` varchar(50) NOT NULL,
397 `mod_id` int(10) NOT NULL,
398 `reason` text NOT NULL,
399 `note` text NOT NULL,
400 `created` int(30) NOT NULL,
401 `seen` int(1) NOT NULL,
402 PRIMARY KEY (`id`)
403);
404
405CREATE TABLE IF NOT EXISTS `whitelist` (
406 `id` int(30) NOT NULL AUTO_INCREMENT,
407 `ip` varchar(50) NOT NULL,
408 `mod_id` int(10) NOT NULL,
409 `note` text NOT NULL,
410 `nolimits` int(1) NOT NULL,
411 PRIMARY KEY (`id`)
412);
413
414CREATE TABLE IF NOT EXISTS `wordfilter` (
415 `id` int(10) NOT NULL AUTO_INCREMENT,
416 `search` varchar(100) NOT NULL,
417 `replace` varchar(100) NOT NULL,
418 `boards` text NOT NULL,
419 `active` int(1) NOT NULL,
420 `regex` int(1) NOT NULL,
421 PRIMARY KEY (`id`)
422);
423
424INSERT INTO `bbcodes` (`name`, `code`) VALUES
425('spoiler', '<s>{param}</s>');
426
427INSERT INTO `config` (`name`, `value`) VALUES
428('boardLinks_board', ''),
429('boardLinks_thread', ''),
430('boardLinks', ''),
431('frontpage_menu_url', 'menu.html'),
432('frontpage_style', 'kusabalike.php'),
433('frontpage_url', 'index.html'),
434('global_message', ''),
435('news_url', 'news.html'),
436('sitename', 'Mitsuba'),
437('enable_api', '0'),
438('enable_rss', '0'),
439('enable_meny', '0'),
440('keep_hours', '6'),
441('caching_mode', '0');
442
443INSERT INTO `embeds` (`name`, `regex`, `code`) VALUES
444('dailymotion', '/http(s)?:\\/\\/(www\\.)?dailymotion\\.com\\/video\\/([^&]+)/', '<iframe width="%1$s" height=""%1$s" src="http://www.dailymotion.com/embed/video/"%4$s" frameborder="0" allowfullscreen></iframe>'),
445('liveleak', '/http(s)?:\\/\\/(www\\.)?liveleak\\.com\\/view\\?i=([^&]+)/', '<iframe width="%1$s" height="%1$s" src="http://www.liveleak.com/e/%4$s" frameborder="0" allowfullscreen></iframe>'),
446('vimeo', '/http(s)?:\\/\\/(www\\.)?vimeo\\.com\\/([0-9]+)/', '<iframe width="%1$s" height="%1$s" src="http://player.vimeo.com/video/%4$s" frameborder="0" allowfullscreen></iframe>'),
447('youtube', '/http(s)?:\\/\\/(www\\.)?youtube\\.com\\/watch\\?v=([^&]+)/', '<iframe width="%1$s" height="%1$s" src="http://www.youtube.com/embed/%4$s" frameborder="0" allowfullscreen></iframe>'),
448('youtu.be', '/http(s)?:\\/\\/(www\\.)?youtu\\.be\\/([^&]+)/', '<iframe width="%1$s" height="%1$s" src="http://www.youtube.com/embed/%4$s" frameborder="0" allowfullscreen></iframe>');
449
450INSERT INTO `extensions` (`ext`, `name`, `mimetype`, `image`, `default`) VALUES
451('jpg', 'JPEG Image', 'image/jpeg', 1, 1),
452('png', 'PNG Image', 'image/png', 1, 1),
453('gif', 'GIF Image', 'image/gif', 1, 1),
454('mp3', 'MP3 Audio File', 'audio/mpeg', 0, 0),
455('mp3', 'MP3 Audio File', 'audio/mp3', 0, 0),
456('mp3', 'MP3 Audio File', 'audio/mpg', 0, 0),
457('wav', 'WAV Audio File', 'audio/wav', 0, 0),
458('mp3', 'MP3 Audio File', 'audio/x-mpeg', 0, 0),
459('mp3', 'MP3 Audio File', 'audio/x-mp3', 0, 0),
460('mp3', 'MP3 Audio File', 'audio/x-mpg', 0, 0),
461('wav', 'WAV Audio File', 'audio/x-wav', 0, 0),
462('swf', 'Flash Application', 'application/x-shockwave-flash', 0, 0),
463('mp4', 'MP4 Video File', 'video/mp4', 0, 0),
464('mpg', 'MPG Video File', 'video/mpeg', 0, 0),
465('webm', 'WEBM Video File', 'video/webm', 0, 0),
466('avi', 'AVI Video File', 'video/avi', 0, 0),
467('mkv', 'Matroska Video File', 'video/x-matroska', 0, 0);
468
469INSERT INTO `groups` (`id`, `name`, `capcode`, `capcode_style`, `capcode_icon`) VALUES
470(1, 'Janitor', '', '', ''),
471(2, 'Moderator', 'Mod', 'color:#800080', './img/mod.png'),
472(3, 'Administrator', 'Admin', 'color:#FF0000', './img/admin.png'),
473(4, 'Disabled', '', '', '');
474
475INSERT INTO `permissions_categories` (`id`, `name`, `description`) VALUES
476(0, 'ads', 'Advertisements'),
477(1, 'announcements', 'Announcements'),
478(2, 'appeals', 'Appeals'),
479(3, 'bans', 'Bans'),
480(4, 'bbcodes', 'BBCodes'),
481(5, 'boards', 'Boards'),
482(6, 'config', 'Configuration'),
483(7, 'embeds', 'Embed management'),
484(8, 'info', 'IP information'),
485(9, 'ipnotes', 'IP Notes'),
486(10, 'links', 'Links'),
487(11, 'logs', 'Logs'),
488(12, 'news', 'News'),
489(13, 'notes', 'Notes'),
490(14, 'post', 'Post management'),
491(15, 'range', 'Range bans'),
492(16, 'recent', 'Recent'),
493(17, 'reports', 'Reports'),
494(18, 'requests', 'Requests'),
495(19, 'search', 'Search'),
496(20, 'spamfilter', 'Spamfilter'),
497(21, 'styles', 'Styles'),
498(22, 'user', 'Account'),
499(23, 'users', 'Users'),
500(24, 'warnings', 'Warnings'),
501(25, 'whitelist', 'Whitelist'),
502(26, 'wordfilter', 'Wordfilter'),
503(27, 'pages', 'Pages'),
504(28, 'modules', 'Modules'),
505(29, 'module', 'Module permissions');
506
507INSERT INTO `permissions` (`id`, `name`, `description`, `category`) VALUES
508(0, 'ads.add', 'Create advertisements', 0),
509(1, 'ads.delete', 'Delete advertisements', 0),
510(2, 'ads.list', 'List advertisements', 0),
511(3, 'ads.update', 'Update advertisements', 0),
512(4, 'announcements.add', 'Add announcements', 1),
513(5, 'announcements.delete', 'Delete announcements', 1),
514(6, 'announcements.delete.own', 'Delete own announcements', 1),
515(7, 'announcements.manage', 'Manage announcements', 1),
516(8, 'announcements.update', 'Update announcements', 1),
517(9, 'announcements.update.own', 'Update own annoucements', 1),
518(10, 'announcements.view', 'View announcements', 1),
519(11, 'appeals.clear.all', 'Clear all appeals', 2),
520(12, 'appeals.clear.single', 'Clear single appeal', 2),
521(13, 'appeals.view', 'View appeals', 2),
522(14, 'bans.add', 'Add bans', 3),
523(15, 'bans.delete', 'Delete bans', 3),
524(16, 'bans.view', 'View bans', 3),
525(17, 'bbcodes.add', 'Add BBCodes', 4),
526(18, 'bbcodes.delete', 'Delete BBCodes', 4),
527(19, 'bbcodes.edit', 'Edit BBCodes', 4),
528(20, 'bbcodes.view', 'View BBCodes', 4),
529(21, 'boards.add', 'Add boards', 5),
530(22, 'boards.delete', 'Delete boards', 5),
531(23, 'boards.move', 'Move boards', 5),
532(24, 'boards.rebuild', 'Rebuild boards', 5),
533(25, 'boards.update', 'Update boards', 5),
534(26, 'boards.view', 'View boards', 5),
535(27, 'config.cleaner', 'Use cleaner', 6),
536(28, 'config.extras', 'Use config extras', 6),
537(29, 'config.global_message', 'Change global message', 6),
538(30, 'config.reset', 'Reset configuration', 6),
539(31, 'config.rebuild', 'Rebuild cache', 6),
540(32, 'config.update', 'Update configuration', 6),
541(33, 'config.view', 'View configuration', 6),
542(34, 'embeds.add', 'Add embeds', 7),
543(35, 'embeds.delete', 'Delete embeds', 7),
544(36, 'embeds.edit', 'Update embeds', 7),
545(37, 'embeds.view', 'View embeds', 7),
546(38, 'info.view', 'View IP information', 8),
547(39, 'ipnotes.add', 'Add IP notes', 9),
548(40, 'ipnotes.delete', 'Delete IP notes', 9),
549(41, 'ipnotes.view', 'View IP notes', 9),
550(42, 'links.add', 'Add board links', 10),
551(43, 'links.delete', 'Delete board links', 10),
552(44, 'links.move', 'Change board links position', 10),
553(45, 'links.update', 'Update board links', 10),
554(46, 'links.view', 'View board links', 10),
555(47, 'logs.view', 'View action logs', 11),
556(48, 'news.add', 'Add news', 12),
557(49, 'news.delete', 'Delete news', 12),
558(50, 'news.delete.own', 'Delete own news', 12),
559(51, 'news.manage', 'Manage news', 12),
560(52, 'news.update', 'Update news', 12),
561(53, 'news.update.own', 'Update own news', 12),
562(54, 'news.view', 'View news', 12),
563(55, 'notes.add', 'Add notes', 13),
564(56, 'notes.delete', 'Delete notes', 13),
565(57, 'notes.view', 'View notes', 13),
566(58, 'post.antibump', 'Enable antibump on posts', 14),
567(59, 'post.capcode', 'Use capcode', 14),
568(60, 'post.customcapcode', 'Use custom capcode', 14),
569(61, 'post.closed', 'Close threads', 14),
570(62, 'post.delete.ip', 'Delete posts from IP', 14),
571(63, 'post.delete.single', 'Delete single post', 14),
572(64, 'post.edit', 'Edit posts', 14),
573(65, 'post.sticky', 'Sticky threads', 14),
574(66, 'post.viewip', 'View IP', 14),
575(67, 'range.add', 'Add range bans', 15),
576(68, 'range.delete', 'Delete range bans', 15),
577(69, 'range.view', 'View range bans', 15),
578(70, 'recent.files', 'View recent files', 16),
579(71, 'recent.posts', 'View recent posts', 16),
580(72, 'reports.clear.all', 'Clear all reports', 17),
581(73, 'reports.clear.multiple', 'Clear multiple reports (D_WTIP, D_WTR)', 17),
582(74, 'reports.clear.single', 'Clear single report', 17),
583(75, 'reports.view', 'View reporst', 17),
584(76, 'requests.delete', 'Delete ban requests', 18),
585(77, 'requests.view', 'View ban requests', 18),
586(78, 'search.ip', 'Search by IP', 19),
587(79, 'search.text', 'Search by text', 19),
588(80, 'spamfilter.add', 'Add spamfilter', 20),
589(81, 'spamfilter.delete', 'Delete spamfilter', 20),
590(82, 'spamfilter.update', 'Update spamfilter', 20),
591(83, 'spamfilter.view', 'View spamfilter', 20),
592(84, 'styles.delete', 'Delete styles', 21),
593(85, 'styles.update', 'Update styles', 21),
594(86, 'styles.upload', 'Upload styles', 21),
595(87, 'styles.view', 'View styles', 21),
596(88, 'user.change_password', 'Change own password', 22),
597(89, 'user.inbox', 'Inbox', 22),
598(90, 'user.login', 'Log in', 22),
599(91, 'users.add', 'Add users', 23),
600(92, 'users.delete', 'Delete users', 23),
601(93, 'users.update', 'Update users', 23),
602(94, 'users.view', 'View users', 23),
603(95, 'warnings.add', 'Add warnings', 24),
604(96, 'warnings.delete', 'Delete warnings', 24),
605(97, 'warnings.view', 'View warnings', 24),
606(98, 'whitelist.add', 'Add whitelist', 25),
607(99, 'whitelist.delete', 'Delete whitelist', 25),
608(100, 'whitelist.view', 'View whitelist', 25),
609(101, 'wordfilter.add', 'Add wordfilter', 26),
610(102, 'wordfilter.delete', 'Delete wordfilter', 26),
611(103, 'wordfilter.update', 'Update wordfilter', 26),
612(104, 'wordfilter.view', 'View wordfilter', 26),
613(105, 'bans.add.request', 'Add ban requests', 3),
614(106, 'post.ignorespamfilter', 'Ignore spamfilter', 14),
615(107, 'post.ignorebumplimit', 'Ignore bumplimit', 14),
616(108, 'post.ignoresizelimit', 'Ignore size limit', 14),
617(109, 'post.raw', 'Raw HTML', 14),
618(110, 'post.nofile', 'No file', 14),
619(111, 'post.fakeid', 'Fake ID', 14),
620(112, 'post.ignorespamlimits', 'Ignore spamlimits', 14),
621(113, 'post.ignorenoname', 'Ignore noname', 14),
622(114, 'post.ignorenodup', 'Ignore nodup', 14),
623(115, 'post.ignorecaptcha', 'Ignore CAPTCHA', 14),
624(116, 'pages.view', 'View pages', 27),
625(117, 'pages.update', 'Update pages', 27),
626(118, 'pages.delete', 'Delete pages', 27),
627(119, 'pages.add', 'Add pages', 27),
628(120, 'modules.view', 'View modules', 28),
629(121, 'modules.upload', 'Upload modules', 28),
630(122, 'modules.install', 'Install modules', 28),
631(123, 'modules.uninstall', 'Uninstall modules', 28),
632(124, 'modules.delete', 'Delete modules', 28),
633(125, 'modules.config', 'Configure modules', 28);
634
635INSERT INTO `group_permissions` (`gid`, `pid`) VALUES
636(1, 10),
637(1, 14),
638(1, 38),
639(1, 41),
640(1, 54),
641(1, 66),
642(1, 70),
643(1, 71),
644(1, 75),
645(1, 88),
646(1, 89),
647(1, 90),
648(1, 105),
649(2, 10),
650(2, 11),
651(2, 12),
652(2, 13),
653(2, 14),
654(2, 15),
655(2, 16),
656(2, 38),
657(2, 39),
658(2, 4),
659(2, 40),
660(2, 41),
661(2, 48),
662(2, 50),
663(2, 51),
664(2, 53),
665(2, 54),
666(2, 55),
667(2, 56),
668(2, 57),
669(2, 58),
670(2, 59),
671(2, 6),
672(2, 61),
673(2, 62),
674(2, 63),
675(2, 65),
676(2, 66),
677(2, 67),
678(2, 69),
679(2, 7),
680(2, 70),
681(2, 71),
682(2, 72),
683(2, 73),
684(2, 74),
685(2, 75),
686(2, 76),
687(2, 77),
688(2, 78),
689(2, 88),
690(2, 89),
691(2, 9),
692(2, 90),
693(2, 95),
694(2, 96),
695(2, 97),
696(2, 105),
697(2, 106),
698(2, 107),
699(2, 108),
700(2, 109),
701(2, 110),
702(2, 111),
703(2, 112),
704(2, 113),
705(2, 114),
706(2, 115),
707(3, 0),
708(3, 1),
709(3, 10),
710(3, 100),
711(3, 101),
712(3, 102),
713(3, 103),
714(3, 104),
715(3, 105),
716(3, 11),
717(3, 12),
718(3, 13),
719(3, 14),
720(3, 15),
721(3, 16),
722(3, 17),
723(3, 18),
724(3, 19),
725(3, 2),
726(3, 20),
727(3, 21),
728(3, 22),
729(3, 23),
730(3, 24),
731(3, 25),
732(3, 26),
733(3, 27),
734(3, 28),
735(3, 29),
736(3, 3),
737(3, 30),
738(3, 31),
739(3, 32),
740(3, 33),
741(3, 34),
742(3, 35),
743(3, 36),
744(3, 37),
745(3, 38),
746(3, 39),
747(3, 4),
748(3, 40),
749(3, 41),
750(3, 42),
751(3, 43),
752(3, 44),
753(3, 45),
754(3, 46),
755(3, 47),
756(3, 48),
757(3, 49),
758(3, 5),
759(3, 50),
760(3, 51),
761(3, 52),
762(3, 53),
763(3, 54),
764(3, 55),
765(3, 56),
766(3, 57),
767(3, 58),
768(3, 59),
769(3, 6),
770(3, 60),
771(3, 61),
772(3, 62),
773(3, 63),
774(3, 64),
775(3, 65),
776(3, 66),
777(3, 67),
778(3, 68),
779(3, 69),
780(3, 7),
781(3, 70),
782(3, 71),
783(3, 72),
784(3, 73),
785(3, 74),
786(3, 75),
787(3, 76),
788(3, 77),
789(3, 78),
790(3, 8),
791(3, 80),
792(3, 81),
793(3, 82),
794(3, 83),
795(3, 84),
796(3, 85),
797(3, 86),
798(3, 87),
799(3, 88),
800(3, 89),
801(3, 9),
802(3, 90),
803(3, 91),
804(3, 92),
805(3, 93),
806(3, 94),
807(3, 95),
808(3, 96),
809(3, 97),
810(3, 98),
811(3, 99),
812(3, 106),
813(3, 107),
814(3, 108),
815(3, 109),
816(3, 110),
817(3, 111),
818(3, 112),
819(3, 113),
820(3, 114),
821(3, 115),
822(3, 116),
823(3, 117),
824(3, 118),
825(3, 119),
826(3, 120),
827(3, 121),
828(3, 122),
829(3, 123),
830(3, 124),
831(3, 125);
832
833INSERT INTO `styles` (`name`, `path`, `relative`, `default`) VALUES
834('Mitsuba', './styles/mitsuba.css', 1, 1),
835('Mitsuba Blue', './styles/mitsubablue.css', 1, 0);
836
837INSERT INTO `link` (`name`, `regex`, `parser`) VALUES
838('dailymotion', '/http(s)?:\\/\\/(www\\.)?dailymotion\\.com\\/video\\/([^&]+)/', 'dailymotion.php'),
839('liveleak', '/http(s)?:\\/\\/(www\\.)?liveleak\\.com\\/view\\?i=([^&]+)/', 'liveleak.php'),
840('vimeo', '/http(s)?:\\/\\/(www\\.)?vimeo\\.com\\/([0-9]+)/', 'vimeo.php'),
841('youtube', '/http(s)?:\\/\\/(www\\.)?youtube\\.com\\/watch\\?v=([^&]+)/', 'youtube.php'),
842('youtu.be', '/http(s)?:\\/\\/(www\\.)?youtu\\.be\\/([^&]+)/', 'youtube.php'),
843('rapidshare_link', '/http(s)?:\\/\\/rapidshare.com\\/files\\/([0-9]+)\\/(\w+)/', 'rapidshare.php');