1 | <?php
|
---|
2 |
|
---|
3 | /***************************************************************************
|
---|
4 | * Dolphin Smart Community Builder
|
---|
5 | * -----------------
|
---|
6 | * begin : Mon Mar 23 2006
|
---|
7 | * copyright : (C) 2006 BoonEx Group
|
---|
8 | * website : http://www.boonex.com/
|
---|
9 | * This file is part of Dolphin - Smart Community Builder
|
---|
10 | *
|
---|
11 | * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
|
---|
12 | * http://creativecommons.org/licenses/by/3.0/
|
---|
13 | *
|
---|
14 | * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
---|
15 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
---|
16 | * See the Creative Commons Attribution 3.0 License for more details.
|
---|
17 | * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
|
---|
18 | * see license.txt file; if not, write to marketing@boonex.com
|
---|
19 | ***************************************************************************/
|
---|
20 |
|
---|
21 | require_once( '../inc/header.inc.php' );
|
---|
22 | require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
|
---|
23 | require_once( BX_DIRECTORY_PATH_INC . 'admin_design.inc.php' );
|
---|
24 | bx_import('BxDolFtp');
|
---|
25 | bx_import('BxDolInstallerUi');
|
---|
26 | bx_import('BxTemplFormView');
|
---|
27 |
|
---|
28 | $logged['admin'] = member_auth( 1, true, true );
|
---|
29 |
|
---|
30 | $oInstallerUi = new BxDolInstallerUi();
|
---|
31 |
|
---|
32 | //--- Check actions ---//
|
---|
33 | $sResult = $sResultUpload = '';
|
---|
34 | $sResultDeleteModule = $sResultDeleteUpdate = '';
|
---|
35 | if(isset($_POST['modules-install']) && is_array($_POST['pathes']) && !empty($_POST['pathes']))
|
---|
36 | $sResult = $oInstallerUi->actionInstall($_POST['pathes']);
|
---|
37 | if(isset($_POST['modules-delete']) && is_array($_POST['pathes']) && !empty($_POST['pathes']))
|
---|
38 | $sResultDeleteModule = $oInstallerUi->actionDelete($_POST['pathes']);
|
---|
39 | else if(isset($_POST['modules-update']) && is_array($_POST['pathes']) && !empty($_POST['pathes']))
|
---|
40 | $oInstallerUi->setCheckPathes($_POST['pathes']);
|
---|
41 | else if(isset($_POST['modules-uninstall']) && is_array($_POST['pathes']) && !empty($_POST['pathes']))
|
---|
42 | $sResult = $oInstallerUi->actionUninstall($_POST['pathes']);
|
---|
43 | else if(isset($_POST['modules-recompile-languages']) && is_array($_POST['pathes']) && !empty($_POST['pathes']))
|
---|
44 | $sResult = $oInstallerUi->actionRecompile($_POST['pathes']);
|
---|
45 | if(isset($_POST['updates-install']) && is_array($_POST['pathes']) && !empty($_POST['pathes']))
|
---|
46 | $sResult = $oInstallerUi->actionUpdate($_POST['pathes']);
|
---|
47 | if(isset($_POST['updates-delete']) && is_array($_POST['pathes']) && !empty($_POST['pathes']))
|
---|
48 | $sResultDeleteUpdate = $oInstallerUi->actionDelete($_POST['pathes']);
|
---|
49 | else if(isset($_POST['submit_upload']) && isset($_FILES['module']) && !empty($_FILES['module']['tmp_name']))
|
---|
50 | $sResultUpload = $oInstallerUi->actionUpload('module', $_FILES['module'], $_POST);
|
---|
51 | else if(isset($_POST['submit_upload']) && isset($_FILES['update']) && !empty($_FILES['update']['tmp_name']))
|
---|
52 | $sResultUpload = $oInstallerUi->actionUpload('update', $_FILES['update'], $_POST);
|
---|
53 |
|
---|
54 | //--- Display cotent ---//
|
---|
55 | $iNameIndex = 7;
|
---|
56 |
|
---|
57 | $_page['name_index'] = $iNameIndex;
|
---|
58 | $_page['css_name'] = array('forms_adv.css', 'modules.css');
|
---|
59 | $_page['header'] = "Modules";
|
---|
60 | $_page_cont[$iNameIndex] = array(
|
---|
61 | 'page_code_results' => !empty($sResult) ? DesignBoxAdmin(_t('_adm_box_cpt_operation_results'), $sResult) : '',
|
---|
62 | 'page_code_uploader' => DesignBoxAdmin(_t('_adm_box_cpt_upload'), $oInstallerUi->getUploader($sResultUpload), array (array('title' => _t('_adm_txt_get_new_modules'), 'href' => "http://www.boonex.com/unity/extensions/home/"))),
|
---|
63 | 'page_code_installed' => DesignBoxAdmin(_t('_adm_box_cpt_installed_modules'), $oInstallerUi->getInstalled()),
|
---|
64 | 'page_code_not_installed' => DesignBoxAdmin(_t('_adm_box_cpt_not_installed_modules'), $oInstallerUi->getNotInstalled($sResultDeleteModule)),
|
---|
65 | 'page_code_updates' => DesignBoxAdmin(_t('_adm_box_cpt_available_updates'), $oInstallerUi->getUpdates($sResultDeleteUpdate)),
|
---|
66 | 'page_code_market_feed' => DesignBoxAdmin(_t('_adm_txt_hot_from_unity_market'), '
|
---|
67 | <div class="RSSAggrCont" rssid="boonex_unity_market" rssnum="5" member="0">
|
---|
68 | <div class="loading_rss">
|
---|
69 | <img src="' . getTemplateImage('loading.gif') . '" alt="'._t('_loading ...').'" />
|
---|
70 | </div>
|
---|
71 | </div>'),
|
---|
72 | );
|
---|
73 |
|
---|
74 | PageCodeAdmin();
|
---|
75 |
|
---|
76 | ?>
|
---|