Esempio n. 1
0
function pages_custom($category = array())
{
    return \query\main::while_pages($category);
}
Esempio n. 2
0
                echo '<div class="bulk_options">';
                if ($ab_del) {
                    echo '<button class="btn" name="delete" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete_all'] . '</button> ';
                }
                if ($ab_edt) {
                    echo $LANG['action'] . ':
    <select name="action">';
                    foreach (array('publish' => $LANG['publish'], 'unpublish' => $LANG['unpublish']) as $k => $v) {
                        echo '<option value="' . $k . '">' . $v . '</option>';
                    }
                    echo '</select>
    <button class="btn" name="set_action">' . $LANG['set_all'] . '</button>';
                }
                echo '</div>';
            }
            foreach (\query\main::while_pages(array_merge(array('orderby' => isset($_GET['orderby']) ? urldecode($_GET['orderby']) : 'date desc'), $options)) as $item) {
                echo '<li><input type="checkbox" name="id[' . $item->ID . ']" />
  <div class="info-div"><h2>' . ($item->visible ? '<span class="msg-success">' . $LANG['published'] . '</span> ' : '<span class="msg-error">' . $LANG['notpublished'] . '</span> ') . $item->name . '</h2></div>
  <div class="options">';
                if ($ab_edt) {
                    echo '<a href="?route=pages.php&amp;action=edit&amp;id=' . $item->ID . '">' . $LANG['edit'] . '</a>';
                    echo '<a href="' . \site\utils::update_uri('', array('type' => !$item->visible ? 'publish' : 'unpublish', 'id' => $item->ID, 'token' => $csrf)) . '">' . (!$item->visible ? $LANG['publish'] : $LANG['unpublish']) . '</a>';
                }
                if ($ab_del) {
                    echo '<a href="' . \site\utils::update_uri('', array('action' => 'delete', 'id' => $item->ID, 'token' => $csrf)) . '" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete'] . '</a>';
                }
                echo '</div>
  </li>';
            }
            echo '</ul>