Show
Ignore:
Timestamp:
06/10/07 18:09:50 (19 months ago)
Author:
inureyes
Message:

#408

  • 헤더 메뉴에 acl 도입
  • 팀블로그 메뉴를 acl 기반으로 새로 짤 준비 및 테스트.
  • acl component 관련 변수명 오타들 수정
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/blog/owner/setting/teamblog/index.php

    r3424 r3425  
    2828                                    sInString = sInString.replace( /^\s+/g, "" );// strip leading 
    2929                                    return sInString.replace( /\s+$/g, "" );// strip trailing 
    30                                 } 
    31                                  
    32                                 function Trim(sInString) { 
    33                                     sInString = sInString.replace( /^\s+/g, "" );// strip leading 
    34                                     return sInString.replace( /\s+$/g, "" );// strip trailing 
    35                                 } 
    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                                     } 
    7530                                } 
    7631 
     
    298253                                    if(mycheck == 0) alert("선택된 사용자가 없습니다."); 
    299254                                } 
    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                        //]]> 
    302267                        </script> 
    303268 
    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> 
    305286<?php 
    306287    $teamblog_owner = DBQuery::queryRow("SELECT * FROM {$database['prefix']}Teamblog  
     
    308289                AND teams='".$owner."'"); 
    309290    $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   
    311293            WHERE a.userid = '".$_SESSION['admin']."'  
    312294                AND a.teams = '".$_SESSION['userid']."'  
    313295                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 
    341304    $count=0; 
     305 
    342306    if(isset($invited_user)) { 
    343307        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':''; 
    346310?> 
    347311                                                <tr class="<?php echo $className;?> inactive-class"> 
    348312                                                    <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> 
    351319<?php 
    352320            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                }  
    360330            } else { 
    361331                $pblog = $value['enduser'] - $value['userid']; 
     
    397367?> 
    398368                                            </tbody> 
    399 <?php  
    400     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 <?php 
    406     } 
    407 ?> 
    408369                                        </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="적용"  /> 
    411386                            </div> 
    412387                        </div> 
     388 
     389                         
     390                         
     391                         
     392                         
    413393<?php 
    414394if($owner == $_SESSION['admin'] && empty($enduser)) {