本文整理汇总了PHP中DataListCP::Display方法的典型用法代码示例。如果您正苦于以下问题:PHP DataListCP::Display方法的具体用法?PHP DataListCP::Display怎么用?PHP DataListCP::Display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataListCP
的用法示例。
在下文中一共展示了DataListCP::Display方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showmsg
showmsg('对不起,发布不成功', '-1');
}
}
}
} else {
if ($action == 'list') {
include_once DEDEINC . '/datalistcp.class.php';
$query = "SELECT * FROM {$diy->table} ORDER BY id DESC";
$datalist = new DataListCP();
$datalist->pageSize = 10;
$datalist->SetParameter('action', 'list');
$datalist->SetParameter('diyid', $diyid);
$datalist->SetTemplate(DEDEADMIN . '/templets/diy_list.htm');
$datalist->SetSource($query);
$fieldlist = $diy->getFieldList();
$datalist->Display();
} else {
if ($action == 'edit') {
if (empty($do)) {
$id = isset($id) && is_numeric($id) ? $id : 0;
if (empty($id)) {
showMsg('非法操作!未指定id', 'javascript:;');
exit;
}
$query = "SELECT * FROM {$diy->table} WHERE id={$id}";
$row = $dsql->GetOne($query);
if (!is_array($row)) {
showmsg("你访问的记录不存在或未经审核", '-1');
exit;
}
$postform = $diy->getForm('edit', $row, 'admin');
示例2: addslashes
if (empty($price)) {
$price = $row['price'];
}
if (empty($des)) {
$des = addslashes($row['des']);
} else {
$des = cn_substrR($des, 255);
}
$dsql->ExecuteNoneQuery("UPDATE #@__shops_delivery SET dname='{$dname}',price='{$price}',des='{$des}' WHERE pid='{$id}'");
}
ShowMsg("成功修改配送方式!", "shops_delivery.php");
exit;
}
}
}
$deliveryarr = array();
$dsql->SetQuery("SELECT pid,dname,price,des FROM #@__shops_delivery ORDER BY orders ASC");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
$deliveryarr[] = $row;
}
$dlist = new DataListCP();
$dlist->pageSize = 25;
//设定每页显示记录数(默认25条)
//这两句的顺序不能更换
$dlist->SetTemplate(DEDEADMIN . "/templets/shops_delivery.htm");
//载入模板
$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM #@__shops_delivery ORDER BY `orders` ASC");
//设定查询SQL
$dlist->Display();
//显示
示例3: dirname
<?php
/**
* @version $Id: mygroup.php 1 12:11 2010年9月13日Z tianya $
* @package DedeCMS.Module.Group
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
require_once dirname(__FILE__) . "/system/config.php";
require_once DEDEINC . "/datalistcp.class.php";
$menutype = 'mydede';
$sql = "SELECT * FROM #@__groups WHERE ishidden='0' AND uid='" . $cfg_ml->M_ID . "' ORDER BY threads DESC,stime DESC";
$dl = new DataListCP();
$dl->pageSize = 20;
//这两句的顺序不能更换
$dl->SetTemplate(_SYSTEM_ . "/mygroup.htm");
//载入模板
$dl->SetSource($sql);
//设定查询SQL
$dl->Display();
//显示