当前位置: 首页>>代码示例>>PHP>>正文


PHP page_list函数代码示例

本文整理汇总了PHP中page_list函数的典型用法代码示例。如果您正苦于以下问题:PHP page_list函数的具体用法?PHP page_list怎么用?PHP page_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了page_list函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: plugin_deleted_action

function plugin_deleted_action()
{
    global $vars;
    $_deleted_plugin_title = _('The list of deleted pages');
    $_deleted_plugin_title_withfilename = _('The list of deleted pages (with filename)');
    $dir = isset($vars['dir']) ? $vars['dir'] : 'backup';
    $withfilename = isset($vars['file']);
    $_DIR['diff']['dir'] = DIFF_DIR;
    $_DIR['diff']['ext'] = '.txt';
    $_DIR['backup']['dir'] = BACKUP_DIR;
    $_DIR['backup']['ext'] = BACKUP_EXT;
    // .gz or .txt
    //$_DIR['cache' ]['dir'] = CACHE_DIR; // No way to delete them via web browser now
    //$_DIR['cache' ]['ext'] = '.ref';
    //$_DIR['cache' ]['ext'] = '.rel';
    if (!isset($_DIR[$dir])) {
        return array('msg' => 'Deleted plugin', 'body' => 'No such setting: Choose backup or diff');
    }
    $deleted_pages = array_diff(auth::get_existpages($_DIR[$dir]['dir'], $_DIR[$dir]['ext']), auth::get_existpages());
    if ($withfilename) {
        $retval['msg'] = $_deleted_plugin_title_withfilename;
    } else {
        $retval['msg'] = $_deleted_plugin_title;
    }
    $retval['body'] = page_list($deleted_pages, $dir, $withfilename);
    return $retval;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:27,代码来源:deleted.inc.php

示例2: plugin_deleted_action

function plugin_deleted_action()
{
    global $vars, $_deleted_msg;
    $dir = isset($vars['dir']) ? $vars['dir'] : 'backup';
    $withfilename = isset($vars['file']);
    $_DIR['diff']['dir'] = DIFF_DIR;
    $_DIR['diff']['ext'] = '.txt';
    $_DIR['backup']['dir'] = BACKUP_DIR;
    $_DIR['backup']['ext'] = BACKUP_EXT;
    // .gz or .txt
    //$_DIR['cache' ]['dir'] = CACHE_DIR; // No way to delete them via web browser now
    //$_DIR['cache' ]['ext'] = '.ref';
    //$_DIR['cache' ]['ext'] = '.rel';
    if (!isset($_DIR[$dir])) {
        return array('msg' => 'Deleted plugin', 'body' => $_deleted_msg['no_such_setting']);
    }
    $deleted_pages = array_diff(Auth::get_existpages($_DIR[$dir]['dir'], $_DIR[$dir]['ext']), Auth::get_existpages());
    if ($withfilename) {
        $retval['msg'] = $_deleted_msg['title_withfilename'];
    } else {
        $retval['msg'] = $_deleted_msg['title_collision'];
    }
    $retval['body'] = page_list($deleted_pages, $dir, $withfilename);
    return $retval;
}
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:25,代码来源:deleted.inc.php

示例3: plugin_tb_action

function plugin_tb_action()
{
    global $vars, $trackback;
    if (isset($vars['url'])) {
        // Receive and save a TrackBack Ping (both GET and POST)
        $url = $vars['url'];
        $tb_id = isset($vars['tb_id']) ? $vars['tb_id'] : '';
        plugin_tb_save($url, $tb_id);
        // Send a response (and exit)
    } else {
        if ($trackback && isset($vars['__mode']) && isset($vars['tb_id'])) {
            // Show TrackBacks received (and exit)
            switch ($vars['__mode']) {
                case 'rss':
                    plugin_tb_mode_rss($vars['tb_id']);
                    break;
                    // case 'view': plugin_tb_mode_view($vars['tb_id']); break;
                // case 'view': plugin_tb_mode_view($vars['tb_id']); break;
                case 'view':
                    return plugin_tb_mode_view($vars['tb_id']);
            }
        }
        // Show List of pages that TrackBacks reached
        $pages = auth::get_existpages(TRACKBACK_DIR, '.txt');
        if (!empty($pages)) {
            return array('msg' => 'Trackback list', 'body' => page_list($pages, 'read', FALSE));
        } else {
            return array('msg' => '', 'body' => '');
        }
    }
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:31,代码来源:tb.inc.php

示例4: plugin_tb_action

function plugin_tb_action()
{
    global $trackback, $vars;
    if ($trackback && isset($vars['url'])) {
        // Receive and save a TrackBack Ping (both GET and POST)
        $url = $vars['url'];
        $tb_id = isset($vars['tb_id']) ? $vars['tb_id'] : '';
        list($error, $message) = plugin_tb_save($url, $tb_id);
        // Output the response
        plugin_tb_output_response($error, $message);
        exit;
    } else {
        if ($trackback && isset($vars['__mode']) && isset($vars['tb_id'])) {
            // Show TrackBacks received (and exit)
            switch ($vars['__mode']) {
                case 'rss':
                    plugin_tb_output_rsslist($vars['tb_id']);
                    break;
                case 'view':
                    plugin_tb_output_htmllist($vars['tb_id']);
                    break;
            }
            exit;
        } else {
            // Show List of pages that TrackBacks reached
            $pages = get_existpages(TRACKBACK_DIR, '.txt');
            if (!empty($pages)) {
                return array('msg' => 'Trackback list', 'body' => page_list($pages, 'read', false));
            } else {
                return array('msg' => '', 'body' => '');
            }
        }
    }
}
开发者ID:nsmr0604,项目名称:pukiwiki,代码行数:34,代码来源:tb.inc.php

示例5: page_edit

/**
 * The main Page editor panel.
 *
 * @param string|array $message The activity message
 */
function page_edit($message = '')
{
    global $event, $step;
    pagetop(gTxt('edit_pages'), $message);
    extract(array_map('assert_string', gpsa(array('copy', 'save_error', 'savenew'))));
    $name = sanitizeForPage(assert_string(gps('name')));
    $newname = sanitizeForPage(assert_string(gps('newname')));
    if ($step == 'page_delete' || empty($name) && $step != 'page_new' && !$savenew) {
        $name = safe_field('page', 'txp_section', "name = 'default'");
    } elseif ((($copy || $savenew) && $newname || $newname && $newname != $name) && !$save_error) {
        $name = $newname;
    }
    $buttons = n . tag(gTxt('page_name'), 'label', array('for' => 'new_page')) . br . fInput('text', 'newname', $name, 'input-medium', '', '', INPUT_MEDIUM, '', 'new_page', false, true);
    if ($name) {
        $buttons .= span(href(gTxt('duplicate'), '#', array('id' => 'txp_clone', 'class' => 'clone', 'title' => gTxt('page_clone'))), array('class' => 'txp-actions'));
    } else {
        $buttons .= hInput('savenew', 'savenew');
    }
    $html = !$save_error ? fetch('user_html', 'txp_page', 'name', $name) : gps('html');
    // Format of each entry is popTagLink -> array ( gTxt() string, class/ID).
    $tagbuild_items = array('page_article' => array('page_article_hed', 'article-tags'), 'page_article_nav' => array('page_article_nav_hed', 'article-nav-tags'), 'page_nav' => array('page_nav_hed', 'nav-tags'), 'page_xml' => array('page_xml_hed', 'xml-tags'), 'page_misc' => array('page_misc_hed', 'misc-tags'), 'page_file' => array('page_file_hed', 'file-tags'));
    $tagbuild_links = '';
    foreach ($tagbuild_items as $tb => $item) {
        $tagbuild_links .= wrapRegion($item[1] . '_group', taglinks($tb), $item[1], $item[0], 'page_' . $item[1]);
    }
    echo hed(gTxt('tab_pages'), 1, array('class' => 'txp-heading'));
    echo n . tag(n . tag(hed(gTxt('tagbuilder'), 2) . $tagbuild_links, 'div', array('id' => 'tagbuild_links', 'class' => 'txp-layout-cell txp-layout-1-4')) . n . tag(form(graf($buttons) . graf(tag(gTxt('page_code'), 'label', array('for' => 'html')) . br . '<textarea class="code" id="html" name="html" cols="' . INPUT_LARGE . '" rows="' . TEXTAREA_HEIGHT_LARGE . '" dir="ltr">' . txpspecialchars($html) . '</textarea>') . graf(fInput('submit', '', gTxt('save'), 'publish') . eInput('page') . sInput('page_save') . hInput('name', $name)), '', '', 'post', 'edit-form', '', 'page_form'), 'div', array('id' => 'main_content', 'class' => 'txp-layout-cell txp-layout-2-4')) . n . tag(graf(sLink('page', 'page_new', gTxt('create_new_page')), ' class="action-create"') . page_list($name) . n, 'div', array('id' => 'content_switcher', 'class' => 'txp-layout-cell txp-layout-1-4')) . n, 'div', array('id' => $event . '_container', 'class' => 'txp-layout-grid'));
}
开发者ID:hcgtv,项目名称:textpattern,代码行数:33,代码来源:txp_page.php

示例6: page_edit

function page_edit($message = '')
{
    global $step;
    pagetop(gTxt('edit_pages'), $message);
    extract(gpsa(array('name', 'div')));
    $name = (!$name or $step == 'page_delete') ? 'default' : $name;
    $divline = $step == "div_edit" ? graf(gTxt('you_are_editing_div') . sp . strong($div)) : '';
    echo startTable('edit') . tr(td() . td(graf(gTxt('you_are_editing_page') . sp . strong($name)) . $divline) . td()) . tr(tda(hed(gTxt('useful_tags'), 2) . graf(gTxt('page_article_hed') . br . small(taglinks('page_article')), ' class="column"') . graf(gTxt('page_article_nav_hed') . br . small(taglinks('page_article_nav')), ' class="column"') . graf(gTxt('page_nav_hed') . br . small(taglinks('page_nav')), ' class="column"') . graf(gTxt('page_xml_hed') . br . small(taglinks('page_xml')), ' class="column"') . graf(gTxt('page_misc_hed') . br . small(taglinks('page_misc')), ' class="column"') . graf(gTxt('page_file_hed') . br . small(taglinks('page_file')), ' class="column"')) . tda(page_edit_form($name), ' class="column"') . tda(hed(gTxt('all_pages'), 2) . page_list($name), ' class="column"')) . endTable();
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:9,代码来源:txp_page.php

示例7: page_edit

function page_edit($message = '')
{
    global $step;
    pagetop(gTxt('edit_pages'), $message);
    extract(gpsa(array('name', 'div', 'newname', 'copy')));
    $name = (!$name or $step == 'page_delete') ? 'default' : $name;
    $name = $copy && trim(preg_replace('/[<>&"\']/', '', $newname)) ? $newname : $name;
    echo startTable('edit') . tr(tda(n . hed(gTxt('tagbuilder'), 2) . n . n . hed('<a href="#article-tags" onclick="toggleDisplay(\'article-tags\'); return false;">' . gTxt('page_article_hed') . '</a>', 3, ' class="plain"') . n . '<div id="article-tags">' . taglinks('page_article') . '</div>' . n . n . hed('<a href="#article-nav-tags" onclick="toggleDisplay(\'article-nav-tags\'); return false;">' . gTxt('page_article_nav_hed') . '</a>', 3, ' class="plain"') . n . '<div id="article-nav-tags" style="display: none;">' . taglinks('page_article_nav') . '</div>' . n . n . hed('<a href="#nav-tags" onclick="toggleDisplay(\'nav-tags\'); return false;">' . gTxt('page_nav_hed') . '</a>', 3, ' class="plain"') . n . '<div id="nav-tags" style="display: none;">' . taglinks('page_nav') . '</div>' . n . n . hed('<a href="#xml-tags" onclick="toggleDisplay(\'xml-tags\'); return false;">' . gTxt('page_xml_hed') . '</a>', 3, ' class="plain"') . n . '<div id="xml-tags" style="display: none;">' . taglinks('page_xml') . '</div>' . n . n . hed('<a href="#misc-tags" onclick="toggleDisplay(\'misc-tags\'); return false;">' . gTxt('page_misc_hed') . '</a>', 3, ' class="plain"') . n . '<div id="misc-tags" style="display: none;">' . taglinks('page_misc') . '</div>' . n . n . hed('<a href="#file-tags" onclick="toggleDisplay(\'file-tags\'); return false;">' . gTxt('page_file_hed') . '</a>', 3, ' class="plain"') . n . '<div id="file-tags" style="display: none;">' . taglinks('page_file') . '</div>', ' class="column"') . tda(page_edit_form($name), ' class="column"') . tda(hed(gTxt('all_pages'), 2) . page_list($name), ' class="column"')) . endTable();
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:9,代码来源:txp_page.php

示例8: page_list

function page_list($pages)
{
    global $app;
    foreach ($pages as $key => $page) {
        if (!empty($page['pages'])) {
            page_list($page['pages']);
        } else {
            $app['page_list'][$page['url']] = $page;
        }
    }
}
开发者ID:jasonnug,项目名称:simple-web-framework,代码行数:11,代码来源:data.php

示例9: page_edit

function page_edit($message = '')
{
    global $step;
    pagetop(gTxt('edit_pages'), $message);
    extract(gpsa(array('name', 'newname', 'copy')));
    if (!$name or $step == 'page_delete') {
        $name = safe_field('page', 'txp_section', "name = 'default'");
    }
    $name = $copy && trim(preg_replace('/[<>&"\']/', '', $newname)) ? $newname : $name;
    echo startTable('edit') . tr(tda(n . hed(gTxt('tagbuilder'), 2) . n . n . hed('<a href="#article-tags">' . gTxt('page_article_hed') . '</a>', 3, ' class="plain lever expanded"') . n . '<div id="article-tags" class="toggle on" style="display:block">' . taglinks('page_article') . '</div>' . n . n . hed('<a href="#article-nav-tags">' . gTxt('page_article_nav_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="article-nav-tags" class="toggle" style="display:none">' . taglinks('page_article_nav') . '</div>' . n . n . hed('<a href="#nav-tags">' . gTxt('page_nav_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="nav-tags" class="toggle" style="display:none">' . taglinks('page_nav') . '</div>' . n . n . hed('<a href="#xml-tags">' . gTxt('page_xml_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="xml-tags" class="toggle" style="display:none">' . taglinks('page_xml') . '</div>' . n . n . hed('<a href="#misc-tags">' . gTxt('page_misc_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="misc-tags" class="toggle" style="display:none">' . taglinks('page_misc') . '</div>' . n . n . hed('<a href="#file-tags">' . gTxt('page_file_hed') . '</a>', 3, ' class="plain lever"') . n . '<div id="file-tags" class="toggle" style="display:none">' . taglinks('page_file') . '</div>', ' class="column"') . tda(page_edit_form($name), ' class="column"') . tda(hed(gTxt('all_pages'), 2) . page_list($name), ' class="column"')) . endTable();
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:11,代码来源:txp_page.php

示例10: plugin_list_getlist

function plugin_list_getlist($withfilename = false)
{
    global $non_list, $whatsnew;
    $pages = array_diff(get_existpages(), array($whatsnew));
    if (!$withfilename) {
        $pages = array_diff($pages, preg_grep('/' . $non_list . '/S', $pages));
    }
    if (empty($pages)) {
        return '';
    }
    return page_list($pages, 'read', $withfilename);
}
开发者ID:nsmr0604,项目名称:pukiwiki,代码行数:12,代码来源:list.inc.php

示例11: plugin_list_getlist

function plugin_list_getlist($withfilename = FALSE, $listcmd = 'read')
{
    global $non_list, $whatsnew;
    $pages = array_diff(auth::get_existpages(), array($whatsnew));
    if (!$withfilename) {
        $pages = array_diff($pages, preg_grep('/' . $non_list . '/S', $pages));
    }
    if (empty($pages)) {
        return '';
    }
    $cmd = $listcmd == 'read' || $listcmd == 'edit' ? $listcmd : 'read';
    return page_list($pages, $cmd, $withfilename);
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:13,代码来源:list.inc.php

示例12: plugin_list_getlist

function plugin_list_getlist($withfilename = FALSE)
{
    global $non_list, $whatsnew, $style_name;
    $pages = array_diff(get_existpages(), array($whatsnew));
    if (!$withfilename) {
        $pages = array_diff($pages, preg_grep('/' . $non_list . '/S', $pages));
    }
    if (empty($pages)) {
        return '';
    }
    if (ss_admin_check()) {
        $style_name = '..';
        return plugin_list_create_html(plugin_list_array($pages), $withfilename);
    } else {
        return page_list($pages, 'read', $withfilename);
    }
}
开发者ID:big2men,项目名称:qhm,代码行数:17,代码来源:list.inc.php

示例13: page_edit

function page_edit($message = '')
{
    global $event, $step;
    pagetop(gTxt('edit_pages'), $message);
    extract(gpsa(array('name', 'newname', 'copy', 'savenew')));
    if ($step == 'page_delete' || empty($name) && $step != 'page_new' && !$savenew) {
        $name = safe_field('page', 'txp_section', "name = 'default'");
    } elseif (($copy || $savenew) && trim(preg_replace('/[<>&"\']/', '', $newname))) {
        $name = $newname;
    }
    // Format of each entry is popTagLink -> array ( gTxt() string, class/ID)
    $tagbuild_items = array('page_article' => array('page_article_hed', 'article-tags'), 'page_article_nav' => array('page_article_nav_hed', 'article-nav-tags'), 'page_nav' => array('page_nav_hed', 'nav-tags'), 'page_xml' => array('page_xml_hed', 'xml-tags'), 'page_misc' => array('page_misc_hed', 'misc-tags'), 'page_file' => array('page_file_hed', 'file-tags'));
    $tagbuild_options = '';
    foreach ($tagbuild_items as $tb => $item) {
        $tagbuild_options .= n . n . '<div class="' . $item[1] . '">' . hed('<a href="#' . $item[1] . '">' . gTxt($item[0]) . '</a>', 3, ' class="plain lever' . (get_pref('pane_page_' . $item[1] . '_visible') ? ' expanded' : '') . '"') . n . '<div id="' . $item[1] . '" class="toggle" style="display:' . (get_pref('pane_page_' . $item[1] . '_visible') ? 'block' : 'none') . '">' . taglinks($tb) . '</div></div>';
    }
    echo '<div id="' . $event . '_container" class="txp-container txp-edit">' . startTable('edit', '', 'edit-pane') . tr(tda('<div id="tagbuild_links">' . n . hed(gTxt('tagbuilder'), 2) . $tagbuild_options . n . '</div>', ' class="column"') . tda(page_edit_form($name), ' class="column"') . tda('<div id="content_switcher">' . hed(gTxt('all_pages'), 2) . graf(sLink('page', 'page_new', gTxt('create_new_page')), ' class="action-create smallerbox"') . page_list($name) . '</div>', ' class="column"')) . endTable() . '</div>';
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:18,代码来源:txp_page.php

示例14: plugin_referer_action

function plugin_referer_action()
{
    global $vars, $referer;
    $qm = get_qm();
    // Setting: Off
    if (!$referer) {
        return array('msg' => '', 'body' => '');
    }
    if (isset($vars['page']) && is_page($vars['page'])) {
        $sort = empty($vars['sort']) ? '0d' : $vars['sort'];
        return array('msg' => $qm->m['plg_referer']['title'], 'body' => plugin_referer_body($vars['page'], $sort));
    }
    $pages = get_existpages(TRACKBACK_DIR, '.ref');
    if (empty($pages)) {
        return array('msg' => '', 'body' => '');
    } else {
        return array('msg' => $qm->m['plg_referer']['title_list'], 'body' => page_list($pages, 'referer', FALSE));
    }
}
开发者ID:big2men,项目名称:qhm,代码行数:19,代码来源:referer.inc.php

示例15: plugin_referer_action

function plugin_referer_action()
{
    global $vars, $referer;
    global $_referer_msg;
    // Setting: Off
    if (!$referer) {
        return array('msg' => '', 'body' => '');
    }
    if (isset($vars['page']) && is_page($vars['page'])) {
        $sort = empty($vars['sort']) ? '0d' : $vars['sort'];
        return array('msg' => $_referer_msg['msg_H0_Refer'], 'body' => plugin_referer_body($vars['page'], $sort));
    }
    $pages = get_existpages(TRACKBACK_DIR, '.ref');
    if (empty($pages)) {
        return array('msg' => '', 'body' => '');
    } else {
        return array('msg' => 'referer list', 'body' => page_list($pages, 'referer', false));
    }
}
开发者ID:nsmr0604,项目名称:pukiwiki,代码行数:19,代码来源:referer.inc.php


注:本文中的page_list函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。