Merge branch 'master' of github.com:gnuboard/g4s

This commit is contained in:
chicpro
2013-03-18 13:42:19 +09:00
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,7 @@ function editor_html($id, $content, $ckeditor=true, $class="")
$html = "";
$html .= "<span class=\"sound_only\">웹에디터 시작</span>";
$html .= "<div class=\"cke_sc\"><button type=\"button\" class=\"btn_cke_sc\">단축키 일람</button></div>";
$html .= '<script>document.write("<div class=\'cke_sc\'><button type=\'button\' class=\'btn_cke_sc\'>단축키 일람</button></div>");</script>';
if ($js) {
$html .= "\n".'<script src="'.G4_CKEDITOR_URL.'/ckeditor.js"></script>';

View File

@ -71,7 +71,8 @@ function g4_path()
{
$path = dirname(__FILE__); // 예) /home/sir/www/g4s
$linux_dir = str_replace("\\", "/", $path); // 예) /home/sir/www/g4s
$document_root = str_replace("\\", "/", $_SERVER['DOCUMENT_ROOT']); // 예) /home/sir/www
//$document_root = str_replace("\\", "/", $_SERVER['DOCUMENT_ROOT']); // 예) /home/sir/www
$document_root = str_replace("\\", "/", realpath($_SERVER['DOCUMENT_ROOT']));
$base_dir = preg_replace('#^'.$document_root.'#i', '', $linux_dir); // 예) /g4s
$port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';