Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 * 내부 구현 기준에서 사용자 접근도 기준으로 메뉴 변경
 * mail 서버 설정은 서비스관리로, 관리자스킨은 스킨 하위로, 표지 설정은 스킨 하위로.
  • Loading branch information
inureyes committed May 4, 2008
1 parent 1540655 commit e213048
Show file tree
Hide file tree
Showing 19 changed files with 477 additions and 369 deletions.
75 changes: 75 additions & 0 deletions interface/owner/control/server/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php
/// Copyright (c) 2004-2008, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT)
require ROOT . '/lib/includeForBlogOwner.php';
require ROOT . '/lib/piece/owner/header.php';
require ROOT . '/lib/piece/owner/contentMenu.php';
?>
<script type="text/javascript">
//<![CDATA[
function setSmtp() {
var useCustomSMTP = document.getElementById('useCustomSMTP').checked?1:0;
var smtpHost = document.getElementById('smtpHost').value;
var smtpPort = document.getElementById('smtpPort').value;

var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/control/server/mailhost/");
request.onVerify = function() {
return this.getText("/response/error") == 0;
}
request.onSuccess = function() {
PM.showMessage("<?php echo _t('저장하였습니다');?>", "center", "bottom");
}
request.onError = function() {
alert('<?php echo _t('저장하지 못하였습니다');?>');
}
request.send("&useCustomSMTP="+useCustomSMTP+"&smtpHost="+encodeURIComponent(smtpHost)+"&smtpPort="+smtpPort);
}


//]]>
</script>

<div id="part-setting-mailhost" class="part">
<h2 class="caption"><span class="main-text"><?php echo _t('메일 보낼 서버를 지정합니다');?></span></h2>

<div class="data-inbox">
<form class="section" method="post" action="<?php echo $blogURL;?>/owner/setting/blog/mailhost">
<dl>
<dt class="title"><span class="label"><?php echo _t('메일 서버 설정');?></span></dt>
<dd>
<div class="line">
<span><?php echo _text( '운영자만이 수정할 수 있습니다' ); ?></span>
</div>

<div class="line">
<input id="useCustomSMTP" type="checkbox" class="checkbox" name="useCustomSMTP" value="1" <?php if( getServiceSetting( 'useCustomSMTP', 0 ) ) { echo "checked='checked'"; } ?> />
<label for="useCustomSMTP"><?php echo _t('메일서버 지정'); ?></label>
</div>
<div class="line">
<label for="smtpHost"><?php echo _t('메일서버 IP 주소:포트'); ?></label>
<input id="smtpHost" type="text" class="input-text" name="smtpHost" value="<?php echo getServiceSetting( 'smtpHost', '127.0.0.1' ); ?>" /> :
<input id="smtpPort" type="text" class="input-text" name="smtpPort" value="<?php echo getServiceSetting( 'smtpPort', 25 );?>" />
</div>
</dd>
</dl>
<div class="button-box">
<input type="submit" class="save-button input-button" value="<?php echo _t('저장하기');?>" onclick="setSmtp(); return false;" />
</div>
</form>
</div>
</div>
<?php
if (isset($_GET['message'])) {
$msg = escapeJSInCData($_GET['message']);
?>
<script type="text/javascript">
//<![CDATA[
window.onload = function() { PM.showMessage("<?php echo $msg;?>", "center", "bottom"); }
//]]>
</script>
<?php
}

require ROOT . '/lib/piece/owner/footer.php';
?>
File renamed without changes.
80 changes: 0 additions & 80 deletions interface/owner/setting/blog/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -783,87 +783,7 @@ function setSmtp() {
</div>
</form>
</div>

<hr class="hidden" />

<div id="part-setting-admin" class="part">
<h2 class="caption"><span class="main-text"><?php echo setDetailPanel('admin_skin_setting','link',_t('관리자 화면 스킨을 설정합니다'));?></span></h2>
<form id="admin-skin-form" class="data-inbox" method="post" action="<?php echo parseURL($blogURL.'/owner/setting/blog/skin');?>">
<div id="admin_skin_setting" class="section folding">
<fieldset class="container">
<legend><?php echo _t('관리자 스킨을 설정합니다');?></legend>

<dl id="admin-skin--line" class="line">
<dt><span class="label"><?php echo _t('관리자 화면 스킨');?></span></dt>
<dd>
<select id="adminSkin" name="adminSkin">
<?php
$currentAdminSkin = getBlogSetting("adminSkin", "whitedream");
$dir = dir(ROOT . '/style/admin/');
while ($tempAdminSkin = $dir->read()) {
if (!preg_match('/^[a-zA-Z0-9 _-]+$/', $tempAdminSkin))
continue;
if (!is_dir(ROOT . '/style/admin/' . $tempAdminSkin))
continue;
if (!file_exists(ROOT . "/style/admin/$tempAdminSkin/index.xml"))
continue;
$xmls = new XMLStruct();
if (!$xmls->open(file_get_contents(ROOT . "/style/admin/$tempAdminSkin/index.xml"))) {
continue;
} else {
$skinDir = trim($tempAdminSkin);
$skinName = htmlspecialchars($xmls->getValue('/adminSkin/information/name[lang()]'));
?>
<option value="<?php echo $skinDir;?>"<?php echo $currentAdminSkin==$skinDir ?' selected="selected"':'';?>><?php echo $skinName;?></option>
<?php
}
}
?>
</select>
</dd>
</dl>
</fieldset>
<div class="button-box">
<input type="submit" class="save-button input-button" value="<?php echo _t('저장하기');?>" />
</div>
</div>
</form>
</div>

<?php if( Acl::check('group.creators') ) { ?>
<div id="part-setting-mailhost" class="part">
<h2 class="caption"><span class="main-text"><?php echo _t('메일 보낼 서버를 지정합니다');?></span></h2>

<div class="data-inbox">
<form class="section" method="post" action="<?php echo $blogURL;?>/owner/setting/blog/mailhost">
<dl>
<dt class="title"><span class="label"><?php echo _t('보낼 메일 서버 설정');?></span></dt>
<dd>
<div class="line">
<span><?php echo _text( '운영자만이 수정할 수 있습니다' ); ?></span>
</div>

<div class="line">
<input id="useCustomSMTP" type="checkbox" class="checkbox" name="useCustomSMTP" value="1" <?php if( getServiceSetting( 'useCustomSMTP', 0 ) ) { echo "checked='checked'"; } ?> />
<label for="useCustomSMTP"><?php echo _t('메일서버 지정'); ?></label>
</div>
<div class="line">
<label for="smtpHost"><?php echo _t('메일서버 IP 주소:포트'); ?></label>
<input id="smtpHost" type="text" class="input-text" name="smtpHost" value="<?php echo getServiceSetting( 'smtpHost', '127.0.0.1' ); ?>" /> :
<input id="smtpPort" type="text" class="input-text" name="smtpPort" value="<?php echo getServiceSetting( 'smtpPort', 25 );?>" />
</div>
</dd>
</dl>
<?php if( Acl::check('group.creators') ) { ?>
<div class="button-box">
<input type="submit" class="save-button input-button" value="<?php echo _t('저장하기');?>" onclick="setSmtp(); return false;" />
</div>
<?php } ?>
</form>
</div>
</div>
<?php
}
if (isset($_GET['message'])) {
$msg = escapeJSInCData($_GET['message']);
?>
Expand Down
69 changes: 69 additions & 0 deletions interface/owner/skin/adminSkin/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/// Copyright (c) 2004-2008, Needlworks / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT)
require ROOT . '/lib/includeForBlogOwner.php';
require ROOT . '/lib/piece/owner/header.php';
require ROOT . '/lib/piece/owner/contentMenu.php';
?>
<div id="part-setting-admin" class="part">
<h2 class="caption"><span class="main-text"><?php echo setDetailPanel('admin_skin_setting','link',_t('관리자 패널의 스킨을 설정합니다'));?></span></h2>
<form id="admin-skin-form" class="data-inbox" method="post" action="<?php echo parseURL($blogURL.'/owner/skin/adminSkin/set');?>">
<div class="main-explain-box">
<p class="explain"><?php echo _t('관리자 패널 스킨은 로그인한 후 보여지는 패널의 디자인을 다양하게 변경합니다.');?></p>
</div>
<fieldset class="container">
<legend><?php echo _t('관리자 패널의 스킨을 설정합니다');?></legend>

<dl id="admin-skin-line" class="line">
<dt><span class="label"><?php echo _t('패널 스킨');?></span></dt>
<dd>
<select id="adminSkin" name="adminSkin">
<?php
$currentAdminSkin = getBlogSetting("adminSkin", "whitedream");
$dir = dir(ROOT . '/style/admin/');
while ($tempAdminSkin = $dir->read()) {
if (!preg_match('/^[a-zA-Z0-9 _-]+$/', $tempAdminSkin))
continue;
if (!is_dir(ROOT . '/style/admin/' . $tempAdminSkin))
continue;
if (!file_exists(ROOT . "/style/admin/$tempAdminSkin/index.xml"))
continue;
$xmls = new XMLStruct();
if (!$xmls->open(file_get_contents(ROOT . "/style/admin/$tempAdminSkin/index.xml"))) {
continue;
} else {
$skinDir = trim($tempAdminSkin);
$skinName = htmlspecialchars($xmls->getValue('/adminSkin/information/name[lang()]'));
?>
<option value="<?php echo $skinDir;?>"<?php echo $currentAdminSkin==$skinDir ?' selected="selected"':'';?>><?php echo $skinName;?></option>
<?php
}
}
?>
</select>
</dd>
<dd>
<p><label for="adminSkin"><?php echo _t('팀블로그의 관리자 패널 스킨을 변경할 경우 다른 팀원들의 관리자 패널 디자인도 함께 바뀝니다.');?></label></p>
</dd>
</dl>
</fieldset>
<div class="button-box">
<input type="submit" class="save-button input-button" value="<?php echo _t('저장하기');?>" />
</div>
</form>
</div>
<?php
if (isset($_GET['message'])) {
$msg = escapeJSInCData($_GET['message']);
?>
<script type="text/javascript">
//<![CDATA[
window.onload = function() { PM.showMessage("<?php echo $msg;?>", "center", "bottom"); }
//]]>
</script>
<?php
}

require ROOT . '/lib/piece/owner/footer.php';
?>
File renamed without changes.
File renamed without changes.
11 changes: 6 additions & 5 deletions lib/piece/owner/contentMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
if(Acl::check('group.administrators')) {
$blogContentMenuItem = array(
array('menu'=>'dashboard','title'=>_t('조각보'),'link'=>'/owner/center/dashboard'),
array('menu'=>'coverpage','title'=>_t('색동'),'link'=>'/owner/center/coverpage'),
);
}
else{
$blogContentMenuItem = array(
array('menu'=>'dashboard','title'=>_t('조각보'),'link'=>'/owner/center/dashboard'),
array('menu'=>'dashboard','title'=>_t('조각보'),'link'=>'/owner/center/dashboard')
);
}
break;
Expand Down Expand Up @@ -54,8 +53,10 @@
$blogContentMenuItem = array(
array('menu'=>'skin','title'=>_t('스킨 선택'),'link'=>'/owner/skin'),
array('menu'=>'edit','title'=>_t('스킨 편집'),'link'=>'/owner/skin/edit'),
array('menu'=>'setting','title'=>_t('출력 설정'),'link'=>'/owner/skin/setting'),
array('menu'=>'sidebar','title'=>_t('사이드바'),'link'=>'/owner/skin/sidebar')
array('menu'=>'setting','title'=>_t('상세한 설정'),'link'=>'/owner/skin/setting'),
array('menu'=>'coverpage','title'=>_t('색동'),'link'=>'/owner/skin/coverpage'),
array('menu'=>'sidebar','title'=>_t('사이드바'),'link'=>'/owner/skin/sidebar'),
array('menu'=>'adminSkin','title'=>_t('관리자 패널 스킨 선택'),'link'=>'/owner/skin/adminSkin')
);
}
break;
Expand Down Expand Up @@ -96,8 +97,8 @@
$blogContentMenuItem = array(
array('menu'=>'blog','title'=>_t('블로그'),'link'=>'/owner/control/blog'),
array('menu'=>'user','title'=>_t('사용자'),'link'=>'/owner/control/user'),
array('menu'=>'server','title'=>_t('서버'),'link'=>'/owner/control/server'),
array('menu'=>'system','title'=>_t('시스템 정보'),'link'=>'/owner/control/system')
// array('menu'=>'etc','title'=>_t('기타 설정'),'link'=>'/owner/control/etc')
);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/piece/owner/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
//}

if(Acl::check('group.creators')) {
array_push($blogTopMenuItem, array('menu'=>'control','title'=>_t('서비스'),'link'=>'/owner/control/blog'));
array_push($blogTopMenuItem, array('menu'=>'control','title'=>_t('서비스관리'),'link'=>'/owner/control/blog'));
}
switch($blogMenu['topMenu']) {
case 'center':
Expand Down
Loading

0 comments on commit e213048

Please sign in to comment.