| | 494 | if (!doesExistTable($database['prefix'] . 'Teamblog')) { |
| | 495 | $changed = true; |
| | 496 | echo '<li>', _text('팀블로그 기능을 위한 테이블을 추가합니다.'), ': '; |
| | 497 | $query = " |
| | 498 | CREATE TABLE {$database['prefix']}Teamblog ( |
| | 499 | teams int(11) NOT NULL default 0, |
| | 500 | userid int(11) NOT NULL default 1, |
| | 501 | enduser int(11) NOT NULL default 0, |
| | 502 | admin int(11) NOT NULL default 0, |
| | 503 | posting int(11) NOT NULL default 0, |
| | 504 | profile text NULL default '', |
| | 505 | logo varchar(15) default '', |
| | 506 | font_style int(11) NOT NULL default 0, |
| | 507 | font_color varchar(10) NOT NULL default '#000000', |
| | 508 | font_size int(11) NOT NULL default 10, |
| | 509 | font_bold int(11) NOT NULL default 0, |
| | 510 | created int(11) NOT NULL default 0, |
| | 511 | lastLogin int(11) NOT NULL default 0, |
| | 512 | PRIMARY KEY (teams,userid,admin) |
| | 513 | ) TYPE=MyISAM |
| | 514 | "; |
| | 515 | if (DBQuery::execute($query . ' DEFAULT CHARSET=utf8') || DBQuery::execute($query)) { |
| | 516 | while($row = DBQuery::queryRow("SELECT * FROM `{$database['prefix']}Users` ORDER BY userid")){ |
| | 517 | DBQuery::execute("INSERT INTO `{$database['prefix']}Teamblog` VALUES('".$row['userid']."', '".$row['userid']."','0','1','1', '".$row['name']."', '', '0', '#000000', '10', '0', '".$row['created']."', '0')"); |
| | 518 | } |
| | 519 | echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; |
| | 520 | } else |
| | 521 | echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; |
| | 522 | } |
| | 523 | |
| | 524 | if (!doesExistTable($database['prefix'] . 'TeamEntryRelations')) { |
| | 525 | $changed = true; |
| | 526 | echo '<li>', _text('팀블로그 연관글 기능을 위한 테이블을 추가합니다.'), ': '; |
| | 527 | $query = " |
| | 528 | CREATE TABLE {$database['prefix']}TeamEntryRelations ( |
| | 529 | owner int(11) NOT NULL default 1, |
| | 530 | id int(11) NOT NULL default 1, |
| | 531 | team int(11) NOT NULL default 1, |
| | 532 | PRIMARY KEY (owner,id,team) |
| | 533 | ) TYPE=MyISAM |
| | 534 | "; |
| | 535 | if (DBQuery::execute($query . ' DEFAULT CHARSET=utf8') || DBQuery::execute($query)) { |
| | 536 | while($row = DBQuery::queryRow("SELECT * FROM `{$database['prefix']}Entries` ORDER BY owner")){ |
| | 537 | DBQuery::execute("INSERT INTO `{$database['prefix']}TeamEntryRelations` VALUES('".$row['owner']."', '".$row['id']."','".$row['owner']."')"); |
| | 538 | } |
| | 539 | echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; |
| | 540 | } else |
| | 541 | echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; |
| | 542 | } |
| | 543 | |