$row[‘showmod‘] = isset($row[‘showmod‘])? $row[‘showmod‘] : 0; if ($row[‘showmod‘] == 1) { $pv->SaveToHtml(dirname(__FILE__).‘/index.html‘); include(dirname(__FILE__).‘/index.html‘); exit(); } else { $pv->Display(); exit(); } |
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row[‘templet‘]); $pv->Display(); exit(); |
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0); |
if($cfg_rewritem == ‘Y‘) { $typedir = parse_url($tid, PHP_URL_PATH); $PageNo = stripos(GetCurUrl(), ‘.html‘) ? intval(str_replace(‘.html‘, ‘‘, end(explode("_", GetCurUrl())))) : 1; $tinfos = $dsql->GetOne("SELECT * FROM `dede_arctype` WHERE typedir=‘/$typedir‘ or typedir=‘{cmspath}/$typedir‘"); if(is_array($tinfos)) { $tid = $tinfos[‘id‘]; $typeid = GetSonIds($tid); $row = $dsql->GetOne("Select count(id) as total From `dede_archives` where typeid in({$typeid})"); $TotalResult = is_array($row) ? $row[‘total‘] : 0; } else { $tid = 0; } } else { $tid = (isset($tid) && is_numeric($tid) ? $tid : 0); } |
$t1 = ExecTime(); |
if($cfg_rewritem == ‘Y‘) { $aid = stripos(GetCurUrl(), ‘.html‘) ? intval(str_replace(‘.html‘, ‘‘, end(explode("/", GetCurUrl())))) : 0; } |
global $cfg_rewrite; |
global $cfg_rewrite,$cfg_rewritem; |
$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; $purl .= ‘?‘.$geturl; |
if($cfg_rewritem == ‘Y‘) { $purl = ""; } else { $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; $purl .= ‘?‘.$geturl; } |
return $plist; |
if($cfg_rewritem == ‘Y‘) { $plist = preg_replace("/PageNo=(\d+)/i",‘list_‘.$this->TypeID.‘_\\1.html‘,$plist); } |
{dede:field.body runphp=yes} global $cfg_basehost; $str = @me; $search = ‘/(<img.*?)width=(["\‘])?.*?(?(2)\2|\s)([^>]+>)/is‘;//过滤img里的width $search1 = ‘/(<img.*?)height=(["\‘])?.*?(?(2)\2|\s)([^>]+>)/is‘;//过滤img里的height $search2 = ‘#(<img.*?style=".*?)width:\d+px;([^"]*?.*?>)#i‘;//过滤img里style的width $search3 = ‘#(<img.*?style=".*?)height:\d+px;([^"]*?.*?>)#i‘;//过滤img里style的height $content = preg_replace($search,‘$1$3‘,$str); $content = preg_replace($search1,‘$1$3‘,$content); $content = preg_replace($search2,‘$1$2‘,$content); $content = preg_replace($search3,‘$1$2‘,$content); @me = $content; @me = str_replace(‘/uploads/allimg/‘, $cfg_basehost.‘/uploads/allimg/‘, $content);//手机版图片使用绝对路径 {/dede:field.body} |
#dedecms移动版伪静态 RewriteEngine On RewriteBase / #移动版列表栏目 RewriteRule ^(.*)/$ /list.php?tid=$1 #移动版列表栏目分页 RewriteRule ^(.*)/list_([0-9]+)_([0-9]+)\.html$ /list.php?tid=$1&PageNo=$2 #移动版文章页伪静态规则 RewriteRule ^(.*)/([0-9]+)\.html$ /view.php?aid=$1 |
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobile/}"> <script type="text/javascript">if(window.location.toString().indexOf(‘pref=padindex‘) != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobile/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script> |
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}{dede:type}[field:typeurl/]{/dede:type}"> <script type="text/javascript">if(window.location.toString().indexOf(‘pref=padindex‘) != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}{dede:type}[field:typeurl/]{/dede:type}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script> |
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobile/}{dede:field.id runphp=yes}$result=GetOneArchive(@me);@me=$result[‘arcurl‘];{/dede:field.id}"> <script type="text/javascript">if(window.location.toString().indexOf(‘pref=padindex‘) != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobile/}{dede:field.id runphp=yes}$result=GetOneArchive(@me);@me=$result[‘arcurl‘];{/dede:field.id}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script> |