• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP strip_bracket函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: plugin_newpage_action

function plugin_newpage_action()
{
    global $vars;
    $_btn_edit = _('Edit');
    $_msg_newpage = _('New page');
    // if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing');
    if (auth::check_role('readonly')) {
        die_message(_('PKWK_READONLY prohibits editing'));
    }
    if (auth::is_check_role(PKWK_CREATE_PAGE)) {
        die_message(_('PKWK_CREATE_PAGE prohibits editing'));
    }
    if ($vars['page'] == '') {
        $retvars['msg'] = $_msg_newpage;
        $retvars['body'] = plugin_newpage_convert();
        return $retvars;
    } else {
        $page = strip_bracket($vars['page']);
        if (isset($vars['refer'])) {
            $r_page = get_fullname($page, $vars['refer']);
            $r_refer = 'refer=' . $vars['refer'];
        } else {
            $r_page = $page;
            $r_refer = '';
        }
        pkwk_headers_sent();
        header('Location: ' . get_page_location_uri($r_page, $r_refer));
        exit;
    }
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:30,代码来源:newpage.inc.php


示例2: plugin_ls2_convert

function plugin_ls2_convert()
{
    global $script, $vars, $_ls2_msg_title;
    $params = array('link' => FALSE, 'title' => FALSE, 'include' => FALSE, 'reverse' => FALSE, 'compact' => PLUGIN_LS2_LIST_COMPACT, '_args' => array(), '_done' => FALSE);
    $args = array();
    $prefix = '';
    if (func_num_args()) {
        $args = func_get_args();
        $prefix = array_shift($args);
    }
    if ($prefix == '') {
        $prefix = strip_bracket($vars['page']) . '/';
    }
    foreach ($args as $arg) {
        plugin_ls2_check_arg($arg, $params);
    }
    $title = !empty($params['_args']) ? join(',', $params['_args']) : str_replace('$1', htmlsc($prefix), $_ls2_msg_title);
    // Auto
    if (!$params['link']) {
        return plugin_ls2_show_lists($prefix, $params);
    }
    $tmp = array();
    $tmp[] = 'plugin=ls2&prefix=' . rawurlencode($prefix);
    if (isset($params['title'])) {
        $tmp[] = 'title=1';
    }
    if (isset($params['include'])) {
        $tmp[] = 'include=1';
    }
    return '<p><a href="' . $script . '?' . join('&amp;', $tmp) . '">' . $title . '</a></p>' . "\n";
}
开发者ID:geoemon2k,项目名称:source_wiki,代码行数:31,代码来源:ls2.inc.php


示例3: plugin_ls2_convert

function plugin_ls2_convert()
{
    global $vars;
    if (!isset($vars['page'])) {
        return '';
    }
    $params = array('link' => FALSE, 'title' => FALSE, 'include' => FALSE, 'reverse' => FALSE, 'compact' => PLUGIN_LS2_LIST_COMPACT, '_args' => array(), '_done' => FALSE);
    $args = func_get_args();
    $prefix = '';
    if (!empty($args)) {
        $prefix = array_shift($args);
    }
    if ($prefix == '') {
        $prefix = strip_bracket($vars['page']) . '/';
    }
    foreach ($args as $arg) {
        plugin_ls2_check_arg($arg, $params);
    }
    $title = !empty($params['_args']) ? join(',', $params['_args']) : str_replace('$1', htmlsc($prefix), T_("List of pages which begin with ' \$1'"));
    // Auto
    if (!$params['link']) {
        return '<div class="list_pages">' . plugin_ls2_show_lists($prefix, $params) . '</div>';
    }
    $tmp = array();
    if (isset($params['title'])) {
        $tmp[] = 'title=1';
    }
    if (isset($params['include'])) {
        $tmp[] = 'include=1';
    }
    return '<p><a href="' . get_cmd_uri('ls2', $prefix) . join('&amp;', $tmp) . '">' . $title . '</a></p>' . "\n";
}
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:32,代码来源:ls2.inc.php


示例4: plugin_splitinclude_convert

function plugin_splitinclude_convert()
{
    global $vars, $get, $post;
    global $_msg_splitinclude_restrict;
    static $splitinclude_list = array();
    //処理済ページ名の配列
    if (func_num_args() == 0) {
        return;
    }
    $splitinclude_list[$vars['page']] = TRUE;
    $func_vars_num = func_num_args();
    $func_vars_array = func_get_args();
    $incbody = "";
    foreach ($func_vars_array as $page) {
        $page = strip_bracket($page);
        if (!is_page($page) or isset($splitinclude_list[$page])) {
            return '';
        }
        $splitinclude_list[$page] = TRUE;
        $_page = $vars['page'];
        $get['page'] = $post['page'] = $vars['page'] = $page;
        $wiki = Factory::Wiki($page);
        // splitincludeのときは、認証画面をいちいち出さず、後始末もこちらでつける
        if ($wiki->isReadable()) {
            $body = $wiki->render();
        } else {
            $body = str_replace('$1', $page, $_msg_splitinclude_restrict);
        }
        $get['page'] = $post['page'] = $vars['page'] = $_page;
        $incbody .= "<div style=\"width:" . intval(96 / $func_vars_num) . "%;margin:0px 2px;vartical-align:top;float:left;\">{$body}</div>\n";
    }
    $incbody = "<div style=\"width:100%\">\n{$incbody}</div>\n<div style=\"display:block;\"></div>\n";
    return $incbody;
}
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:34,代码来源:splitinclude.inc.php


示例5: plugin_newpage_action

function plugin_newpage_action()
{
    global $vars;
    $qm = get_qm();
    if (PKWK_READONLY) {
        die_message($qm->m['fmt_err_pkwk_readonly']);
    }
    if ($vars['page'] == '') {
        $retvars['msg'] = $qm->m['plg_newpage']['label'];
        $retvars['body'] = plugin_newpage_convert();
        if (preg_match('/id="([^"]+)"/', $retvars['body'], $ms)) {
            $domid = $ms[1];
            //jquery ライブラリの読み込み
            $qt = get_qt();
            $qt->setv('jquery_include', true);
            $addscript = <<<EOS
<script type="text/javascript">
jQuery(function(){
\tjQuery("#{$domid}").focus().select();
});
</script>
EOS;
            $qt->appendv_once('plugin_select_fsize', 'beforescript', $addscript);
        }
        return $retvars;
    } else {
        $page = strip_bracket($vars['page']);
        $r_page = rawurlencode(isset($vars['refer']) ? get_fullname($page, $vars['refer']) : $page);
        $r_refer = rawurlencode($vars['refer']);
        pkwk_headers_sent();
        header('Location: ' . get_script_uri() . '?cmd=read&page=' . $r_page . '&refer=' . $r_refer);
        exit;
    }
}
开发者ID:big2men,项目名称:qhm,代码行数:34,代码来源:newpage.inc.php


示例6: plugin_unfreeze_action

function plugin_unfreeze_action()
{
    global $script, $vars, $function_freeze;
    global $_title_isunfreezed, $_title_unfreezed, $_title_unfreeze;
    global $_msg_invalidpass, $_msg_unfreezing, $_btn_unfreeze;
    $page = isset($vars['page']) ? $vars['page'] : '';
    if (!$function_freeze || !is_page($page)) {
        return array('msg' => '', 'body' => '');
    }
    $pass = isset($vars['pass']) ? $vars['pass'] : NULL;
    $msg = $body = '';
    if (!is_freeze($page)) {
        // Unfreezed already
        $msg =& $_title_isunfreezed;
        $body = str_replace('$1', htmlspecialchars(strip_bracket($page)), '<p>' . $_title_isunfreezed . '</p>');
    } else {
        if ($pass !== NULL && pkwk_login($pass)) {
            // Unfreeze
            $postdata = get_source($page);
            array_shift($postdata);
            $postdata = join('', $postdata);
            file_write(DATA_DIR, $page, $postdata, TRUE);
            // Update
            is_freeze($page, TRUE);
            if (PLUGIN_UNFREEZE_EDIT) {
                $vars['cmd'] = 'read';
                // To show 'Freeze' link
                $msg =& $_title_unfreezed;
                $body = edit_form($page, $postdata);
            } else {
                $vars['cmd'] = 'read';
                $msg =& $_title_unfreezed;
                $body = '';
            }
        } else {
            // Show unfreeze form
            // kazuwaya
            $msg =& $_title_unfreeze;
            $s_page = htmlspecialchars($page);
            $body = $pass === NULL ? '' : "<p><strong>{$_msg_invalidpass}</strong></p>\n";
            $body .= <<<EOD
<p>{$_msg_unfreezing}</p>
<form action="{$script}" method="post">
 <p>
  <input type="hidden"   name="cmd"  value="unfreeze" />
  <input type="hidden"   name="page" value="{$s_page}" />
  <input type="password" name="pass" size="12" />
  <input type="submit"   name="ok"   value="{$_btn_unfreeze}" />
 </p>
</form>
EOD;
        }
    }
    return array('msg' => $msg, 'body' => $body);
}
开发者ID:lolo3-sight,项目名称:wiki,代码行数:55,代码来源:unfreeze.inc.php


示例7: plugin_navibar2_convert

function plugin_navibar2_convert()
{
    global $vars, $hr;
    $page = strip_bracket($vars['page']);
    $navi_page = plugin_navibar2_search_navipage($page);
    if (!empty($navi_page)) {
        return plugin_navibar2_makehtml($navi_page);
    }
    exist_plugin('navibar');
    return do_plugin_convert('navibar', NAVIBAR2_DEFAULT_PARM) . $hr;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:11,代码来源:navibar2.inc.php


示例8: plugin_freeze_action

function plugin_freeze_action()
{
    global $script, $vars, $function_freeze;
    $_title_isfreezed = _(' $1 has already been frozen');
    $_title_freezed = _(' $1 has been frozen.');
    $_title_freeze = _('Freeze  $1');
    $_msg_invalidpass = _('Invalid password.');
    $_msg_freezing = _('Please input the password for freezing.');
    $_btn_freeze = _('Freeze');
    $page = isset($vars['page']) ? $vars['page'] : '';
    if (!$function_freeze || is_cantedit($page) || !is_page($page)) {
        return array('msg' => '', 'body' => '');
    }
    $pass = isset($vars['pass']) ? $vars['pass'] : NULL;
    $msg = $body = '';
    if (is_freeze($page)) {
        // Freezed already
        $msg =& $_title_isfreezed;
        $body = str_replace('$1', htmlspecialchars(strip_bracket($page)), $_title_isfreezed);
    } else {
        if (!auth::check_role('role_adm_contents') || $pass !== NULL && pkwk_login($pass)) {
            // Freeze
            $postdata = get_source($page);
            array_unshift($postdata, "#freeze\n");
            file_write(DATA_DIR, $page, join('', $postdata), TRUE);
            // Update
            is_freeze($page, TRUE);
            $vars['cmd'] = 'read';
            $msg =& $_title_freezed;
            $body = '';
        } else {
            // Show a freeze form
            $msg =& $_title_freeze;
            $s_page = htmlspecialchars($page);
            $body = $pass === NULL ? '' : "<p><strong>{$_msg_invalidpass}</strong></p>\n";
            $body .= <<<EOD
<p>{$_msg_freezing}</p>
<form action="{$script}" method="post">
 <div>
  <input type="hidden"   name="cmd"  value="freeze" />
  <input type="hidden"   name="page" value="{$s_page}" />
  <input type="password" name="pass" size="12" />
  <input type="submit"   name="ok"   value="{$_btn_freeze}" />
 </div>
</form>
EOD;
        }
    }
    return array('msg' => $msg, 'body' => $body);
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:50,代码来源:freeze.inc.php


示例9: plugin_freeze_action

function plugin_freeze_action()
{
    global $script, $vars, $function_freeze;
    global $_title_isfreezed, $_title_freezed, $_title_freeze;
    global $_msg_invalidpass, $_msg_freezing, $_btn_freeze;
    $qt = get_qt();
    //キャッシュしない
    $qt->enable_cache = false;
    $page = isset($vars['page']) ? $vars['page'] : '';
    if (!$function_freeze || !is_page($page)) {
        return array('msg' => '', 'body' => '');
    }
    $pass = isset($vars['pass']) ? $vars['pass'] : NULL;
    $msg = $body = '';
    if (is_freeze($page)) {
        // Freezed already
        $msg =& $_title_isfreezed;
        $body = str_replace('$1', htmlspecialchars(strip_bracket($page)), $_title_isfreezed);
    } else {
        if ($pass !== NULL && pkwk_login($pass)) {
            // Freeze
            $postdata = get_source($page);
            array_unshift($postdata, "#freeze\n");
            file_write(DATA_DIR, $page, join('', $postdata), TRUE);
            // Update
            is_freeze($page, TRUE);
            $vars['cmd'] = 'read';
            $msg =& $_title_freezed;
            $body = '';
        } else {
            // Show a freeze form
            $msg =& $_title_freeze;
            $s_page = htmlspecialchars($page);
            $body = $pass === NULL ? '' : "<p><strong>{$_msg_invalidpass}</strong></p>\n";
            $body .= <<<EOD
<p>{$_msg_freezing}</p>
<form action="{$script}" method="post">
 <div>
  <input type="hidden"   name="cmd"  value="freeze" />
  <input type="hidden"   name="page" value="{$s_page}" />
  <input type="password" name="pass" size="12" />
  <input type="submit"   name="ok"   value="{$_btn_freeze}" />
 </div>
</form>
EOD;
        }
    }
    return array('msg' => $msg, 'body' => $body);
}
开发者ID:big2men,项目名称:qhm,代码行数:49,代码来源:freeze.inc.php


示例10: plugin_menu_convert

function plugin_menu_convert()
{
    global $vars, $menubar;
    static $menu = NULL;
    $num = func_num_args();
    if ($num > 0) {
        // Try to change default 'MenuBar' page name (only)
        if ($num > 1) {
            return '#menu(): Zero or One argument needed';
        }
        if ($menu !== NULL) {
            return '#menu(): Already set: ' . htmlspecialchars($menu);
        }
        $args = func_get_args();
        if (!is_page($args[0])) {
            return '#menu(): No such page: ' . htmlspecialchars($args[0]);
        } else {
            $menu = $args[0];
            // Set
            return '';
        }
    } else {
        // Output menubar page data
        $page = $menu === NULL ? $menubar : $menu;
        if (MENU_ENABLE_SUBMENU) {
            $path = explode('/', strip_bracket($vars['page']));
            while (!empty($path)) {
                $_page = join('/', $path) . '/' . MENU_SUBMENUBAR;
                if (is_page($_page)) {
                    $page = $_page;
                    break;
                }
                array_pop($path);
            }
        }
        if (!is_page($page)) {
            return '';
        } else {
            if ($vars['page'] == $page) {
                return '<!-- #menu(): You already view ' . htmlspecialchars($page) . ' -->';
            } else {
                // Cut fixed anchors
                $menutext = preg_replace('/^(\\*{1,3}.*)\\[#[A-Za-z][\\w-]+\\](.*)$/m', '$1$2', get_source($page));
                return preg_replace('/<ul[^>]*>/', '<ul>', convert_html($menutext));
            }
        }
    }
}
开发者ID:KimuraYoichi,项目名称:PukiWiki,代码行数:48,代码来源:menu.inc.php


示例11: plugin_todo_convert

/**
 * ページ内で #todo 指定された場合の呼び出しエントリポイント。
 *
 * @returns $result = $content
 */
function plugin_todo_convert()
{
    global $vars, $script;
    // default is to traverse all subtopics under own topic
    $page = strip_bracket($vars['page']);
    switch (func_num_args()) {
        case 2:
            $mark = func_get_arg(1);
        case 1:
            $page = func_get_arg(0);
        default:
    }
    $body = todo_generate_index($vars, $page, $mark);
    # echo "<pre>"; print_r($body); exit;
    return $body;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:21,代码来源:todo.inc.php


示例12: plugin_includesubmenu_convert

function plugin_includesubmenu_convert()
{
    global $script, $vars;
    $ShowPageName = FALSE;
    if (func_num_args()) {
        $aryargs = func_get_args();
        if ($aryargs[0] == 'showpagename') {
            $ShowPageName = TRUE;
        }
    }
    $SubMenuPageName = '';
    $tmppage = strip_bracket($vars['page']);
    //下階層のSubMenuページ名
    $SubMenuPageName1 = $tmppage . '/SubMenu';
    //同階層のSubMenuページ名
    $LastSlash = strrpos($tmppage, '/');
    if ($LastSlash === FALSE) {
        $SubMenuPageName2 = 'SubMenu';
    } else {
        $SubMenuPageName2 = substr($tmppage, 0, $LastSlash) . '/SubMenu';
    }
    //echo "$SubMenuPageName1 <br />";
    //echo "$SubMenuPageName2 <br />";
    //下階層にSubMenuがあるかチェック
    //あれば、それを使用
    if (is_page($SubMenuPageName1)) {
        //下階層にSubMenu有り
        $SubMenuPageName = $SubMenuPageName1;
    } else {
        if (is_page($SubMenuPageName2)) {
            //同階層にSubMenu有り
            $SubMenuPageName = $SubMenuPageName2;
        } else {
            //SubMenu無し
            return "";
        }
    }
    $body = convert_html(get_source($SubMenuPageName));
    if ($ShowPageName) {
        $r_page = rawurlencode($SubMenuPageName);
        $s_page = htmlspecialchars($SubMenuPageName);
        $link = "<a href=\"{$script}?cmd=edit&amp;page={$r_page}\">{$s_page}</a>";
        $body = "<h1>{$link}</h1>\n{$body}";
    }
    return $body;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:46,代码来源:includesubmenu.inc.php


示例13: plugin_footarea_convert

function plugin_footarea_convert()
{
    global $vars, $footarea, $use_open_uri_in_new_window;
    static $foot = NULL;
    static $foothtml = NULL;
    //miko patched
    // Cached MenuHTML
    if ($foothtml !== NULL) {
        return preg_replace('/<ul class="list[^>]*>/', '<ul class="foot">', $foothtml);
    }
    //miko patched
    if (func_num_args()) {
        $args = func_get_args();
        if (is_page($args[0])) {
            $foot = $args[0];
        }
        return '';
    }
    $page = $foot === NULL ? $footarea : $foot;
    if (FOOT_ENABLE_SUBFOOT) {
        $path = explode('/', strip_bracket($vars['page']));
        while (count($path)) {
            $_page = join('/', $path) . '/' . FOOT_SUBFOOTBAR;
            if (is_page($_page)) {
                $page = $_page;
                break;
            }
            array_pop($path);
        }
    }
    if (!is_page($page)) {
        return '';
        //	} else if ($vars['page'] == $page) {
        //		return '<!-- #footarea(): You already view ' . htmlspecialchars($page) . ' -->';
    }
    $foottext = preg_replace('/^(\\*{1,3}.*)\\[#[A-Za-z][\\w-]+\\](.*)$/m', '$1$2', get_source($page));
    if (function_exists('convert_filter')) {
        $foottext = convert_filter($foottext);
    }
    $save_newwindow = $use_open_uri_in_new_window;
    $use_open_uri_in_new_window = 0;
    $foothtml = convert_html($foottext);
    $use_open_uri_in_new_window = $save_newwindow;
    $foothtml = str_replace("\n", '', $foothtml);
    return preg_replace('/<ul class="list[^>]*>/', '<ul class="foot">', $foothtml);
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:46,代码来源:footarea.inc.php


示例14: plugin_headarea_convert

function plugin_headarea_convert()
{
    global $vars, $headarea, $use_open_uri_in_new_window;
    static $head = NULL;
    static $headhtml = NULL;
    //miko patched
    // Cached MenuHTML
    if ($headhtml !== NULL) {
        return preg_replace('/<ul class="list[^>]*>/', '<ul class="head">', $headhtml);
    }
    //miko patched
    if (func_num_args()) {
        $args = func_get_args();
        if (is_page($args[0])) {
            $head = $args[0];
        }
        return '';
    }
    $page = $head === NULL ? $headarea : $head;
    if (HEAD_ENABLE_SUBHEAD) {
        $path = explode('/', strip_bracket($vars['page']));
        while (count($path)) {
            $_page = join('/', $path) . '/' . HEAD_SUBHEADBAR;
            if (is_page($_page)) {
                $page = $_page;
                break;
            }
            array_pop($path);
        }
    }
    if (!is_page($page)) {
        return '';
        //	} else if ($vars['page'] == $page) {
        //		return '<!-- #headarea(): You already view ' . htmlsc($page) . ' -->';
    }
    $headtext = preg_replace('/^(\\*{1,3}.*)\\[#[A-Za-z][\\w-]+\\](.*)$/m', '$1$2', get_source($page));
    if (function_exists('convert_filter')) {
        $headtext = convert_filter($headtext);
    }
    $save_newwindow = $use_open_uri_in_new_window;
    $use_open_uri_in_new_window = 0;
    $headhtml = RendererFactory::factory($headtext);
    $use_open_uri_in_new_window = $save_newwindow;
    $headhtml = str_replace("\n", '', $headhtml);
    return preg_replace('/<ul class="list[^>]*>/', '<ul class="head">', $headhtml);
}
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:46,代码来源:headarea.inc.php


示例15: plugin_random_action

function plugin_random_action()
{
    global $vars;
    $pattern = strip_bracket($vars['refer']) . '/';
    $pages = array();
    foreach (get_existpages() as $_page) {
        if (strpos($_page, $pattern) === 0) {
            $pages[$_page] = strip_bracket($_page);
        }
    }
    srand((double) microtime() * 1000000);
    $page = array_rand($pages);
    if ($page != '') {
        $vars['refer'] = $page;
    }
    return array('body' => '', 'msg' => '');
}
开发者ID:KimuraYoichi,项目名称:PukiWiki,代码行数:17,代码来源:random.inc.php


示例16: plugin_includesubmenu_convert

function plugin_includesubmenu_convert()
{
    global $vars;
    $ShowPageName = FALSE;
    if (func_num_args()) {
        $aryargs = func_get_args();
        if ($aryargs[0] == 'showpagename') {
            $ShowPageName = TRUE;
        }
    }
    $SubMenuPageName = '';
    $tmppage = strip_bracket($vars['page']);
    //下階層のSubMenuページ名
    $SubMenuPageName1 = $tmppage . '/SubMenu';
    //同階層のSubMenuページ名
    $LastSlash = strrpos($tmppage, '/');
    if ($LastSlash === FALSE) {
        $SubMenuPageName2 = 'SubMenu';
    } else {
        $SubMenuPageName2 = substr($tmppage, 0, $LastSlash) . '/SubMenu';
    }
    //echo "$SubMenuPageName1 <br />";
    //echo "$SubMenuPageName2 <br />";
    //下階層にSubMenuがあるかチェック
    //あれば、それを使用
    if (is_page($SubMenuPageName1)) {
        //下階層にSubMenu有り
        $SubMenuPageName = $SubMenuPageName1;
    } else {
        if (is_page($SubMenuPageName2)) {
            //同階層にSubMenu有り
            $SubMenuPageName = $SubMenuPageName2;
        } else {
            //SubMenu無し
            return "";
        }
    }
    $wiki = WikiFactory::Wiki($SubMenuPageName);
    $body = $wiki->render();
    if ($ShowPageName) {
        $s_page = htmlsc($SubMenuPageName);
        $link = '<a href="' . $wiki->get_uri('edit') . '">$s_page</a>';
        $body = "<h1>{$link}</h1>\n{$body}";
    }
    return $body;
}
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:46,代码来源:includesubmenu.inc.php


示例17: plugin_newpage_action

function plugin_newpage_action()
{
    global $vars, $_btn_edit, $_msg_newpage;
    if (PKWK_READONLY) {
        die_message('PKWK_READONLY prohibits editing');
    }
    if ($vars['page'] == '') {
        $retvars['msg'] = $_msg_newpage;
        $retvars['body'] = plugin_newpage_convert();
        return $retvars;
    } else {
        $page = strip_bracket($vars['page']);
        $r_page = rawurlencode(isset($vars['refer']) ? get_fullname($page, $vars['refer']) : $page);
        $r_refer = rawurlencode($vars['refer']);
        pkwk_headers_sent();
        header('Location: ' . get_script_uri() . '?cmd=read&page=' . $r_page . '&refer=' . $r_refer);
        exit;
    }
}
开发者ID:nsmr0604,项目名称:pukiwiki,代码行数:19,代码来源:newpage.inc.php


示例18: plugin_lastmod_inline

function plugin_lastmod_inline()
{
    global $vars;
    global $WikiName, $BracketName;
    $args = func_get_args();
    if ($args[0]) {
        if (preg_match("/^({$WikiName}|\\[\\[{$BracketName}\\]\\])\$/", $args[0])) {
            $_page = get_fullname(strip_bracket($args[0]), $vars["page"]);
        } else {
            return FALSE;
        }
    } else {
        $_page = $vars["page"];
    }
    if (!is_page($_page)) {
        return FALSE;
    }
    return format_date(get_filetime($_page));
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:19,代码来源:lastmod.inc.php


示例19: plugin_lastmod_inline

function plugin_lastmod_inline()
{
    global $vars, $WikiName, $BracketName;
    $args = func_get_args();
    $page = $args[0];
    if ($page == '') {
        $page = $vars['page'];
        // Default: page itself
    } else {
        if (preg_match("/^({$WikiName}|{$BracketName})\$/", strip_bracket($page))) {
            $page = get_fullname(strip_bracket($page), $vars['page']);
        } else {
            return false;
        }
    }
    if (!is_page($page)) {
        return false;
    }
    return format_date(get_filetime($page));
}
开发者ID:nsmr0604,项目名称:pukiwiki,代码行数:20,代码来源:lastmod.inc.php


示例20: plugin_tooltip_get_page_title

function plugin_tooltip_get_page_title($term)
{
    $page = strip_bracket($term);
    $wiki = Factory::Wiki($page);
    if (!$wiki->has($page)) {
        return FALSE;
    }
    $ct = 0;
    foreach ($wiki->get() as $line) {
        if ($ct++ > 99) {
            break;
        }
        if (preg_match('/^\\*{1,3}(.*)\\[#[A-Za-z0-9][\\w\\-]+\\].*$/', $line, $match)) {
            return trim($match[1]);
        } else {
            if (preg_match('/^\\*{1,3}(.*)$/', $line, $match)) {
                return trim($match[1]);
            }
        }
    }
    return FALSE;
}
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:22,代码来源:tooltip.inc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP strip_decode函数代码示例发布时间:2022-05-23
下一篇:
PHP strip_bbcode函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap