喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 喜悦证交所 | 帮助

RSS 订阅当前论坛  

$5.95 Web Hosting     

上一主题 下一主题
     
标题: [问题] fff  
 
xiaodi667
注册会员
Rank: 2



UID 79420
精华 0
积分 84
帖子 63
金钱 84 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-9-1
状态 离线
[广告]: 代充Paypal帐号美元
fff



<?php

/*
    [Discuz!] (C)2001-2007 Comsenz Inc.
    This is NOT a freeware, use is subject to license terms

    $Id: viewthread.php 10561 2007-09-05 08:24:49Z monkey $
*/

define('CURSCRIPT''viewthread');
define('SQL_ADD_THREAD'' t.dateline, t.special, t.lastpost AS lastthreadpost,');
require_once 
'./include/common.inc.php';
require_once 
DISCUZ_ROOT.'./include/forum.func.php';

$page max($page1);
if(
$cachethreadlife && $forum['threadcaches'] && !$discuz_uid && $page == && !$forum['special']) {
    
viewthread_loadcache();
}

require_once 
DISCUZ_ROOT.'./include/discuzcode.func.php';

$discuz_action 3;

$supe['status'] && supe_dbconnect();
$query $db->query("SELECT * FROM {$tablepre}threads t WHERE tid='$tid' AND displayorder>='0'");

if(!
$thread $db->fetch_array($query)) {
    
$tid $_GET['tid'];
    if(
$supe['status'] && is_numeric($tid) && !empty($supe_fromsupesite) && md5("$discuz_auth_key-$tid") == $supe_fromsupesite) {
        
$supe['db']->query("UPDATE {$supe[tablepre]}spaceitems SET tid='0' WHERE tid='$tid'"'SILENT');
    }
    
showmessage('thread_nonexistence');
}

$oldtopics = isset($_DCOOKIE['oldtopics']) ? $_DCOOKIE['oldtopics'] : 'D';
if(
strpos($oldtopics'D'.$tid.'D') === FALSE) {
    
$oldtopics 'D'.$tid.$oldtopics;
    if(
strlen($oldtopics) > 3072) {
        
$oldtopics preg_replace("((Dd+)+D).*$""\1"substr($oldtopics03072));
    }
    
dsetcookie('oldtopics'$oldtopics3600);
}

if(
$lastvisit $thread['lastpost'] && (!isset($_DCOOKIE['fid'.$fid]) || $thread['lastpost'] > $_DCOOKIE['fid'.$fid])) {
    
dsetcookie('fid'.$fid$thread['lastpost'], 3600);
}

$thisgid 0;

$thread['subjectenc']     = rawurlencode($thread['subject']);
$fromuid         $creditspolicy['promotion_visit'] && $discuz_uid '&fromuid='.$discuz_uid '';
$supe_fromdiscuz     $supe['status'] && $thread['itemid'] ? md5("$discuz_auth_key-$thread[itemid]") : '';
$iscircle         $supe['status'] && $supe['circlestatus'] && $forum['status'] == && $thread['sgid'];

$navigation '&#187; <a href="'.($iscircle && empty($frombbs) ? $supe['siteurl'].'?action_mygroup_gid_'.$thread['sgid'].'_op_list_type_bbs_fid_'.$fid 'forumdisplay.php?fid='.$fid.($extra '&'.preg_replace("/^(&)*/"''$extra) : '')).'">'.$forum['name'].'</a> &#187; '.$thread['subject'];

$navtitle $thread['subject'].' - '.strip_tags($forum['name']);
if(
$forum['type'] == 'sub') {
    
$query $db->query("SELECT fid, name FROM {$tablepre}forums WHERE fid='$forum[fup]'");
    
$fup $db->fetch_array($query);
    
$navigation '&#187; <a href="'.($iscircle $supe['siteurl'].'?action_mygroup_gid_'.$thread['sgid'].'_op_list_type_bbs_fid_'.$fup[fid] : 'forumdisplay.php?fid='.$fup[fid]).'">'.$fup[name].'</a> '.$navigation;
    
$navtitle $navtitle.' - '.strip_tags($fup['name']);
}
$navtitle .= ' - ';

$forum['typemodels'] = $forum['typemodels'] ? unserialize($forum['typemodels']) : array();
$threadtype = isset($forum['threadtypes']['types'][$thread['typeid']]) ? 0;
$typetemplate '';
$optiondata $optionlist = array();
if(
$thread['typeid'] && $threadtype) {
    if(
$forum['threadtypes']['special'][$thread['typeid']]) {
        if(@include_once 
DISCUZ_ROOT.'./forumdata/cache/threadtype_'.$thread['typeid'].'.php') {
            
$query $db->query("SELECT optionid, value FROM {$tablepre}typeoptionvars WHERE tid='$tid'");
            while(
$option $db->fetch_array($query)) {
                
$optiondata[$option['optionid']] = $option['value'];
            }

            foreach(
$_DTYPE as $optionid => $option) {
                
$optionlist[$option['identifier']]['title'] = $_DTYPE[$optionid]['title'];
                if(
$_DTYPE[$optionid]['type'] == 'checkbox') {
                    
$optionlist[$option['identifier']]['value'] = '';
                    foreach(
explode("t"$optiondata[$optionid]) as $choiceid) {
                        
$optionlist[$option['identifier']]['value'] .= $_DTYPE[$optionid]['choices'][$choiceid].' ';
                    }
                } elseif(
in_array($_DTYPE[$optionid]['type'], array('radio''select'))) {
                    
$optionlist[$option['identifier']]['value'] = $_DTYPE[$optionid]['choices'][$optiondata[$optionid]];
                } elseif(
$_DTYPE[$optionid]['type'] == 'image') {
                    
$maxwidth $_DTYPE[$optionid]['maxwidth'] ? 'width="'.$_DTYPE[$optionid]['maxwidth'].'"' '';
                    
$maxheight $_DTYPE[$optionid]['maxheight'] ? 'height="'.$_DTYPE[$optionid]['maxheight'].'"' '';
                    
$optionlist[$option['identifier']]['value'] = $optiondata[$optionid] ? "<a href=\"$optiondata[$optionid]\" target=\"_blank\"><img src=\"$optiondata[$optionid]\"  $maxwidth $maxheight border=\"0\"></a>" '';
                } elseif(
$_DTYPE[$optionid]['type'] == 'url') {
                    
$optionlist[$option['identifier']]['value'] = $optiondata[$optionid] ? "<a href=\"$optiondata[$optionid]\" target=\"_blank\">$optiondata[$optionid]</a>" '';
                } else {
                    
$optionlist[$option['identifier']]['value'] = $optiondata[$optionid];
                }
            }

            
$typetemplate $_DTYPETEMPLATE preg_replace(array("/[(.+?)value]/ies""/{(.+?)}/ies"), array("showoption('\1', 'value')""showoption('\1', 'title')"), $_DTYPETEMPLATE) : '';
        }
    }

    
$thread['subject'] = ($forum['threadtypes']['listable'] ? '<a href="forumdisplay.php?fid='.$fid.'&filter=type&typeid='.$thread['typeid'].'">['.$forum['threadtypes']['types'][$thread['typeid']].']</a>' '['.$forum['threadtypes']['types'][$thread['typeid']].']').' '.$thread['subject'];
}

if(empty(
$forum['allowview'])) {
    if(!
$forum['viewperm'] && !$readaccess) {
        
showmessage('group_nopermission'NULL'NOPERM');
    } elseif(
$forum['viewperm'] && !forumperm($forum['viewperm'])) {
        
$navtitle '';
        
showmessage('forum_nopermission'NULL'NOPERM');
    }
}

if(
$forum['formulaperm']) {
    
forumformulaperm($forum['formulaperm']);
}

if(
$forum['password'] && $forum['password'] != $_DCOOKIE['fidpw'.$fid]) {
    
dheader("Location: {$boardurl}forumdisplay.php?fid=$fid&sid=$sid");
}

if(
$thread['readperm'] && $thread['readperm'] > $readaccess && !$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
    
showmessage('thread_nopermission'NULL'NOPERM');
}

if(
$thread['price'] > && $thread['special'] == 0) {

    if(
$maxchargespan && $timestamp $thread['dateline'] >= $maxchargespan 3600) {
        
$db->query("UPDATE {$tablepre}threads SET price='0' WHERE tid='$tid'");
        
$thread['price'] = 0;
    } else {
        if(!
$discuz_uid) {
            
showmessage('group_nopermission'NULL'NOPERM');

        } elseif(!
$forum['ismoderator'] && $thread['authorid'] != $discuz_uid) {
            
$query $db->query("SELECT tid FROM {$tablepre}paymentlog WHERE tid='$tid' AND uid='$discuz_uid'");
            if(!
$db->num_rows($query)) {
                require_once 
DISCUZ_ROOT.'./include/threadpay.inc.php';
                
$threadpay TRUE;
            }
        }
    }
}

if(
$iscircle) {
        require_once 
DISCUZ_ROOT.'./include/supesite_circle.inc.php';
}
?>
[ 本帖最后由 wzhu 于 2007-10-8 02:14 PM 编辑 ]
2007-10-8 02:05 PM#1
查看资料  发短消息  顶部
 
xiaodi667
注册会员
Rank: 2



UID 79420
精华 0
积分 84
帖子 63
金钱 84 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-9-1
状态 离线
[广告]: Enom域名自助付费 自助注册 自助PUSH 主流域名COM等一律57.99元年
怎么样才能让自己的代码也能有颜色显示呢?
2007-10-8 02:06 PM#2
查看资料  发短消息  顶部
 
wzhu (wzhu)
版主
Rank: 7Rank: 7Rank: 7
C[A-Z]O


UID 68040
精华 0
积分 47793
帖子 1568
金钱 47770 喜悦币
威望 0
人脉 23
阅读权限 100
注册 2006-1-14
来自 湖北荆州>陕西西安>辽宁 ...
状态 离线
[推荐阅读] ping: unknown host www.163.com
发表的帖子请认真书写标题,表明问题。技术性的东西使用眼球效应没有用的。



<?wzhu
wzhu.print("http://www.cncmm.com");
?>
2007-10-8 02:17 PM#3
查看资料  访问主页  Blog  发短消息  QQ  顶部
 
奶瓶 (NP博士)
版主
Rank: 7Rank: 7Rank: 7
老仙


UID 52707
精华 4
积分 5558
帖子 6228
金钱 5508 喜悦币
威望 50
人脉 0
阅读权限 100
注册 2004-11-22
来自 北大中文系
状态 在线
[推荐阅读] 有问题还是想到这里。PHP的DOMDocument对象显示XML里的中文
ggg一下就知道了




图片包子,注册送100包子!
2007-10-8 03:59 PM#4
查看资料  访问主页  Blog  发短消息  QQ  ICQ 状态  Yahoo!  顶部
 
喜悦村支书
中级会员
Rank: 3Rank: 3


UID 82061
精华 0
积分 210
帖子 258
金钱 210 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2006-10-23
状态 离线
[推荐阅读] 南京地区需要PHP开发人员和团队寻求长期合作
我以为他的意思是:fuck  fire fox.
2007-10-8 04:00 PM#5
查看资料  发短消息  顶部
 
xiaodi667
注册会员
Rank: 2



UID 79420
精华 0
积分 84
帖子 63
金钱 84 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-9-1
状态 离线
[推荐阅读] 最近水区这么安静啊?


QUOTE:
原帖由 wzhu 于 2007-10-8 02:17 PM 发表
发表的帖子请认真书写标题,表明问题。技术性的东西使用眼球效应没有用的。
不好意思发的时候比较着急,为什么我发的时候没有变颜色啊,
是不是编辑器的原因啊,
我想实现 要怎么实现呢
2007-10-8 04:29 PM#6
查看资料  发短消息  顶部
 
lyxcf
中级会员
Rank: 3Rank: 3



UID 78421
精华 0
积分 309
帖子 205
金钱 309 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2006-8-16
来自 北京 角门北路
状态 离线
[推荐阅读] php连接问题
这不会是你想要的结果吧。
http://www.sojiqi.com/code.php?url=highlight




网页搜索、图片搜索、音乐搜索、尽在搜集齐www.sojiqi.com
2007-10-9 01:19 AM#7
查看资料  访问主页  发短消息  QQ  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.103969 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP