1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/youngxj0-emlog-Y_Eadmin_6.0

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
store.php 1.6 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Youngxj Отправлено 09.12.2018 08:47 0ff40c1
<?php
/**
* 应用中心
* @copyright (c) Emlog All Rights Reserved
*/
require_once 'globals.php';
if ($action == '') {
$site_url_encode = rawurlencode(base64_encode(BLOG_URL));
include View::getView('header');
require_once(View::getView('store'));
include View::getView('footer');
View::output();
}
if ($action == 'instpl') {
$source = isset($_GET['source']) ? trim($_GET['source']) : '';
$source_type = 'tpl';
$source_typename = '模板';
$source_typeurl = '<a href="template.php">查看模板</a>';
include View::getView('header');
require_once(View::getView('store_install'));
include View::getView('footer');
}
if ($action == 'insplu') {
$source = isset($_GET['source']) ? trim($_GET['source']) : '';
$source_type = 'plu';
$source_typename = '插件';
$source_typeurl = '<a href="plugin.php">查看插件</a>';
include View::getView('header');
require_once(View::getView('store_install'));
include View::getView('footer');
}
if ($action == 'addon') {
$source = isset($_GET['source']) ? trim($_GET['source'],'/') : '';
$source_type = isset($_GET['type']) ? trim($_GET['type']) : '';
if (empty($source)) {
exit('error');
}
$temp_file = emFecthFile(OFFICIAL_SERVICE_HOST . $source);
if (!$temp_file) {
exit('error_down');
}
$unzip_path = $source_type == 'tpl' ? '../content/templates/' : '../content/plugins/';
$ret = emUnZip($temp_file, $unzip_path, $source_type);
@unlink($temp_file);
switch ($ret) {
case 0:
exit('succ');
break;
case 1:
case 2:
exit('error_dir');
break;
case 3:
exit('error_zip');
break;
}
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/youngxj0-emlog-Y_Eadmin_6.0.git
git@api.gitlife.ru:oschina-mirror/youngxj0-emlog-Y_Eadmin_6.0.git
oschina-mirror
youngxj0-emlog-Y_Eadmin_6.0
youngxj0-emlog-Y_Eadmin_6.0
master