Changeset 5894
- Timestamp:
- 05/07/08 18:21:23 (8 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 modified
-
interface/owner/control/server/index.php (modified) (3 diffs)
-
interface/owner/control/server/rewrite (added)
-
interface/owner/control/server/rewrite/index.php (added)
-
lib/model/blog.service.php (modified) (1 diff)
-
style/admin/whitedream/control.css (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/interface/owner/control/server/index.php
r5888 r5894 6 6 require ROOT . '/lib/piece/owner/header.php'; 7 7 require ROOT . '/lib/piece/owner/contentMenu.php'; 8 9 $htaccessContent = ''; 10 if (file_exists(ROOT . "/.htaccess")) { 11 $htaccessContent = @file_get_contents(ROOT . "/.htaccess"); 12 } 13 8 14 ?> 9 15 <script type="text/javascript"> … … 26 32 request.send("&useCustomSMTP="+useCustomSMTP+"&smtpHost="+encodeURIComponent(smtpHost)+"&smtpPort="+smtpPort); 27 33 } 34 <?php 35 if(!defined('__TEXTCUBE_NO_FANCY_URL__')) { 36 ?> 37 function setRewrite() { 38 var htaccess = document.getElementById('rewrite'); 28 39 29 40 var request = new HTTPRequest("POST", "<?php echo $blogURL;?>/owner/control/server/rewrite/"); 41 request.onSuccess = function() { 42 PM.showMessage("<?php echo _t('저장되었습니다.');?>", "center", "bottom"); 43 } 44 request.onError = function() { 45 if (this.getText("/response/msg")) 46 alert(this.getText("/response/msg")); 47 else 48 alert('<?php echo _t('실패했습니다.');?>'); 49 } 50 request.send('body='+encodeURIComponent(htaccess.value)); 51 } 52 <?php 53 } 54 ?> 30 55 //]]> 31 56 </script> 32 57 33 <div id="part- setting-mailhost" class="part">58 <div id="part-control-mailhost" class="part"> 34 59 <h2 class="caption"><span class="main-text"><?php echo _t('메일 보낼 서버를 지정합니다');?></span></h2> 35 60 … … 57 82 </div> 58 83 </div> 84 85 <hr class="hidden" /> 86 <?php 87 if(!defined('__TEXTCUBE_NO_FANCY_URL__')) { 88 ?> 89 <div id="part-control-rewrite" class="part"> 90 <h2 class="caption"><span class="main-text"><?php echo _t('rewrite 규칙을 편집합니다');?></span></h2> 91 <div class="main-explain-box"> 92 <p class="explain"><?php echo _t('rewrite 모듈의 동작을 조정하는 .htaccess 파일을 변경합니다.').' '._t('변경시 텍스트큐브의 동작에 큰 영향을 줄 수 있으므로 주의하시기 바랍니다.');?></p> 93 </div> 94 <div class="data-inbox"> 95 <form id="rewriteSectionForm" class="section" method="post" action="<?php echo $blogURL;?>/owner/control/server/rewrite/"> 96 97 <div id="rewrite-container"> 98 <textarea id="rewrite" name="htaccess" cols="100" rows="20" onkeyup="htaccessSaved=false"><?php echo htmlspecialchars($htaccessContent);?></textarea> 99 </div> 100 <div class="button-box"> 101 <input type="reset" class="reset-button input-button" value="<?php echo _t('되돌리기');?>" /> 102 <input type="submit" class="save-button input-button" value="<?php echo _t('저장하기');?>" onclick="setRewrite(); return false" /> 103 </div> 104 </form> 105 </div> 106 </div> 107 <hr class="hidden" /> 59 108 <?php 109 } 60 110 if (isset($_GET['message'])) { 61 111 $msg = escapeJSInCData($_GET['message']); -
trunk/lib/model/blog.service.php
r5285 r5894 141 141 return 'http://help.tattertools.com/'.$blog['language'].'/Textcube/Menu/'.$path; 142 142 } 143 144 function writeHtaccess($contents) { 145 if (!is_writable(ROOT . "/.htaccess")) 146 return ROOT . _f('파일 쓰기 권한이 없습니다. 웹서버가 %1 파일의 쓰기 권한을 가지고 있는지 확인하세요.','.htaccess'); 147 $handler = fopen(ROOT . "/.htaccess", 'w'); 148 if (fwrite($handler, $contents) === false) { 149 fclose($handler); 150 return _t('실패했습니다.'); 151 } else { 152 fclose($handler); 153 @chmod(ROOT . "/.htaccess", 0666); 154 return true; 155 } 156 } 143 157 ?> -
trunk/style/admin/whitedream/control.css
r5859 r5894 12 12 .button-box input.input-button 13 13 { 14 background-color : #fff; 15 background-image : none !important; 16 font-weight : bold; 17 height : 30px !important; 18 margin : 0 auto; 19 padding : 0 !important; 14 background-color : #FFFFFF; 15 background-image : none; 16 border : 1px solid #BBBBBB; 17 color : #000000; 18 font-weight : bold; 19 height : 2.5em; 20 line-height : 2.5em; 21 vertical-align : middle; 22 margin-bottom : 10px; 20 23 } 21 24 … … 322 325 /* Server ****************************************************************************************/ 323 326 324 #part- setting-mailhost .button-box327 #part-control-mailhost .button-box 325 328 { 326 329 border-top : 1px solid #DDDDDD; … … 329 332 } 330 333 331 #part- setting-mailhost334 #part-control-mailhost 332 335 { 333 336 margin-bottom: 30px; 334 337 } 338 339 #part-control-rewrite textarea 340 { 341 background-color : #FFFFFF; 342 border : 1px solid #999999; 343 font-family : Courier, 'Courier New', monospace; 344 font-size : 12px; 345 height : 250px; 346 margin-left : 5px !important; 347 padding : 0 0 0 2px; 348 width : 920px !important; 349 } 350 335 351 336 352 /* System ****************************************************************************************/
