当前位置: 首页>>代码示例>>PHP>>正文


PHP DataListCP类代码示例

本文整理汇总了PHP中DataListCP的典型用法代码示例。如果您正苦于以下问题:PHP DataListCP类的具体用法?PHP DataListCP怎么用?PHP DataListCP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DataListCP类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: AND

    $wheresql .= " AND (groupname like '%" . $keyword . "%' OR des like '%" . $keyword . "%' OR creater like '%" . $keyword . "%')";
}
if (!isset($username)) {
    $username = '';
}
if (!empty($username)) {
    $wheresql .= " AND creater like '%" . $username . "%'";
}
if (!isset($store)) {
    $store = -1;
}
if ($store > 0) {
    $wheresql .= " AND (storeid='" . $store . "' OR rootstoreid='" . $store . "')";
}
$sql = "SELECT * FROM #@__groups {$wheresql} ORDER BY stime DESC";
$dl = new DataListCP();
$dl->pageSize = 20;
$dl->SetParameter("username", $username);
$dl->SetParameter("store", $store);
$dl->SetParameter("keyword", $keyword);
//这两句的顺序不能更换
$dl->SetTemplate(DEDEADMIN . "/templets/group_main.htm");
//载入模板
$dl->SetSource($sql);
//设定查询SQL
$dl->Display();
//显示
function GetGroupstore($id)
{
    global $db;
    $row = $db->GetOne("SELECT storename,tops FROM #@__store_groups WHERE storeid='{$id}'");
开发者ID:iabing,项目名称:mzzyc,代码行数:31,代码来源:group_main.php

示例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();
//显示
开发者ID:iabing,项目名称:mzzyc,代码行数:31,代码来源:shops_delivery.php

示例3: AutoCharset

                $config = AutoCharset(unserialize(utf82gb($row['config'])));
            } else {
                if ($cfg_soft_lang == 'gb2312') {
                    $config = unserialize($row['config']);
                }
            }
            foreach ($config as $key => $v) {
                $config[$key]['value'] = "";
            }
            if ($cfg_soft_lang == 'utf-8') {
                $config = AutoCharset($config, 'utf-8', 'gb2312');
                $config = serialize($config);
                $config = gb2utf8($config);
            } else {
                $config = serialize($config);
            }
            $query = "UPDATE `#@__payment` SET fee='',config='{$config}',enabled='0' WHERE id='{$pid}'";
            $dsql->ExecuteNoneQuery($query);
            //同时需要删除对应的缓存
            $m_file = DEDEDATA . "/payment/" . $row['code'] . ".php";
            @unlink($m_file);
            ShowMsg("删除成功!", "sys_payment.php");
            exit;
        }
    }
}
$sql = "SELECT * FROM `#@__payment` ORDER BY rank ASC";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/sys_payment.htm");
$dlist->SetSource($sql);
$dlist->display();
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:sys_payment.php

示例4: 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();
//显示
开发者ID:healthguo,项目名称:PHP,代码行数:22,代码来源:mygroup.php

示例5: dirname

<?php

/**
 * 自定义模型管理
 *
 * @version        $Id: mychannel_main.php 1 15:26 2010年7月20日Z tianya $
 * @package        DedeCMS.Administrator
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . '/config.php';
CheckPurview('temp_Other');
require_once DEDEINC . '/datalistcp.class.php';
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, '/');
$sql = "SELECT myt.aid,myt.tagname,tp.typename,myt.timeset,myt.endtime\r\n        FROM `#@__mytag` myt LEFT JOIN `#@__arctype` tp ON tp.id=myt.typeid ORDER BY myt.aid DESC ";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . '/templets/mytag_main.htm');
$dlist->SetSource($sql);
$dlist->display();
function TestType($tname)
{
    return $tname == '' ? '所有栏目' : $tname;
}
function TimeSetValue($ts)
{
    return $ts == 0 ? '不限时间' : '限时标记';
}
开发者ID:iabing,项目名称:mzzyc,代码行数:28,代码来源:mytag_main.php

示例6: DataListCP

     $dlist->pageSize = $_vars['pagesize'];
     $dlist->SetParameter("mtype", $mtype);
     $dlist->SetParameter("uid", $_vars['userid']);
     $dlist->SetParameter("action", $action);
     $dlist->SetTemplate(DEDEMEMBER . "/space/{$_vars['spacestyle']}/listalbum.htm");
     $dlist->SetSource($query);
     $dlist->Display();
     exit;
 } else {
     if ($action == 'guestbook') {
         if (empty($mtype)) {
             $mtype = 0;
         }
         include_once DEDEINC . '/datalistcp.class.php';
         $query = "SELECT mg.*,mb.face,mb.userid,mb.sex From `#@__member_guestbook` mg \n    left join `#@__member` mb on mb.userid=mg.gid \n    where mg.mid='{$_vars['mid']}' order by mg.aid desc";
         $dlist = new DataListCP();
         $dlist->pageSize = 10;
         $dlist->SetParameter("uid", $_vars['userid']);
         $dlist->SetParameter("action", $action);
         $dlist->SetTemplate(DEDEMEMBER . "/space/{$_vars['spacestyle']}/guestbook.htm");
         $dlist->SetSource($query);
         $dlist->Display();
         exit;
     } else {
         if ($action == 'friend') {
             if (empty($mtype)) {
                 $mtype = 0;
             }
             include_once DEDEINC . '/arc.memberlistview.class.php';
             include_once DEDEINC . '/channelunit.func.php';
             $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath\n          from `#@__archives` arc\n          left join `#@__arctype` tp on arc.typeid=tp.id\n          where arc.mid='{$_vars['mid']}' {$addqSql} order by arc.id desc";
开发者ID:wshudong,项目名称:hbypsy,代码行数:31,代码来源:space_action.php

示例7: IsChecklog

//获得是否审核的表述
function IsChecklog($ischeck)
{
    $s = '';
    $s = $ischeck == '1' ? "<font color=blue>已审核</font>" : "<font color=red>未审核</font>";
    return $s;
}
function JstrimJajxLog($str, $len)
{
    $str = cn_substr($str, $len);
    $str = str_replace('&#039;', '"', $str);
    $str = str_replace('&lt;', '<', $str);
    $str = str_replace('&gt;', '>', $str);
    return $str;
}
$row = $dsql->GetOne("SELECT COUNT({$id}) AS dd FROM {$table}");
$totalnum = $row['dd'];
$rows = $dsql->GetOne("SELECT COUNT({$id}) AS dd FROM {$table} WHERE ischeck=1");
$checknum = $rows['dd'];
$rowss = $dsql->GetOne("SELECT COUNT({$id}) AS dd FROM {$table} WHERE ischeck=0");
$ischecknum = $rowss['dd'];
$sql = "SELECT * FROM {$table} WHERE 1=1 {$where} ORDER BY dtime DESC";
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetParameter("type", $type);
$dlist->SetParameter("totalnum", $totalnum);
$dlist->SetParameter("checknum", $checknum);
$dlist->SetParameter("ischecknum", $ischecknum);
$dlist->SetTemplate($tpl);
$dlist->SetSource($sql);
$dlist->Display();
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:member_info_main.php

示例8: while

//列表
$dsql->SetQuery($where_sql . " order by id desc limit {$offset},{$num}");
$dsql->Execute();
while ($list_row = $dsql->GetObject()) {
    $topid = $list_row->topid;
    if ($list_row->zuozhe) {
        $list_zz = '<a style="color:#025b81;" href="' . $cfg_indexurl . 'author/?' . $list_row->id . '.html" target="_blank" title="' . $list_row->zuozhe . '">' . $list_row->zuozhe . '</a>';
    } else {
        $list_zz = '<font style="color:#343434;">未记录</font>';
    }
    $gxlb_i++;
    $gxlb_i % 2 == 0 ? $class = ' class="odd"' : ($class = '');
    $list_str .= '
	<li' . $class . '>
	  <div class="c"><a href="' . $cfg_indexurl . SBYOU_NET_catalog($topid, 'typedir') . '.html" title="' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . '">[' . str_replace('·', '', SBYOU_NET_catalog($topid, 'typename')) . ']</a></div>
	  <div class="title">
		<div class="t"><a href="' . $cfg_indexurl . ltrim($list_row->typedir, '/') . '/" title="' . $list_row->typename . '" target="_blank">' . $list_row->typename . '</a></div>
		<div class="n">' . SbYOU_Net_NEW($list_row->id, ltrim($list_row->typedir, '/')) . '</div>
	  </div>
	  <div class="words">' . $list_row->booksize . '</div>
	  <div class="author">' . $list_zz . '</div>
	  <div class="abover">' . ($list_row->overdate == 0 ? '<span>连载</span>' : '<font style="color:blue">完结</font>') . '</div>
	  <div class="time">' . date('Y-m-d', $list_row->lastupdate) . '</div>
	</li>
	';
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $cfg_df_style . "/shuku.htm");
$dlist->Display();
开发者ID:soonfine,项目名称:leread,代码行数:31,代码来源:shuku.php

示例9: in

        exit;
    } else {
        if ($job == 'check') {
            $query = "Update `#@__feedback` set ischeck=1 where id in({$ids}) ";
            $dsql->ExecuteNoneQuery($query);
            ShowMsg("成功审核指定评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500);
            exit;
        } else {
            $bgcolor = '';
            $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0;
            $aid = isset($aid) && is_numeric($aid) ? $aid : 0;
            $keyword = !isset($keyword) ? '' : $keyword;
            $ip = !isset($ip) ? '' : $ip;
            $tl = new TypeLink($typeid);
            $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0);
            $addsql = $typeid != 0 ? " And typeid in (" . GetSonIds($typeid) . ")" : '';
            $addsql .= $aid != 0 ? " And aid={$aid} " : '';
            $addsql .= $ip != '' ? " And ip like '{$ip}' " : '';
            $querystring = "select * from `#@__feedback` where msg like '%{$keyword}%' {$addsql} order by dtime desc";
            $dlist = new DataListCP();
            $dlist->pageSize = 15;
            $dlist->SetParameter('aid', $aid);
            $dlist->SetParameter('ip', $ip);
            $dlist->SetParameter('typeid', $typeid);
            $dlist->SetParameter('keyword', $keyword);
            $dlist->SetTemplate(DEDEADMIN . '/templets/feedback_main.htm');
            $dlist->SetSource($querystring);
            $dlist->Display();
        }
    }
}
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:feedback_main.php

示例10: GetState

        exit;
    }
} else {
    function GetState($state)
    {
        if ($state == "0") {
            return "<font color='red'>未发送</font>";
        } else {
            return "已发送";
        }
    }
    function GetSendTimeMk($mktime)
    {
        if ($mktime == "0") {
            return "<font color='red'>未发送</font>";
        } else {
            return MyDate('Y-m-d H:i:s', $mktime);
        }
    }
    function GetCount($typeid)
    {
        global $dsql;
        $row = $dsql->GetOne("SELECT COUNT(typeid) as cc FROM `#@__mail_order`");
        return $row['cc'];
    }
    $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc";
    $dlist = new DataListCP();
    $dlist->SetTemplet(DEDEADMIN . "/templets/mail_title_send.htm");
    $dlist->SetSource($sql);
    $dlist->display();
}
开发者ID:iabing,项目名称:mzzyc,代码行数:31,代码来源:mail_title_send.php

示例11: dirname

<?php

require_once dirname(__FILE__) . '/config.php';
CheckPurview('a_List,a_AccList,a_MyList');
require_once DEDEINC . '/datalistcp.class.php';
if (empty($cid)) {
    $cid = '0';
    $whereSql = '';
}
if ($cid != 0) {
    require_once DEDEINC . '/channelunit.func.php';
    $whereSql = " And arc.typeid in (" . GetSonIds($cid) . ")";
}
$query = "SELECT arc.*,tp.typename FROM `#@__archives` AS arc\r\nLEFT JOIN #@__arctype AS tp ON arc.typeid = tp.id\r\nWHERE arc.arcrank = '-2' {$whereSql} order by arc.id desc";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEADMIN . "/templets/recycling.htm");
$dlist->SetSource($query);
$dlist->display();
开发者ID:klr2003,项目名称:sourceread,代码行数:18,代码来源:recycling.php

示例12: dirname

<?php

require_once dirname(__FILE__) . '/config.php';
CheckRank(0, 0);
require_once DEDEINC . '/datalistcp.class.php';
setcookie('ENV_GOBACK_URL', GetCurUrl(), time() + 3600, '/');
$query = "Select * From `#@__member_operation` where mid='" . $cfg_ml->M_ID . "' And product='archive' order by aid desc";
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetTemplate(DEDEMEMBER . '/templets/mypay.htm');
$dlist->SetSource($query);
$dlist->Display();
开发者ID:klr2003,项目名称:sourceread,代码行数:12,代码来源:mypay.php

示例13: implode

            $ismaster = implode(",", $master);
            $db->ExecuteNoneQuery("UPDATE #@__groups SET ismaster='{$ismaster}' WHERE groupid='{$id}'");
        }
        ShowMsg("{$msg}", "-1");
        exit;
    } else {
        if ($action = "join") {
            $row = $db->GetOne("SELECT isjoin FROM #@__group_user WHERE uid='{$uid}' AND gid='{$id}' AND isjoin='0'");
            if (is_array($row)) {
                $db->ExecuteNoneQuery("UPDATE #@__group_user SET isjoin='1' WHERE uid='{$uid}' AND gid='{$id}'");
            }
        }
    }
}
$sql = "SELECT * FROM #@__group_user WHERE gid='{$id}' ORDER BY jointime DESC";
$dl = new DataListCP();
$dl->pageSize = 20;
$dl->SetParameter("id", $id);
$dl->SetParameter("gid", $gid);
//这两句的顺序不能更换
$dl->SetTemplate(_SYSTEM_ . "/mygroup_member.htm");
//载入模板
$dl->SetSource($sql);
//设定查询SQL
$dl->Display();
//显示
function filter($var)
{
    return $var == '' ? false : true;
}
function GetMaster($user)
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:mygroup_member.php

示例14: AND

$whereSql = '';
if (!empty($folder)) {
    $whereSql = "WHERE folder='{$folder}'";
}
$postuser = "收件人";
if ($folder == "inbox" || $folder == '') {
    $postuser = "发件人";
}
if (!empty($keyword)) {
    $whereSql .= " AND (subject like '%" . $keyword . "%' OR message like '%" . $keyword . "%')";
}
if (!empty($username)) {
    $whereSql .= " AND floginid like '%" . $username . "%'";
}
$sql = "SELECT * FROM #@__member_pms {$whereSql} ORDER BY sendtime desc";
$dlist = new DataListCP();
$dlist->pagesize = 25;
$dlist->SetParameter("folder", $folder);
$dlist->SetParameter("username", $username);
$dlist->SetParameter("keyword", $keyword);
$dlist->SetTemplate(DEDEADMIN . "/templets/member_pm.htm");
$dlist->SetSource($sql);
$dlist->Display();
$dlist->Close();
function GetFolders($me)
{
    if ($me == "outbox") {
        return '发件箱';
    } else {
        if ($me == "inbox") {
            return '收件箱';
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:member_pm.php

示例15: unset

                $title = $row['title'];
            }
            if (empty($notice)) {
                $notice = $row['notice'];
            }
            $db->ExecuteNoneQuery("UPDATE #@__group_notice SET notice='" . $notice . "',title='" . $title . "' WHERE id='{$id}'");
        }
    }
}
unset($row);
//列表加载模板
$wheresql = "WHERE gid='{$gid}'";
if (!empty($keyword)) {
    $wheresql .= " AND    (title like '%" . $keyword . "%' OR notice like '%" . $keyword . "%')";
}
if (!empty($username)) {
    $wheresql .= " AND uname like '%" . $username . "%'";
}
$sql = "SELECT * FROM #@__group_notice {$wheresql} ORDER BY stime DESC";
$dl = new DataListCP();
$dl->pageSize = 20;
$dl->SetParameter("keyword", $keyword);
$dl->SetParameter("username", $username);
$dl->SetParameter("gid", $gid);
//这两句的顺序不能更换
$dl->SetTemplate(DEDEADMIN . "/templets/group_notice.htm");
//载入模板
$dl->SetSource($sql);
//设定查询SQL
$dl->Display();
//显示
开发者ID:iabing,项目名称:mzzyc,代码行数:31,代码来源:group_notice.php


注:本文中的DataListCP类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。