Changeset 5324

Show
Ignore:
Timestamp:
02/21/08 01:49:09 (9 months ago)
Author:
graphittie
Message:

#703 : 전체 블로그들 및 사용자 관리 패널.

  • #828을 위한 구조 변경.
  • '시스템' 메뉴를 '시스템 정보'로 명칭 변경.
Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/interface/owner/control/system/index.php

    r5285 r5324  
    33/// All rights reserved. Licensed under the GPL. 
    44/// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) 
     5 
     6$IV = array( 
     7    'GET' => array( 
     8        'range' => array('int', 'min' => -1, 'max' => 64, 'default' => -1) 
     9    )  
     10); 
    511 
    612require ROOT . '/lib/includeForBlogOwner.php'; 
     
    5056} 
    5157?> 
    52 <h2 class="caption"><span class="main-text"><?php echo _t('Server Info'); ?></span></h2> 
    53 <div class="generalinfo"> 
    54 <table> 
    55 <tr> 
    56     <td>Server time</td> 
    57     <td><?php echo $serverTime; ?></td> 
    58 </tr> 
    59 <tr> 
    60     <td>Database</td> 
    61     <td><? echo $dbVersion; ?></td> 
    62 </tr> 
    63 <tr> 
    64     <td>Database stat</td> 
    65     <td><? echo $dbStat; ?></td> 
    66 </tr> 
    67 <tr> 
    68     <td>Web server</td> 
    69     <td><? echo $webServer; ?></td> 
    70 </tr> 
    71 <tr> 
    72     <td>Operating System</td> 
    73     <td><? echo $osVersion; ?></td> 
    74 </tr> 
    75 <tr> 
    76     <td>Install path</td> 
    77     <td><? echo dirname(dirname(dirname((dirname(dirname(__FILE__)))))); ?></td> 
    78 </tr> 
    79 <tr> 
    80     <td>Disk space</td> 
    81     <td><? echo $diskSpace; ?></td> 
    82 </tr> 
    83 <tr> 
    84     <td>Load Avg.</td> 
    85     <td><? echo $loadAvg; ?></td> 
    86 </tr> 
    87 </table> 
    88 </div> 
    89 <h2 class="caption"><span class="main-text"><?php echo _t('PHP Info'); ?></span></h2> 
    90 <div class="phpinfo"> 
     58    <div id="part-system-generalinfo" class="part"> 
     59        <h2 class="caption"><span class="main-text"><?php echo _t('Server Info'); ?></span></h2> 
     60         
     61        <table> 
     62            <tbody> 
     63                <tr> 
     64                    <th>Server time</th> 
     65                    <td><?php echo $serverTime; ?></td> 
     66                </tr> 
     67                <tr> 
     68                    <th>Database</th> 
     69                    <td><? echo $dbVersion; ?></td> 
     70                </tr> 
     71                <tr> 
     72                    <th>Database stat</th> 
     73                    <td><? echo $dbStat; ?></td> 
     74                </tr> 
     75                <tr> 
     76                    <th>Web server</th> 
     77                    <td><? echo $webServer; ?></td> 
     78                </tr> 
     79                <tr> 
     80                    <th>Operating System</th> 
     81                    <td><? echo $osVersion; ?></td> 
     82                </tr> 
     83                <tr> 
     84                    <th>Install path</th> 
     85                    <td><? echo dirname(dirname(dirname((dirname(dirname(__FILE__)))))); ?></td> 
     86                </tr> 
     87                <tr> 
     88                    <th>Disk space</th> 
     89                    <td><? echo $diskSpace; ?></td> 
     90                </tr> 
     91                <tr> 
     92                    <th>Load Avg.</th> 
     93                    <td><? echo $loadAvg; ?></td> 
     94                </tr> 
     95            </tbody> 
     96        </table> 
     97    </div> 
     98     
     99    <div id="part-system-phpinfo" class="part"> 
     100        <h2 class="caption"><span class="main-text"><?php echo _t('PHP Info'); ?></span></h2> 
     101         
    91102<?php  
     103switch ($_GET['range']) { 
     104    case 1: 
     105    case 2: 
     106    case 4: 
     107    case 8: 
     108    case 16: 
     109    case 32: 
     110    case 64: 
     111    case -1: 
     112        $phpinfo = (int) $_GET['range']; 
     113        break; 
     114    default: 
     115        $phpinfo = -1; 
     116        break; 
     117} 
     118?> 
     119        <form id="phpinfoForm" action="<?php echo strtok($_SERVER['REQUEST_URI'], '?');?>"> 
     120            <label for="range"><?php echo _t('범위설정');?></label> 
     121            <select id="range" name="range" onchange="document.getElementById('phpinfoForm').submit(); return false;"> 
     122                <option value="-1">All Information</option> 
     123<?php 
     124for ($i=1; $i<=64; $i=abs($i*2)) { 
     125    switch ($i) { 
     126        case 1: 
     127            $text = 'General Information'; 
     128            break; 
     129        case 2: 
     130            $text = 'Credits'; 
     131            break; 
     132        case 4: 
     133            $text = 'Configuration'; 
     134            break; 
     135        case 8: 
     136            $text = 'Modules'; 
     137            break; 
     138        case 16: 
     139            $text = 'Environments'; 
     140            break; 
     141        case 32: 
     142            $text = 'Variables'; 
     143            break; 
     144        case 64: 
     145            $text = 'License'; 
     146            break; 
     147    } 
     148     
     149    echo sprintf('<option value="%d"%s>%s</option>', 
     150                    $i, 
     151                    $i == $phpinfo ? ' selected="selected"' : NULL, 
     152                    $text 
     153                ); 
     154} 
     155?> 
     156            </select> 
     157        </form> 
     158         
     159<?php 
    92160ob_start(); 
    93 phpinfo(); 
     161phpinfo($phpinfo); 
    94162$phpinfo = ob_get_contents(); 
    95163ob_end_clean(); 
    96 echo preg_replace( "@.*<body.*?>(.*)</body>.*@sim",'$1', $phpinfo ); 
     164 
     165$regexpArray = array(); 
     166array_push($regexpArray, '@.*<body.*?>(.*)</body>.*@sim'); 
     167array_push($regexpArray, '@<table.*>\s*<tr.*><td>\s*<a href="(.+)"><img border="0" src="(.+)" alt="PHP Logo" /></a><h1 class="p">(.+)</h1>\s*</td></tr>\s*</table>@Usi'); 
     168//array_push($regexpArray, '@<table.*>\s*<tr.*><td>\s*<a href="(.+)"><img border="0" src="(.+)" alt="Zend logo" /></a>(.+)\s*</td></tr>\s*</table>@Usi'); 
     169array_push($regexpArray, '@<(/?)h1(.*)>@Usi'); 
     170array_push($regexpArray, '@<(/?)h2(.*)>@Usi'); 
     171array_push($regexpArray, '@<tr class="h">(.+)</tr>@Usi'); 
     172array_push($regexpArray, '@<table .*>@Usi'); 
     173array_push($regexpArray, '@</table>@'); 
     174array_push($regexpArray, '@<td class="e">(.+)</td>@Usi'); 
     175array_push($regexpArray, '@<td class="v">(.+)</td>@Usi'); 
     176array_push($regexpArray, '@<(br|hr) />@'); 
     177array_push($regexpArray, ''); 
     178$resultArray = array(); 
     179array_push($resultArray, '$1'); 
     180array_push($resultArray, '<div id="PHPLogo"><a href="$1"><img src="$2" /></a><p>$3</p></div>'); 
     181//array_push($resultArray, '<div id="ZendLogo"><a href="$1"><img src="$2" /></a><p>$3</p></div>'); 
     182array_push($resultArray, '<$1h3>'); 
     183array_push($resultArray, '<$1h4>'); 
     184array_push($resultArray, '<thead><tr>$1</tr></thead><tbody>'); 
     185array_push($resultArray, '<table>'); 
     186array_push($resultArray, '</tbody></table>'); 
     187array_push($resultArray, '<th>$1</th>'); 
     188array_push($resultArray, '<td>$1</td>'); 
     189array_push($resultArray, ''); 
     190array_push($resultArray, ''); 
     191 
     192echo preg_replace($regexpArray, $resultArray, $phpinfo); 
    97193 
    98194/* ORIGINAL embeded css from phpinfo() 
     
    121217 
    122218?> 
    123 </div> 
     219    </div> 
    124220<?php require ROOT . '/lib/piece/owner/footer.php';?> 
  • trunk/lib/piece/owner/contentMenu.php

    r5304 r5324  
    9898                array('menu'=>'blog','title'=>_t('블로그'),'link'=>'/owner/control/blog'), 
    9999                array('menu'=>'user','title'=>_t('사용자'),'link'=>'/owner/control/user'), 
    100                 array('menu'=>'system','title'=>_t('시스템'),'link'=>'/owner/control/system') 
     100                array('menu'=>'system','title'=>_t('시스템 정보'),'link'=>'/owner/control/system') 
    101101//              array('menu'=>'etc','title'=>_t('기타 설정'),'link'=>'/owner/control/etc') 
    102102            );