Changeset 4808

Show
Ignore:
Timestamp:
12/21/07 02:14:00 (11 months ago)
Author:
gofeel
Message:

#703

  • ctlTable Class 도입
Location:
trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/blog/owner/control/action/blog/index/index.php

    r4799 r4808  
    55 
    66define('ROOT', '../../../../../..'); 
     7require ROOT . '/lib/includeForBlogOwner.php'; 
    78 
    89global $blogid, $database; 
    910$page=(isset($_GET['page']) && $_GET['page'] >= 1 ? $_GET['page'] : 1 ); 
     11$row=(isset($_GET['rows']) && $_GET['rows'] >= 1 ? $_GET['rows'] : 25 ); 
    1012 
    11 $bloglist = POD::queryColumn("SELECT blogid,name FROM `{$database['prefix']}BlogSettings` WHERE name = 'name' ORDER BY blogid ASC LIMIT " . ($page-1)*25 . " ,25"); 
     13$bloglist = POD::queryColumn("SELECT blogid,name FROM `{$database['prefix']}BlogSettings` WHERE name = 'name' ORDER BY blogid ASC LIMIT " . ($page-1)*$row . " ,$row"); 
    1214$blogcount = POD::queryCount("SELECT blogid,name FROM `{$database['prefix']}BlogSettings` WHERE name = 'name'"); 
    1315 
    14 $pages = (int)(($blogcount-0.5) / 25)+1; 
     16$pages = (int)(($blogcount-0.5) / $row)+1; 
    1517if ($pages<$page) { 
    1618    printRespond(array('error' => -2,'result' => $pages)); 
     
    3638        $tempString.=$bsetting['name'].","; 
    3739        $tempString.=$bsetting['title'].","; 
    38         $tempString.=User::getName($bsetting['owner']).","; 
    39         $tempString.=User::getEmail($bsetting['owner'])."*"; 
     40        $tempString.=User::getName($bsetting['owner'])."(".User::getEmail($bsetting['owner']).")*"; 
    4041    } 
    4142    if($tempString!=''){ 
    42         $resultString .= $tempString; 
     43        $resultString .= substr($tempString,0,-1); 
    4344        printRespond(array('error' => 0, 'result' => $resultString)); 
    4445    } 
  • trunk/blog/owner/control/action/user/index/index.php

    r4799 r4808  
    55 
    66define('ROOT', '../../../../../..'); 
    7 require ROOT . '/lib/includeForBlog.php'; 
     7require ROOT . '/lib/includeForBlogOwner.php'; 
    88 
    99global $database; 
     
    3333        $tempString.=$row['loginid'].","; 
    3434        $tempString.=$row['name'].","; 
    35         $tempString.=date("Y/m/d H:i:s T",$row['lastLogin'])."*"; 
     35        $tempString.=($row['lastLogin']?date("Y/m/d H:i:s T",$row['lastLogin']):"")."*"; 
    3636        } 
    3737    if($tempString!=''){ 
    38         $resultString.=$tempString; 
     38        $resultString.=substr($tempString,0,-1); 
    3939        printRespond(array('error' => 0, 'result' => $resultString)); 
    4040    } 
  • trunk/blog/owner/control/blog/index.php

    r4752 r4808  
    2424 
    2525var page = <?php echo $page;?>; 
     26function ctlRefresh() { 
     27    ctlTableObj.refreshTable(); 
     28} 
    2629 
    2730function deleteBlog(bid) { 
     
    3033    request.onSuccess = function() { 
    3134        PM.showMessage(_t('선택된 블로그가 삭제되었습니다.'), "center", "top"); 
    32         showBlogList(page); 
     35        ctlTableObj.refreshTable(); 
     36    //  showBlogList(page); 
    3337    } 
    3438    request.onError = function() { 
     
    4549<input type=submit value="<?php echo _t("새 블로그 생성");?>" onclick="sendBlogAddInfo(ctlUserSuggestObj.getValue(),document.getElementById('bi-identify').value);return false;"> 
    4650</form> 
     51</div> 
     52 
     53<h2 class="caption"><span class="main-text">Blog List</span></h2> 
     54<div id=container-blog-list class='part'></div> 
     55<?php  
     56require ROOT . '/lib/piece/owner/footer.php'; 
     57?> 
    4758<script type="text/javascript"> 
    4859//<![CDATA[ 
     
    5465        document.getElementById("sgtOwner").innerHTML = '<input type="text" class="bi-owner-loginid" name="location" value="" />'; 
    5566    } 
     67    var ctlTableObj = new ctlBlog('container-blog-list'); 
     68    ctlTableObj.setPage(page); 
     69    ctlTableObj.showTable(); 
    5670//]]> 
    5771</script>  
    58 </div> 
    59  
    60 <h2 class="caption"><span class="main-text">Blog List</span></h2> 
    61 <div id=container-blog-list class='part'></div> 
    62 <script type="text/javascript"> // <![CDATA[ 
    63 showBlogList(page); 
    64 // ]]> </script> 
    65 <?php  
    66 require ROOT . '/lib/piece/owner/footer.php'; 
    67 ?> 
  • trunk/blog/owner/control/user/index.php

    r4752 r4808  
    2121<script type="text/javascript"> // <![CDATA[ 
    2222    var page = <?php echo $page;?>; 
    23     function showUserList(page) { 
    24         var request = new HTTPRequest(blogURL + "/owner/control/action/user/index/?page="+page); 
    25         request.onVerify = function () { 
    26             document.getElementById("container-user-list").innerHTML=''; 
    27             var resultResponse = this.getText("/response/result"); 
    28             var resultRow = resultResponse.split('*'); 
    29             if (resultRow.length == 1) 
    30             tempTable = ''; 
    31             else { 
    32                 field = resultRow[0]; 
    33                 tempInfo = document.createElement("div"); 
    34                 tempInfo.id = "page-navigation"; 
    35                 tempSpan = document.createElement("span"); 
    36                 tempSpan.id = "page-list"; 
    37                 tempSpan.innerHTML = field; 
    38                 tempInfo.appendChild(tempSpan); 
    39                 field = resultRow[1]; 
    40                 tempSpan = document.createElement("span"); 
    41                 tempSpan.id = "total-count"; 
    42                 tempSpan.innerHTML = "총 " + field + "명의 사용자"; 
    43                 tempInfo.appendChild(tempSpan); 
    44  
    45                 tempSpan.id = "total-count"; 
    46                 tempTable = ''; 
    47                 tempTable = document.createElement("TABLE"); 
    48                 tempThead = document.createElement("THEAD"); 
    49                 Tbody_container = document.createElement("TBODY"); 
    50                  
    51                 tempTable.id = "table-user-list"; 
    52                 tempTable.className = "data-inbox"; 
    53                 tempTable.setAttribute("cellpadding", 0); 
    54                 tempTable.setAttribute("cellspacing", 0);                    
    55  
    56                 Tr_container = document.createElement("TR"); 
    57                 tempTh_0 = document.createElement("TH"); 
    58                 tempTh_1 = document.createElement("TH"); 
    59                 tempTh_2 = document.createElement("TH"); 
    60                 tempTh_3 = document.createElement("TH"); 
    61                 tempTh_4 = document.createElement("TH"); 
    62                 tempTh_5 = document.createElement("TH"); 
    63                  
    64                 tempCheckBox = document.createElement("input"); 
    65                 tempCheckBox.type = "checkbox"; 
    66                 tempCheckBox.onclick = function() { selectCheckBoxAll("table-user-list",this.checked); }; 
    67                 tempTh_0.appendChild(tempCheckBox); 
    68                 tempTh_1.innerHTML = "<?php echo _t('ID');?>"; 
    69                 tempTh_2.innerHTML = "<?php echo _t('E-mail');?>";   
    70                 tempTh_3.innerHTML = "<?php echo _t('이름');?>"; 
    71                 tempTh_4.innerHTML = "<?php echo _t('마지막 접속 시간');?>"; 
    72                 tempTh_5.innerHTML = "<?php echo _t('Actions');?>"; 
    73                  
    74                 Tr_container.appendChild(tempTh_0); 
    75                 Tr_container.appendChild(tempTh_1); 
    76                 Tr_container.appendChild(tempTh_2); 
    77                 Tr_container.appendChild(tempTh_3); 
    78                 Tr_container.appendChild(tempTh_4); 
    79                 Tr_container.appendChild(tempTh_5); 
    80                 tempThead.appendChild(Tr_container); 
    81                 tempTable.appendChild(tempThead); 
    82  
    83                 for (var i=2; i<resultRow.length-1 ; i++) { 
    84  
    85                     field = resultRow[i].split(','); 
    86  
    87                     Tr_container = document.createElement("TR"); 
    88                     Td_checkbox = document.createElement("TD"); 
    89                     Td_id = document.createElement("TD"); 
    90                     Td_loginid = document.createElement("TD"); 
    91                     Td_name = document.createElement("TD"); 
    92                     Td_date = document.createElement("TD"); 
    93                     Td_action = document.createElement("TD"); 
    94                      
    95                     Tr_container.id = "HostList_" + field[0]; 
    96                      
    97                     Td_id.innerHTML = field[0]; 
    98                     Td_name.innerHTML = field[2]; 
    99                     Td_date.innerHTML = field[3]; 
    100                     Td_action.className = "action"; 
    101  
    102                     tempCheckBox = document.createElement("input"); 
    103                     tempCheckBox.id = Tr_container.id+"_check"; 
    104                     tempCheckBox.type = "checkbox"; 
    105                     Td_checkbox.appendChild(tempCheckBox); 
    106                      
    107                     tempLink = document.createElement("A"); 
    108                     tempLink.setAttribute("href",blogURL + "/owner/control/user/" + field[0]); 
    109                     tempLink.innerHTML = field[1]; 
    110                     Td_loginid.appendChild(tempLink); 
    111                      
    112                     tempLink = document.createElement("A"); 
    113                     tempLink.className = "remove-button button"; 
    114                     tempLink.id = "rb_" + field[0]; 
    115                     tempLink.setAttribute("href", "#void"); 
    116                     tempLink.onclick = function() { deleteUser(this.id.substr(3)); return false; }; 
    117                     tempLink.setAttribute("title", "<?php echo _t('이 블로그를 삭제합니다.');?>"); 
    118  
    119                     tempSpan = document.createElement("SPAN"); 
    120                     tempSpan.className = "text"; 
    121                     tempSpan.innerHTML = "<?php echo _t('삭제');?>"; 
    122                      
    123                     tempLink.appendChild(tempSpan); 
    124                     Td_action.appendChild(tempLink);                 
    125                      
    126                     Tr_container.appendChild(Td_checkbox); 
    127                     Tr_container.appendChild(Td_id); 
    128                     Tr_container.appendChild(Td_loginid); 
    129                     Tr_container.appendChild(Td_name); 
    130                     Tr_container.appendChild(Td_date); 
    131                     Tr_container.appendChild(Td_action); 
    132                     Tbody_container.appendChild(Tr_container); 
    133                     } 
    134                     tempTable.appendChild(Tbody_container); 
    135                 } 
    136             if (tempTable != '' ) { 
    137                 document.getElementById("container-user-list").appendChild(tempTable); 
    138                 document.getElementById("container-user-list").appendChild(tempInfo); 
    139             } 
    140             return true; 
    141         } 
    142         request.send(); 
    143     } 
    14423// ]]> </script> 
    14524<?php 
     
    15938</div> <!--userlist--> 
    16039<script type="text/javascript"> // <![CDATA[ 
    161 showUserList(page); 
     40    var ctlTableObj = new ctlUser('container-user-list'); 
     41    ctlTableObj.setPage(page); 
     42    ctlTableObj.showTable(); 
    16243// ]]> </script> 
    16344 
  • trunk/blog/owner/control/user/item.php

    r4799 r4808  
    2525                                </p> 
    2626                                <div id="copyright"> 
     27                                    <?php if(POD::queryExistence("SELECT * FROM `{$database['prefix']}UserSettings` WHERE name ='AuthToken' AND userid = " . $userid)) {echo _t("임시 암호가 설정되어 있습니다.") . '<br/>';}?> 
    2728                                    <?php echo _f('이 계정은 %1에 생성되었습니다.', date("D M j G:i:s T Y",$usersetting['created']));?><br/> 
    2829                                </div> 
  • trunk/script/control.js

    r4723 r4808  
    349349// 여기까지 Suggestion용 Function 
    350350 
    351 function showBlogList(page) { 
    352     var request = new HTTPRequest(blogURL + "/owner/control/action/blog/index/?page="+page); 
     351function sendUserAddInfo(name,email) { 
     352    var request = new HTTPRequest(blogURL + "/owner/control/action/user/add/?name=" + name + "&email=" + email); 
     353    request.onSuccess = function() { 
     354        PM.showMessage(_t('새로운 사용자가 추가되었습니다.'), "center", "top"); 
     355        ctlRefresh(); 
     356    } 
     357    request.onError = function() { 
     358        msg = this.getText("/response/result"); 
     359        alert(_t('사용자를 추가하지 못했습니다.') + "Error : \r\n" + msg); 
     360    } 
     361    request.send(); 
     362} 
     363 
     364function sendBlogAddInfo(owner,identify) { 
     365    var request = new HTTPRequest(blogURL + "/owner/control/action/blog/add/?owner="+owner+"&identify="+identify); 
     366    request.onSuccess = function() { 
     367        PM.showMessage(_t('새로운 블로그가 추가되었습니다.'), "center", "top"); 
     368        ctlRefresh(); 
     369    } 
     370    request.onError = function() { 
     371        msg = this.getText("/response/result"); 
     372        alert(_t('블로그를 추가하지 못했습니다.') + "Error : \r\n" + msg); 
     373    } 
     374    request.send(); 
     375} 
     376 
     377//From prototype.js 
     378function ctlExtend(destination,source) { 
     379 
     380    for(var property in source.prototype) { 
     381        destination.prototype[property] = source.prototype[property]; 
     382    } 
     383    return destination; 
     384} 
     385 
     386function ctlTable(containername) 
     387{ 
     388    this.init(); 
     389     
     390    this.name = "Textcube Control Panel Blog Table Object"; 
     391    this.copyright = "Tatter Network Foundation"; 
     392     
     393    this.container = document.getElementById(containername);     
     394} 
     395 
     396ctlTable.prototype.init = function() { 
     397    this.instance = this; 
     398    this.enablecheckbox = true; 
     399    this.enableaction = true; 
     400    this.enableinfo = true; 
     401 
     402    this.table = document.createElement("TABLE");        
     403    this.rows = 20; 
     404     
     405    this.url=""; 
     406    this.colitem = new Array(); 
     407    this.collink = new Array();  
     408     
     409} 
     410 
     411ctlTable.prototype.setsource = function(url,page,rows) { 
     412    this.url = url; 
     413} 
     414 
     415ctlTable.prototype.setColumns = function(columns) { 
     416    this.columns = columns.length; 
     417    this.colitem = columns; 
     418} 
     419 
     420ctlTable.prototype.refreshTable = function() 
     421{ 
     422    this.showTable(); 
     423} 
     424ctlTable.prototype.showTable = function() 
     425{ 
     426    this.requesturl = blogURL + this.url + "?page="+this.page+"&rows="+this.rows; 
     427    var request = new HTTPRequest(this.requesturl); 
     428    request.instance=this.instance; 
    353429    request.onSuccess = function () { 
    354         document.getElementById("container-blog-list").innerHTML=''; 
    355         var resultResponse = this.getText("/response/result"); 
    356         var resultRow = resultResponse.split('*'); 
     430        var Line_id,resultResponse,resultRow; 
     431        var instance=this.instance; 
     432         
     433        resultResponse = this.getText("/response/result"); 
     434        resultRow = instance.resultRow = resultResponse.split('*'); 
     435        instance.container.innerHTML=''; 
     436        instance.table.innerHTML = ''; 
     437         
    357438        if (resultRow.length == 1) 
    358         tempTable = ''; 
     439            instance.table = ''; 
    359440        else { 
    360             field = resultRow[0]; 
    361             tempInfo = document.createElement("div"); 
    362             tempInfo.id = "page-navigation"; 
    363             tempSpan = document.createElement("span"); 
    364             tempSpan.id = "page-list"; 
    365             tempSpan.innerHTML = field; 
    366             tempInfo.appendChild(tempSpan); 
    367             field = resultRow[1]; 
    368             tempSpan = document.createElement("span"); 
    369             tempSpan.id = "total-count"; 
    370             tempSpan.innerHTML = "총 " + field + "개의 블로그"; 
    371             tempInfo.appendChild(tempSpan); 
     441            if(instance.enableinfo) { 
     442                tempInfo = instance.printInfo(); 
     443            } 
     444            var containerThead, containerTr, tempTh, tempCheckBox,containerTbody; 
     445 
     446            containerThead = document.createElement("THEAD"); 
     447            containerTr = document.createElement("TR"); 
     448 
     449            if(instance.enablecheckbox) { 
     450                tempTh = document.createElement("TH"); 
     451                tempCheckBox = document.createElement("input"); 
     452                tempCheckBox.type = "checkbox"; 
     453                tempCheckBox.onclick = function() { instance.selectCheckBoxAll(this.checked); }; 
     454                tempTh.appendChild(tempCheckBox); 
     455                containerTr.appendChild(tempTh); 
     456            } 
     457            for(var i=0;i<instance.columns;i++) { 
     458                tempTh = document.createElement("TH"); 
     459                tempTh.innerHTML = instance.colitem[i]; 
     460                containerTr.appendChild(tempTh); 
     461            } 
     462            tempTh = document.createElement("TH"); 
     463            tempTh.innerHTML = _t('Actions'); 
     464            containerTr.appendChild(tempTh); 
    372465             
    373             tempTable = document.createElement("TABLE"); 
    374             tempThead = document.createElement("THEAD"); 
    375             Tbody_container = document.createElement("TBODY"); 
    376              
    377             tempTable.id = "table-blog-list"; 
    378             tempTable.className = "data-inbox"; 
    379             tempTable.setAttribute("cellpadding", 0); 
    380             tempTable.setAttribute("cellspacing", 0);                    
    381  
    382             Tr_container = document.createElement("TR"); 
    383             tempTh_0 = document.createElement("TH"); 
    384             tempTh_1 = document.createElement("TH"); 
    385             tempTh_2 = document.createElement("TH"); 
    386             tempTh_3 = document.createElement("TH"); 
    387             tempTh_4 = document.createElement("TH"); 
    388             tempTh_5 = document.createElement("TH"); 
    389              
    390             tempCheckBox = document.createElement("input"); 
    391             tempCheckBox.type = "checkbox"; 
    392             tempCheckBox.onclick = function() { selectCheckBoxAll("table-blog-list",this.checked); }; 
    393             tempTh_0.appendChild(tempCheckBox); 
    394             tempTh_1.innerHTML = _t('블로그 ID'); 
    395             tempTh_2.innerHTML = _t('블로그 구분자');  
    396             tempTh_3.innerHTML = _t('블로그 제목'); 
    397             tempTh_4.innerHTML = _t('블로그 소유자'); 
    398             tempTh_5.innerHTML = _t('Actions'); 
    399              
    400             Tr_container.appendChild(tempTh_0); 
    401             Tr_container.appendChild(tempTh_1); 
    402             Tr_container.appendChild(tempTh_2); 
    403             Tr_container.appendChild(tempTh_3); 
    404             Tr_container.appendChild(tempTh_4); 
    405             Tr_container.appendChild(tempTh_5);                  
    406             tempThead.appendChild(Tr_container); 
    407             tempTable.appendChild(tempThead); 
    408             for (var i=2; i<resultRow.length-1 ; i++) { 
    409  
    410                 field = resultRow[i].split(','); 
    411                 Tr_container = document.createElement("TR"); 
    412                 Tr_container.id = tempTable.id + "_" + field[0]; 
    413                 Td_id = document.createElement("TD"); 
    414                 Td_identity = document.createElement("TD"); 
    415                 Td_title = document.createElement("TD"); 
    416                 Td_owner = document.createElement("TD"); 
    417                 Td_action = document.createElement("TD"); 
    418                 Td_checkbox = document.createElement("TD"); 
    419                  
    420                  
    421                 tempCheckBox = document.createElement("input"); 
    422                 tempCheckBox.id = Tr_container.id+"_check"; 
    423                 tempCheckBox.type = "checkbox"; 
    424                 Td_checkbox.appendChild(tempCheckBox); 
    425  
    426                 Td_id.innerHTML = field[0]; 
    427                 //Td_identity.innerHTML = field[1]; 
    428                 Td_title.innerHTML = field[2]; 
    429                 Td_owner.innerHTML = field[3] + "(" + field[4] +")"; 
    430                 Td_action.className = "action"; 
    431                  
    432                 tempLink = document.createElement("A"); 
    433                 tempLink.setAttribute("href",blogURL + "/owner/control/blog/" + field[0]); 
    434                 tempLink.innerHTML = field[1]; 
    435                 Td_identity.appendChild(tempLink); 
    436                  
    437                 tempLink = document.createElement("A"); 
    438                 tempLink.className = "remove-button button"; 
    439                 tempLink.id = "rb_" + field[0]; 
    440                 tempLink.setAttribute("href", "#void"); 
    441                 tempLink.onclick = function() { deleteBlog(this.id.substr(3)); showBlogList(page);return false; }; 
    442                 tempLink.setAttribute("title", _t('이 블로그를 삭제합니다.')); 
    443  
    444                 tempSpan = document.createElement("SPAN"); 
    445                 tempSpan.className = "text"; 
    446                 tempSpan.innerHTML = _t('삭제'); 
    447                  
    448                 tempLink.appendChild(tempSpan); 
    449                 Td_action.appendChild(tempLink);                 
    450                  
    451                 Tr_container.appendChild(Td_checkbox); 
    452                 Tr_container.appendChild(Td_id); 
    453                 Tr_container.appendChild(Td_identity); 
    454                 Tr_container.appendChild(Td_title); 
    455                 Tr_container.appendChild(Td_owner); 
    456                 Tr_container.appendChild(Td_action); 
    457                 Tbody_container.appendChild(Tr_container); 
     466            containerThead.appendChild(containerTr); 
     467            instance.table.appendChild(containerThead); 
     468 
     469            containerTbody = document.createElement("TBODY"); 
     470 
     471            for (var i=0; i<instance.rows && resultRow.length > 0; i++) { 
     472                tempRow = resultRow.shift(); 
     473                field = tempRow.split(','); 
     474                containerTr = document.createElement("TR"); 
     475 
     476                var Line_id = field[0]; 
     477                containerTr.id = instance.table.id + "_" + Line_id; 
     478                Td_id = document.createElement("td"); 
     479 
     480                if(instance.enablecheckbox) { 
     481                    tempCheckBox = document.createElement("input"); 
     482                    Td_checkbox = document.createElement("td"); 
     483                    tempCheckBox.id = containerTr.id+"_check"; 
     484                    tempCheckBox.type = "checkbox"; 
     485                    Td_checkbox.appendChild(tempCheckBox); 
     486                    containerTr.appendChild(Td_checkbox); 
    458487                } 
    459                 tempTable.appendChild(Tbody_container); 
     488                for (var j=0;j<4;j++) { 
     489                    Td_id = document.createElement("TD"); 
     490                    if (instance.collink[j]!='') { 
     491                        var tempLink = document.createElement("A"); 
     492                        tempLink.innerHTML = field[j]; 
     493                        tempLink.setAttribute("href",instance.collink[j] + Line_id); 
     494                        Td_id.appendChild(tempLink); 
     495                    } 
     496                    else { 
     497                        Td_id.innerHTML = field[j]; 
     498                    } 
     499                    containerTr.appendChild(Td_id); 
     500                } 
     501 
     502                if(instance.enableaction) { 
     503                    Td_action = document.createElement("TD"); 
     504                    instance.printAction(Td_action); 
     505                    containerTr.appendChild(Td_action); 
     506                } 
     507 
     508                containerTbody.appendChild(containerTr); 
     509                } 
     510            this.instance.table.appendChild(containerTbody); 
     511        } 
     512        if (this.instance.table != '' ) { 
     513            this.instance.container.appendChild(this.instance.table); 
     514            if(instance.enablecheckbox) { 
     515                tempTable = instance.printActionChecked(); 
     516                this.instance.container.appendChild(tempTable); 
    460517            } 
    461         if (tempTable != '' ) { 
    462             Tbody_container.appendChild(Tr_container); 
    463             document.getElementById("container-blog-list").appendChild(tempTable); 
    464             tempTable = document.createElement("TABLE"); 
    465             tempTable.innerHTML = "<tbody><tr><td class='action'>선택한 블로그 : <a title='선택한 블로그를 삭제합니다.' href='#void' onclick='deleteBlogChecked(\"table-blog-list\")'><span class='text'>삭제</span></a></td></tr></tbody>"; 
    466             document.getElementById("container-blog-list").appendChild(tempTable); 
    467             document.getElementById("container-blog-list").appendChild(tempInfo); 
     518            if(instance.enableinfo) { 
     519                this.instance.container.appendChild(tempInfo); 
     520            }    
    468521        } 
    469522        return true; 
     
    478531} 
    479532 
    480 function sendUserAddInfo(name,email) { 
    481     var request = new HTTPRequest(blogURL + "/owner/control/action/user/add/?name=" + name + "&email=" + email); 
    482     request.onSuccess = function() { 
    483         PM.showMessage(_t('새로운 사용자가 추가되었습니다.'), "center", "top"); 
    484         showUserList(page); 
    485     } 
    486     request.onError = function() { 
    487         msg = this.getText("/response/result"); 
    488         alert(_t('사용자를 추가하지 못했습니다.') + "Error : \r\n" + msg); 
    489     } 
    490     request.send(); 
    491 } 
    492  
    493 function sendBlogAddInfo(owner,identify) { 
    494     var request = new HTTPRequest(blogURL + "/owner/control/action/blog/add/?owner="+owner+"&identify="+identify); 
    495     request.onSuccess = function() { 
    496         PM.showMessage(_t('새로운 블로그가 추가되었습니다.'), "center", "top"); 
    497         showBlogList(page); 
    498     } 
    499     request.onError = function() { 
    500         msg = this.getText("/response/result"); 
    501         alert(_t('블로그를 추가하지 못했습니다.') + "Error : \r\n" + msg); 
    502     } 
    503     request.send(); 
    504 } 
    505  
    506 function getChecked(tablename) { 
    507     var tbody = document.getElementById(tablename).childNodes[1]; 
     533ctlTable.prototype.getChecked = function() { 
     534    var tbody = this.table.childNodes[1]; 
    508535    var returnText = new Array(); 
    509536    for(var i=0; i<tbody.childNodes.length; i++) { 
     
    511538        if (checkbox.checked) 
    512539        { 
    513             returnText.push(tbody.childNodes[i].id.substr(tablename.length+1)); 
     540            returnText.push(tbody.childNodes[i].id.substr(this.table.id.length+1)); 
    514541        } 
    515542    } 
     
    517544} 
    518545 
    519 function selectCheckBoxAll(tablename,checked) { 
    520     var tbody = document.getElementById(tablename).childNodes[1]; 
     546ctlTable.prototype.selectCheckBoxAll = function(checked) { 
     547    var tbody = this.table.childNodes[1]; 
    521548    for(var i=0; i<tbody.childNodes.length; i++) { 
    522549        var checkbox =  document.getElementById(tbody.childNodes[i].id+"_check"); 
    523550        checkbox.checked = checked; 
    524551    } 
    525 } 
    526  
    527  
    528 function reverseCheckBoxAll(tablename,checked) { 
    529     var tbody = document.getElementById(tablename).childNodes[1]; 
     552}  
     553 
     554ctlTable.prototype.reverseCheckBoxAll = function(checked) { 
     555    var tbody = this.table.childNodes[1]; 
    530556    for(var i=0; i<tbody.childNodes.length; i++) { 
    531557        var checkbox =  document.getElementById(tbody.childNodes[i].id+"_check"); 
    532558        //checkbox.checked = checked; 
    533         if (checkbox.checked) { 
    534             checkbox.checked=false; 
    535         } 
    536         else { 
    537             checkbox.checked=true; 
    538         } 
    539     } 
    540 } 
    541  
    542 function deleteB