Changeset 3425
- Timestamp:
- 06/10/07 18:09:50 (18 months ago)
- Location:
- trunk
- Files:
-
- 8 modified
-
blog/checkup/index.php (modified) (3 diffs)
-
blog/owner/setting/account/index.php (modified) (1 diff)
-
blog/owner/setting/teamblog/index.php (modified) (4 diffs)
-
components/Textcube.Core.php (modified) (3 diffs)
-
lib/auth.php (modified) (2 diffs)
-
lib/piece/owner/contentMenu.php (modified) (7 diffs)
-
lib/piece/owner/header.php (modified) (1 diff)
-
setup.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/blog/checkup/index.php
r3424 r3425 482 482 teams int(11) NOT NULL default 0, 483 483 userid int(11) NOT NULL default 1, 484 enduser int(11) NOT NULL default 0, 485 admin int(11) NOT NULL default 0, 486 posting int(11) NOT NULL default 0, 484 acl int(11) NOT NULL default 0, 487 485 profile text NULL default '', 488 logo varchar(15) default '',489 font_style int(11) NOT NULL default 0,490 font_color varchar(10) NOT NULL default '#000000',491 font_size int(11) NOT NULL default 10,492 font_bold int(11) NOT NULL default 0,493 486 created int(11) NOT NULL default 0, 494 487 lastLogin int(11) NOT NULL default 0, … … 502 495 if ($users = $query->getAll('userid, name, created')) { 503 496 foreach($users as $user) { 504 DBQuery::execute("INSERT INTO `{$database['prefix']}Teamblog` VALUES('".$user['userid']."', '".$user['userid']."',' 0','1','1', '".$user['name']."', '', '0', '#000000', '10', '0','".$user['created']."', '0')");497 DBQuery::execute("INSERT INTO `{$database['prefix']}Teamblog` VALUES('".$user['userid']."', '".$user['userid']."','9', '".$user['name']."','".$user['created']."', '0')"); 505 498 } 506 499 } … … 558 551 } 559 552 560 if (DBQuery::queryExistence("DESC {$database['prefix']}Teamblog font_color")) {553 if (DBQuery::queryExistence("DESC {$database['prefix']}Teamblog enduser")) { 561 554 $changed = true; 562 555 echo '<li>', _text('팀블로그 테이블의 유저 출력 설정 필드를 삭제합니다.'), ': '; 563 556 if(DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP logo") && 557 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP enduser") && 558 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP admin") && 559 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP posting") && 564 560 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP font_style") && 565 561 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP font_color") && 566 562 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP font_size") && 567 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP font_bold")) 563 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog DROP font_bold") && 564 DBQuery::execute("ALTER TABLE {$database['prefix']}Teamblog ADD acl int(11) not null AFTER userid")) 568 565 echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; 569 566 else -
trunk/blog/owner/setting/account/index.php
r3424 r3425 240 240 241 241 <div id="part-setting-account" class="part"> 242 <h2 class="caption"><span class="main-text"><?php echo _t(' 회원정보를 관리합니다');?></span></h2>242 <h2 class="caption"><span class="main-text"><?php echo _t('팀블로그 구성원 목록');?></span></h2> 243 243 244 244 <div class="data-inbox"> -
trunk/blog/owner/setting/teamblog/index.php
r3424 r3425 28 28 sInString = sInString.replace( /^\s+/g, "" );// strip leading 29 29 return sInString.replace( /\s+$/g, "" );// strip trailing 30 }31 32 function Trim(sInString) {33 sInString = sInString.replace( /^\s+/g, "" );// strip leading34 return sInString.replace( /\s+$/g, "" );// strip trailing35 }36 37 function saveName() {38 try{39 var Astyle = document.getElementById('admin_style');40 var Apos = document.getElementById('stylePos');41 var Ais_style = document.getElementById('is_style');42 43 var Sbold = document.getElementById('font_bold');44 var Sitalic = document.getElementById('font_i');45 var Ssize = document.getElementById('font_size');46 var Scolor = document.getElementById('font_color');47 48 var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/setting/teamblog/nameStyle/");49 request.onSuccess = function() {50 PM.showMessage("<?php echo _t('저장되었습니다.');?>", "center", "bottom");51 }52 request.onError = function() {53 alert("<?php echo _t('저장하지 못했습니다.');?>");54 }55 56 var SendValue;57 SendValue = "&bold=" + encodeURIComponent(Sbold.checked);58 SendValue += "&italic=" + encodeURIComponent(Sitalic.checked);59 SendValue += "&size=" + encodeURIComponent(Ssize.value);60 SendValue += "&color=" + encodeURIComponent(Scolor.value);61 62 if(Astyle){63 SendValue += "&style=" + encodeURIComponent(Astyle.checked);64 }65 if(Apos){66 SendValue += "&pos=" + encodeURIComponent(Apos.value);67 }68 if(Ais_style){69 SendValue += "&is_style=" + encodeURIComponent(Ais_style.checked);70 }71 72 request.send(SendValue);73 }catch(e){74 }75 30 } 76 31 … … 298 253 if(mycheck == 0) alert("선택된 사용자가 없습니다."); 299 254 } 300 <?php 301 }?> //]]> 255 256 function buttonchange(){ 257 if( document.getElementById('target-role').value == 'delete'){ 258 document.getElementById('apply-button').value = '<?php echo _t('탈퇴');?>'; 259 } else { 260 document.getElementById('apply-button').value = '<?php echo _t('적용');?>'; 261 } 262 } 263 <?php 264 } 265 ?> 266 //]]> 302 267 </script> 303 268 304 269 <div id="part-setting-account" class="part"> 270 <h2 class="caption"><span class="main-text"><?php echo _t('팀블로그를 관리합니다');?></span></h2> 271 <div id="list-section" class="section"> 272 <table cellspacing="0" cellpadding="0"> 273 <thead> 274 <tr> 275 <th class="status"><input type="checkbox" name="Aclick" onclick="Check_rev()"></th> 276 <th class="acl"><span class="text"><?php echo _t('권한 ');?></span></th> 277 <th class="name"><span class="text"><?php echo _t('이름 ');?></span></th> 278 <th class="blog"><span class="text"><?php echo _t('대표 블로그');?></span></th> 279 <th class="email"><span class="text"><?php echo _t('이메일');?></span></th> 280 <th class="date"><span class="text"><?php echo _t('가입일');?></span></th> 281 <th class="date"><span class="text"><?php echo _t('작성한 글 수');?></span></th> 282 <th class="cancel"><span class="text"><?php echo _t('초대취소');?></span></th> 283 </tr> 284 </thead> 285 <tbody> 305 286 <?php 306 287 $teamblog_owner = DBQuery::queryRow("SELECT * FROM {$database['prefix']}Teamblog … … 308 289 AND teams='".$owner."'"); 309 290 $teamblog_user = DBQuery::queryRow("SELECT a.*, b.name 310 FROM {$database['prefix']}Teamblog a, {$database['prefix']}Users b 291 FROM {$database['prefix']}Teamblog a, 292 {$database['prefix']}Users b 311 293 WHERE a.userid = '".$_SESSION['admin']."' 312 294 AND a.teams = '".$_SESSION['userid']."' 313 295 AND b.userid = a.userid"); 314 $invited_user = DBQuery::queryAll("SELECT a.*, b.* 315 FROM {$database['prefix']}Teamblog a, 316 {$database['prefix']}Users b 317 WHERE teams = '$owner' 318 AND b.userid = a.userid 319 AND a.userid != '$owner' 320 ORDER BY b.created DESC"); 321 ?> 322 <div id="part-setting-account" class="part"> 323 <h2 class="caption"><span class="main-text"><?php echo _t('팀블로그를 관리합니다');?></span></h2> 324 <div id="list-section" class="section"> 325 <dl> 326 <dt class="title"><span class="label"><?php echo _t('팀원 명단');?></span></dt> 327 <dd> 328 <table cellspacing="0" cellpadding="0"> 329 <thead> 330 <tr> 331 <th class="status"><input type="checkbox" name="Aclick" onclick="Check_rev()"></th> 332 <th class="email"><span class="text"><?php echo _t('이름 (e-mail)');?></span></th> 333 <th class="date"><span class="text"><?php echo _t('초대일');?></span></th> 334 <th class="status"><span class="text"><?php echo _t('경과');?></span></th> 335 <th class="password"><span class="text"><?php echo _t('비밀번호');?> / <?php echo _t('권한 관리');?></span></th> 336 <th class="cancel"><span class="text"><?php echo _t('초대취소');?></span></th> 337 </tr> 338 </thead> 339 <tbody> 340 <?php 296 $invited_user = DBQuery::queryAll("SELECT t.*, u.* 297 FROM {$database['prefix']}Teamblog t, 298 {$database['prefix']}Users u 299 WHERE t.teams = '$owner' 300 AND u.userid = t.userid 301 AND t.userid != '$owner' 302 ORDER BY u.created DESC"); 303 341 304 $count=0; 305 342 306 if(isset($invited_user)) { 343 307 foreach($invited_user as $value) { 344 $className= ($count%2)==1?'even-line':'odd-line';345 $className.=($count==sizeof($invited_user)-1) ?' last-line':'';308 $className= ($count%2)==1 ? 'even-line' : 'odd-line'; 309 $className.=($count==sizeof($invited_user)-1) ? ' last-line':''; 346 310 ?> 347 311 <tr class="<?php echo $className;?> inactive-class"> 348 312 <td class="status"><input type="checkbox" id="check_<?php echo $count; ?>"><input type="hidden" name="chh<?php echo $count; ?>" value="<?php echo $value['userid']; ?>"><input type="hidden" name="cht<?php echo $count; ?>" value="<?php if($value['last'] == '0' && $value['lastLogin'] =='0') echo "0"; else echo "1"; ?>"></td> 349 <td class="email"><?php echo htmlspecialchars($value['name']);?>(<?php echo htmlspecialchars($value['loginid']);?>)</td> 350 <td class="date"><?php echo Timestamp::format5($value['create']);?></td> 313 <td class="acl">test</td> 314 <td class="name"><?php echo $value['name'];?></td> 315 <td class="blog">test</td> 316 <td class="email"><?php echo htmlspecialchars($value['loginid']);?></td> 317 <td class="date"><?php echo Timestamp::format5($value['created']);?></td> 318 <td class="posting"><?php echo $value['posting'];?></td> 351 319 <?php 352 320 if($value['lastLogin'] == 0) { 353 ?> 354 <td class="status"><?php echo _f('%1 전',timeInterval($value['created'],time()));?></td> 355 <td class="password"><?php echo DBQuery::queryCell("SELECT password FROM {$database['prefix']}Users WHERE userid = {$value['userid']} AND host = $owner AND lastLogin = 0");?></td> 356 <?php if($value['lastLogin'] == 0){ ?><td class="cancel"><a class="cancel-button button" href="#void" onclick="cancelInvite(<?php echo $value['userid'];?>);return false;" title="<?php echo _t('초대에 응하지 않은 사용자의 계정을 삭제합니다.');?>"><span class="text"><?php echo _t('초대취소');?></span></a></td> 357 <?php } else{ ?><td class="cancel"><a class="cancel-button button" href="#void" onclick="deleteUser(<?php echo $value['userid'];?>,0);return false;" title="<?php echo _t('초대에 응하지 않은 사용자의 계정을 삭제합니다.');?>"><span class="text"><?php echo _t('초대 취소');?></span></a></td> 358 <?php } ?> 359 <?php 321 if($value['lastLogin'] == 0) { 322 ?> 323 <td class="cancel"><a class="cancel-button button" href="#void" onclick="cancelInvite(<?php echo $value['userid'];?>);return false;" title="<?php echo _t('초대에 응하지 않은 사용자의 계정을 삭제합니다.');?>"><span class="text"><?php echo _t('초대취소');?></span></a></td> 324 <?php 325 } else { 326 ?> 327 <td class="cancel"><a class="cancel-button button" href="#void" onclick="deleteUser(<?php echo $value['userid'];?>,0);return false;" title="<?php echo _t('초대에 응하지 않은 사용자의 계정을 삭제합니다.');?>"><span class="text"><?php echo _t('초대 취소');?></span></a></td> 328 <?php 329 } 360 330 } else { 361 331 $pblog = $value['enduser'] - $value['userid']; … … 397 367 ?> 398 368 </tbody> 399 <?php400 if($count) {401 ?>402 <tr>403 <td colspan="6"><input type="button" value="<?php echo _t('선택된 사용자 삭제');?>" onclick="deleteSelectedUsers(<?php echo $count;?>)";></td>404 </tr>405 <?php406 }407 ?>408 369 </table> 409 </dd> 410 </dl> 370 </div> 371 372 <div id="role-action" class="part" > 373 <span class="text" >선택한 구성원을 </span> 374 <select name="t-role" id="target-role" onchange="buttonchange();" > 375 <option value=''>행동을 지정합니다</option> 376 <optgroup label="다음 권한으로 변경합니다"> 377 <option value='manager'>관리자</option> 378 <option value='editor'>편집자</option> 379 <option value='writer'>필자</option> 380 </optgroup> 381 <optgroup label="탈퇴 처리 합니다"> 382 <option value='delete'>탈퇴</option> 383 </optgroup> 384 </select> 385 <input type="submit" id="apply-button" class="apply-button input-button" value="적용" /> 411 386 </div> 412 387 </div> 388 389 390 391 392 413 393 <?php 414 394 if($owner == $_SESSION['admin'] && empty($enduser)) { -
trunk/components/Textcube.Core.php
r3416 r3425 51 51 /* Access Control Object: i.e. uri, components, functions */ 52 52 class Aco { 53 var $predefi end;53 var $predefined; 54 54 55 55 function Aco( $predefined = null ) { … … 74 74 } 75 75 76 /* Ad ujsting access controll object from plugins */76 /* Adjusting access control object from plugins */ 77 77 $aco = Aco::adjust($aco, $aco_action); 78 78 79 /* Ad ujsting required object from plugins by aco*/79 /* Adjusting required object from plugins by aco*/ 80 80 $aro = Aro::adjust($aco, $aco_action); 81 81 … … 166 166 WHERE teams='$owner' AND userid='$owner' " ); 167 167 168 $is_style = $res['font_style'] & 1;169 $is_admin = $res['font_style'] & 2;170 $font_style = $res['font_style'] & 4;171 $isname = $res['font_style'] & 8;172 $is_ch = $res['font_style'] & 16;173 168 $name = array(4); 174 169 $name[0] = ''; -
trunk/lib/auth.php
r3416 r3425 40 40 41 41 // 팀블로그 :: 로그인 성공시 로그인한 시간을 DB 에 기록한다. 42 DBQuery::execute("UPDATE {$database['prefix']}Teamblog SET last = unix_timestamp() WHERE teams='$owner' AND userid=' $session[userid]'");42 DBQuery::execute("UPDATE {$database['prefix']}Teamblog SET last = unix_timestamp() WHERE teams='$owner' AND userid='".$session['userid']); 43 43 // End TeamBlog 44 44 … … 120 120 121 121 // 팀블로그 :: 팀원 확인 122 $result=DBQuery::query("select a.userid from {$database['prefix']}Users a, {$database['prefix']}Teamblog b where b.teams = $userid and a.loginid = '$loginid' and b.userid=a.userid"); 122 $result=DBQuery::query("select a.userid 123 from {$database['prefix']}Users a, 124 {$database['prefix']}Teamblog b 125 where b.teams = $userid 126 and a.loginid = '$loginid' 127 and b.userid=a.userid"); 123 128 // End TeamBlog 124 129 -
trunk/lib/piece/owner/contentMenu.php
r3372 r3425 3 3 switch($blogMenu['topMenu']) { 4 4 case 'center': 5 if( !empty($ac)){5 if(Acl::Check('group.administrators')){ 6 6 $blogContentMenuItem = array( 7 7 array('menu'=>'dashboard','title'=>_t('조각보'),'link'=>'/owner/center/dashboard'), … … 20 20 break; 21 21 case 'entry': 22 if( !empty($pc)){22 if(Acl::Check('group.blogwriters')){ 23 23 $blogContentMenuItem = array( 24 24 array('menu'=>'post','title'=>_t('글쓰기'),'link'=>'/owner/entry/post'), … … 30 30 array('menu'=>'trash','title'=>_t('휴지통'),'link'=>'/owner/entry/trash') 31 31 ); 32 } 33 else{ 32 } else { 34 33 $blogContentMenuItem = array( 35 34 array('menu'=>'post','title'=>_t('글쓰기'),'link'=>'/owner/entry/post'), … … 39 38 break; 40 39 case 'link': 41 if( !empty($ac)){40 if(Acl::Check('group.administrators')){ 42 41 $blogContentMenuItem = array( 43 42 array('menu'=>'add','title'=>_t('링크 추가'),'link'=>'/owner/link/add'), … … 47 46 break; 48 47 case 'skin': 49 if( !empty($ac)){48 if(Acl::Check('group.administrators')){ 50 49 $blogContentMenuItem = array( 51 50 array('menu'=>'skin','title'=>_t('스킨 선택'),'link'=>'/owner/skin'), … … 57 56 break; 58 57 case 'plugin': 59 if( !empty($ac)){58 if(Acl::Check('group.administrators')){ 60 59 $blogContentMenuItem = array( 61 60 array('menu'=>'plugin','title'=>_t('플러그인 목록'),'link'=>'/owner/plugin'), … … 66 65 case 'setting': 67 66 case 'data': 68 if(!empty($ac)){ 67 if($service['type']=='single'){ 68 $blogContentMenuItem = array( 69 array('menu'=>'blog','title'=>_t('블로그'),'link'=>'/owner/setting/blog'), 70 array('menu'=>'entry','title'=>_t('글 작성'),'link'=>'/owner/setting/entry'), 71 array('menu'=>'account','title'=>_t('계정 정보'),'link'=>'/owner/setting/account'), 72 array('menu'=>'filter','title'=>_t('스팸 필터'),'link'=>'/owner/setting/filter'), 73 array('menu'=>'data','title'=>_t('데이터 관리'),'link'=>'/owner/data') 74 ); 75 } else if(Acl::Check('group.administrators')){ 69 76 $blogContentMenuItem = array( 70 77 array('menu'=>'blog','title'=>_t('블로그'),'link'=>'/owner/setting/blog'), -
trunk/lib/piece/owner/header.php
r3355 r3425 14 14 } 15 15 16 if( !empty($ac)){16 if(Acl::Check('group.administrators')){ 17 17 $blogTopMenuItem = array( 18 18 array('menu'=>'center','title'=>_t('센터'),'link'=>'/owner/center/dashboard'), -
trunk/setup.php
r3406 r3425 1345 1345 teams int(11) NOT NULL default 0, 1346 1346 userid int(11) NOT NULL default 1, 1347 enduser int(11) NOT NULL default 0, 1348 admin int(11) NOT NULL default 0, 1349 posting int(11) NOT NULL default 0, 1350 profile text NULL default '', 1351 logo varchar(15) default '', 1352 font_style int(11) NOT NULL default 0, 1353 font_color varchar(10) NOT NULL default '#000000', 1354 font_size int(11) NOT NULL default 10, 1355 font_bold int(11) NOT NULL default 0, 1347 acl int(11) NOT NULL default 0, 1356 1348 created int(11) NOT NULL default 0, 1357 1349 lastLogin int(11) NOT NULL default 0, … … 1367 1359 INSERT INTO {$_POST['dbPrefix']}Users VALUES (1, '$loginid', '$password', '$name', UNIX_TIMESTAMP(), 0, 0); 1368 1360 INSERT INTO {$_POST['dbPrefix']}UserSettings VALUES (1, 'defaultEditor', 'modern'), (1, 'defaultFormatter', 'ttml'); 1369 INSERT INTO {$_POST['dbPrefix']}Teamblog VALUES (1, 1, 1, 1, 1, '', '', 0, '#000000', 10, 0, UNIX_TIMESTAMP(), 0);1361 INSERT INTO {$_POST['dbPrefix']}Teamblog VALUES (1, 1, 9, UNIX_TIMESTAMP(), 0); 1370 1362 INSERT INTO {$_POST['dbPrefix']}ServiceSettings (name, value) VALUES ('newlineStyle', '1.1'); 1371 1363 INSERT INTO {$_POST['dbPrefix']}BlogSettings (owner, name, language, blogLanguage, timezone) VALUES (1, '$blog', '$baseLanguage', '$baseLanguage', '$baseTimezone');
