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


PHP arg_check函数代码示例

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


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

示例1: plugin_navititle_inline

function plugin_navititle_inline()
{
    global $newtitle;
    global $page;
    $is_read = arg_check('read') && is_page($vars['page']);
    return '<h1 class="title">' . ($newtitle != '' && $is_read ? $newtitle : $page) . '</h1>';
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:7,代码来源:navititle.inc.php

示例2: plugin_monobook_navigation

function plugin_monobook_navigation($wikinote, $tabs, $background)
{
    global $vars, $plugin, $_monobook_navigation_messages;
    if (!exist_plugin('monobook_getlink')) {
        die('monobook_getlink plugin not found');
    }
    do_plugin_init('monobook_navigation');
    $main_tabs = '';
    if ($wikinote->is_effect()) {
        $main_tabs = str_replace(array('<ul class="wikinote">', '</ul>', "\n"), '', $wikinote->show_tabs(array(array('cmd' => 'main', 'label' => $_monobook_navigation_messages['article']), array('cmd' => 'note', 'label' => $_monobook_navigation_messages['discuss']))));
    }
    $sub_tabs = '';
    $selected_flag = FALSE;
    foreach ($tabs as $tab) {
        if ($tab === 'edit' && is_freeze($vars['page']) && !in_array('source', $tabs)) {
            $tab = 'source';
        }
        if ($tab === 'edit' && $plugin === 'paraedit') {
            $tab = 'paraedit';
        }
        if ($tab === 'edit' && exist_plugin('revert') && plugin_revert_getlink()) {
            $tab = 'revert';
        }
        list($link, $selected) = plugin_monobook_getlink($tab, $_monobook_navigation_messages, TRUE);
        if (!$link) {
            continue;
        }
        if ($selected) {
            $sub_tabs .= '<li class="selected">' . $link . '</li>';
            $selected_flag = TRUE;
        } else {
            $sub_tabs .= '<li>' . $link . '</li>';
        }
    }
    if (!$selected_flag) {
        $link = plugin_monobook_getlink('nowplugin', $_monobook_navigation_messages);
        if (!$main_tabs) {
            if ($link) {
                $sub_tabs = '<li class="selected" id="separate">' . $link . '</li>' . $sub_tabs;
            } else {
                $sub_tabs = '<li class="selected"><a href="' . get_script_uri() . strrchr($_SERVER['REQUEST_URI'], '?') . '">' . $_monobook_navigation_messages['undefined'] . '</a></li>';
            }
        } elseif ($main_tabs && !arg_check('read') && $link) {
            $sub_tabs = '<li class="selected">' . $link . '</li>' . $sub_tabs;
        }
    }
    return '<div id="navigator"><ul' . $background . '>' . $main_tabs . $sub_tabs . '</ul></div>' . "\n";
}
开发者ID:orangeal2o3,项目名称:pukiwiki-plugin,代码行数:48,代码来源:monobook_navigation.inc.php

示例3: rawurlencode

/* enter送信防止 */
$(function(){
  $("input[type=text]").keydown(function(ev) {
    if ((ev.which && ev.which === 13) ||
        (ev.keyCode && ev.keyCode === 13)) {
      return false;
    } else {
      return true;
    }
  });
});

</script>

<?php 
if (arg_check('read') && exist_plugin_convert('menu')) {
    ?>
<script src="skin/snsCount.js?150804" id="snsCount" data-url=<?php 
    if ($vars["page"] == "FrontPage") {
        ?>
"http://pad.rtwiki.net/"<?php 
    } else {
        ?>
"<?php 
        echo $script . '?';
        echo rawurlencode($_page);
        ?>
"<?php 
    }
    ?>
></script>
开发者ID:nemusg,项目名称:pad.rtwiki.net,代码行数:31,代码来源:smartphone.skin.php

示例4: do_plugin_convert

<?php 
}
?>
  <td class="ctable" valign="top">
   <?php 
if ($is_page and exist_plugin_convert('topicpath')) {
    echo do_plugin_convert('topicpath');
}
?>
   <div id="body"><?php 
echo $body;
?>
</div>
  </td>
<?php 
if (arg_check('read') && exist_plugin_convert('side') && do_plugin_convert('side') != '') {
    ?>
  <td class="rtable" valign="top"><div id="sidebar"><?php 
    echo do_plugin_convert('side');
    ?>
</div></td>
<?php 
}
?>
 </tr>
</table>
</div>

<?php 
if ($notes) {
    ?>
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:31,代码来源:sagiri.skin.php

示例5: _navigator

    ?>

 <?php 
    if ($rw) {
        ?>
	<?php 
        _navigator('new');
        ?>
 <?php 
    }
    ?>
   <?php 
    _navigator('list');
    ?>
 <?php 
    if (arg_check('list')) {
        ?>
   <?php 
        _navigator('filelist');
        ?>
 <?php 
    }
    ?>
   <?php 
    _navigator('search');
    ?>
   <?php 
    _navigator('recent');
    ?>
   <?php 
    _navigator('help');
开发者ID:geoemon2k,项目名称:source_wiki,代码行数:31,代码来源:tdiary.skin.php

示例6: plugin_toolbar_convert

function plugin_toolbar_convert()
{
    global $do_backup, $trackback, $referer;
    global $function_freeze;
    global $vars;
    // $is_read = (arg_check('read') && is_page($vars['page']));
    $is_read = is_page($vars['page']);
    $is_readonly = auth::check_role('readonly');
    $is_safemode = auth::check_role('safemode');
    $is_createpage = auth::is_check_role(PKWK_CREATE_PAGE);
    $num = func_num_args();
    $args = $num ? func_get_args() : array();
    $body = '';
    while (!empty($args)) {
        $name = array_shift($args);
        switch ($name) {
            case 'freeze':
                if ($is_readonly) {
                    break;
                }
                if (!$is_read) {
                    break;
                }
                if ($function_freeze) {
                    if (!is_freeze($vars['page'])) {
                        $name = 'freeze';
                    } else {
                        $name = 'unfreeze';
                    }
                    if ($body != '') {
                        $body .= "\n";
                    }
                    $body .= _toolbar($name);
                }
                break;
            case 'upload':
                if ($is_readonly) {
                    break;
                }
                if (!$is_read) {
                    break;
                }
                if ($function_freeze && is_freeze($vars['page'])) {
                    break;
                }
                if ((bool) ini_get('file_uploads')) {
                    if ($body != '') {
                        $body .= "\n";
                    }
                    $body .= _toolbar($name);
                }
                break;
            case 'filelist':
                if (arg_check('list')) {
                    if ($body != '') {
                        $body .= "\n";
                    }
                    $body .= _toolbar($name);
                }
                break;
            case 'backup':
                if ($do_backup) {
                    if ($body != '') {
                        $body .= "\n";
                    }
                    $body .= _toolbar($name);
                }
                break;
            case 'trackback':
                if ($trackback) {
                    if ($body != '') {
                        $body .= "\n";
                    }
                    $tbcount = tb_count($vars['page']);
                    if ($tbcount > 0) {
                        $body .= _toolbar($name);
                    } else {
                        if (!$is_read) {
                            $body .= _toolbar($name);
                        }
                    }
                }
                break;
            case 'refer':
                if ($referer) {
                    if ($body != '') {
                        $body .= "\n";
                    }
                    $body .= _toolbar($name);
                }
                break;
            case 'rss':
            case 'mixirss':
                if ($body != '') {
                    $body .= "\n";
                }
                $body .= _toolbar($name);
                break;
            case '|':
                $body .= "\n&nbsp;\n";
//.........这里部分代码省略.........
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:101,代码来源:toolbar.inc.php

示例7: catbody

function catbody($title, $page, $body)
{
    global $script, $vars, $arg, $defaultpage, $whatsnew, $help_page, $hr;
    global $attach_link, $related_link, $cantedit, $function_freeze;
    global $search_word_color, $_msg_word, $foot_explain, $note_hr, $head_tags;
    global $trackback, $trackback_javascript, $referer, $javascript;
    global $nofollow;
    global $_LANG, $_LINK, $_IMAGE;
    global $pkwk_dtd;
    // XHTML 1.1, XHTML1.0, HTML 4.01 Transitional...
    global $page_title;
    // Title of this site
    global $do_backup;
    // Do backup or not
    global $modifier;
    // Site administrator's  web page
    global $modifierlink;
    // Site administrator's name
    if (!file_exists(SKIN_FILE) || !is_readable(SKIN_FILE)) {
        die_message('SKIN_FILE is not found');
    }
    $_LINK = $_IMAGE = array();
    // Add JavaScript header when ...
    if ($trackback && $trackback_javascript) {
        $javascript = 1;
    }
    // Set something If you want
    if (!PKWK_ALLOW_JAVASCRIPT) {
        unset($javascript);
    }
    $_page = isset($vars['page']) ? $vars['page'] : '';
    $r_page = rawurlencode($_page);
    // Set $_LINK for skin
    $_LINK['add'] = "{$script}?cmd=add&amp;page={$r_page}";
    $_LINK['backup'] = "{$script}?cmd=backup&amp;page={$r_page}";
    $_LINK['copy'] = "{$script}?plugin=template&amp;refer={$r_page}";
    $_LINK['diff'] = "{$script}?cmd=diff&amp;page={$r_page}";
    $_LINK['edit'] = "{$script}?cmd=edit&amp;page={$r_page}";
    $_LINK['filelist'] = "{$script}?cmd=filelist";
    $_LINK['freeze'] = "{$script}?cmd=freeze&amp;page={$r_page}";
    $_LINK['help'] = "{$script}?" . rawurlencode($help_page);
    $_LINK['list'] = "{$script}?cmd=list";
    $_LINK['new'] = "{$script}?plugin=newpage&amp;refer={$r_page}";
    $_LINK['rdf'] = "{$script}?cmd=rss&amp;ver=1.0";
    $_LINK['recent'] = "{$script}?" . rawurlencode($whatsnew);
    $_LINK['refer'] = "{$script}?plugin=referer&amp;page={$r_page}";
    $_LINK['reload'] = "{$script}?{$r_page}";
    $_LINK['rename'] = "{$script}?plugin=rename&amp;refer={$r_page}";
    $_LINK['rss'] = "{$script}?cmd=rss";
    $_LINK['rss10'] = "{$script}?cmd=rss&amp;ver=1.0";
    // Same as 'rdf'
    $_LINK['rss20'] = "{$script}?cmd=rss&amp;ver=2.0";
    $_LINK['search'] = "{$script}?cmd=search";
    $_LINK['top'] = "{$script}?" . rawurlencode($defaultpage);
    if ($trackback) {
        $tb_id = tb_get_id($_page);
        $_LINK['trackback'] = "{$script}?plugin=tb&amp;__mode=view&amp;tb_id={$tb_id}";
    }
    $_LINK['unfreeze'] = "{$script}?cmd=unfreeze&amp;page={$r_page}";
    $_LINK['upload'] = "{$script}?plugin=attach&amp;pcmd=upload&amp;page={$r_page}";
    // Compat: Skins for 1.4.4 and before
    $link_add =& $_LINK['add'];
    $link_new =& $_LINK['new'];
    // New!
    $link_edit =& $_LINK['edit'];
    $link_diff =& $_LINK['diff'];
    $link_top =& $_LINK['top'];
    $link_list =& $_LINK['list'];
    $link_filelist =& $_LINK['filelist'];
    $link_search =& $_LINK['search'];
    $link_whatsnew =& $_LINK['recent'];
    $link_backup =& $_LINK['backup'];
    $link_help =& $_LINK['help'];
    $link_trackback =& $_LINK['trackback'];
    // New!
    $link_rdf =& $_LINK['rdf'];
    // New!
    $link_rss =& $_LINK['rss'];
    $link_rss10 =& $_LINK['rss10'];
    // New!
    $link_rss20 =& $_LINK['rss20'];
    // New!
    $link_freeze =& $_LINK['freeze'];
    $link_unfreeze =& $_LINK['unfreeze'];
    $link_upload =& $_LINK['upload'];
    $link_template =& $_LINK['copy'];
    $link_refer =& $_LINK['refer'];
    // New!
    $link_rename =& $_LINK['rename'];
    // Init flags
    $is_page = is_pagename($_page) && !arg_check('backup') && $_page != $whatsnew;
    $is_read = arg_check('read') && is_page($_page);
    $is_freeze = is_freeze($_page);
    // Last modification date (string) of the page
    $lastmodified = $is_read ? format_date(get_filetime($_page)) . ' ' . get_pg_passage($_page, FALSE) : '';
    // List of attached files to the page
    $attaches = $attach_link && $is_read && exist_plugin_action('attach') ? attach_filelist() : '';
    // List of related pages
    $related = $related_link && $is_read ? make_related($_page) : '';
    // List of footnotes
//.........这里部分代码省略.........
开发者ID:geoemon2k,项目名称:source_wiki,代码行数:101,代码来源:html.php

示例8: unset

     if (isset($tools['qbloglink'])) {
         unset($tools['qbloglink']);
     }
 }
 // レイアウトページの時の管理ウィンドウの制御
 if ($no_toolmenu) {
     if (!is_bootstrap_skin()) {
         $tools = array('editlink' => $tools['editlink'], 'reflink' => $tools['reflink'], 'pagelink' => $tools['pagelink']);
     }
     unset($tools['pagelink']['sub']['sharelink']);
     unset($tools['pagelink']['sub']['renamelink']);
     unset($tools['pagelink']['sub']['dellink']);
     unset($tools['pagelink']['sub']['copylink']);
     unset($tools['pagelink']['sub']['maplink']);
     unset($tools['pagelink']['sub']['tinyurllink']);
     if (arg_check('backup') or arg_check('diff')) {
         $tools['reflink']['visible'] = FALSE;
     }
 }
 $tools_str = '<ul class="toolbar_menu">';
 foreach ($tools as $lv1key => $lv1) {
     // main menu
     $style = $lv1['style'] != '' ? $lv1['style'] : '';
     // visible
     if ($lv1['visible']) {
         // link
         if ($lv1['link'] != '') {
             $class = isset($lv1['class']) && $lv1['class'] != '' ? ' class="' . $lv1['class'] . '"' : '';
             $target = $lv1key == 'helplink' ? ' target="help"' : '';
             $tools_str .= '<li style="background-image:none;' . $style . '"' . $class . '><a href="' . $lv1['link'] . '"' . $target . ' id="' . $lv1key . '">' . $lv1['name'] . '</a>';
         } else {
开发者ID:big2men,项目名称:qhm,代码行数:31,代码来源:qhm_init.php

示例9: plugin_navibar2_keyword

function plugin_navibar2_keyword($name)
{
    global $_LINK;
    global $do_backup, $trackback, $referer;
    global $function_freeze;
    global $vars;
    if ($_LINK['reload'] == '') {
        return array();
    }
    $_page = isset($vars['page']) ? $vars['page'] : '';
    $is_read = arg_check('read') && is_page($_page);
    $is_freeze = is_freeze($_page);
    switch ($name) {
        case 'freeze':
            if ($is_read && $function_freeze) {
                if (!$is_freeze) {
                    $name = 'freeze';
                    return _navigator2($name);
                }
            }
            break;
        case 'unfreeze':
            if ($is_read && $function_freeze) {
                if ($is_freeze) {
                    $name = 'unfreeze';
                    return _navigator2($name);
                }
            }
            break;
        case 'upload':
            if ($is_read && (bool) ini_get('file_uploads')) {
                return _navigator2($name);
            }
            break;
        case 'filelist':
            if (arg_check('list')) {
                return _navigator2($name);
            }
            break;
        case 'backup':
            if ($do_backup) {
                return _navigator2($name);
            }
            break;
        case 'brokenlink':
        case 'template':
        case 'source':
            if (!empty($_page)) {
                return _navigator2($name);
            }
            break;
        case 'trackback':
            if ($trackback) {
                $tbcount = tb_count($_page);
                if ($tbcount > 0) {
                    return _navigator2($name, 'Trackback(' . $tbcount . ')');
                } else {
                    if ($is_read) {
                        return array('text' => 'no Trackback');
                    } else {
                        if ($vars['cmd'] == 'list') {
                            return _navigator2($name, 'Trackback list');
                        }
                    }
                }
            }
            break;
        case 'refer':
        case 'skeylist':
        case 'linklist':
            if ($referer) {
                if (!isset($refcount)) {
                    $refcount = ref_count($vars['page']);
                }
                if ($refcount > 0) {
                    return _navigator2($name);
                }
            }
            break;
        case 'log_login':
            if (log_exist('login', $vars['page'])) {
                return _navigator2($name);
            }
            break;
        case 'log_check':
            if (log_exist('check', $vars['page'])) {
                return _navigator2($name);
            }
            break;
        case 'log_browse':
            if (log_exist('browse', $vars['page'])) {
                return _navigator2($name);
            }
            break;
        case 'log_update':
            if (log_exist('update', $vars['page'])) {
                return _navigator2($name);
            }
            break;
        case 'log_down':
//.........这里部分代码省略.........
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:101,代码来源:navibar2.inc.php

示例10: catbody


//.........这里部分代码省略.........
    $_LINK['rss20'] = get_cmd_absuri('rss', '', 'ver=2.0');
    $_LINK['mixirss'] = get_cmd_absuri('mixirss');
    // Same as 'rdf' for mixi
    // Compat: Skins for 1.4.4 and before
    $link_add =& $_LINK['add'];
    $link_backup =& $_LINK['backup'];
    $link_brokenlink =& $_LINK['brokenlink'];
    $link_template =& $_LINK['copy'];
    $link_diff =& $_LINK['diff'];
    $link_edit =& $_LINK['edit'];
    $link_guiedit =& $_LINK['guiedit'];
    $link_filelist =& $_LINK['filelist'];
    $link_freeze =& $_LINK['freeze'];
    $link_help =& $_LINK['help'];
    $link_linklist =& $_LINK['linklist'];
    $link_list =& $_LINK['list'];
    $link_log_login =& $_LINK['log_login'];
    $link_log_browse =& $_LINK['log_browse'];
    $link_log_update =& $_LINK['log_update'];
    $link_log_down =& $_LINK['log_down'];
    $link_log_check =& $_LINK['log_check'];
    $link_menu =& $_LINK['menu'];
    $link_new =& $_LINK['new'];
    $link_newsub =& $_LINK['newsub'];
    $link_print =& $_LINK['print'];
    $link_full =& $_LINK['full'];
    $link_read =& $_LINK['read'];
    $link_whatsnew =& $_LINK['recent'];
    $link_refer =& $_LINK['refer'];
    $link_reload =& $_LINK['reload'];
    $link_reload_rel =& $_LINK['reload_rel'];
    $link_rename =& $_LINK['rename'];
    $link_skeylist =& $_LINK['skeylist'];
    $link_search =& $_LINK['search'];
    $link_side =& $_LINK['side'];
    $link_source =& $_LINK['source'];
    $link_top =& $_LINK['top'];
    if ($trackback) {
        $link_trackback =& $_LINK['trackback'];
    }
    $link_unfreeze =& $_LINK['unfreeze'];
    $link_upload =& $_LINK['upload'];
    //
    $link_rdf =& $_LINK['rdf'];
    $link_rss =& $_LINK['rss'];
    $link_rss10 =& $_LINK['rss10'];
    $link_rss20 =& $_LINK['rss20'];
    $link_mixirss =& $_LINK['mixirss'];
    // Init flags
    $is_page = is_pagename($_page) && !arg_check('backup') && !is_cantedit($_page);
    $is_read = arg_check('read') && is_page($_page);
    $is_freeze = is_freeze($_page);
    // Last modification date (string) of the page
    $lastmodified = $is_read ? get_date('D, d M Y H:i:s T', get_filetime($_page)) . ' ' . get_pg_passage($_page, FALSE) : '';
    // List of attached files to the page
    $attaches = '';
    if ($attach_link && $is_read && exist_plugin_action('attach')) {
        if (do_plugin_init('attach') !== FALSE) {
            $attaches = attach_filelist();
        }
    }
    // List of related pages
    $related = $related_link && $is_read ? make_related($_page) : '';
    // List of footnotes
    ksort($foot_explain, SORT_NUMERIC);
    $notes = !empty($foot_explain) ? $note_hr . join("\n", $foot_explain) : '';
    // Tags will be inserted into <head></head>
    $head_tag = !empty($head_tags) ? join("\n", $head_tags) . "\n" : '';
    $foot_tag = !empty($foot_tags) ? join("\n", $foot_tags) . "\n" : '';
    // 1.3.x compat
    // Last modification date (UNIX timestamp) of the page
    $fmt = $is_read ? get_filetime($_page) : 0;
    // Search words
    if ($search_word_color && isset($vars['word'])) {
        $body = '<div class="small">' . $_string['word'] . htmlspecialchars($vars['word']) . '</div>' . $hr . "\n" . $body;
        // BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
        $words = preg_split('/\\s+/', $vars['word'], -1, PREG_SPLIT_NO_EMPTY);
        $words = array_splice($words, 0, 10);
        // Max: 10 words
        $words = array_flip($words);
        $keys = array();
        foreach ($words as $word => $id) {
            $keys[$word] = strlen($word);
        }
        arsort($keys, SORT_NUMERIC);
        $keys = get_search_words(array_keys($keys), TRUE);
        $id = 0;
        foreach ($keys as $key => $pattern) {
            $s_key = htmlspecialchars($key);
            $pattern = '/' . '<textarea[^>]*>.*?<\\/textarea>' . '|' . '<[^>]*>' . '|' . '&[^;]+;' . '|' . '(' . $pattern . ')' . '/sS';
            $decorate_Nth_word = create_function('$matches', 'return (isset($matches[1])) ? ' . '\'<strong class="word' . $id . '">\' . $matches[1] . \'</strong>\' : ' . '$matches[0];');
            $body = preg_replace_callback($pattern, $decorate_Nth_word, $body);
            $notes = preg_replace_callback($pattern, $decorate_Nth_word, $notes);
            ++$id;
        }
    }
    // Compat: 'HTML convert time' without time about MenuBar and skin
    $taketime = elapsedtime();
    require SKIN_FILE;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:101,代码来源:html.php

示例11: plugin_navibar_convert

function plugin_navibar_convert()
{
    global $_LINK;
    global $do_backup, $trackback, $referer;
    global $function_freeze;
    global $vars;
    if ($_LINK['reload'] == '') {
        return '#navibar: plugin called from wikipage. skipped.';
    }
    $_page = isset($vars['page']) ? $vars['page'] : '';
    $is_read = arg_check('read') && is_page($_page);
    $is_freeze = is_freeze($_page);
    $num = func_num_args();
    $args = $num ? func_get_args() : array();
    $body = '';
    $line = '';
    while (!empty($args)) {
        $name = array_shift($args);
        switch ($name) {
            case 'freeze':
                if ($is_read && $function_freeze) {
                    if (!$is_freeze) {
                        $name = 'freeze';
                        if ($body != '' && $oldname != '|') {
                            $body .= ' | ';
                        }
                        $body .= _navigator($name);
                    }
                }
                break;
            case 'unfreeze':
                if ($is_read && $function_freeze) {
                    if ($is_freeze) {
                        $name = 'unfreeze';
                        if ($body != '' && $oldname != '|') {
                            $body .= ' | ';
                        }
                        $body .= _navigator($name);
                    }
                }
                break;
            case 'upload':
                if ($is_read && (bool) ini_get('file_uploads')) {
                    if ($body != '' && $oldname != '|') {
                        $body .= ' | ';
                    }
                    $body .= _navigator($name);
                }
                break;
            case 'filelist':
                if (arg_check('list')) {
                    if ($body != '' && $oldname != '|') {
                        $body .= ' | ';
                    }
                    $body .= _navigator($name);
                }
                break;
            case 'backup':
                if ($do_backup) {
                    if ($body != '' && $oldname != '|') {
                        $body .= ' | ';
                    }
                    $body .= _navigator($name);
                }
                break;
            case 'brokenlink':
            case 'template':
            case 'source':
                if (!empty($_page)) {
                    if ($body != '' && $oldname != '|') {
                        $body .= ' | ';
                    }
                    $body .= _navigator($name);
                }
                break;
            case 'trackback':
                if ($trackback) {
                    if ($body != '' && $oldname != '|') {
                        $body .= ' | ';
                    }
                    $tbcount = tb_count($_page);
                    if ($tbcount > 0) {
                        $body .= _navigator($name, 'Trackback(' . $tbcount . ')');
                    } else {
                        if ($is_read) {
                            $body .= 'no Trackback';
                        } else {
                            if (isset($vars['cmd']) && $vars['cmd'] == 'list') {
                                $body .= _navigator($name, 'Trackback list');
                            }
                        }
                    }
                }
                break;
            case 'refer':
            case 'skeylist':
            case 'linklist':
                if ($referer) {
                    if ($body != '' && $oldname != '|') {
                        $body .= ' | ';
//.........这里部分代码省略.........
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:101,代码来源:navibar.inc.php

示例12: catbody


//.........这里部分代码省略.........
    // New!
    $link_rss20 =& $_LINK['rss20'];
    // New!
    $link_freeze =& $_LINK['freeze'];
    $link_unfreeze =& $_LINK['unfreeze'];
    $link_upload =& $_LINK['upload'];
    $link_template =& $_LINK['copy'];
    $link_refer =& $_LINK['refer'];
    // New!
    $link_rename =& $_LINK['rename'];
    $link_delete =& $_LINK['delete'];
    $link_menuadmin =& $_LINK['menuadmin'];
    //Hokuken.com original
    $link_copy =& $_LINK['copy'];
    $link_qhm_adminmenu =& $_LINK['qhm_adminmenu'];
    //Hokuken.com original
    $link_qhm_logout =& $_LINK['qhm_logout'];
    //Hokuken.com original
    $link_qhm_setting =& $_LINK['qhm_setting'];
    //Hokuken.com original
    $link_edit_menu =& $_LINK['edit_menu'];
    //Hokuken.com original
    $link_edit_menu2 =& $_LINK['edit_menu2'];
    $link_edit_navi =& $_LINK['edit_navi'];
    //Hokuken.com original
    $link_edit_navi2 =& $_LINK['edit_navi2'];
    //Hokuken.com original
    $link_edit_header =& $_LINK['edit_header'];
    //Hokuken.com original
    $link_yetlist =& $_LINK['yetlist'];
    //Hokuken.com original
    // Init flags
    $is_page = is_pagename($_page) && $_page != $whatsnew;
    $is_read = arg_check('read') && is_page($_page);
    $is_freeze = is_freeze($_page);
    // Last modification date (string) of the page
    $lastmodified = $is_read ? format_date(get_filetime($_page)) . ' ' . get_pg_passage($_page, FALSE) : '';
    // List of attached files to the page
    $attaches = $attach_link && $is_read && exist_plugin_action('attach') ? attach_filelist() : '';
    // List of related pages
    $related = $related_link && $is_read ? make_related($_page) : '';
    // List of footnotes
    ksort($foot_explain, SORT_NUMERIC);
    $notes = !empty($foot_explain) ? $note_hr . join("\n", $foot_explain) : '';
    // Tags will be inserted into <head></head>
    $head_tag = !empty($head_tags) ? join("\n", $head_tags) . "\n" : '';
    // 1.3.x compat
    // Last modification date (UNIX timestamp) of the page
    $fmt = $is_read ? get_filetime($_page) + LOCALZONE : 0;
    // Search words
    if ($search_word_color && isset($vars['word'])) {
        $body = '<div class="small">' . $_msg_word . htmlspecialchars($vars['word']) . '</div>' . $hr . "\n" . $body;
        // BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
        // with array_splice(), array_flip()
        $words = preg_split('/\\s+/', $vars['word'], -1, PREG_SPLIT_NO_EMPTY);
        $words = array_splice($words, 0, 10);
        // Max: 10 words
        $words = array_flip($words);
        $keys = array();
        foreach ($words as $word => $id) {
            $keys[$word] = strlen($word);
        }
        arsort($keys, SORT_NUMERIC);
        $keys = get_search_words(array_keys($keys), TRUE);
        $id = 0;
        foreach ($keys as $key => $pattern) {
开发者ID:big2men,项目名称:qhm,代码行数:67,代码来源:html.php

示例13: plugin_toolbar_convert

function plugin_toolbar_convert()
{
    global $_LINK;
    global $do_backup, $trackback, $referer;
    global $function_freeze;
    global $vars;
    global $whatsnew, $whatsdeleted;
    //	if ($_LINK['reload'] == '') {
    //		return '#navibar: plugin called from wikipage. skipped.';
    //	}
    $_page = isset($vars['page']) ? $vars['page'] : '';
    $is_read = arg_check('read') && is_page($_page);
    $is_freeze = is_freeze($_page);
    $num = func_num_args();
    $args = $num ? func_get_args() : array();
    $ret[] = '<ul role="toolbar">';
    while (!empty($args)) {
        $name = array_shift($args);
        switch ($name) {
            case 'freeze':
            case 'unfreeze':
                if ($is_read && $function_freeze) {
                    if ($is_freeze) {
                        $name = 'unfreeze';
                    } else {
                        $name = 'freeze';
                    }
                    $ret[] = _toolbar($name);
                }
                break;
            case 'upload':
                if ($is_read && (bool) ini_get('file_uploads') && !$is_freeze && !($_page == $whatsnew || $_page == $whatsdeleted)) {
                    $ret[] = _toolbar($name);
                }
                break;
            case 'list':
                if ($vars['cmd'] !== 'list') {
                    $ret[] = _toolbar($name);
                } else {
                    $ret[] = _toolbar('filelist');
                }
                break;
            case 'backup':
                if ($do_backup) {
                    $ret[] = _toolbar($name);
                }
                break;
            case 'brokenlink':
            case 'template':
            case 'source':
                if (!empty($_page)) {
                    $ret[] = _toolbar($name);
                }
                break;
            case 'trackback':
                if ($trackback) {
                    if (!empty($_page) && !($_page == $whatsnew || $_page == $whatsdeleted)) {
                        $ret[] = _toolbar($name, 'Trackback(' . tb_count($_page) . ')');
                    } else {
                        //		$ret[] = _toolbar($name, 'Trackback list');
                    }
                }
                break;
            case 'referer':
            case 'skeylist':
            case 'linklist':
                if ($referer && !empty($_page)) {
                    $ret[] = _toolbar($name);
                }
                break;
            case 'log_login':
                if (!empty($_page) && log_exist('login', $vars['page'])) {
                    $ret[] = _toolbar($name);
                }
                break;
            case 'log_check':
                if (!empty($_page) && log_exist('check', $vars['page'])) {
                    $ret[] = _toolbar($name);
                }
                break;
            case 'log':
            case 'log_browse':
                if (!empty($_page)) {
                    $ret[] = _toolbar($name);
                }
                //			if (log_exist('browse',$vars['page'])) {
                //				return _toolbar($name);
                //			}
                break;
            case 'log_update':
                if (!empty($_page) && log_exist('update', $vars['page'])) {
                    $ret[] = _toolbar($name);
                }
                break;
            case 'log_down':
                if (!empty($_page) && log_exist('download', $vars['page'])) {
                    $ret[] = _toolbar($name);
                }
                break;
            case '|':
//.........这里部分代码省略.........
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:101,代码来源:toolbar.inc.php

示例14: catbody

function catbody($title,$page,$body)
{
	global $script,$vars,$arg,$defaultpage,$whatsnew,$help_page,$hr;
	global $related_link,$cantedit,$function_freeze,$search_word_color,$_msg_word;
	global $foot_explain,$note_hr,$head_tags;
	
	global $html_transitional; // FALSE:XHTML1.1 TRUE:XHTML1.0 Transitional
	global $page_title;        // ホームページのタイトル
	global $do_backup;         // バックアップを行うかどうか
	global $modifier;          // 編集者のホームページ
	global $modifierlink;      // 編集者の名前

	$_page = $vars['page'];
	$r_page = rawurlencode($_page);
	
	$link_add      = "$script?cmd=add&amp;page=$r_page";
	$link_edit     = "$script?cmd=edit&amp;page=$r_page";
	$link_diff     = "$script?cmd=diff&amp;page=$r_page";
	$link_top      = "$script?".rawurlencode($defaultpage);
	$link_list     = "$script?cmd=list";
	$link_filelist = "$script?cmd=filelist";
	$link_search   = "$script?cmd=search";
	$link_whatsnew = "$script?".rawurlencode($whatsnew);
	$link_backup   = "$script?cmd=backup&amp;page=$r_page";
	$link_help     = "$script?".rawurlencode($help_page);
	$link_rss      = "$script?cmd=rss10";
	$link_freeze   = "$script?cmd=freeze&amp;page=$r_page";
	$link_unfreeze = "$script?cmd=unfreeze&amp;page=$r_page";
	$link_upload   = "$script?plugin=attach&amp;pcmd=upload&amp;page=$r_page";
	$link_template = "$script?plugin=template&amp;refer=$r_page";
	$link_rename   = "$script?plugin=rename&amp;refer=$r_page";
	
	// ページの表示時TRUE(バックアップの表示、RecentChangesの表示を除く)
	$is_page = (is_pagename($_page) and !arg_check('backup') and $_page != $whatsnew);
	
	// ページの読み出し時TRUE
	$is_read = (arg_check('read') and is_page($_page));
	
	// ページが凍結されているときTRUE
	$is_freeze = is_freeze($_page);
	
	// ページの最終更新時刻(文字列)
	$lastmodified = $is_read ?
		get_date('D, d M Y H:i:s T',get_filetime($_page)).' '.get_pg_passage($_page,FALSE) : '';
	
	// 関連するページのリスト
	$related = ($is_read and $related_link) ? make_related($_page) : '';
	
	// 添付ファイルのリスト
	$attaches = ($is_read and exist_plugin_action('attach')) ? attach_filelist() : '';
	
	// 注釈のリスト
	ksort($foot_explain,SORT_NUMERIC);
	$notes = count($foot_explain) ? $note_hr.join("\n",$foot_explain) : '';
	
	// <head>内に追加するタグ
	$head_tag = count($head_tags) ? join("\n",$head_tags)."\n" : '';
	
	// 1.3.x compat
	// ページの最終更新時刻(UNIX timestamp)
	$fmt = $is_read ? get_filetime($_page) + LOCALZONE : 0;

	//単語検索
	if ($search_word_color and array_key_exists('word',$vars))
	{
		$body = '<div class="small">'.$_msg_word.htmlspecialchars($vars['word'])."</div>$hr\n$body";
		$words = array_flip(array_splice(preg_split('/\s+/',$vars['word'],-1,PREG_SPLIT_NO_EMPTY),0,10));
		$keys = array();
		foreach ($words as $word=>$id)
		{
			$keys[$word] = strlen($word);
		}
		arsort($keys,SORT_NUMERIC);
		$keys = get_search_words(array_keys($keys),TRUE);
		$id = 0;
		foreach ($keys as $key=>$pattern)
		{
			$s_key = htmlspecialchars($key);
			$pattern = "/(<[^>]*>)|($pattern)/";
			$callback = create_function(
				'$arr',
				'return $arr[1] ? $arr[1] : "<strong class=\"word'.$id++.'\">{$arr[2]}</strong>";'
			);
			$body = preg_replace_callback($pattern,$callback,$body);
			$notes = preg_replace_callback($pattern,$callback,$notes);
		}
	}
	
	$longtaketime = getmicrotime() - MUTIME;
	$taketime = sprintf('%01.03f',$longtaketime);
	
	if (!file_exists(SKIN_FILE)||!is_readable(SKIN_FILE))
	{
		die_message(SKIN_FILE.'(skin file) is not found.');
	}
	require(SKIN_FILE);
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:97,代码来源:html.php

示例15:

    ?>
					</ul>
				</nav>
<?php 
}
?>
			</header>

			<main role="main" data-role="content" data-theme="c">
				<?php 
echo $this->body;
?>
			</main>

<?php 
if (arg_check('read')) {
    ?>
	<?php 
    if (!empty($this->menubar)) {
        ?>
			<aside data-role="panel" id="menubar" data-theme="b" data-content-theme="d" data-position="left" data-display="reveal">
				<?php 
        echo $this->menubar;
        ?>
			</aside>
	<?php 
    }
    ?>
	<?php 
    if (!empty($this->sidebar)) {
        ?>
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:31,代码来源:mobile.skin.php


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