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


PHP rewriteoutput函数代码示例

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


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

示例1: global_header

 function global_header()
 {
     global $_G;
     $url = base64_decode($_G['currenturl_encode']);
     if ($_G['mod'] == 'viewthread') {
         if (in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('forum_viewthread', 1, '', $_G['tid'], $_G['page'], $_G['prevpage'], '');
         } else {
             $url = str_replace(array('&extra=' . $_GET['extra'], '&extra=' . urlencode($_GET['extra']), '&page=' . $_G['page']), '', $url);
         }
     } elseif ($_G['mod'] == 'redirect') {
         if (in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('forum_viewthread', 1, '', $_G['tid'], $_G['page'], $_G['prevpage'], '');
         }
     } elseif ($_G['mod'] == 'forumdisplay') {
         if (in_array('forum_forumdisplay', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('forum_forumdisplay', 1, '', $_G['fid'], $_G['page'], '', '');
         } else {
             $url = str_replace(array('&page=' . $_G['page']), '', $url);
         }
     } elseif ($_G['basescript'] == 'group' && $_G['mod'] == 'forumdisplay') {
         if (in_array('group_group', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('group_group', 1, '', $_G['fid'], $_G['page'], '', '');
         }
     }
     $copy_open_area = str_replace(array('1', '2', '3', '4', '5', '6'), array('forumdisplay', 'viewthread', 'redirect', 'group', 'home', 'portal'), unserialize($this->settings['copy_open_area']));
     $return = '';
     if ((in_array($_G['mod'], $copy_open_area) || in_array($_G['basescript'], $copy_open_area)) && in_array($_G['groupid'], unserialize($this->settings['copy_group']))) {
         if ($this->settings['ban_copy'] && !$this->settings['add_copy']) {
             if (in_array($_G['mod'], array('forumdisplay', 'viewthread', 'redirect'))) {
                 if (in_array($_G['fid'], unserialize($this->settings['copy_forum']))) {
                     $return .= '<script type="text/javascript">document.onselectstart=function(){return false};</script><style type="text/css">html{-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;}</style>';
                 }
             } else {
                 $return .= '<script type="text/javascript">document.onselectstart=function(){return false};</script><style type="text/css">html{-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;}</style>';
             }
         }
         if ($this->settings['add_copy'] && !$this->settings['ban_copy']) {
             $auto_add = str_replace(array("'", '"', '{bbname}', '{boardurl}', '{url}'), array("\\'", '\\"', $_G['setting']['bbname'], $_G['siteurl'], $url), $this->settings['add_copy_content']);
             if (in_array($_G['mod'], array('forumdisplay', 'viewthread', 'redirect'))) {
                 if (in_array($_G['fid'], unserialize($this->settings['copy_forum']))) {
                     $return .= '<script type="text/javascript">function dsuMarcoAddCopyright(){var a="' . $auto_add . '";if("function"==typeof window.getSelection){var b=window.getSelection();if("Microsoft Internet Explorer"==navigator.appName&&navigator.appVersion.match(/MSIE ([\\d.]+)/)[1]>=10||"Opera"==navigator.appName){var c=b.getRangeAt(0),d=document.createElement("span");d.appendChild(c.cloneContents()),c.insertNode(d);var e=d.innerHTML.replace(/(?:\\n|\\r\\n|\\r)/gi,"").replace(/<\\s*script[^>]*>[\\s\\S]*?<\\/script>/gim,"").replace(/<\\s*style[^>]*>[\\s\\S]*?<\\/style>/gim,"").replace(/<!--.*?-->/gim,"").replace(/<!DOCTYPE.*?>/gi,"");try{document.getElementsByTagName("body")[0].removeChild(d)}catch(f){d.style.display="none",d.innerHTML=""}}else var e=""+b;var g=document.getElementsByTagName("body")[0],h=document.createElement("div");h.style.position="absolute",h.style.left="-99999px",g.appendChild(h),h.innerHTML=e.replace(/([^>\\r\\n]?)(\\r\\n|\\n\\r|\\r|\\n)/g,"$1<br />$2")+"<br />"+a,b.selectAllChildren(h),setTimeout(function(){g.removeChild(h)},0)}else if("object"==typeof document.selection.createRange){event.returnValue=!1;var b=document.selection.createRange().text;window.clipboardData.setData("Text",b+"\\r\\n"+a)}}document.body.oncopy=dsuMarcoAddCopyright;</script>';
                 }
             } else {
                 $return .= '<script type="text/javascript">function dsuMarcoAddCopyright(){var a="' . $auto_add . '";if("function"==typeof window.getSelection){var b=window.getSelection();if("Microsoft Internet Explorer"==navigator.appName&&navigator.appVersion.match(/MSIE ([\\d.]+)/)[1]>=10||"Opera"==navigator.appName){var c=b.getRangeAt(0),d=document.createElement("span");d.appendChild(c.cloneContents()),c.insertNode(d);var e=d.innerHTML.replace(/(?:\\n|\\r\\n|\\r)/gi,"").replace(/<\\s*script[^>]*>[\\s\\S]*?<\\/script>/gim,"").replace(/<\\s*style[^>]*>[\\s\\S]*?<\\/style>/gim,"").replace(/<!--.*?-->/gim,"").replace(/<!DOCTYPE.*?>/gi,"");try{document.getElementsByTagName("body")[0].removeChild(d)}catch(f){d.style.display="none",d.innerHTML=""}}else var e=""+b;var g=document.getElementsByTagName("body")[0],h=document.createElement("div");h.style.position="absolute",h.style.left="-99999px",g.appendChild(h),h.innerHTML=e.replace(/([^>\\r\\n]?)(\\r\\n|\\n\\r|\\r|\\n)/g,"$1<br />$2")+"<br />"+a,b.selectAllChildren(h),setTimeout(function(){g.removeChild(h)},0)}else if("object"==typeof document.selection.createRange){event.returnValue=!1;var b=document.selection.createRange().text;window.clipboardData.setData("Text",b+"\\r\\n"+a)}}document.body.oncopy=dsuMarcoAddCopyright;</script>';
             }
         }
         if ($this->settings['popup']) {
             if (in_array($_G['mod'], array('forumdisplay', 'viewthread', 'redirect'))) {
                 if (in_array($_G['fid'], unserialize($this->settings['copy_forum']))) {
                     $return .= '<script type="text/javascript">function copyright(msg, script){script = !script ? \'\' : script;var c = \'<div class="f_c"><div class="c floatwrap" style="height:' . $this->settings['height_mini'] . ';">\' + msg + \'</div></div>\';var t = \'' . lang('plugin/dsu_marcocopyright', 'copyright') . '\' ;showDialog(c, \'info\', t);}document.oncontextmenu=function(){copyright(\'' . $this->text_mini . '\', this.href);return false;}</script>';
                 }
             } else {
                 $return .= '<script type="text/javascript">function copyright(msg, script){script = !script ? \'\' : script;var c = \'<div class="f_c"><div class="c floatwrap" style="height:' . $this->settings['height_mini'] . ';">\' + msg + \'</div></div>\';var t = \'' . lang('plugin/dsu_marcocopyright', 'copyright') . '\' ;showDialog(c, \'info\', t);}document.oncontextmenu=function(){copyright(\'' . $this->text_mini . '\', this.href);return false;}</script>';
             }
         }
         return $return;
     }
 }
开发者ID:sayhanabi,项目名称:sayhanabi_forum,代码行数:59,代码来源:copyright.class.php

示例2: foreach

    $alldata = C::t('forum_rsscache')->fetch_all_by_fid($fidarray, $num);
    if ($alldata) {
        foreach ($alldata as $thread) {
            if (TIMESTAMP - $thread['lastupdate'] > $ttl * 60) {
                updatersscache($num);
                break;
            } else {
                list($thread['description'], $attachremote, $attachfile, $attachsize) = explode("\t", $thread['description']);
                if ($attachfile) {
                    if ($attachremote) {
                        $filename = $_G['setting']['ftp']['attachurl'] . 'forum/' . $attachfile;
                    } else {
                        $filename = $_G['siteurl'] . $_G['setting']['attachurl'] . 'forum/' . $attachfile;
                    }
                }
                echo "    <item>\n" . "      <title>" . $thread['subject'] . "</title>\n" . "      <link>{$_G['siteurl']}" . ($trewriteflag ? rewriteoutput('forum_viewthread', 1, '', $thread['tid']) : "forum.php?mod=viewthread&amp;tid={$thread['tid']}") . "</link>\n" . "      <description><![CDATA[" . dhtmlspecialchars($thread['description']) . "]]></description>\n" . "      <category>" . dhtmlspecialchars($thread['forum']) . "</category>\n" . "      <author>" . dhtmlspecialchars($thread['author']) . "</author>\n" . ($attachfile ? '<enclosure url="' . $filename . '" length="' . $attachsize . '" type="image/jpeg" />' : '') . "      <pubDate>" . gmdate('r', $thread['dateline']) . "</pubDate>\n" . "    </item>\n";
            }
        }
    } else {
        updatersscache($num);
    }
}
echo "  </channel>\n" . "</rss>";
function updatersscache($num)
{
    global $_G;
    $processname = 'forum_rss_cache';
    if (discuz_process::islocked($processname, 600)) {
        return false;
    }
    C::t('forum_rsscache')->truncate();
开发者ID:dalinhuang,项目名称:healthshop,代码行数:31,代码来源:forum_rss.php

示例3: dhtmlspecialchars

    }
    $t_link = 'forum.php?mod=forumdisplay&amp;fid=' . $_G['fid'] . ($_GET['extra'] && !IS_ROBOT ? '&amp;' . $_GET['extra'] : '');
    $navigation .= ' <em>&rsaquo;</em> <a href="' . $t_link . '">' . $_G['forum']['name'] . '</a>';
    if ($archiveid) {
        if ($threadtable_info[$archiveid]['displayname']) {
            $t_name = dhtmlspecialchars($threadtable_info[$archiveid]['displayname']);
        } else {
            $t_name = lang('core', 'archive') . ' ' . $archiveid;
        }
        $navigation .= ' <em>&rsaquo;</em> <a href="forum.php?mod=forumdisplay&fid=' . $_G['fid'] . '&archiveid=' . $archiveid . '">' . $t_name . '</a>';
    }
    unset($t_link, $t_name);
}
$_GET['extra'] = $_GET['extra'] ? rawurlencode($_GET['extra']) : '';
if (@in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
    $canonical = rewriteoutput('forum_viewthread', 1, '', $_G['tid'], 1, '', '');
} else {
    $canonical = 'forum.php?mod=viewthread&tid=' . $_G['tid'];
}
$_G['setting']['seohead'] .= '<link href="' . $_G['siteurl'] . $canonical . '" rel="canonical" />';
$_G['forum_tagscript'] = '';
$threadsort = $thread['sortid'] && isset($_G['forum']['threadsorts']['types'][$thread['sortid']]) ? 1 : 0;
if ($threadsort) {
    require_once libfile('function/threadsort');
    $threadsortshow = threadsortshow($thread['sortid'], $_G['tid']);
}
if (empty($_G['forum']['allowview'])) {
    if (!$_G['forum']['viewperm'] && !$_G['group']['readaccess']) {
        showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
    } elseif ($_G['forum']['viewperm'] && !forumperm($_G['forum']['viewperm'])) {
        showmessagenoperm('viewperm', $_G['fid']);
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:forum_viewthread.php

示例4: rewriteoutput

            }
            $target = $thread['isgroup'] == 1 || $thread['forumstick'] ? ' target="_blank"' : ' onclick="atarget(this)"';
            if (in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
                $thread['threadurl'] = '<a href="' . rewriteoutput('forum_viewthread', 1, '', $thread['tid'], 1, '', '') . '"' . $thread['highlight'] . $target . 'class="s xst">' . $thread['subject'] . '</a>';
            } else {
                $thread['threadurl'] = '<a href="forum.php?mod=viewthread&amp;tid=' . $thread['tid'] . '"' . $thread['highlight'] . $target . 'class="s xst">' . $thread['subject'] . '</a>';
            }
            if (in_array($thread['displayorder'], array(1, 2, 3, 4))) {
                $thread['id'] = 'stickthread_' . $thread['tid'];
            } else {
                $thread['id'] = 'normalthread_' . $thread['tid'];
            }
            $thread['threadurl'] = $thread['threadtype'] . $thread['threadsort'] . $thread['threadurl'];
            if (in_array('home_space', $_G['setting']['rewritestatus'])) {
                $thread['authorurl'] = '<a href="' . rewriteoutput('home_space', 1, '', $thread['authorid'], '', '') . '">' . $thread['author'] . '</a>';
                $thread['lastposterurl'] = '<a href="' . rewriteoutput('home_space', 1, '', '', rawurlencode($thread['lastposter']), '') . '">' . $thread['lastposter'] . '</a>';
            } else {
                $thread['authorurl'] = '<a href="home.php?mod=space&uid=' . $thread['authorid'] . '">' . $thread['author'] . '</a>';
                $thread['lastposterurl'] = '<a href="home.php?mod=space&username=' . rawurlencode($thread['lastposter']) . '">' . $thread['lastposter'] . '</a>';
            }
            $threadlist[] = $thread;
        }
        if ($threadlist) {
            krsort($threadlist);
        }
        include template('forum/ajax_threadlist');
    }
} elseif ($_GET['action'] == 'downremoteimg') {
    $_GET['message'] = str_replace(array("\r", "\n"), array($_GET['wysiwyg'] ? '<br />' : '', "\\n"), $_GET['message']);
    preg_match_all("/\\[img\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]|\\[img=\\d{1,4}[x|\\,]\\d{1,4}\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/is", $_GET['message'], $image1, PREG_SET_ORDER);
    preg_match_all("/\\<img.+src=('|\"|)?(.*)(\\1)([\\s].*)?\\>/ismUe", $_GET['message'], $image2, PREG_SET_ORDER);
开发者ID:vanloswang,项目名称:DiscuzX,代码行数:31,代码来源:forum_ajax.php

示例5: preg_replace

 if (strpos($msglower, '[/quote]') !== FALSE) {
     $post['message'] = preg_replace('/\\[quote\\].*\\[\\/quote\\](\\r\\n|\\n|\\r){0,}/is', '', $post['message']);
 }
 if (strpos($msglower, '[/media]') !== FALSE) {
     $post['message'] = preg_replace("/\\[media=([\\w,]+)\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/media\\]/ies", '', $post['message']);
 }
 if (strpos($msglower, '[/flash]') !== FALSE) {
     $post['message'] = preg_replace("/\\[flash(=(\\d+),(\\d+))?\\]\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/flash\\]/ies", '', $post['message']);
 }
 if (strpos($msglower, '[/hide]') !== FALSE) {
     $post['message'] = preg_replace("/\\[hide[=]?(d\\d+)?[,]?(\\d+)?\\]\\s*(.*?)\\s*\\[\\/hide\\]/is", '', $post['message']);
 }
 $html_content = $connectService->connectParseBbcode($post['message'], $thread['fid'], $post['pid'], $post['htmlon'], $attach_images);
 $html_content = strip_tags(preg_replace('/(&nbsp;)+/', ' ', $html_content));
 if ($_G['setting']['rewritestatus'] && in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
     $url = rewriteoutput('forum_viewthread', 1, $_G['siteurl'], $tid);
 } else {
     $url = $_G['siteurl'] . 'forum.php?mod=viewthread&tid=' . $tid;
 }
 $qzone_params = array('title' => $thread['subject'], 'url' => $url, 'summary' => $html_content, 'nswb' => '1');
 $_t_content = lang('plugin/qqconnect', 'connect_feed_iam');
 $_t_content .= '#' . cutstr($_G['setting']['bbname'], 20, '') . '#';
 $_t_content .= lang('plugin/qqconnect', 'connect_feed_published_thread', array('subject' => cutstr($thread['subject'], 120)));
 $_t_content .= cutstr($html_content, 80);
 $_t_content .= ' ' . $url;
 $t_params = array('content' => $_t_content);
 if ($attach_images && is_array($attach_images)) {
     $attach_image = array_shift($attach_images);
     $qzone_params['images'] = $attach_image['big'];
     $t_params['pic'] = $attach_image['path'];
     $t_params['remote'] = $attach_image['remote'];
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:connect_feed.php

示例6: space_blog_title_output

 function space_blog_title_output()
 {
     global $_G, $blog;
     if ($this->conf['space_blog_title']) {
         if (@in_array('home_blog', $_G['setting']['rewritestatus'])) {
             $canonical = rewriteoutput('home_blog', 1, '', $blog['blogid'], 1, '', '');
         } else {
             $canonical = 'home.php?mod=space&uid=' . $blog['uid'] . '&do=blog&id=' . $blog['blogid'];
         }
         $pdata = array('url' => $_G['siteurl'] . $canonical);
         return parent::pocode($pdata);
     }
 }
开发者ID:hacktea8,项目名称:d_z_s_t_u_d_e_n_t,代码行数:13,代码来源:onexin_google_1.class.php

示例7: global_header

 function global_header()
 {
     global $_G;
     $url_dz = base64_decode($_G['currenturl_encode']);
     if ($_G['gp_mod'] == 'viewthread') {
         if (in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('forum_viewthread', 1, '', $_G['tid'], $_G['page'], $_G['prevpage'], '');
         } else {
             $url = str_replace(array('&extra=' . $_G['gp_extra'] . '', '&page=' . $_G['gp_page'] . ''), '', $url_dz);
         }
     } elseif ($_G['gp_mod'] == 'redirect') {
         if (in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('forum_viewthread', 1, '', $_G['gp_tid'], $_G['page'], $_G['prevpage'], '');
         } else {
             $url = $url_dz;
         }
     } elseif ($_G['gp_mod'] == 'forumdisplay') {
         if (in_array('forum_forumdisplay', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('forum_forumdisplay', 1, '', $_G['fid'], $_G['page'], '', '');
         } else {
             $url = str_replace(array('&page=' . $_G['gp_page'] . ''), '', $url_dz);
         }
     } elseif ($_G['basescript'] == 'group' && $_G['gp_mod'] == 'forumdisplay') {
         if (in_array('group_group', $_G['setting']['rewritestatus'])) {
             $url = $_G['siteurl'] . rewriteoutput('group_group', 1, '', $_G['fid'], $_G['page'], '', '');
         } else {
             $url = $url_dz;
         }
     } else {
         $url = $url_dz;
     }
     $replace_script = array('1', '2', '3', '4', '5', '6');
     $script = array('forumdisplay', 'viewthread', 'redirect', 'group', 'home', 'portal');
     $copy_open_area = str_replace($replace_script, $script, $this->copy_open_area);
     if ((in_array($_G['gp_mod'], $copy_open_area) || in_array($_G['basescript'], $copy_open_area)) && in_array($_G['groupid'], $this->copy_group)) {
         if ($this->ban_copy && !$this->add_copy) {
             $return .= '<script type="text/javascript">document.onselectstart=function(){return false;};</script><style type="text/css">html{-moz-user-select: none;-webkit-user-select: none;}</style>';
         } else {
             $return .= "";
         }
         if ($this->add_copy && !$this->ban_copy && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') == TRUE) {
             $auto_add = str_replace(array("'", '"', "{bbname}", "{boardurl}", "{url}"), array("\\'", '\\"', $_G['setting']['bbname'], $_G['siteurl'], $url), $this->add_copy_content);
             $return .= '<script type="text/javascript">document.body.oncopy=function(){event.returnValue=false;var t=document.selection.createRange().text;var s=\'' . $auto_add . '\';clipboardData.setData(\'Text\',t+"\\r\\n"+s);}</script>';
         } else {
             $return .= "";
         }
         if ($this->popup) {
             $return .= "<script type=text/javascript>function copyright(msg, script){script = !script ? '' : script;var c = '<div class=\"f_c\"><div class=\"c floatwrap\" style=\"height:" . $this->height_mini . ";\">' + msg + '</div></div>';var t = '" . lang('plugin/dsu_marcocopyright', 'copyright') . "' ;showDialog(c, 'info', t);}document.oncontextmenu=function(){copyright('{$this->text_mini}', this.href);return false;}</script>";
         } else {
             $return .= "";
         }
         return $return;
     }
 }
开发者ID:v998,项目名称:dsu,代码行数:54,代码来源:copyright.class.php

示例8: getPluginUrl

 public static function getPluginUrl($pluginid, $param = array())
 {
     global $_G;
     if (in_array('plugin', $_G['setting']['rewritestatus'])) {
         $url = $_G['siteurl'] . rewriteoutput('plugin', 1, 'wechat', 'access');
     } else {
         $url = $_G['siteurl'] . 'plugin.php?id=wechat:access';
     }
     $url .= '&pluginid=' . urlencode($pluginid);
     $url .= '&param=' . urlencode(base64_encode(http_build_query($param)));
     return $url;
 }
开发者ID:hacktea8,项目名称:d_z_s_t_u_d_e_n_t,代码行数:12,代码来源:wechat.lib.class.php

示例9: array

        $afmethods[] = array('class' => 'extend_thread_sort', 'method' => 'after_newthread');
    }
    $bfmethods[] = array('class' => 'extend_thread_allowat', 'method' => 'before_newthread');
    $afmethods[] = array('class' => 'extend_thread_allowat', 'method' => 'after_newthread');
    $afmethods[] = array('class' => 'extend_thread_image', 'method' => 'after_newthread');
    if (!empty($_GET['adddynamic'])) {
        $afmethods[] = array('class' => 'extend_thread_follow', 'method' => 'after_newthread');
    }
    $modthread->attach_before_methods('newthread', $bfmethods);
    $modthread->attach_after_methods('newthread', $afmethods);
    $return = $modthread->newthread($params);
    $tid = $modthread->tid;
    $pid = $modthread->pid;
    dsetcookie('clearUserdata', 'forum');
    if ($specialextra) {
        $classname = 'threadplugin_' . $specialextra;
        if (class_exists($classname) && method_exists($threadpluginclass = new $classname(), 'newthread_submit_end')) {
            $threadpluginclass->newthread_submit_end($_G['fid'], $modthread->tid);
        }
    }
    if (!$modthread->param('modnewthreads') && !empty($_GET['addfeed'])) {
        $modthread->feed();
    }
    if (!empty($_G['setting']['rewriterule']['forum_viewthread']) && in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
        $returnurl = rewriteoutput('forum_viewthread', 1, '', $modthread->tid, 1, '', $extra);
    } else {
        $returnurl = "forum.php?mod=viewthread&tid={$modthread->tid}&extra={$extra}";
    }
    $values = array('fid' => $modthread->forum('fid'), 'tid' => $modthread->tid, 'pid' => $modthread->pid, 'coverimg' => '', 'sechash' => !empty($_GET['sechash']) ? $_GET['sechash'] : '');
    showmessage($return, $returnurl, array_merge($values, (array) $modthread->param('values')), $modthread->param('param'));
}
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:post_newthread.php

示例10: switch

         C::app()->init();
         $jump = true;
         $domain = C::t('common_domain')->fetch_by_domain_domainroot($_ENV['prefixdomain'], $_ENV['domainroot']);
         $apphost = $_ENV['domain']['app'][$domain['idtype']] ? $_ENV['domain']['app'][$domain['idtype']] : $_ENV['domain']['app']['default'];
         $apphost = $apphost ? 'http://' . $apphost . '/' : '';
         switch ($domain['idtype']) {
             case 'home':
                 if ($_G['setting']['rewritestatus'] && in_array('home_space', $_G['setting']['rewritestatus'])) {
                     $url = rewriteoutput('home_space', 1, $apphost, $domain['id']);
                 } else {
                     $url = $apphost . 'home.php?mod=space&uid=' . $domain['id'];
                 }
                 break;
             case 'group':
                 if ($_G['setting']['rewritestatus'] && in_array('group_group', $_G['setting']['rewritestatus'])) {
                     $url = rewriteoutput('group_group', 1, $apphost, $domain['id']);
                 } else {
                     $url = $apphost . 'forum.php?mod=group&fid=' . $domain['id'] . '&page=1';
                 }
                 break;
         }
     }
 } else {
     $jump = true;
 }
 if (empty($url) && empty($_ENV['curapp'])) {
     if (!empty($_ENV['domain']['defaultindex']) && !$jump) {
         if ($_ENV['defaultapp'][$_ENV['domain']['defaultindex']]) {
             $_ENV['curapp'] = $_ENV['defaultapp'][$_ENV['domain']['defaultindex']];
         } else {
             $url = $_ENV['domain']['defaultindex'];
开发者ID:wait121000,项目名称:discuz3.0forsae,代码行数:31,代码来源:index.php

示例11: arch_multi

}
?>
	<div class="page">
		<?php 
echo arch_multi($_G['forum_thread']['replies'] + 1, $_G['ppp'], $page, "?tid-{$_G['tid']}.html");
?>
	</div>
</div>

<div id="end">
	<?php 
echo lang('forum/archiver', 'full_version');
?>
:
	<a href="../<?php 
echo in_array('forum_viewthread', $_G['setting']['rewritestatus']) ? rewriteoutput('forum_viewthread', 1, '', $_G['tid'], $page) : 'forum.php?mod=viewthread&tid=' . $_G['tid'] . '&page=' . $page;
?>
" target="_blank"><strong><?php 
echo $_G['forum_thread']['subject'];
?>
</strong></a>
</div>
<?php 
include loadarchiver('common/footer');
function archivermessage($message)
{
    if (strpos($message, '[/password]') !== FALSE) {
        return '';
    }
    return nl2br(preg_replace(array('/&amp;(#\\d{3,5};)/', "/\\[hide=?\\d*\\](.*?)\\[\\/hide\\]/is", "/\\[postbg\\]\\s*([^\\[\\<\r\n;'\"\\?\\(\\)]+?)\\s*\\[\\/postbg\\]/is", "/\\[\\/?\\w+=?.*?\\]/"), array('&\\1', '<b>**** Hidden Message *****</b>', ''), str_replace(array('&', '"', '<', '>', "\t", '   ', '', '  '), array('&amp;', '&quot;', '&lt;', '&gt;', '&nbsp; &nbsp; &nbsp; &nbsp; ', '&nbsp; &nbsp;', '&nbsp;&nbsp;'), $message)));
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:viewthread.php

示例12: strip_tags

        } else {
            $navigation = ' <em>&rsaquo;</em> <a href="forum.php">' . $_G['setting']['navs'][2]['navname'] . '</a> <em>&rsaquo;</em> <a href="forum.php?mod=forumdisplay&fid=' . $fup['fid'] . '">' . (strip_tags($fup['name']) ? strip_tags($fup['name']) : $fup['name']) . '</a> <em>&rsaquo;</em> <a href="' . $upnavlink . '">' . (strip_tags($_G['forum']['name']) ? strip_tags($_G['forum']['name']) : $_G['forum']['name']) . '</a>' . ' <em>&rsaquo;</em> <a href="forum.php?mod=forumdisplay&fid=' . $_G['fid'] . '&archiveid=' . $_G['forum']['threadtableid'] . '">' . $forumarchivename . '</a>';
        }
    }
} elseif ($_G['gp_from'] == 'portal') {
    $_G['setting']['ratelogon'] = 1;
    $navigation = ' <em>&rsaquo;</em> <a href="portal.php">' . lang('core', 'portal') . '</a>';
    $navsubject = $_G['forum_thread']['subject'];
    $navtitle = $_G['forum_thread']['subject'];
}
$_G['gp_extra'] = $_G['gp_extra'] ? rawurlencode($_G['gp_extra']) : '';
$metakeywords = strip_tags($_G['forum_thread']['subject']);
if (in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
    $canonical = rewriteoutput('forum_viewthread', 1, '', $_G['tid'], 1, '', '');
} elseif (in_array('all_script', $_G['setting']['rewritestatus'])) {
    $canonical = rewriteoutput('all_script', 1, '', 'forum', 'viewthread&tid=' . $_G['tid'] . '&page=1', '');
} else {
    $canonical = 'forum.php?mod=viewthread&tid=' . $_G['tid'];
}
$_G['setting']['seohead'] .= '<link href="' . $_G['siteurl'] . $canonical . '" rel="canonical" />';
if ($_G['forum']['status'] == 3) {
    $_G['action']['action'] = 3;
    require_once libfile('function/group');
    $status = groupperm($_G['forum'], $_G['uid']);
    if ($status == 1) {
        showmessage('forum_group_status_off');
    } elseif ($status == 2) {
        showmessage('forum_group_noallowed', 'forum.php?mod=group&fid=' . $_G['fid']);
    } elseif ($status == 3) {
        showmessage('forum_group_moderated', 'forum.php?mod=group&fid=' . $_G['fid']);
    }
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:forum_viewthread.php

示例13: foreach

    $alldata = C::t('portal_rsscache')->fetch_all_by_catid($catarray, $num);
    if ($alldata) {
        foreach ($alldata as $article) {
            if (TIMESTAMP - $article['lastupdate'] > $ttl * 60) {
                updatersscache($num);
                break;
            } else {
                list($article['description'], $attachremote, $attachfile, $attachsize) = explode("\t", $article['description']);
                if ($attachfile) {
                    if ($attachremote) {
                        $filename = $_G['setting']['ftp']['attachurl'] . 'portal/' . $attachfile;
                    } else {
                        $filename = $_G['siteurl'] . $_G['setting']['attachurl'] . 'portal/' . $attachfile;
                    }
                }
                echo "    <item>\n" . "      <title>" . $article['subject'] . "</title>\n" . "      <link>{$_G['siteurl']}" . ($rewriteflag ? rewriteoutput('portal_article', 1, '', $article[aid]) : "portal.php?mod=view&amp;aid={$article['aid']}") . "</link>\n" . "      <description><![CDATA[" . dhtmlspecialchars($article['description']) . "]]></description>\n" . "      <category>" . dhtmlspecialchars($article['catname']) . "</category>\n" . "      <author>" . dhtmlspecialchars($article['author']) . "</author>\n" . ($attachfile ? '<enclosure url="' . $filename . '" length="' . $attachsize . '" type="image/jpeg" />' . "\n" : '') . "      <pubDate>" . gmdate('r', $article['dateline']) . "</pubDate>\n" . "    </item>\n";
            }
        }
    } else {
        updatersscache($num);
    }
}
echo "  </channel>\n" . "</rss>";
function updatersscache($num)
{
    global $_G;
    $processname = 'portal_rss_cache';
    if (discuz_process::islocked($processname, 600)) {
        return false;
    }
    C::t('portal_rsscache')->truncate();
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:portal_rss.php

示例14: getThreadUrl

 /**
  * 获取指定tid的链接地址
  * @param $tid
  */
 function getThreadUrl($tid)
 {
     global $_G;
     $enableFromuid = XWB_plugin::pcfg('link_visit_promotion');
     if (1 != $enableFromuid && $_G['setting']['rewritestatus'] && in_array('forum_viewthread', $_G['setting']['rewritestatus'])) {
         $siteUrl = $_G['siteurl'];
         if (version_compare(XWB_S_VERSION, '2', '<')) {
             $siteUrl = str_replace(array('http://', 'https://', '//'), array('', '', '/'), $siteUrl);
         }
         $threadURL = rewriteoutput('forum_viewthread', 1, $siteUrl, $tid);
     } else {
         $threadURL = $_G['siteurl'] . 'forum.php?mod=viewthread&tid=' . $tid;
         if (1 == $enableFromuid) {
             $threadURL .= '&fromuid=' . $_G['uid'];
         }
     }
     return $threadURL;
 }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:22,代码来源:xwb_plugins_publish.class.php

示例15: showsortmodetemplate

function showsortmodetemplate($sortid, $fid, $sortoptionarray, $templatearray, $threadlist, $threadids = array(), &$verify = array())
{
    global $_G;
    $sorttemplate = $replaces = array();
    $sorttemplate['footer'] = $sorttemplate['body'] = $sorttemplate['header'] = '';
    if (strexists($templatearray[$sortid], '[loop]') && strexists($templatearray[$sortid], '[/loop]')) {
        preg_match('/^(.+?)\\[loop\\](.+?)\\[\\/loop\\](.+?)$/s', $templatearray[$sortid], $r);
        $sorttemplate['header'] = stripslashes($r[1]);
        $templatearray[$sortid] = stripslashes($r[2]);
        $sorttemplate['footer'] = stripslashes($r[3]);
    }
    $rewritespace = is_array($_G['setting']['rewritestatus']) && in_array('home_space', $_G['setting']['rewritestatus']);
    $rewriteviewthread = is_array($_G['setting']['rewritestatus']) && in_array('forum_viewthread', $_G['setting']['rewritestatus']);
    $sortlistarray = showsorttemplate($sortid, $fid, $sortoptionarray, $templatearray, $threadlist, $threadids, true);
    foreach ($threadlist as $thread) {
        foreach ($thread as $k => $v) {
            $replaces['{' . $k . '}'] = $v;
        }
        $body = $sortlistarray['template'][$sortid][$thread['tid']];
        $replaces['{author_url}'] = $rewritespace ? rewriteoutput('home_space', 1, '', $thread['authorid']) : 'home.php?mod=space&amp;uid=' . $thread['authorid'];
        $replaces['{lastposter_url}'] = $rewritespace ? rewriteoutput('home_space', 1, '', '', $thread['lastposter']) : 'home.php?mod=space&amp;username=' . $thread['lastposterenc'];
        $replaces['{subject_url}'] = $rewriteviewthread ? rewriteoutput('forum_viewthread', 1, '', $thread['tid']) : 'forum.php?mod=viewthread&amp;tid=' . $thread['tid'];
        $replaces['{lastpost_url}'] = 'forum.php?mod=redirect&tid=' . $thread['tid'] . '&goto=lastpost#lastpost';
        $replaces['{lastpost_url}'] = 'forum.php?mod=redirect&tid=' . $thread['tid'] . '&goto=lastpost#lastpost';
        $sql = "SELECT m.groupid,g.icon FROM " . DB::table('common_member') . " m ," . DB::table('common_usergroup') . " g WHERE m.uid =" . $thread['authorid'] . " and m.groupid=g.groupid LIMIT 0, 1";
        $query = DB::query($sql);
        $vanfon_usergroup = 0;
        while ($result = DB::fetch($query)) {
            $vanfon_usergroup = $result['icon'];
        }
        $replaces['{vanfon_usergroup}'] = $vanfon_usergroup ? '<img src=' . $vanfon_usergroup . ' />' : '<img src=http://static.yylmacro.com/jx3pve/groupicon/LV0.png >';
        $sql = "SELECT c.icon FROM " . DB::table('forum_threadclass') . " c ," . DB::table('forum_thread') . " t WHERE t.tid =" . $thread['tid'] . " and t.typeid=c.typeid LIMIT 0, 1";
        $query = DB::query($sql);
        $vanfon_typeicon = 0;
        while ($result = DB::fetch($query)) {
            $vanfon_typeicon = $result['icon'];
        }
        $replaces['{vanfon_typeicon}'] = $vanfon_typeicon ? $vanfon_typeicon : '';
        $replaces['{avatar_small}'] = avatar($thread['authorid'], 'small', true);
        $replaces['{typename_url}'] = 'forum.php?mod=forumdisplay&fid=' . $fid . '&filter=typeid&typeid=' . $thread['tid'];
        $replaces['{attachment}'] = $thread['attachment'] == 2 ? '<img src="' . STATICURL . 'image/filetype/image_s.gif" align="absmiddle" />' : ($thread['attachment'] == 1 ? '<img src="' . STATICURL . 'image/filetype/common.gif" align="absmiddle" />' : '');
        $replaces['{author_verify}'] = $verify[$thread['authorid']] ? $verify[$thread['authorid']] : '';
        if ($_G['forum']['ismoderator']) {
            if ($thread['fid'] == $fid && $thread['displayorder'] <= 3 || $_G['adminid'] == 1) {
                $replaces['{modcheck}'] = '<input onclick="tmodclick(this)" type="checkbox" name="moderate[]" value="' . $thread['tid'] . '" />';
            } else {
                $replaces['{modcheck}'] = '<input type="checkbox" disabled="disabled" />';
            }
        } else {
            $replaces['{modcheck}'] = '';
        }
        $body = str_replace(array_keys($replaces), $replaces, $body);
        $sorttemplate['body'] .= $body;
    }
    return $sorttemplate;
}
开发者ID:deepziyu,项目名称:JX3PVE,代码行数:56,代码来源:function_threadsort_bakfavicon.php


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