Show
Ignore:
Timestamp:
05/21/07 01:56:13 (20 months ago)
Author:
inureyes
Message:

#408

  • 팀블로그 소스 이식
  • 차칸아이님 소스 기반으로 태터툴즈 코드 일관성 유지를 위하여 전체적으로 수정하였음.
    • 아직 멀었다.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • sandbox/blog/checkup/index.php

    r3108 r3299  
    492492} 
    493493 
     494if (!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 
     524if (!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 
    494544$filename = ROOT . '/.htaccess'; 
    495545$fp = fopen($filename, "r");