• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP DataListCP类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: while

$dsql->Execute();
while ($sbYou_neT_row = $dsql->GetObject()) {
    $topid = $sbYou_neT_row->topid;
    $sbyou_typeimg = ltrim($sbYou_neT_row->typeimg, '/');
    if (!$sbyou_typeimg) {
        $randPICID = rand(1, 50);
        $sbyou_typeimg = "uploads/empty/" . $randPICID . ".jpg";
    }
    $sByou_NET_list .= '
	<li>
	  <a href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/" target="_blank" class="preview"><img src="' . $BOOK_URL . $sbyou_typeimg . '" alt="" width="84"  height="112"/></a>
	  <div class="cbody">
		<a href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/" target="_blank" class="title">' . $sbYou_neT_row->typename . '</a> <span class="endpl">最近更新:<small>' . date('Y-m-d H:i:s', $sbYou_neT_row->lastupdate) . '</small></span>
		<p class="intro">' . sbyou_nEt_cut_str($sbYou_neT_row->description, '90', '0', 'gbk') . '</p>
		<span class="info">
		  <small class="view">浏览:</small>' . $sbYou_neT_row->bookclick . '<small class="hpd">推荐:</small>' . $sbYou_neT_row->tuijian . '<small class="pl">字数:</small>' . $sbYou_neT_row->booksize . '
		  <small class="btn">
		  [<a class="yd" href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/" target="_blank">立即阅读</a>]
		  [<a class="sm" href="' . $BOOK_URL . ltrim($sbYou_neT_row->typedir, '/') . '/chapter.html" target="_blank">查看书目</a>]
		  [<a class="xz" href="' . $TXT_URL . '?topid=' . $topid . '&id=' . $sbYou_neT_row->id . '&date=' . $sbYou_neT_row->lastupdate . '" target="_blank">下载TXT</a>]
		  </small>
		</span>
	  </div>
	</li>
	';
}
//加载模板
require_once DEDEINC . "/datalistcp.class.php";
$dlist = new DataListCP();
$dlist->SetTemplet(DEDEMEMBER . '/templets/caicai.htm');
$dlist->Display();
开发者ID:soonfine,项目名称:leread,代码行数:31,代码来源:caicai.php


示例17: ConvertStr

     $row = $dsql->GetOne("Select typename,ishidden From `#@__arctype` where id='{$id}' ");
     if ($row['ishidden'] == 1) {
         exit;
     }
     $typename = ConvertStr($row['typename']);
     //当前栏目下级分类
     $dsql->SetQuery("Select id,typename From `#@__arctype` where reid='{$id}' And channeltype=1 And ishidden=0 And ispart<>2 order by sortrank");
     $dsql->Execute();
     while ($row = $dsql->GetObject()) {
         $channellistnext .= "<a href='wap.php?action=list&amp;id={$row->id}'>" . ConvertStr($row->typename) . "</a> ";
     }
     //栏目内容(分页输出)
     $sids = GetSonIds($id, 1, true);
     $varlist = "cfg_webname,typename,channellist,channellistnext,cfg_templeturl";
     ConvertCharset($varlist);
     $dlist = new DataListCP();
     $dlist->SetTemplet($cfg_templets_dir . "/wap/list.wml");
     $dlist->pageSize = 10;
     $dlist->SetParameter("action", "list");
     $dlist->SetParameter("id", $id);
     $dlist->SetSource("Select id,title,pubdate,click From `#@__archives` where typeid in({$sids}) And arcrank=0 order by id desc");
     $dlist->Display();
     exit;
 } else {
     if ($action == 'article') {
         //文档信息
         $query = "\r\n\t  Select tp.typename,tp.ishidden,arc.typeid,arc.title,arc.arcrank,arc.pubdate,arc.writer,arc.click,addon.body From `#@__archives` arc \r\n\t  left join `#@__arctype` tp on tp.id=arc.typeid\r\n\t  left join `#@__addonarticle` addon on addon.aid=arc.id\r\n\t  where arc.id='{$id}'\r\n\t";
         $row = $dsql->GetOne($query, MYSQL_ASSOC);
         foreach ($row as $k => $v) {
             ${$k} = $v;
         }
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:wap.php


示例18: ShowMsg

        if (is_array($row)) {
            ShowMsg("关键字已存在库中!", "-1");
            exit;
        }
        $inquery = "INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES ('{$keyword}','{$rank}','1','{$rpurl}');";
        $dsql->ExecuteNoneQuery($inquery);
        ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL);
        exit;
    }
}
if (empty($keyword)) {
    $keyword = '';
    $addquery = '';
} else {
    $addquery = " WHERE keyword LIKE '%{$keyword}%' ";
}
$sql = "SELECT * FROM `#@__keywords` {$addquery} ORDER BY rank DESC";
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetParameter("keyword", $keyword);
$dlist->SetTemplate(DEDEADMIN . "/templets/article_keywords_main.htm");
$dlist->SetSource($sql);
$dlist->Display();
function GetSta($sta)
{
    if ($sta == 1) {
        return '';
    } else {
        return ' checked="1" ';
    }
}
开发者ID:iabing,项目名称:mzzyc,代码行数:31,代码来源:article_keywords_main.php


示例19: dirname

 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
require_once dirname(__FILE__) . "/config.php";
require_once DEDEINC . "/datalistcp.class.php";
CheckPurview('shops_Operations');
if (!isset($oid)) {
    exit("<a href='javascript:window.close()'>无效操作!</a>");
}
$oid = preg_replace("#[^-0-9A-Z]#", "", $oid);
if (empty($oid)) {
    exit("<a href='javascript:window.close()'>无效订单号!</a>");
}
$row = $dsql->GetOne("SELECT * FROM #@__shops_userinfo WHERE oid='{$oid}'");
$sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM #@__shops_orders as o left join #@__shops_products as p on o.oid=p.oid left join #@__shops_delivery as d on d.pid=o.pid WHERE o.oid='{$oid}'";
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetParameter("oid", $oid);
$dlist->SetTemplate(DEDEADMIN . "/templets/shops_operations_cart.htm");
$dlist->SetSource($sql);
$dlist->Display();
$dlist->Close();
function GetSta($sta, $oid)
{
    global $dsql;
    $row = $dsql->GetOne("SELECT paytype FROM #@__shops_orders WHERE oid='{$oid}'");
    $payname = $dsql->GetOne("SELECT name,fee FROM #@__payment WHERE id='{$row['paytype']}'");
    if ($sta == 0) {
        return $payname['name'] . " 手续费:" . $payname['fee'] . "元";
    } else {
        if ($sta == 1) {
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:shops_operations_cart.php


示例20: stripslashes

        $row['des'] = stripslashes($row['des']);
        $rs = $dsql->GetOne("SELECT * FROM #@__shops_orders WHERE userid='" . $cfg_ml->M_ID . "' AND oid='{$oid}'");
        $row['state'] = $rs['state'];
        $row['stime'] = $rs['stime'];
        $row['cartcount'] = $rs['cartcount'];
        $row['price'] = $rs['price'];
        $row['uprice'] = $rs['price'] / $rs['cartcount'];
        $row['dprice'] = $rs['dprice'];
        $row['priceCount'] = $rs['priceCount'];
        $rs = $dsql->GetOne("SELECT `dname` FROM #@__shops_delivery WHERE pid='{$rs['pid']}' LIMIT 0,1");
        $row['dname'] = $rs['dname'];
        unset($rs);
        $addsql = " AND oid='" . $oid . "'";
    }
    $sql = "SELECT * FROM #@__shops_products WHERE userid='" . $cfg_ml->M_ID . "' {$addsql} ORDER BY aid ASC";
    $dl = new DataListCP();
    $dl->pageSize = 20;
    if (!empty($oid)) {
        $dl->SetParameter('oid', $oid);
    }
    //这两句的顺序不能更换
    $dl->SetTemplate(dirname(__FILE__) . "/templets/shops_products.htm");
    //载入模板
    $dl->SetSource($sql);
    //设定查询SQL
    $dl->Display();
} else {
    if ($dopost == 'del') {
        $ids = explode(',', $ids);
        if (isset($ids) && is_array($ids)) {
            foreach ($ids as $id) {
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:shops_products.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP DataManager类代码示例发布时间:2022-05-23
下一篇:
PHP DataList类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap