<?php
/*
  欢迎使用DM企业建站系统，本系统由www.demososo.com开发。
*/
if(!defined('IN_DEMOSOSO')) {
  exit('this is wrong page,please back to homepage');
}
?>

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>datatest</title>
<meta name="description" content=" " />
<meta name="keywords" content=" " />
<meta name="author" content="DM建站系统 www.demososo.com" />
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no, width=device-width">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
 
</head>
<body  class="page page33 page_index  pcpage nopagenarrow style20160721_0855323118">

<style>
.datatestnav{clear:both;overflow:hidden;border-bottom:1px solid #ccc;margin-bottom:20px}
.datatestnav  a{display:inline-block; padding:5px;font-size:12px }
li {
    list-style-type: none;
}
.value { border:1px dashed #cccc;padding:5px;margin:10px }
</style>
<div style="padding:5px;background:#eee;font-size:12px;">文件位于 component\dm-include\file_formpost \formpost_datatest.php </div>
<ul class="datatestnav">
<li>
分类：
<a href="dmpostform.php?type=datatest&type2=cateproducts">产品中心</a>
<a href="dmpostform.php?type=datatest&type2=catenews">新闻中心</a>
<a href="dmpostform.php?type=datatest&type2=catecase">客户案例</a>
<br />

内容：
<a href="dmpostform.php?type=datatest&type2=products">产品中心</a>
<a href="dmpostform.php?type=datatest&type2=products_new">(最新)</a>
<a href="dmpostform.php?type=datatest&type2=products_tj">(推荐)</a>
<a href="dmpostform.php?type=datatest&type2=products_hot">(热门)</a>


<a href="dmpostform.php?type=datatest&type2=news">新闻中心</a>
<a href="dmpostform.php?type=datatest&type2=case">客户案例</a>
<a href="dmpostform.php?type=datatest&type2=team">团队介绍</a>
<a href="dmpostform.php?type=datatest&type2=knowledge">知识</a>
<a href="dmpostform.php?type=datatest&type2=video">视频中心</a>
<br />
效果内容：
<a href="dmpostform.php?type=datatest&type2=slider">幻灯片 - 默认效果</a>
<a href="dmpostform.php?type=datatest&type2=aboutus">关于我们  </a>
<a href="dmpostform.php?type=datatest&type2=services">我们的服务  </a>
<a href="dmpostform.php?type=datatest&type2=pj">客户评价  </a>
<a href="dmpostform.php?type=datatest&type2=clients">我们的客户   </a>
<a href="dmpostform.php?type=datatest&type2=faq">faq 常见问题  </a>
<a href="dmpostform.php?type=datatest&type2=leftright">左图右文或右图左文    </a>
 


<br />
自定义内容：
<a href="dmpostform.php?type=datatest&type2=cus_aboutus">关于我们</a>

<br />
菜单：
<a href="dmpostform.php?type=datatest&type2=menu">默认菜单组</a>


</li>


</ul>
<?php

require INCLUDE_ROOT.'file_formpost/formpost_datainc.php';
 
$type2 = @htmlentitdm2($_GET['type2']);
 
$result = '';
 //-----------------
	if($type2=='cateproducts') $result = 'jthomev_products_cate';
	if($type2=='catenews')   $result = 'jthomev_news_cate';
	if($type2=='catecase')   $result = 'jthomev_case_cate';
	
 
 //------------------

 
	if($type2=='products')   $result = 'jthomev_products';	
	if($type2=='products_new')  $result = 'jthomev_products_new';
	if($type2=='products_tj')   $result = 'jthomev_products_tj';
	if($type2=='products_hot')   $result = 'jthomev_products_hot';
	
	
	if($type2=='news')    $result = 'jthomev_news';
	if($type2=='case')   $result = 'jthomev_case';
	if($type2=='team')    $result = 'jthomev_team';
	if($type2=='video')    $result = 'jthomev_video';
	if($type2=='knowledge')    $result = 'jthomev_knowledge';
	
 
 
//----------------------

 
	if($type2=='slider')  $result = 'jthomev_dh_slider';
	if($type2=='aboutus')   $result = 'jthomev_dh_aboutus';
	if($type2=='services')   $result = 'jthomev_dh_services';
	if($type2=='pj')   $result = 'jthomev_dh_pj';
	if($type2=='clients')   $result = 'jthomev_dh_clients';
	if($type2=='faq')   $result = 'jthomev_dh_faq';
	if($type2=='leftright')  $result = 'jthomev_dh_leftright';
	
  
//-----------------------
if($type2=='cus_aboutus')  $result = 'jthomev_cus_aboutus';

//-----------------------
if($type2=='menu')  $result = 'jthomev_menu';
 	 
//-------------------

 
?>
<div class="value"> 数组变量的值：<?php echo 'arr_'.$result ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 编辑的值：<?php echo  $result ?>
 </div>

<div class="value"> 

<pre>
使用方法：
在jthome页面加载：　require INCLUDE_ROOT.'file_formpost/formpost_datainc.php';
------------
有了这些数组后，只要在前端代码里，写上foreach就能输出，从而嵌套在html里。
foreach(数组变量 as $k=>$v ){
	...代码...
	if($k>5) break;
}
------------
前台编辑链接： edit_node_inblock($var,__FILE__);  (父级再加class,值为block)
------------
测试图片：  $img = jthomerepimg($img,'jthome_page12/images/pro'.($k+1).'.jpg');
------------
<a href="https://www.demososo.com/pageblock.html" target="_blank">具体请看首页内容模板的视频教程> </a>
</pre>
</div>

<div class="value">
<pre>
产品最新  - 因为 sta_new 为y
产品推荐  - 因为 sta_tj 为y
产品热门  - 因为 hit 值最高
</pre>
</div>

<?php
if($type2=='menu'){
//menu的数组
$jthomev_menu = 'menu20161129_1804453928';

	$arr_jthomev_menu =  getarr_dmmenu($jthomev_menu);   
  	  pre($arr_jthomev_menu);
   
}else{
		$result2 = 'arr_'.$result;
 
		pre($$result2);

}
 

?>

</body>
</html>