<?php 
if(!dmlogin()){
	echo '提示：没有登录后台，或者后台取消了前台编辑功能';
    //fnoid();
	exit;
}

$seo1 = array('预览');
 
require_once  BLOCKROOT.'tpl/preview_meta.php'; 

?>
<script src="<?php echo STAPATH?>assets/vendor/clipboard-polyfill.promise.js"></script>

 <style>
.headershowblock{
 margin:50px 0 20px  0;line-height:30px;
 text-align:center;background:#37cde6;font-size:20px
}
.headershowblock span{font-size:14px;color:#666;}

.viewblocktab {height:30px;margin:10px 0;text-align: center}
.viewblocktab a{display: inline-block;margin-right: 16px;padding:5px;background: #e2e2e2}
.viewblocktab a.active{background: #12A7ED;color:#fff;}

 /*blocklist*/
.blocklist .h3here{background:#eadd8a;color:#fff;padding:20px;font-size:14px;font-weight:bold; text-align: center;margin-top:30px; }
.blocklist .h3here a{ color:#fff;font-weight:normal;font-size:12px; }

.addblock{border-radius: 8px;background: #407dba;color:#fff;padding:3px 10px;font-size: 12px}
</style>
<?php
/*
  欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
*/
if(!defined('IN_DEMOSOSO')) {
  exit('this is wrong page,please back to homepage');
}



$pidname = @htmlentitdm($_GET['pidname']);
 echo '<div class="headershowblock"> <span>  [DMblockid]'.$pidname.'[/DMblockid] </span> <i title="复制" style="font-style:normal;cursor:pointer" class="fa fa-files-o jscopyblockid" aria-hidden="true"></i>  '.addtoblock($pidname).'</div>';

 
//$pidname = 'ndlist20160712_1014264451';
$container1 = $container2 ='';
$pidname4 = substr($pidname, 0,4);
 //echo $pidname4;
if($pidname4=='regi' || $pidname4=='imgt' || $_GET['full']=='y') { }
	else {
		$container1 = '<div class="container dmyiblock">';
		$container2 = '</div>';
	}


if($_GET['scroll']=='y') echo '<div style="background:#ccc;height:500px"> </div>';

echo $container1;
 $page = 1;
block($pidname);

echo $container2;
 
if($_GET['scroll']=='y') echo '<div style="background:#ccc;height:1500px"> </div>';


function addtoblock($v){
	  if(substr($v,0,6)<>'region') return  '<p><a class="addblock" href="'.BASEURL.ADMINDIR.'/mod_region/mod_region_addblock.php?pidname='.$v.'&lang='.LANG.'">添加到页面区域</a></p>';
}

?>


<div class="container c">
<p style="height:100px;padding:50px;text-align:center">
提示：个别预览可能不会有结果或不正常。这时以前台正式显示为准。
<br />
如果目录区块没有正常显示，则可能是 当前模板 没有 使用这个目录区块。
</p>
</div>
 
<?php 
require_once  BLOCKROOT.'tpl/preview_metafooter.php'; 

?>
 </body></html>