本文整理汇总了PHP中DataList::SetTemplet方法的典型用法代码示例。如果您正苦于以下问题:PHP DataList::SetTemplet方法的具体用法?PHP DataList::SetTemplet怎么用?PHP DataList::SetTemplet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataList
的用法示例。
在下文中一共展示了DataList::SetTemplet方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DataList
<?php
require_once(dirname(__FILE__)."/config.php");
CheckPurview('co_NewRule');
require_once(dirname(__FILE__)."/../include/pub_datalist.php");
require_once(dirname(__FILE__)."/../include/inc_functions.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
$sql = "
Select
aid,rulename,etype,dtime
From #@__co_exrule
order by aid desc
";
$dlist = new DataList();
$dlist->Init();
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/co_export_rule.htm");
$dlist->display();
$dlist->Close();
ClearAllLink();
?>
示例2: GetSta
function GetSta($sta)
{
if($sta==1) return "内页";
if($sta==2) return "首页";
else return "未审核";
}
$addquery = " where 1=1 ";
if($ischeck!=-1){
if($ischeck==3) $addquery .= " And ischeck>0 ";
else $addquery .= " And ischeck='$ischeck' ";
}
if(!empty($keyword)){
$addquery .= " And (url like '%$keyword%' OR webname like '%$keyword%') ";
}
$sql = "";
$sql = "Select * From #@__flink $addquery order by dtime desc";
$dlist = new DataList();
$dlist->Init();
$dlist->SetParameter("ischeck",$ischeck);
$dlist->SetParameter("keyword",$keyword);
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/friendlink_main.htm");
$dlist->display();
$dlist->Close();
ClearAllLink();
?>
示例3: TestType
require_once(dirname(__FILE__)."/../include/pub_datalist.php");
require_once(dirname(__FILE__)."/../include/inc_functions.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
function TestType($tname)
{
if($tname=="") return "所有栏目";
else return $tname;
}
function TimeSetValue($ts)
{
if($ts==0) return "不限时间";
else return "限时标记";
}
$sql = "Select
#@__mytag.aid,#@__mytag.tagname,#@__arctype.typename,#@__mytag.timeset,#@__mytag.endtime
From #@__mytag
left join #@__arctype on #@__arctype.ID=#@__mytag.typeid
order by #@__mytag.aid desc
";
$dlist = new DataList();
$dlist->Init();
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/mytag_main.htm");
$dlist->display();
$dlist->Close();
?>
示例4: GetFolders
if($folder=="inbox"||$folder=='') $postuser = "发件人";
if(!empty($keyword)) $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')";
if(!empty($username)) $whereSql .= " AND msgfrom like '%".$username."%'";
function GetFolders($me){
if($me=="track") return "发件箱";
else if($me=="inbox") return "收件箱";
else if($me=="outbox") return "草搞箱";
}
function IsReader($me){
$me = ereg_replace("[^0-1]","",$me);
if($me) return "<font color='green'>×</font>";
else return "<font color='red'>√</font>";
}
$sql = "SELECT * FROM #@__pms $whereSql ORDER BY dateline desc";
$dlist = new DataList();
$dlist->Init();
$dlist->SetParameter("folder",$folder);
$dlist->SetParameter("username",$username);
$dlist->SetParameter("keyword",$keyword);
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/member_pm.htm");
$dlist->display();
$dlist->Close();
ClearAllLink();
?>
示例5: GetSta
<?php
require_once(dirname(__FILE__)."/config.php");
CheckPurview('c_List');
require_once(dirname(__FILE__)."/../include/pub_datalist.php");
require_once(dirname(__FILE__)."/../include/inc_functions.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
function GetSta($sta,$ID)
{
if($sta==1) return "启用 > <a href='mychannel_edit.php?dopost=hide&ID=$ID'><u>禁用</u></a>";
else return "<font color='red'>禁用</font> > <a href='mychannel_edit.php?dopost=show&ID=$ID'><u>启用</u></a>";
}
function IsSystem($s)
{
if($s==1) return "系统模型";
else return "自动模型";
}
$sql = "Select ID,nid,typename,addtable,mancon,isshow,issystem From #@__channeltype order by ID";
$dlist = new DataList();
$dlist->Init();
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/mychannel_main.htm");
$dlist->display();
$dlist->Close();
ClearAllLink();
?>
示例6: GetAreaName
}else{
return "";
}
}
function GetAreaName($e,$df)
{
global $Areas;
if(isset($Areas[$e])) return $Areas[$e];
else return $df;
}
function GetMAtt($m){
if($m<1) return "";
else return "<img src='img/adminuserico.gif' width='16' height='15'><font color='red'>(荐)</font>";
}
$sql = "select ID,userid,pwd,uname,email,sex,money,c1,c2,c3,matt,logintime,loginip,membertype,scores,spaceshow,pageshow
From #@__member $whereSql order by $sortkey desc
";
$dlist = new DataList();
$dlist->Init();
$dlist->SetParameter("sex",$sex);
$dlist->SetParameter("keyword",$keyword);
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/company_main.htm");
$dlist->display();
$dlist->Close();
ClearAllLink();
?>
示例7: GetIsMake
<?php
require_once(dirname(__FILE__)."/config.php");
CheckPurview('temp_One');
require_once(dirname(__FILE__)."/../include/pub_datalist.php");
require_once(dirname(__FILE__)."/../include/inc_functions.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
function GetIsMake($im)
{
if($im==1) return "需编译";
else return "不编译";
}
$sql = "Select aid,title,ismake,uptime,filename From #@__sgpage order by aid desc";
$dlist = new DataList();
$dlist->Init();
$dlist->SetSource($sql);
$dlist->SetTemplet(dirname(__FILE__)."/templets/templets_one.htm");
$dlist->display();
$dlist->Close();
ClearAllLink();
?>
示例8: GetUserType
<?php
require_once(dirname(__FILE__)."/config.php");
CheckPurview('sys_User');
require_once(dirname(__FILE__)."/../include/pub_datalist.php");
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/");
if(empty($rank)) $rank="";
else $rank = " where #@__admin.usertype='$rank' ";
$dsql = new DedeSql(false);
$dsql->SetQuery("select rank,typename From #@__admintype");
$dsql->Execute();
while($row = $dsql->GetObject()){
$adminRanks[$row->rank] = $row->typename;
}
function GetUserType($trank)
{
global $adminRanks;
if(isset($adminRanks[$trank])) return $adminRanks[$trank];
else return "错误类型";
}
$query = "Select #@__admin.*,#@__arctype.typename From #@__admin left join #@__arctype on #@__admin.typeid=#@__arctype.ID $rank ";
$dlist = new DataList();
$dlist->SetTemplet(dirname(__FILE__)."/templets/sys_admin_user.htm");
$dlist->SetSource($query);
$dlist->Display();
$dlist->Close();
ClearAllLink();
?>