otherbank 发表于 2012-4-12 15:14
看你的截图是有修改模版的,可以把你添加的代码(比如导航下面的代码),检查一下,有没有多或少div;
关 ...
嗯,非常谢谢,但是我有一个guide.php的文件,运行tiaozhuang.php后不行了,麻烦您在帮我看一下,以下是他的代码:- <?php
- define('APPTYPEID', 2);
- define('CURSCRIPT', 'guide');
- require './source/class/class_core.php';
- $discuz = & discuz_core::instance();
- $discuz->init();
- runhooks();
- $newthread_list = $newthread_lists = $newreply_list = $newreply_lists = array();
- $forum_colorarray = array('','#EE1B2E','#EE5023','#996600','#3C9D40','#2897C5','#2B65B7','#8F2A90','#EC1282');
- $newthread_query = DB::query("SELECT tid, fid, typeid, sortid, special, author, authorid, subject, highlight, dateline FROM ".DB::table('forum_thread')." WHERE displayorder >= 0 ORDER BY dateline DESC LIMIT 20");
- while($newthread_list = DB::fetch($newthread_query)){
- if($newthread_list['highlight']) {
- $thread_string = sprintf('%02d', $newthread_list['highlight']);
- $thread_stylestr = sprintf('%03b', $thread_string[0]);
- $newthread_list['highlight'] = ' style="';
- $newthread_list['highlight'] .= $thread_stylestr[0] ? 'font-weight: bold;' : '';
- $newthread_list['highlight'] .= $thread_stylestr[1] ? 'font-style: italic;' : '';
- $newthread_list['highlight'] .= $thread_stylestr[2] ? 'text-decoration: underline;' : '';
- $newthread_list['highlight'] .= $thread_string[1] ? 'color: '.$forum_colorarray[$thread_string[1]] : '';
- $newthread_list['highlight'] .= '"';
- } else {
- $newthread_list['highlight'] = '';
- }
-
- if($newthread_list['typeid']){
- $threadtype = DB::result_first("SELECT threadtypes FROM ".DB::table('forum_forumfield')." WHERE fid = $newthread_list[fid]");
- $threadtype = unserialize($threadtype);
- $newthread_list['typename'] = $threadtype['types'][$newthread_list['typeid']];
- }
- /*
- if($newthread_list['sortid']){
- $threadsort = DB::result_first("SELECT threadsorts FROM ".DB::table('forum_forumfield')." WHERE fid = $newthread_list[fid]");
- $threadsort = unserialize($threadsort);
- $newthread_list['sortname'] = $threadsort['types'][$newthread_list['sortid']];
- }
- */
- $newthread_list['dateline'] = dgmdate($newthread_list['dateline'], 'u');
- $newthread_lists[] = $newthread_list;
- }
- $newreply_query = DB::query("SELECT tid, fid, typeid, sortid, special, subject, lastposter, highlight, lastpost FROM ".DB::table('forum_thread')." WHERE displayorder >= 0 ORDER BY lastpost DESC LIMIT 20");
- while($newreply_list = DB::fetch($newreply_query)){
- if($newreply_list['highlight']) {
- $string = sprintf('%02d', $newreply_list['highlight']);
- $stylestr = sprintf('%03b', $string[0]);
- $newreply_list['highlight'] = ' style="';
- $newreply_list['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
- $newreply_list['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
- $newreply_list['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
- $newreply_list['highlight'] .= $string[1] ? 'color: '.$forum_colorarray[$string[1]] : '';
- $newreply_list['highlight'] .= '"';
- } else {
- $newreply_list['highlight'] = '';
- }
-
- if($newreply_list['typeid']){
- $threadtype = DB::result_first("SELECT threadtypes FROM ".DB::table('forum_forumfield')." WHERE fid = $newreply_list[fid]");
- $threadtype = unserialize($threadtype);
- $newreply_list['typename'] = $threadtype['types'][$newreply_list['typeid']];
- }
- /*
- if($newreply_list['sortid']){
- $threadsort = DB::result_first("SELECT threadsorts FROM ".DB::table('forum_forumfield')." WHERE fid = $newreply_list[fid]");
- $threadsort = unserialize($threadsort);
- $newreply_list['sortname'] = $threadsort['types'][$newreply_list['sortid']];
- }
- */
- $newreply_list['lastpost'] = dgmdate($newreply_list['lastpost'], 'u');
- $newreply_lists[] = $newreply_list;
- }
- include template('forum/guide');
- ?>
复制代码 |