[ Index ] |
PHP Cross Reference of MyBB 1.8.38 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * MyBB 1.8 4 * Copyright 2014 MyBB Group, All Rights Reserved 5 * 6 * Website: http://www.mybb.com 7 * License: http://www.mybb.com/about/license 8 * 9 */ 10 11 // Disallow direct access to this file for security reasons 12 if(!defined("IN_MYBB")) 13 { 14 die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined."); 15 } 16 17 $tables[] = "CREATE TABLE mybb_adminlog ( 18 uid int NOT NULL default '0', 19 ipaddress bytea NOT NULL default '', 20 dateline int NOT NULL default '0', 21 module varchar(50) NOT NULL default '', 22 action varchar(50) NOT NULL default '', 23 data text NOT NULL default '' 24 );"; 25 26 $tables[] = "CREATE TABLE mybb_adminoptions ( 27 uid int NOT NULL default '0', 28 cpstyle varchar(50) NOT NULL default '', 29 cplanguage varchar(50) NOT NULL default '', 30 codepress smallint NOT NULL default '1', 31 notes text NOT NULL default '', 32 permissions text NOT NULL default '', 33 defaultviews text NOT NULL, 34 loginattempts smallint NOT NULL default '0', 35 loginlockoutexpiry int NOT NULL default '0', 36 authsecret varchar(16) NOT NULL default '', 37 recovery_codes varchar(177) NOT NULL default '', 38 UNIQUE (uid) 39 );"; 40 41 $tables[] = "CREATE TABLE mybb_adminsessions ( 42 sid varchar(32) NOT NULL default '', 43 uid int NOT NULL default '0', 44 loginkey varchar(50) NOT NULL default '', 45 ip bytea NOT NULL default '', 46 dateline int NOT NULL default '0', 47 lastactive int NOT NULL default '0', 48 data text NOT NULL default '', 49 useragent varchar(200) NOT NULL default '', 50 authenticated smallint NOT NULL default '0' 51 );"; 52 53 $tables[] = "CREATE TABLE mybb_adminviews ( 54 vid serial, 55 uid int NOT NULL default '0', 56 title varchar(100) NOT NULL default '', 57 type varchar(6) NOT NULL default '', 58 visibility smallint NOT NULL default '0', 59 fields text NOT NULL, 60 conditions text NOT NULL, 61 custom_profile_fields text NOT NULL, 62 sortby varchar(20) NOT NULL default '', 63 sortorder varchar(4) NOT NULL default '', 64 perpage smallint NOT NULL default '0', 65 view_type varchar(6) NOT NULL default '', 66 PRIMARY KEY (vid) 67 );"; 68 69 $tables[] = "CREATE TABLE mybb_announcements ( 70 aid serial, 71 fid int NOT NULL default '0', 72 uid int NOT NULL default '0', 73 subject varchar(120) NOT NULL default '', 74 message text NOT NULL default '', 75 startdate int NOT NULL default '0', 76 enddate int NOT NULL default '0', 77 allowhtml smallint NOT NULL default '0', 78 allowmycode smallint NOT NULL default '0', 79 allowsmilies smallint NOT NULL default '0', 80 PRIMARY KEY (aid) 81 );"; 82 83 $tables[] = "CREATE TABLE mybb_attachments ( 84 aid serial, 85 pid int NOT NULL default '0', 86 posthash varchar(50) NOT NULL default '', 87 uid int NOT NULL default '0', 88 filename varchar(255) NOT NULL default '', 89 filetype varchar(120) NOT NULL default '', 90 filesize int NOT NULL default '0', 91 attachname varchar(255) NOT NULL default '', 92 downloads int NOT NULL default '0', 93 dateuploaded int NOT NULL default '0', 94 visible smallint NOT NULL default '0', 95 thumbnail varchar(120) NOT NULL default '', 96 PRIMARY KEY (aid) 97 );"; 98 99 $tables[] = "CREATE TABLE mybb_attachtypes ( 100 atid serial, 101 name varchar(120) NOT NULL default '', 102 mimetype varchar(120) NOT NULL default '', 103 extension varchar(10) NOT NULL default '', 104 maxsize int NOT NULL default '0', 105 icon varchar(100) NOT NULL default '', 106 enabled smallint NOT NULL default '1', 107 forcedownload smallint NOT NULL default '0', 108 groups text NOT NULL default '-1', 109 forums text NOT NULL default '-1', 110 avatarfile smallint NOT NULL default '0', 111 PRIMARY KEY (atid) 112 );"; 113 114 $tables[] = "CREATE TABLE mybb_awaitingactivation ( 115 aid serial, 116 uid int NOT NULL default '0', 117 dateline int NOT NULL default '0', 118 code varchar(100) NOT NULL default '', 119 type char(1) NOT NULL default '', 120 validated smallint NOT NULL default '0', 121 misc varchar(255) NOT NULL default '', 122 PRIMARY KEY (aid) 123 );"; 124 125 $tables[] = "CREATE TABLE mybb_badwords ( 126 bid serial, 127 badword varchar(100) NOT NULL default '', 128 regex smallint NOT NULL default '0', 129 replacement varchar(100) NOT NULL default '', 130 PRIMARY KEY (bid) 131 );"; 132 133 $tables[] = "CREATE TABLE mybb_banfilters ( 134 fid serial, 135 filter varchar(200) NOT NULL default '', 136 type smallint NOT NULL default '0', 137 lastuse int NOT NULL default '0', 138 dateline int NOT NULL default '0', 139 PRIMARY KEY (fid) 140 );"; 141 142 $tables[] = "CREATE TABLE mybb_banned ( 143 uid int NOT NULL default '0', 144 gid int NOT NULL default '0', 145 oldgroup int NOT NULL default '0', 146 oldadditionalgroups text NOT NULL default '', 147 olddisplaygroup int NOT NULL default '0', 148 admin int NOT NULL default '0', 149 dateline int NOT NULL default '0', 150 bantime varchar(50) NOT NULL default '', 151 lifted int NOT NULL default '0', 152 reason varchar(255) NOT NULL default '' 153 );"; 154 155 $tables[] = "CREATE TABLE mybb_buddyrequests ( 156 id serial, 157 uid int NOT NULL default '0', 158 touid int NOT NULL default '0', 159 date int NOT NULL default '0', 160 PRIMARY KEY (id) 161 );"; 162 163 $tables[] = "CREATE TABLE mybb_calendars ( 164 cid serial, 165 name varchar(100) NOT NULL default '', 166 disporder smallint NOT NULL default '0', 167 startofweek smallint NOT NULL default '0', 168 showbirthdays smallint NOT NULL default '0', 169 eventlimit smallint NOT NULL default '0', 170 moderation smallint NOT NULL default '0', 171 allowhtml smallint NOT NULL default '0', 172 allowmycode smallint NOT NULL default '0', 173 allowimgcode smallint NOT NULL default '0', 174 allowvideocode smallint NOT NULL default '0', 175 allowsmilies smallint NOT NULL default '0', 176 PRIMARY KEY(cid) 177 );"; 178 179 $tables[] = "CREATE TABLE mybb_calendarpermissions ( 180 cid serial, 181 gid int NOT NULL default '0', 182 canviewcalendar smallint NOT NULL default '0', 183 canaddevents smallint NOT NULL default '0', 184 canbypasseventmod smallint NOT NULL default '0', 185 canmoderateevents smallint NOT NULL default '0' 186 );"; 187 188 $tables[] = "CREATE TABLE mybb_captcha ( 189 imagehash varchar(32) NOT NULL default '', 190 imagestring varchar(8) NOT NULL default '', 191 dateline int NOT NULL default '0', 192 used smallint NOT NULL default '0' 193 );"; 194 195 $tables[] = "CREATE TABLE mybb_datacache ( 196 title varchar(50) NOT NULL default '', 197 cache text NOT NULL default '', 198 PRIMARY KEY (title) 199 );"; 200 201 $tables[] = "CREATE TABLE mybb_delayedmoderation ( 202 did serial, 203 type varchar(30) NOT NULL default '', 204 delaydateline int NOT NULL default '0', 205 uid int NOT NULL default '0', 206 fid smallint NOT NULL default '0', 207 tids text NOT NULL, 208 dateline int NOT NULL default '0', 209 inputs text NOT NULL default '', 210 PRIMARY KEY (did) 211 );"; 212 213 $tables[] = "CREATE TABLE mybb_events ( 214 eid serial, 215 cid int NOT NULL default '0', 216 uid int NOT NULL default '0', 217 name varchar(120) NOT NULL default '', 218 description text NOT NULL, 219 visible smallint NOT NULL default '0', 220 private smallint NOT NULL default '0', 221 dateline int NOT NULL default '0', 222 starttime int NOT NULL default '0', 223 endtime int NOT NULL default '0', 224 timezone varchar(5) NOT NULL default '', 225 ignoretimezone smallint NOT NULL default '0', 226 usingtime smallint NOT NULL default '0', 227 repeats text NOT NULL, 228 PRIMARY KEY (eid) 229 );"; 230 231 $tables[] = "CREATE TABLE mybb_forumpermissions ( 232 pid serial, 233 fid int NOT NULL default '0', 234 gid int NOT NULL default '0', 235 canview smallint NOT NULL default '0', 236 canviewthreads smallint NOT NULL default '0', 237 canonlyviewownthreads smallint NOT NULL default '0', 238 candlattachments smallint NOT NULL default '0', 239 canpostthreads smallint NOT NULL default '0', 240 canpostreplys smallint NOT NULL default '0', 241 canonlyreplyownthreads smallint NOT NULL default '0', 242 canpostattachments smallint NOT NULL default '0', 243 canratethreads smallint NOT NULL default '0', 244 caneditposts smallint NOT NULL default '0', 245 candeleteposts smallint NOT NULL default '0', 246 candeletethreads smallint NOT NULL default '0', 247 caneditattachments smallint NOT NULL default '0', 248 canviewdeletionnotice smallint NOT NULL default '0', 249 modposts smallint NOT NULL default '0', 250 modthreads smallint NOT NULL default '0', 251 mod_edit_posts smallint NOT NULL default '0', 252 modattachments smallint NOT NULL default '0', 253 canpostpolls smallint NOT NULL default '0', 254 canvotepolls smallint NOT NULL default '0', 255 cansearch smallint NOT NULL default '0', 256 PRIMARY KEY (pid) 257 );"; 258 259 $tables[] = "CREATE TABLE mybb_forums ( 260 fid serial, 261 name varchar(120) NOT NULL default '', 262 description text NOT NULL default '', 263 linkto varchar(180) NOT NULL default '', 264 type char(1) NOT NULL default '', 265 pid smallint NOT NULL default '0', 266 parentlist text NOT NULL default '', 267 disporder smallint NOT NULL default '0', 268 active smallint NOT NULL default '0', 269 open smallint NOT NULL default '0', 270 threads int NOT NULL default '0', 271 posts int NOT NULL default '0', 272 lastpost int NOT NULL default '0', 273 lastposter varchar(120) NOT NULL default '', 274 lastposteruid int NOT NULL default '0', 275 lastposttid int NOT NULL default '0', 276 lastpostsubject varchar(120) NOT NULL default '', 277 allowhtml smallint NOT NULL default '0', 278 allowmycode smallint NOT NULL default '0', 279 allowsmilies smallint NOT NULL default '0', 280 allowimgcode smallint NOT NULL default '0', 281 allowvideocode smallint NOT NULL default '0', 282 allowpicons smallint NOT NULL default '0', 283 allowtratings smallint NOT NULL default '0', 284 usepostcounts smallint NOT NULL default '0', 285 usethreadcounts smallint NOT NULL default '0', 286 requireprefix smallint NOT NULL default '0', 287 password varchar(50) NOT NULL default '', 288 showinjump smallint NOT NULL default '0', 289 style smallint NOT NULL default '0', 290 overridestyle smallint NOT NULL default '0', 291 rulestype smallint NOT NULL default '0', 292 rulestitle varchar(200) NOT NULL default '', 293 rules text NOT NULL default '', 294 unapprovedthreads int NOT NULL default '0', 295 unapprovedposts int NOT NULL default '0', 296 deletedthreads int NOT NULL default '0', 297 deletedposts int NOT NULL default '0', 298 defaultdatecut smallint NOT NULL default '0', 299 defaultsortby varchar(10) NOT NULL default '', 300 defaultsortorder varchar(4) NOT NULL default '', 301 PRIMARY KEY (fid) 302 );"; 303 304 $tables[] = "CREATE TABLE mybb_forumsread ( 305 fid int NOT NULL default '0', 306 uid int NOT NULL default '0', 307 dateline int NOT NULL default '0', 308 UNIQUE (fid, uid) 309 );"; 310 311 $tables[] = "CREATE TABLE mybb_forumsubscriptions ( 312 fsid serial, 313 fid smallint NOT NULL default '0', 314 uid int NOT NULL default '0', 315 PRIMARY KEY (fsid) 316 );"; 317 318 $tables[] = "CREATE TABLE mybb_groupleaders ( 319 lid serial, 320 gid smallint NOT NULL default '0', 321 uid int NOT NULL default '0', 322 canmanagemembers smallint NOT NULL default '0', 323 canmanagerequests smallint NOT NULL default '0', 324 caninvitemembers smallint NOT NULL default '0', 325 PRIMARY KEY (lid) 326 );"; 327 328 $tables[] = "CREATE TABLE mybb_helpdocs ( 329 hid serial, 330 sid smallint NOT NULL default '0', 331 name varchar(120) NOT NULL default '', 332 description text NOT NULL default '', 333 document text NOT NULL default '', 334 usetranslation smallint NOT NULL default '0', 335 enabled smallint NOT NULL default '0', 336 disporder smallint NOT NULL default '0', 337 PRIMARY KEY (hid) 338 );"; 339 340 $tables[] = "CREATE TABLE mybb_helpsections ( 341 sid serial, 342 name varchar(120) NOT NULL default '', 343 description text NOT NULL default '', 344 usetranslation smallint NOT NULL default '0', 345 enabled smallint NOT NULL default '0', 346 disporder smallint NOT NULL default '0', 347 PRIMARY KEY (sid) 348 );"; 349 350 $tables[] = "CREATE TABLE mybb_icons ( 351 iid serial, 352 name varchar(120) NOT NULL default '', 353 path varchar(220) NOT NULL default '', 354 PRIMARY KEY (iid) 355 );"; 356 357 $tables[] = "CREATE TABLE mybb_joinrequests ( 358 rid serial, 359 uid int NOT NULL default '0', 360 gid smallint NOT NULL default '0', 361 reason varchar(250) NOT NULL default '', 362 dateline int NOT NULL default '0', 363 invite smallint NOT NULL default '0', 364 PRIMARY KEY (rid) 365 );"; 366 367 $tables[] = "CREATE TABLE mybb_massemails ( 368 mid serial, 369 uid int NOT NULL default '0', 370 subject varchar(200) NOT NULL default '', 371 message text NOT NULL, 372 htmlmessage text NOT NULL, 373 type smallint NOT NULL default '0', 374 format smallint NOT NULL default '0', 375 dateline numeric(30,0) NOT NULL default '0', 376 senddate numeric(30,0) NOT NULL default '0', 377 status smallint NOT NULL default '0', 378 sentcount int NOT NULL default '0', 379 totalcount int NOT NULL default '0', 380 conditions text NOT NULL, 381 perpage int NOT NULL default '50', 382 PRIMARY KEY(mid) 383 );"; 384 385 $tables[] = "CREATE TABLE mybb_mailerrors ( 386 eid serial, 387 subject varchar(200) NOT NULL default '', 388 message text NOT NULL default '', 389 toaddress varchar(150) NOT NULL default '', 390 fromaddress varchar(150) NOT NULL default '', 391 dateline int NOT NULL default '0', 392 error text NOT NULL default '', 393 smtperror varchar(200) NOT NULL default '', 394 smtpcode smallint NOT NULL default '0', 395 PRIMARY KEY(eid) 396 );"; 397 398 $tables[] = "CREATE TABLE mybb_maillogs ( 399 mid serial, 400 subject varchar(200) not null default '', 401 message text NOT NULL default '', 402 dateline int NOT NULL default '0', 403 fromuid int NOT NULL default '0', 404 fromemail varchar(200) not null default '', 405 touid int NOT NULL default '0', 406 toemail varchar(200) NOT NULL default '', 407 tid int NOT NULL default '0', 408 ipaddress bytea NOT NULL default '', 409 type smallint NOT NULL default '0', 410 PRIMARY KEY(mid) 411 );"; 412 413 $tables[] = "CREATE TABLE mybb_mailqueue ( 414 mid serial, 415 mailto varchar(200) NOT NULL, 416 mailfrom varchar(200) NOT NULL, 417 subject varchar(200) NOT NULL, 418 message text NOT NULL default '', 419 headers text NOT NULL default '', 420 PRIMARY KEY(mid) 421 );"; 422 423 $tables[] = "CREATE TABLE mybb_moderatorlog ( 424 uid int NOT NULL default '0', 425 dateline int NOT NULL default '0', 426 fid smallint NOT NULL default '0', 427 tid int NOT NULL default '0', 428 pid int NOT NULL default '0', 429 action text NOT NULL default '', 430 data text NOT NULL, 431 ipaddress bytea NOT NULL default '' 432 );"; 433 434 $tables[] = "CREATE TABLE mybb_moderators ( 435 mid serial, 436 fid smallint NOT NULL default '0', 437 id int NOT NULL default '0', 438 isgroup smallint NOT NULL default '0', 439 caneditposts smallint NOT NULL default '0', 440 cansoftdeleteposts smallint NOT NULL default '0', 441 canrestoreposts smallint NOT NULL default '0', 442 candeleteposts smallint NOT NULL default '0', 443 cansoftdeletethreads smallint NOT NULL default '0', 444 canrestorethreads smallint NOT NULL default '0', 445 candeletethreads smallint NOT NULL default '0', 446 canviewips smallint NOT NULL default '0', 447 canviewunapprove smallint NOT NULL default '0', 448 canviewdeleted smallint NOT NULL default '0', 449 canopenclosethreads smallint NOT NULL default '0', 450 canstickunstickthreads smallint NOT NULL default '0', 451 canapproveunapprovethreads smallint NOT NULL default '0', 452 canapproveunapproveposts smallint NOT NULL default '0', 453 canapproveunapproveattachs smallint NOT NULL default '0', 454 canmanagethreads smallint NOT NULL default '0', 455 canmanagepolls smallint NOT NULL default '0', 456 canpostclosedthreads smallint NOT NULL default '0', 457 canmovetononmodforum smallint NOT NULL default '0', 458 canusecustomtools smallint NOT NULL default '0', 459 canmanageannouncements smallint NOT NULL default '0', 460 canmanagereportedposts smallint NOT NULL default '0', 461 canviewmodlog smallint NOT NULL default '0', 462 PRIMARY KEY (mid) 463 );"; 464 465 $tables[] = "CREATE TABLE mybb_modtools ( 466 tid serial, 467 name varchar(200) NOT NULL, 468 description text NOT NULL default '', 469 forums text NOT NULL default '', 470 groups text NOT NULL default '', 471 type char(1) NOT NULL default '', 472 postoptions text NOT NULL default '', 473 threadoptions text NOT NULL default '', 474 PRIMARY KEY (tid) 475 );"; 476 477 $tables[] = "CREATE TABLE mybb_mycode ( 478 cid serial, 479 title varchar(100) NOT NULL default '', 480 description text NOT NULL default '', 481 regex text NOT NULL default '', 482 replacement text NOT NULL default '', 483 active smallint NOT NULL default '0', 484 parseorder smallint NOT NULL default '0', 485 PRIMARY KEY(cid) 486 );"; 487 488 $tables[] = "CREATE TABLE mybb_polls ( 489 pid serial, 490 tid int NOT NULL default '0', 491 question varchar(200) NOT NULL default '', 492 dateline int NOT NULL default '0', 493 options text NOT NULL default '', 494 votes text NOT NULL default '', 495 numoptions smallint NOT NULL default '0', 496 numvotes int NOT NULL default '0', 497 timeout int NOT NULL default '0', 498 closed smallint NOT NULL default '0', 499 multiple smallint NOT NULL default '0', 500 public smallint NOT NULL default '0', 501 maxoptions smallint NOT NULL default '0', 502 PRIMARY KEY (pid) 503 );"; 504 505 $tables[] = "CREATE TABLE mybb_pollvotes ( 506 vid serial, 507 pid int NOT NULL default '0', 508 uid int NOT NULL default '0', 509 voteoption smallint NOT NULL default '0', 510 dateline int NOT NULL default '0', 511 ipaddress bytea NOT NULL default '', 512 PRIMARY KEY (vid) 513 );"; 514 515 $tables[] = "CREATE TABLE mybb_posts ( 516 pid serial, 517 tid int NOT NULL default '0', 518 replyto int NOT NULL default '0', 519 fid smallint NOT NULL default '0', 520 subject varchar(120) NOT NULL default '', 521 icon smallint NOT NULL default '0', 522 uid int NOT NULL default '0', 523 username varchar(80) NOT NULL default '', 524 dateline int NOT NULL default '0', 525 message text NOT NULL default '', 526 ipaddress bytea NOT NULL default '', 527 includesig smallint NOT NULL default '0', 528 smilieoff smallint NOT NULL default '0', 529 edituid int NOT NULL default '0', 530 edittime int NOT NULL default '0', 531 editreason varchar(150) NOT NULL default '', 532 visible smallint NOT NULL default '0', 533 PRIMARY KEY (pid) 534 );"; 535 536 $tables[] = "CREATE TABLE mybb_privatemessages ( 537 pmid serial, 538 uid int NOT NULL default '0', 539 toid int NOT NULL default '0', 540 fromid int NOT NULL default '0', 541 recipients text NOT NULL default '', 542 folder smallint NOT NULL default '1', 543 subject varchar(120) NOT NULL default '', 544 icon smallint NOT NULL default '0', 545 message text NOT NULL default '', 546 dateline int NOT NULL default '0', 547 deletetime int NOT NULL default '0', 548 status smallint NOT NULL default '0', 549 statustime int NOT NULL default '0', 550 includesig smallint NOT NULL default '0', 551 smilieoff smallint NOT NULL default '0', 552 receipt smallint NOT NULL default '0', 553 readtime int NOT NULL default '0', 554 ipaddress bytea NOT NULL default '', 555 PRIMARY KEY (pmid) 556 );"; 557 558 $tables[] = "CREATE TABLE mybb_profilefields ( 559 fid serial, 560 name varchar(100) NOT NULL default '', 561 description text NOT NULL default '', 562 disporder smallint NOT NULL default '0', 563 type text NOT NULL default '', 564 regex text NOT NULL default '', 565 length smallint NOT NULL default '0', 566 maxlength smallint NOT NULL default '0', 567 required smallint NOT NULL default '0', 568 registration smallint NOT NULL default '0', 569 profile smallint NOT NULL default '0', 570 postbit smallint NOT NULL default '0', 571 viewableby text NOT NULL default '-1', 572 editableby text NOT NULL default '-1', 573 postnum smallint NOT NULL default '0', 574 allowhtml smallint NOT NULL default '0', 575 allowmycode smallint NOT NULL default '0', 576 allowsmilies smallint NOT NULL default '0', 577 allowimgcode smallint NOT NULL default '0', 578 allowvideocode smallint NOT NULL default '0', 579 PRIMARY KEY (fid) 580 );"; 581 582 $tables[] = "CREATE TABLE mybb_promotions ( 583 pid serial, 584 title varchar(120) NOT NULL default '', 585 description text NOT NULL default '', 586 enabled smallint NOT NULL default '1', 587 logging smallint NOT NULL default '0', 588 posts int NOT NULL default '0', 589 posttype varchar(2) NOT NULL default '', 590 threads int NOT NULL default '0', 591 threadtype varchar(2) NOT NULL default '', 592 registered int NOT NULL default '0', 593 registeredtype varchar(20) NOT NULL default '', 594 online int NOT NULL default '0', 595 onlinetype varchar(20) NOT NULL default '', 596 reputations int NOT NULL default '0', 597 reputationtype varchar(2) NOT NULL default '', 598 referrals int NOT NULL default '0', 599 referralstype varchar(2) NOT NULL default '', 600 warnings int NOT NULL default '0', 601 warningstype varchar(2) NOT NULL default '', 602 requirements varchar(200) NOT NULL default '', 603 originalusergroup varchar(120) NOT NULL default '0', 604 newusergroup smallint NOT NULL default '0', 605 usergrouptype varchar(120) NOT NULL default '0', 606 PRIMARY KEY(pid) 607 );"; 608 609 $tables[] = "CREATE TABLE mybb_promotionlogs ( 610 plid serial, 611 pid int NOT NULL default '0', 612 uid int NOT NULL default '0', 613 oldusergroup varchar(200) NOT NULL default '0', 614 newusergroup smallint NOT NULL default '0', 615 dateline int NOT NULL default '0', 616 type varchar(9) NOT NULL default 'primary', 617 PRIMARY KEY(plid) 618 );"; 619 620 $tables[] = "CREATE TABLE mybb_questions ( 621 qid serial, 622 question varchar(200) NOT NULL default '', 623 answer varchar(150) NOT NULL default '', 624 shown int NOT NULL default 0, 625 correct int NOT NULL default 0, 626 incorrect int NOT NULL default 0, 627 active smallint NOT NULL default '0', 628 PRIMARY KEY (qid) 629 );"; 630 631 $tables[] = "CREATE TABLE mybb_questionsessions ( 632 sid varchar(32) NOT NULL default '', 633 qid int NOT NULL default '0', 634 dateline int NOT NULL default '0', 635 UNIQUE (sid) 636 );"; 637 638 $tables[] = "CREATE TABLE mybb_reportedcontent ( 639 rid serial, 640 id int NOT NULL default '0', 641 id2 int NOT NULL default '0', 642 id3 int NOT NULL default '0', 643 uid int NOT NULL default '0', 644 reportstatus smallint NOT NULL default '0', 645 reasonid smallint NOT NULL default '0', 646 reason varchar(250) NOT NULL default '', 647 type varchar(50) NOT NULL default '', 648 reports int NOT NULL default '0', 649 reporters text NOT NULL default '', 650 dateline int NOT NULL default '0', 651 lastreport int NOT NULL default '0', 652 PRIMARY KEY (rid) 653 );"; 654 655 $tables[] = "CREATE TABLE mybb_reportreasons ( 656 rid serial, 657 title varchar(250) NOT NULL default '', 658 appliesto varchar(250) NOT NULL default '', 659 extra smallint NOT NULL default '0', 660 disporder smallint NOT NULL default '0', 661 PRIMARY KEY (rid) 662 );"; 663 664 $tables[] = "CREATE TABLE mybb_reputation ( 665 rid serial, 666 uid int NOT NULL default '0', 667 adduid int NOT NULL default '0', 668 pid int NOT NULL default '0', 669 reputation smallint NOT NULL default '0', 670 dateline int NOT NULL default '0', 671 comments text NOT NULL default '', 672 PRIMARY KEY(rid) 673 );"; 674 675 $tables[] = "CREATE TABLE mybb_searchlog ( 676 sid varchar(32) NOT NULL default '', 677 uid int NOT NULL default '0', 678 dateline int NOT NULL default '0', 679 ipaddress bytea NOT NULL default '', 680 threads text NOT NULL default '', 681 posts text NOT NULL default '', 682 resulttype varchar(10) NOT NULL default '', 683 querycache text NOT NULL default '', 684 keywords text NOT NULL default '', 685 UNIQUE (sid) 686 );"; 687 688 $tables[] = "CREATE TABLE mybb_sessions ( 689 sid varchar(32) NOT NULL default '', 690 uid int NOT NULL default '0', 691 ip bytea NOT NULL default '', 692 time int NOT NULL default '0', 693 location varchar(150) NOT NULL default '', 694 useragent varchar(200) NOT NULL default '', 695 anonymous smallint NOT NULL default '0', 696 nopermission smallint NOT NULL default '0', 697 location1 int NOT NULL default '0', 698 location2 int NOT NULL default '0', 699 UNIQUE (sid) 700 );"; 701 702 $tables[] = "CREATE TABLE mybb_settinggroups ( 703 gid serial, 704 name varchar(100) NOT NULL default '', 705 title varchar(220) NOT NULL default '', 706 description text NOT NULL default '', 707 disporder smallint NOT NULL default '0', 708 isdefault smallint NOT NULL default '0', 709 PRIMARY KEY (gid) 710 );"; 711 712 $tables[] = "CREATE TABLE mybb_settings ( 713 sid serial, 714 name varchar(120) NOT NULL default '', 715 title varchar(120) NOT NULL default '', 716 description text NOT NULL default '', 717 optionscode text NOT NULL default '', 718 value text NOT NULL default '', 719 disporder smallint NOT NULL default '0', 720 gid smallint NOT NULL default '0', 721 isdefault smallint NOT NULL default '0', 722 PRIMARY KEY (sid) 723 );"; 724 725 $tables[] = "CREATE TABLE mybb_smilies ( 726 sid serial, 727 name varchar(120) NOT NULL default '', 728 find text NOT NULL, 729 image varchar(220) NOT NULL default '', 730 disporder smallint NOT NULL default '0', 731 showclickable smallint NOT NULL default '0', 732 PRIMARY KEY (sid) 733 );"; 734 735 $tables[] = "CREATE TABLE mybb_spamlog ( 736 sid serial, 737 username varchar(120) NOT NULL DEFAULT '', 738 email varchar(220) NOT NULL DEFAULT '', 739 ipaddress bytea NOT NULL default '', 740 dateline numeric(30,0) NOT NULL default '0', 741 data text NOT NULL default '', 742 PRIMARY KEY (sid) 743 );"; 744 745 $tables[] = "CREATE TABLE mybb_spiders ( 746 sid serial, 747 name varchar(100) NOT NULL default '', 748 theme smallint NOT NULL default '0', 749 language varchar(20) NOT NULL default '', 750 usergroup smallint NOT NULL default '0', 751 useragent varchar(200) NOT NULL default '', 752 lastvisit int NOT NULL default '0', 753 PRIMARY KEY(sid) 754 );"; 755 756 $tables[] = "CREATE TABLE mybb_stats ( 757 dateline numeric(30,0) NOT NULL default '0', 758 numusers numeric(10,0) NOT NULL default '0', 759 numthreads numeric(10,0) NOT NULL default '0', 760 numposts numeric(10,0) NOT NULL default '0', 761 UNIQUE (dateline) 762 );"; 763 764 $tables[] = "CREATE TABLE mybb_tasks ( 765 tid serial, 766 title varchar(120) NOT NULL default '', 767 description text NOT NULL default '', 768 file varchar(30) NOT NULL default '', 769 minute varchar(200) NOT NULL default '', 770 hour varchar(200) NOT NULL default '', 771 day varchar(100) NOT NULL default '', 772 month varchar(30) NOT NULL default '', 773 weekday varchar(15) NOT NULL default '', 774 nextrun int NOT NULL default '0', 775 lastrun int NOT NULL default '0', 776 enabled smallint NOT NULL default '1', 777 logging smallint NOT NULL default '0', 778 locked int NOT NULL default '0', 779 PRIMARY KEY(tid) 780 );"; 781 782 $tables[] = "CREATE TABLE mybb_tasklog ( 783 lid serial, 784 tid int NOT NULL default '0', 785 dateline int NOT NULL default '0', 786 data text NOT NULL, 787 PRIMARY KEY(lid) 788 );"; 789 790 $tables[] = "CREATE TABLE mybb_templategroups ( 791 gid serial, 792 prefix varchar(50) NOT NULL default '', 793 title varchar(100) NOT NULL default '', 794 isdefault smallint NOT NULL default '0', 795 PRIMARY KEY (gid) 796 );"; 797 798 $tables[] = "CREATE TABLE mybb_templates ( 799 tid serial, 800 title varchar(120) NOT NULL default '', 801 template text NOT NULL default '', 802 sid smallint NOT NULL default '0', 803 version varchar(20) NOT NULL default '0', 804 status varchar(10) NOT NULL default '', 805 dateline int NOT NULL default '0', 806 PRIMARY KEY (tid) 807 );"; 808 809 $tables[] = "CREATE TABLE mybb_templatesets ( 810 sid serial, 811 title varchar(120) NOT NULL default '', 812 PRIMARY KEY (sid) 813 );"; 814 815 $tables[] = "CREATE TABLE mybb_themes ( 816 tid serial, 817 name varchar(100) NOT NULL default '', 818 pid smallint NOT NULL default '0', 819 def smallint NOT NULL default '0', 820 properties text NOT NULL default '', 821 stylesheets text NOT NULL default '', 822 allowedgroups text NOT NULL default '', 823 PRIMARY KEY (tid) 824 );"; 825 826 $tables[] = "CREATE TABLE mybb_themestylesheets( 827 sid serial, 828 name varchar(30) NOT NULL default '', 829 tid numeric(10,0) NOT NULL default '0', 830 attachedto text NOT NULL, 831 stylesheet text NOT NULL, 832 cachefile varchar(100) NOT NULL default '', 833 lastmodified numeric(30,0) NOT NULL default '0', 834 PRIMARY KEY(sid) 835 );"; 836 837 $tables[] = "CREATE TABLE mybb_threadprefixes ( 838 pid serial, 839 prefix varchar(120) NOT NULL default '', 840 displaystyle varchar(200) NOT NULL default '', 841 forums text NOT NULL, 842 groups text NOT NULL, 843 PRIMARY KEY(pid) 844 );"; 845 846 $tables[] = "CREATE TABLE mybb_threadratings ( 847 rid serial, 848 tid int NOT NULL default '0', 849 uid int NOT NULL default '0', 850 rating smallint NOT NULL default '0', 851 ipaddress bytea NOT NULL default '', 852 PRIMARY KEY (rid) 853 );"; 854 855 $tables[] = "CREATE TABLE mybb_threadviews ( 856 tid int NOT NULL default '0' 857 );"; 858 859 $tables[] = "CREATE TABLE mybb_threads ( 860 tid serial, 861 fid smallint NOT NULL default '0', 862 subject varchar(120) NOT NULL default '', 863 prefix smallint NOT NULL default '0', 864 icon smallint NOT NULL default '0', 865 poll int NOT NULL default '0', 866 uid int NOT NULL default '0', 867 username varchar(80) NOT NULL default '', 868 dateline int NOT NULL default '0', 869 firstpost int NOT NULL default '0', 870 lastpost int NOT NULL default '0', 871 lastposter varchar(120) NOT NULL default '', 872 lastposteruid int NOT NULL default '0', 873 views int NOT NULL default '0', 874 replies int NOT NULL default '0', 875 closed varchar(30) NOT NULL default '', 876 sticky smallint NOT NULL default '0', 877 numratings smallint NOT NULL default '0', 878 totalratings smallint NOT NULL default '0', 879 notes text NOT NULL default '', 880 visible smallint NOT NULL default '0', 881 unapprovedposts int NOT NULL default '0', 882 deletedposts int NOT NULL default '0', 883 attachmentcount int NOT NULL default '0', 884 deletetime int NOT NULL default '0', 885 PRIMARY KEY (tid) 886 );"; 887 888 $tables[] = "CREATE TABLE mybb_threadsread ( 889 tid int NOT NULL default '0', 890 uid int NOT NULL default '0', 891 dateline int NOT NULL default '0', 892 UNIQUE (tid, uid) 893 );"; 894 895 $tables[] = "CREATE TABLE mybb_threadsubscriptions ( 896 sid serial, 897 uid int NOT NULL default '0', 898 tid int NOT NULL default '0', 899 notification smallint NOT NULL default '0', 900 dateline int NOT NULL default '0', 901 PRIMARY KEY (sid) 902 );"; 903 904 $tables[] = "CREATE TABLE mybb_userfields ( 905 ufid int NOT NULL default '0', 906 fid1 text NOT NULL default '', 907 fid2 text NOT NULL default '', 908 fid3 text NOT NULL default '', 909 PRIMARY KEY (ufid) 910 );"; 911 $tables[] = "CREATE SEQUENCE mybb_userfields_ufid_seq;"; 912 913 $tables[] = "CREATE TABLE mybb_usergroups ( 914 gid serial, 915 type smallint NOT NULL default '2', 916 title varchar(120) NOT NULL default '', 917 description text NOT NULL default '', 918 namestyle varchar(200) NOT NULL default '{username}', 919 usertitle varchar(120) NOT NULL default '', 920 stars smallint NOT NULL default '0', 921 starimage varchar(120) NOT NULL default '', 922 image varchar(120) NOT NULL default '', 923 disporder smallint NOT NULL default '0', 924 isbannedgroup smallint NOT NULL default '0', 925 canview smallint NOT NULL default '0', 926 canviewthreads smallint NOT NULL default '0', 927 canviewprofiles smallint NOT NULL default '0', 928 candlattachments smallint NOT NULL default '0', 929 canviewboardclosed smallint NOT NULL default '0', 930 canpostthreads smallint NOT NULL default '0', 931 canpostreplys smallint NOT NULL default '0', 932 canpostattachments smallint NOT NULL default '0', 933 canratethreads smallint NOT NULL default '0', 934 modposts smallint NOT NULL default '0', 935 modthreads smallint NOT NULL default '0', 936 mod_edit_posts smallint NOT NULL default '0', 937 modattachments smallint NOT NULL default '0', 938 caneditposts smallint NOT NULL default '0', 939 candeleteposts smallint NOT NULL default '0', 940 candeletethreads smallint NOT NULL default '0', 941 caneditattachments smallint NOT NULL default '0', 942 canviewdeletionnotice smallint NOT NULL default '0', 943 canpostpolls smallint NOT NULL default '0', 944 canvotepolls smallint NOT NULL default '0', 945 canundovotes smallint NOT NULL default '0', 946 canusepms smallint NOT NULL default '0', 947 cansendpms smallint NOT NULL default '0', 948 cantrackpms smallint NOT NULL default '0', 949 candenypmreceipts smallint NOT NULL default '0', 950 pmquota int NOT NULL default '0', 951 maxpmrecipients int NOT NULL default '5', 952 cansendemail smallint NOT NULL default '0', 953 cansendemailoverride smallint NOT NULL default '0', 954 maxemails int NOT NULL default '5', 955 emailfloodtime int NOT NULL default '5', 956 canviewmemberlist smallint NOT NULL default '0', 957 canviewcalendar smallint NOT NULL default '0', 958 canaddevents smallint NOT NULL default '0', 959 canbypasseventmod smallint NOT NULL default '0', 960 canmoderateevents smallint NOT NULL default '0', 961 canviewonline smallint NOT NULL default '0', 962 canviewwolinvis smallint NOT NULL default '0', 963 canviewonlineips smallint NOT NULL default '0', 964 cancp smallint NOT NULL default '0', 965 issupermod smallint NOT NULL default '0', 966 cansearch smallint NOT NULL default '0', 967 canusercp smallint NOT NULL default '0', 968 canuploadavatars smallint NOT NULL default '0', 969 canratemembers smallint NOT NULL default '0', 970 canchangename smallint NOT NULL default '0', 971 canbereported smallint NOT NULL default '0', 972 canbeinvisible smallint NOT NULL default '1', 973 canchangewebsite smallint NOT NULL default '1', 974 showforumteam smallint NOT NULL default '0', 975 usereputationsystem smallint NOT NULL default '0', 976 cangivereputations smallint NOT NULL default '0', 977 candeletereputations smallint NOT NULL default '0', 978 reputationpower int NOT NULL default '0', 979 maxreputationsday int NOT NULL default '0', 980 maxreputationsperuser int NOT NULL default '0', 981 maxreputationsperthread int NOT NULL default '0', 982 candisplaygroup smallint NOT NULL default '0', 983 attachquota int NOT NULL default '0', 984 cancustomtitle smallint NOT NULL default '0', 985 canwarnusers smallint NOT NULL default '0', 986 canreceivewarnings smallint NOT NULL default '0', 987 maxwarningsday int NOT NULL default '3', 988 canmodcp smallint NOT NULL default '0', 989 showinbirthdaylist smallint NOT NULL default '0', 990 canoverridepm smallint NOT NULL default '0', 991 canusesig smallint NOT NULL default '0', 992 canusesigxposts smallint NOT NULL default '0', 993 signofollow smallint NOT NULL default '0', 994 edittimelimit smallint NOT NULL default '0', 995 maxposts smallint NOT NULL default '0', 996 showmemberlist smallint NOT NULL default '1', 997 canmanageannounce smallint NOT NULL default '0', 998 canmanagemodqueue smallint NOT NULL default '0', 999 canmanagereportedcontent smallint NOT NULL default '0', 1000 canviewmodlogs smallint NOT NULL default '0', 1001 caneditprofiles smallint NOT NULL default '0', 1002 canbanusers smallint NOT NULL default '0', 1003 canviewwarnlogs smallint NOT NULL default '0', 1004 canuseipsearch smallint NOT NULL default '0', 1005 PRIMARY KEY (gid) 1006 );"; 1007 1008 $tables[] = "CREATE TABLE mybb_users ( 1009 uid serial, 1010 username varchar(120) NOT NULL default '', 1011 password varchar(120) NOT NULL default '', 1012 salt varchar(10) NOT NULL default '', 1013 loginkey varchar(50) NOT NULL default '', 1014 email varchar(220) NOT NULL default '', 1015 postnum int NOT NULL default '0', 1016 threadnum int NOT NULL default '0', 1017 avatar varchar(200) NOT NULL default '', 1018 avatardimensions varchar(10) NOT NULL default '', 1019 avatartype varchar(10) NOT NULL default '0', 1020 usergroup smallint NOT NULL default '0', 1021 additionalgroups varchar(200) NOT NULL default '', 1022 displaygroup smallint NOT NULL default '0', 1023 usertitle varchar(250) NOT NULL default '', 1024 regdate int NOT NULL default '0', 1025 lastactive int NOT NULL default '0', 1026 lastvisit int NOT NULL default '0', 1027 lastpost int NOT NULL default '0', 1028 website varchar(200) NOT NULL default '', 1029 icq varchar(10) NOT NULL default '', 1030 skype varchar(75) NOT NULL default '', 1031 google varchar(75) NOT NULL default '', 1032 birthday varchar(15) NOT NULL default '', 1033 birthdayprivacy varchar(4) NOT NULL default 'all', 1034 signature text NOT NULL default '', 1035 allownotices smallint NOT NULL default '0', 1036 hideemail smallint NOT NULL default '0', 1037 subscriptionmethod smallint NOT NULL default '0', 1038 invisible smallint NOT NULL default '0', 1039 receivepms smallint NOT NULL default '0', 1040 receivefrombuddy smallint NOT NULL default '0', 1041 pmnotice smallint NOT NULL default '0', 1042 pmnotify smallint NOT NULL default '0', 1043 buddyrequestspm smallint NOT NULL default '1', 1044 buddyrequestsauto smallint NOT NULL default '0', 1045 threadmode varchar(8) NOT NULL default '', 1046 showimages smallint NOT NULL default '0', 1047 showvideos smallint NOT NULL default '0', 1048 showsigs smallint NOT NULL default '0', 1049 showavatars smallint NOT NULL default '0', 1050 showquickreply smallint NOT NULL default '0', 1051 showredirect smallint NOT NULL default '0', 1052 ppp smallint NOT NULL default '0', 1053 tpp smallint NOT NULL default '0', 1054 daysprune smallint NOT NULL default '0', 1055 dateformat varchar(4) NOT NULL default '', 1056 timeformat varchar(4) NOT NULL default '', 1057 timezone varchar(5) NOT NULL default '', 1058 dst smallint NOT NULL default '0', 1059 dstcorrection smallint NOT NULL default '0', 1060 buddylist text NOT NULL default '', 1061 ignorelist text NOT NULL default '', 1062 style smallint NOT NULL default '0', 1063 away smallint NOT NULL default '0', 1064 awaydate int NOT NULL default '0', 1065 returndate varchar(15) NOT NULL default '', 1066 awayreason varchar(200) NOT NULL default '', 1067 pmfolders text NOT NULL default '', 1068 notepad text NOT NULL default '', 1069 referrer int NOT NULL default '0', 1070 referrals int NOT NULL default '0', 1071 reputation int NOT NULL default '0', 1072 regip bytea NOT NULL default '', 1073 lastip bytea NOT NULL default '', 1074 language varchar(50) NOT NULL default '', 1075 timeonline int NOT NULL default '0', 1076 showcodebuttons smallint NOT NULL default '1', 1077 totalpms int NOT NULL default '0', 1078 unreadpms int NOT NULL default '0', 1079 warningpoints int NOT NULL default '0', 1080 moderateposts int NOT NULL default '0', 1081 moderationtime int NOT NULL default '0', 1082 suspendposting smallint NOT NULL default '0', 1083 suspensiontime int NOT NULL default '0', 1084 suspendsignature smallint NOT NULL default '0', 1085 suspendsigtime int NOT NULL default '0', 1086 coppauser smallint NOT NULL default '0', 1087 classicpostbit smallint NOT NULL default '0', 1088 loginattempts smallint NOT NULL default '0', 1089 loginlockoutexpiry int NOT NULL default '0', 1090 usernotes text NOT NULL default '', 1091 sourceeditor smallint NOT NULL default '0', 1092 PRIMARY KEY (uid) 1093 );"; 1094 1095 $tables[] = "CREATE TABLE mybb_usertitles ( 1096 utid serial, 1097 posts int NOT NULL default '0', 1098 title varchar(250) NOT NULL default '', 1099 stars smallint NOT NULL default '0', 1100 starimage varchar(120) NOT NULL default '', 1101 PRIMARY KEY (utid) 1102 );"; 1103 1104 $tables[] = "CREATE TABLE mybb_warninglevels ( 1105 lid serial, 1106 percentage smallint NOT NULL default '0', 1107 action text NOT NULL, 1108 PRIMARY KEY(lid) 1109 );"; 1110 1111 $tables[] = "CREATE TABLE mybb_warningtypes ( 1112 tid serial, 1113 title varchar(120) NOT NULL default '', 1114 points smallint NOT NULL default '0', 1115 expirationtime int NOT NULL default '0', 1116 PRIMARY KEY(tid) 1117 );"; 1118 1119 $tables[] = "CREATE TABLE mybb_warnings ( 1120 wid serial, 1121 uid int NOT NULL default '0', 1122 tid int NOT NULL default '0', 1123 pid int NOT NULL default '0', 1124 title varchar(120) NOT NULL default '', 1125 points smallint NOT NULL default '0', 1126 dateline int NOT NULL default '0', 1127 issuedby int NOT NULL default '0', 1128 expires int NOT NULL default '0', 1129 expired smallint NOT NULL default '0', 1130 daterevoked int NOT NULL default '0', 1131 revokedby int NOT NULL default '0', 1132 revokereason text NOT NULL default '', 1133 notes text NOT NULL default '', 1134 PRIMARY KEY(wid) 1135 );"; 1136
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |