|
|
|
|
@ -163,39 +163,41 @@ function handlePlugins() |
|
|
|
|
foreach($my_plugin_list as $plugin_item) { |
|
|
|
|
$plugin_list[$plugin_item] = $plugin_item; |
|
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
$installed = ''; |
|
|
|
|
$notInstalled = ''; |
|
|
|
|
foreach ($all_plugins as $pluginName) { |
|
|
|
|
$plugin_info_file = api_get_path(SYS_PLUGIN_PATH).$pluginName.'/plugin.php'; |
|
|
|
|
if (file_exists($plugin_info_file)) { |
|
|
|
|
$plugin_info = array(); |
|
|
|
|
require $plugin_info_file; |
|
|
|
|
|
|
|
|
|
$pluginRow = ''; |
|
|
|
|
|
|
|
|
|
if (in_array($pluginName, $installed_plugins)) { |
|
|
|
|
echo '<tr class="row_selected">'; |
|
|
|
|
$pluginRow .= '<tr class="row_selected">'; |
|
|
|
|
} else { |
|
|
|
|
echo '<tr>'; |
|
|
|
|
$pluginRow .= '<tr>'; |
|
|
|
|
} |
|
|
|
|
echo '<td>'; |
|
|
|
|
//Checkbox |
|
|
|
|
$pluginRow .= '<td>'; |
|
|
|
|
// Checkbox |
|
|
|
|
if (in_array($pluginName, $installed_plugins)) { |
|
|
|
|
echo '<input type="checkbox" name="plugin_'.$pluginName.'[]" checked="checked">'; |
|
|
|
|
|
|
|
|
|
$pluginRow .= '<input type="checkbox" name="plugin_'.$pluginName.'[]" checked="checked">'; |
|
|
|
|
} else { |
|
|
|
|
echo '<input type="checkbox" name="plugin_'.$pluginName.'[]">'; |
|
|
|
|
$pluginRow .= '<input type="checkbox" name="plugin_'.$pluginName.'[]">'; |
|
|
|
|
} |
|
|
|
|
echo '</td><td>'; |
|
|
|
|
echo '<h4>'.$plugin_info['title'].' <small>v '.$plugin_info['version'].'</small></h4>'; |
|
|
|
|
echo '<p>'.$plugin_info['comment'].'</p>'; |
|
|
|
|
echo '<p>'.get_lang('Author').': '.$plugin_info['author'].'</p>'; |
|
|
|
|
$pluginRow .= '</td><td>'; |
|
|
|
|
$pluginRow .= '<h4>'.$plugin_info['title'].' <small>v '.$plugin_info['version'].'</small></h4>'; |
|
|
|
|
$pluginRow .= '<p>'.$plugin_info['comment'].'</p>'; |
|
|
|
|
$pluginRow .= '<p>'.get_lang('Author').': '.$plugin_info['author'].'</p>'; |
|
|
|
|
|
|
|
|
|
echo '<div class="btn-group">'; |
|
|
|
|
$pluginRow .= '<div class="btn-group">'; |
|
|
|
|
if (in_array($pluginName, $installed_plugins)) { |
|
|
|
|
echo Display::url( |
|
|
|
|
$pluginRow .= Display::url( |
|
|
|
|
'<em class="fa fa-cogs"></em> '.get_lang('Configure'), |
|
|
|
|
'configure_plugin.php?name='.$pluginName, |
|
|
|
|
array('class' => 'btn btn-default') |
|
|
|
|
); |
|
|
|
|
echo Display::url( |
|
|
|
|
$pluginRow .= Display::url( |
|
|
|
|
'<em class="fa fa-th-large"></em> '.get_lang('Regions'), |
|
|
|
|
'settings.php?category=Regions&name='.$pluginName, |
|
|
|
|
array('class' => 'btn btn-default') |
|
|
|
|
@ -203,7 +205,7 @@ function handlePlugins() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (file_exists(api_get_path(SYS_PLUGIN_PATH).$pluginName.'/readme.txt')) { |
|
|
|
|
echo Display::url( |
|
|
|
|
$pluginRow .= Display::url( |
|
|
|
|
"<em class='fa fa-file-text-o'></em> readme.txt", |
|
|
|
|
api_get_path(WEB_PLUGIN_PATH).$pluginName."/readme.txt", |
|
|
|
|
[ |
|
|
|
|
@ -217,7 +219,7 @@ function handlePlugins() |
|
|
|
|
|
|
|
|
|
$readmeFile = api_get_path(SYS_PLUGIN_PATH).$pluginName.'/README.md'; |
|
|
|
|
if (file_exists($readmeFile)) { |
|
|
|
|
echo Display::url( |
|
|
|
|
$pluginRow .= Display::url( |
|
|
|
|
"<em class='fa fa-file-text-o'></em> README.md", |
|
|
|
|
api_get_path(WEB_AJAX_PATH).'plugin.ajax.php?a=md_to_html&plugin='.$pluginName, |
|
|
|
|
[ |
|
|
|
|
@ -229,11 +231,19 @@ function handlePlugins() |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo '</div>'; |
|
|
|
|
echo '</td></tr>'; |
|
|
|
|
} |
|
|
|
|
$pluginRow .= '</div>'; |
|
|
|
|
$pluginRow .= '</td></tr>'; |
|
|
|
|
|
|
|
|
|
if (in_array($pluginName, $installed_plugins)) { |
|
|
|
|
$installed .= $pluginRow; |
|
|
|
|
} else { |
|
|
|
|
$notInstalled .= $pluginRow; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo $installed; |
|
|
|
|
echo $notInstalled; |
|
|
|
|
echo '</table>'; |
|
|
|
|
|
|
|
|
|
echo '<div class="form-actions bottom_actions">'; |
|
|
|
|
|