Пример #1
0
<ul>';
            echo '<li><a href="?route=plugins.php&amp;action=editor&amp;id=' . $_GET['id'] . '">' . $LANG['editor'] . '</a></li>';
            echo '<li><a href="?route=plugins.php&amp;action=uninstall&amp;id=' . $_GET['id'] . '">' . $LANG['plugins_uninstall'] . '</a></li>';
            echo '</ul>
</div>';
        }
        echo '<a href="?route=plugins.php&amp;action=list" class="btn">' . $LANG['plugins_view'] . '</a>
</div>';
        if (!empty($LANG['plugins_edit_subtitle'])) {
            echo '<span>' . $LANG['plugins_edit_subtitle'] . '</span>';
        }
        echo '</div>';
        if ($plugin_exists) {
            if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['csrf']) && check_csrf($_POST['csrf'], 'plugins_csrf')) {
                if (isset($_POST['description'])) {
                    if (actions::edit_plugin($_GET['id'], array('description' => $_POST['description'], 'menu' => isset($_POST['in_menu']) ? 1 : 0, 'icon' => isset($_POST['menu_ico']) ? $_POST['menu_ico'] : 1, 'publish' => isset($_POST['publish']) ? 1 : 0))) {
                        $info = admin_query::plugin_infos($_GET['id']);
                        echo '<div class="a-success">' . $LANG['msg_saved'] . '</div>';
                    } else {
                        echo '<div class="a-error">' . $LANG['msg_error'] . '</div>';
                    }
                }
            } else {
                if (isset($_GET['type']) && isset($_GET['token']) && check_csrf($_GET['token'], 'plugins_csrf')) {
                    if ($_GET['type'] == 'delete_image') {
                        if (isset($_GET['id'])) {
                            if (actions::delete_plugin_image($_GET['id'])) {
                                $info->image = '';
                                echo '<div class="a-success">' . $LANG['msg_deleted'] . '</div>';
                            } else {
                                echo '<div class="a-error">' . $LANG['msg_error'] . '</div>';