issue 106 Add support for CDN

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8764 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-08-12 09:24:54 +00:00
parent 52b3ae8d4f
commit e6eb7a75d2
19 changed files with 412 additions and 163 deletions

View file

@ -20,14 +20,14 @@
$logged_info = $oMemberModel->getLoggedInfo();
if($logged_info->is_admin!='Y') return $this->stop("msg_is_not_administrator");
// change into administration layout
// change into administration layout
$this->setTemplatePath($this->module_path.'tpl');
$this->setLayoutPath($this->getTemplatePath());
$this->setLayoutFile('layout.html');
$this->makeGnbUrl();
// Retrieve the list of installed modules
// Retrieve the list of installed modules
$db_info = Context::getDBInfo();
@ -41,6 +41,7 @@
Context::set('use_db_session', $db_info->use_db_session=='N'?'N':'Y');
Context::set('use_mobile_view', $db_info->use_mobile_view =='Y'?'Y':'N');
Context::set('use_ssl', $db_info->use_ssl?$db_info->use_ssl:"none");
Context::set('use_cdn', $db_info->use_cdn?$db_info->use_cdn:"none");
if($db_info->http_port) Context::set('http_port', $db_info->http_port);
if($db_info->https_port) Context::set('https_port', $db_info->https_port);
@ -117,7 +118,7 @@
if($val->category == 'statistics') $val->category = 'accessory';
if($val->module == 'admin' || !$val->admin_index_act) continue;
// get action information
// get action information
$action_spec = $oModuleModel->getModuleActionXml($val->module);
$actions = array();
if($action_spec->default_index_act) $actions[] = $action_spec->default_index_act;
@ -131,14 +132,14 @@
$obj->index_act = $val->admin_index_act;
if(in_array(Context::get('act'), $actions)) $obj->selected = true;
// Packages
// Packages
if($val->category == 'package') {
if($package_idx == 0) $obj->position = "first";
else $obj->position = "mid";
$package_modules[] = $obj;
$package_idx ++;
if($obj->selected) Context::set('package_selected',true);
// Modules
// Modules
} else {
$installed_modules[] = $obj;
}
@ -194,7 +195,7 @@
Context::set('download_link', $buff->zbxe_news->attrs->download_link);
}
// DB Information
// DB Information
$db_info = Context::getDBInfo();
Context::set('selected_lang', $db_info->lang_type);
@ -302,7 +303,7 @@
$output = executeQuery("admin.getDocumentCount", $args);
$status->document->total = $output->data->count;
// Comment Status
// Comment Status
$output = executeQueryArray("admin.getCommentStatus", $args);
if($output->data) {
foreach($output->data as $var) {
@ -316,7 +317,7 @@
$output = executeQuery("admin.getCommentCount", $args);
$status->comment->total = $output->data->count;
// Trackback Status
// Trackback Status
$output = executeQueryArray("admin.getTrackbackStatus", $args);
if($output->data) {
foreach($output->data as $var) {
@ -330,7 +331,7 @@
$output = executeQuery("admin.getTrackbackCount", $args);
$status->trackback->total = $output->data->count;
// Attached files Status
// Attached files Status
$output = executeQueryArray("admin.getFileStatus", $args);
if($output->data) {
foreach($output->data as $var) {
@ -400,7 +401,7 @@
Context::set('lang_selected', Context::loadLangSelected());
Context::set('use_mobile_view', $db_info->use_mobile_view=="Y"?'Y':'N');
$ftp_info = Context::getFTPInfo();
Context::set('ftp_info', $ftp_info);
@ -441,7 +442,7 @@
Context::addHtmlFooter($img);
FileHandler::removeDir($path);
FileHandler::writeFile($path.__ZBXE_VERSION__,'1');
FileHandler::writeFile($path.__ZBXE_VERSION__,'1');
} else if($_SESSION['enviroment_gather']=='Y' && !file_exists($path.__ZBXE_VERSION__)) {
$oAdminAdminModel = &getAdminModel('admin');
@ -450,7 +451,7 @@
Context::addHtmlFooter($img);
FileHandler::removeDir($path);
FileHandler::writeFile($path.__ZBXE_VERSION__,'1');
FileHandler::writeFile($path.__ZBXE_VERSION__,'1');
unset($_SESSION['enviroment_gather']);
}
}

View file

@ -107,4 +107,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -107,4 +107,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -106,4 +106,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -105,4 +105,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -97,4 +97,6 @@ $lang->status = '상태';
$lang->find_site = '사이트 찾기';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -105,4 +105,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -106,4 +106,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -108,4 +108,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -106,4 +106,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -106,4 +106,6 @@ $lang->find_site = 'Find Site';
$lang->action = '실행';
$lang->select_module_id = '모듈 아이디를 선택하세요.';
$lang->use_cdn = 'CDN 사용';
$lang->about_cdn = 'XE core의 css, js 파일을 CDN으로부터 제공받으려면 체크하세요.';
?>

View file

@ -38,6 +38,13 @@
<p>{$lang->about_rewrite}</p>
</td>
</tr>
<tr>
<th><div>{$lang->use_cdn}</div></th>
<td>
<input type="checkbox" name="use_cdn" value="Y" <!--@if($use_cdn=='Y')-->checked="checked"<!--@end--> />
<p>{$lang->about_cdn}</p>
</td>
</tr>
<tr>
<th><div>{$lang->use_sso}</div></th>
<td>
@ -110,7 +117,7 @@
<tr>
<th><div>{$lang->server_ports}</div></th>
<td>
HTTP : <input type="text" name="http_port" class="inputTypeText" size="5" value="{$http_port}" />,
HTTP : <input type="text" name="http_port" class="inputTypeText" size="5" value="{$http_port}" />,
HTTPS: <input type="text" name="https_port" class="inputTypeText" size="5" value="{$https_port}" />
<p>{$lang->about_server_ports}</p>
</td>
@ -146,7 +153,7 @@
</tr>
<tr>
<th scope="col"><div><label for="textfield23">{$lang->ftp_host} (default: 127.0.0.1)</label></div></th>
<td><input id="textfield23" type="text" name="ftp_host" value="{$ftp_info->ftp_host}" class="inputTypeText" /></td>
<td><input id="textfield23" type="text" name="ftp_host" value="{$ftp_info->ftp_host}" class="inputTypeText" /></td>
</tr>
<tr>
<th scope="col"><div><label for="textfield24">{$lang->ftp_port} (default: 21) </label></div></th>
@ -165,7 +172,7 @@
<tr>
<th scope="col" rowspan="2"><div>{$lang->msg_ftp_installed_ftp_realpath}<br /><br/>{$lang->msg_ftp_installed_realpath}:<br/> {_XE_PATH_}</div></th>
<td>
<input type="text" name="ftp_root_path" value="{$ftp_info->ftp_root_path}" class="inputTypeText w400" />
<input type="text" name="ftp_root_path" value="{$ftp_info->ftp_root_path}" class="inputTypeText w400" />
</td>
</tr>
<tr id="ftplist">