国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > CMS > 織夢(mèng)DEDE > 正文

織夢(mèng)一級(jí)目錄作域名list.php無法跳轉(zhuǎn)到手機(jī)站解決方法

2024-07-12 08:45:59
字體:
供稿:網(wǎng)友

最近測(cè)試了www.dede58.com/m/list.php?tid=1  在手機(jī)站訪問的時(shí)候,無法跳轉(zhuǎn)到手機(jī)的模板,終于找到了解決了方法,給大家分享一下

修改根目錄下的m/list.php文件

 

重新弄的代碼, 不區(qū)分幾級(jí)目錄,理論是根據(jù)你指定的PC,重新指定手機(jī)的模板 (也就是說,直接用這個(gè)代替現(xiàn)有的文件,就可以實(shí)現(xiàn)幾級(jí)訪問都行了

復(fù)制以下代碼替換list.php即可

<?php/** * * 欄目列表/頻道動(dòng)態(tài)頁(yè) * * @version        $Id: list.php 1 15:38 2010年7月8日Z(yǔ) tianya $ * @package        DedeCMS.Site * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc. * @license        http://help.dedecms.com/usersguide/license.html * @link           http://www.dedecms.com */define('DEDEMOB', 'Y');require_once(dirname(__FILE__)."/../include/common.inc.php");//$t1 = ExecTime();$tid = (isset($tid) && is_numeric($tid) ? $tid : 0);$channelid = (isset($channelid) && is_numeric($channelid) ? $channelid : 0);if($tid==0 && $channelid==0) die(" Request Error! ");if(isset($TotalResult)) $TotalResult = intval(preg_replace("/[^/d]/", '', $TotalResult));//如果指定了內(nèi)容模型ID但沒有指定欄目ID,那么自動(dòng)獲得為這個(gè)內(nèi)容模型的第一個(gè)頂級(jí)欄目作為頻道默認(rèn)欄目if(!empty($channelid) && empty($tid)){    $tinfos = $dsql->GetOne("SELECT tp.id,ch.issystem FROM `dede_arctype` tp LEFT     JOIN `dede_channeltype` ch ON ch.id=tp.channeltype WHERE tp.channeltype='$channelid' And tp.reid=0 order by sortrank asc");    if(!is_array($tinfos)) die(" No catalogs in the channel! ");    $tid = $tinfos['id'];}else{    $tinfos = $dsql->GetOne("SELECT ch.issystem FROM `dede_arctype` tp LEFT JOIN `dede_channeltype` ch     ON ch.id=tp.channeltype WHERE tp.id='$tid' ");}if($tinfos['issystem']==-1){    $nativeplace = ( (empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace );    $infotype = ( (empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype );    if(!empty($keyword)) $keyword = FilterSearch($keyword);    $cArr = array();    if(!empty($nativeplace)) $cArr['nativeplace'] = $nativeplace;    if(!empty($infotype)) $cArr['infotype'] = $infotype;    if(!empty($keyword)) $cArr['keyword'] = $keyword;    include(DEDEINC."/arc.sglistview.class.php");    $lv = new SgListView($tid,$cArr);} else {    include(DEDEINC."/arc.listview.class.php");    $lv = new ListView($tid);    $ispart=$lv->Fields['ispart'];    if($ispart==1){    $tpl=$lv->Fields['tempindex'];   $tpl=str_replace('.htm','_m.htm',$tpl);   $lv->Fields['tempindex']=$tpl;   $lv->TypeLink->TypeInfos['tempindex']=$tpl;    }else{    $tpl=$lv->Fields['templist'];   $tpl=str_replace('.htm','_m.htm',$tpl);   $lv->Fields['templist']=$tpl;   $lv->TypeLink->TypeInfos['templist']=$tpl;    }    // print_r($lv);    // exit();        //對(duì)設(shè)置了會(huì)員級(jí)別的欄目進(jìn)行處理    if(isset($lv->Fields['corank']) && $lv->Fields['corank'] > 0)    {        require_once(DEDEINC.'/memberlogin.class.php');        $cfg_ml = new MemberLogin();        if( $cfg_ml->M_Rank < $lv->Fields['corank'] )        {            $dsql->Execute('me' , "SELECT * FROM `dede_arcrank` ");            while($row = $dsql->GetObject('me'))            {                $memberTypes[$row->rank] = $row->membername;            }            $memberTypes[0] = "游客或沒權(quán)限會(huì)員";            $msgtitle = "你沒有權(quán)限瀏覽欄目:{$lv->Fields['typename']} !";            $moremsg = "這個(gè)欄目需要 <font color='red'>".$memberTypes[$lv->Fields['corank']]."</font> 才能訪問,            你目前是:<font color='red'>".$memberTypes[$cfg_ml->M_Rank]."</font> !";            include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm');            exit();        }    }}if($lv->IsError) ParamError();$lv->Display();

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 黑水县| 晋宁县| 泾川县| 柳河县| 南雄市| 莱州市| 井冈山市| 牡丹江市| 留坝县| 黄大仙区| 迭部县| 定南县| 含山县| 天水市| 高密市| 丹东市| 芮城县| 鄯善县| 拜泉县| 正安县| 武夷山市| 察雅县| 张家口市| 务川| 南开区| 土默特左旗| 石家庄市| 盐池县| 成安县| 同江市| 永定县| 桐庐县| 朝阳市| 彰化市| 邛崃市| 长治市| 鄯善县| 张家港市| 安塞县| 南投市| 冕宁县|