Ejemplo n.º 1
0
 public static function plugins($categories = array())
 {
     return admin_query::have_plugins($categories, array('only_count' => ''));
 }
Ejemplo n.º 2
0
<form action="#" method="GET" autocomplete="off">
<input type="hidden" name="route" value="plugins.php" />
<input type="hidden" name="action" value="list" />';
        if (isset($_GET['orderby'])) {
            echo '<input type="hidden" name="orderby" value="' . htmlspecialchars($_GET['orderby']) . '" />';
        }
        if (isset($_GET['type'])) {
            echo '<input type="hidden" name="type" value="' . htmlspecialchars($_GET['type']) . '" />';
        }
        echo '<input type="search" name="search" value="' . (isset($_GET['search']) ? htmlspecialchars($_GET['search']) : '') . '" placeholder="' . $LANG['plugins_search_input'] . '" />
<button class="btn">' . $LANG['search'] . '</button>
</form>

</div>';
        $p = admin_query::have_plugins($options = array('per_page' => 10, 'show' => isset($_GET['type']) ? $_GET['type'] : '', 'search' => isset($_GET['search']) ? urldecode($_GET['search']) : ''));
        echo '<div class="results">' . ((int) $p['results'] === 1 ? sprintf($LANG['result'], $p['results']) : sprintf($LANG['results'], $p['results']));
        if (!empty($_GET['type']) || !empty($_GET['search'])) {
            echo ' / <a href="?route=plugins.php&amp;action=list">' . $LANG['reset_view'] . '</a>';
        }
        echo '</div>';
        if ($p['results']) {
            echo '<form action="?route=plugins.php&amp;action=list" method="POST">

<ul class="elements-list">

<li class="head"><input type="checkbox" checkall /> ' . $LANG['name'] . '</li>';
            echo '<div class="bulk_options">';
            echo $LANG['action'] . ': ';
            echo '<select name="action">';
            foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) {