<?php only_admin_access(); $update_api = new \Microweber\Update(); ?> apply_updates <?php if (isset($_REQUEST['mw_version'])) { ?> <h2><?php _e("Installing new version of Microweber"); ?> : <?php print $_REQUEST['mw_version']; ?> </h2> <textarea> <?php $iudates = $update_api->install_version($_REQUEST['mw_version']); d($iudates); ?> </textarea> <?php } ?> <?php
<?php only_admin_access(); if (url_param('add_template')) { $install = url_param('add_template'); $update_api = new \Microweber\Update(); $result = $update_api->install_template($install); print_r($result); } else { $update_api = new \Microweber\Update(); $result = $update_api->browse(); } // print_r($result); ?> browsen ew stuff <?php if (isset($result['templates']) and is_array($result['templates']) == true) { foreach ($result['templates'] as $k => $item) { if (isset($item['name']) and isset($item['dir_name'])) { print $item['name']; ?> <a href="<?php print admin_url(); ?> view:updates__browse/add_template:<?php print $item['dir_name']; ?> " class="mw-ui-btn"> <?php _e("Install"); ?>
if (isset($params['show-ui'])) { if ($params['show-ui'] == 'admin') { $mod_params['ui_admin'] = '1'; } else { if ($params['show-ui'] == 'live_edit') { $mod_params['ui'] = '1'; } } } if (isset($params['installed'])) { $mod_params['installed'] = $params['installed']; } else { $mod_params['installed'] = 1; } if (isset($params['install_new'])) { $update_api = new \Microweber\Update(); $result = $update_api->get_modules(); $mods = $result; } else { $mods = mw()->modules->get($mod_params); } $upds = false; ?> <style> .mw-module-installed-0 { opacity: 0.6; } </style> <?php if (isset($mods) and is_array($mods) == true) {
add_module <?php if (url_param('add_module')) { $install = url_param('add_module'); } else { if (isset($_REQUEST['add_module'])) { $install = $_REQUEST['add_module']; } } $update_api = new \Microweber\Update(); d($install); $result = $update_api->install_module($install); d($result);