dede模版引擎二次开发(增加修改显示)

add.php

require_once ("../include/common.inc.php");  //这个两行就是连接数据成功了  $dsql.方法(执行SQL语句完毕);
require_once DEDEINC."/arc.partview.class.php";
$templet="a/add.htm";
if($action=="add")
{
echo $name;
echo $sex;
}


$love="我爱DEDECMS";
echo $cfg_basedir . $cfg_templets_dir . "/" . $templet;
//exit();
$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet);
$pv->Display();

?>


list.php

/*require_once (dirname(__FILE__) . "/include/common.inc.php");  '//这个两行就是连接数据成功了  $dsql.方法(执行SQL语句完毕);
        print_r($dsql);*/
  //require_once('../include/common.inc.php');
  //echo DEDEINC; //F:/dedecms/DedeCMS-V5.7-GBK-SP1/uploads/include
 //exit();
    require_once("../member/config_ceshi.php");

require_once(DEDEINC."/datalistcp.class.php");
require_once("../member/inc/inc_list_functions.php");
 
 
 //echo ("Select * From `liao_homepageset`");  ==  dede_homepageset
 //exit();   //$row['templet']  //default/index.htm
 
    /*$row = $dsql->GetOne("Select * From `liao_homepageset`");
    $row['templet'] = MfTemplet($row['templet']);   ////echo $row['templet']."===============>>"; //default/index.htm
 
 $row['templet']="a/list.htm";*/
    $templet="a/list.htm";
 
    /*$pv = new PartView();
    $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet);
 
  $pv->Display();*/
 
  if(empty($keyword)) $keyword = '';
if(empty($ischeck)) {
    $ischeck = 0;
    $ischeckSql = '';
} else {
    if($ischeck==-1) $ischeckSql = " And ischeck < 1 ";
    else $ischeckSql = " And ischeck='$ischeck' ";
}
 
 //$sql = "SELECT * FROM `liao_flink` WHERE  CONCAT(`url`,`webname`,`email`) LIKE '%$keyword%' $ischeckSql ORDER BY dtime desc";
 $sql = "SELECT * FROM `liao_flink` ORDER BY dtime desc";
 echo $sql ;
$dlist = new DataListCP();
$dlist->pageSize = 2;
/*$dlist->SetParameter('keyword', $keyword);
$dlist->SetParameter('ischeck', $ischeck);*/
$dlist->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet);
$dlist->SetSource($sql);
$dlist->Display();

?>


add2.php

require_once ("../include/common.inc.php");  //这个两行就是连接数据成功了  $dsql.方法(执行SQL语句完毕);
require_once DEDEINC."/arc.partview.class.php";
$templet="a/add.htm";
if($action=="add")
{
echo $name;
echo $sex;
}

 

echo $cfg_basedir . $cfg_templets_dir . "/" . $templet;
//exit();
/*$pv = new PartView();
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $templet);
$pv->Display();*/
$love="我爱DEDECMS";

$content = 'hello';
$dtp  = new DedeTagParse();
$dtp ->LoadTemplate($cfg_basedir . $cfg_templets_dir . "/" . $templet);
$dtp ->Display();

?>


add.htm





添加模版

{dede:global.love /}



 

姓名:
   


 

性别:
   
    男
   
    女


 


   
 





list.htm





分页_{dede:global.cfg_webname/}





wo yao fenye   --$templet


 
   


  





 

         
         
       
        {dede:datalist}
                  onMouseOut="javascript:this.bgColor='#FFFFFF';">
   
   
         
         
       
  {/dede:datalist}
   
    
     
    
    
     
    
  

 

   友情链接管理
 

 
 

  

  
  

   
选择 ID网站名称时间
--{dede:field.id/}{dede:field.dtime function="MyDate('Y-m-d',@me)"/}

        
        [全选]
       [取消]
       批量删除

     


       {dede:pagelist listsize=6/}
     


来源:http://technical.xinqq163.com/dedecms/2012-05-22/44724.html

你可能感兴趣的:(dede模版引擎二次开发(增加修改显示))