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


PHP DataListCP::SetParameter方法代码示例

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


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

示例1: isset

include_once DEDEINC . '/datalistcp.class.php';
$bid = isset($bid) && is_numeric($bid) ? $bid : 0;
$do = isset($do) ? trim($do) : '';
if ($id < 1) {
    ShowMsg("错误,未定义的操作!", "-1");
    exit;
}
if ($do == "del" && $ismaster) {
    $row = $db->GetOne("SELECT bid FROM #@__group_guestbook WHERE bid='{$bid}'");
    if (!is_array($row)) {
        ShowMsg("记录不存在!", "-1");
        exit;
    }
    $db->ExecuteNoneQuery("DELETE FROM #@__group_guestbook WHERE bid='{$bid}'");
}
$pagesize = 5;
$nowpage = isset($pageno) && is_numeric($pageno) ? max($pageno, 1) : 1;
$topic = ($nowpage - 1) * $pagesize;
$sql = "SELECT G.stime,G.bid,G.message,G.title,M.uname,M.userid,M.face FROM #@__group_guestbook G LEFT JOIN #@__member M ON G.userid=M.mid WHERE G.gid='{$id}' ORDER BY G.stime ASC";
$dl = new DataListCP();
$dl->pageSize = $pagesize;
//设定每页显示记录数(默认5条)
$dl->SetParameter('id', $id);
//设定get字符串的变量
//这两句的顺序不能更换
$dl->SetTemplate(GROUP_TPL . '/guestbook.html');
//载入模板
$dl->SetSource($sql);
//设定查询SQL
$dl->Display();
//显示
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:guestbook.php

示例2: unset

        $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 = preg_replace("/^[a-z][0-9]\$/", "", $id);
                $query = "DELETE FROM `#@__shops_products` WHERE oid='{$id}' AND userid='{$cfg_ml->M_ID}'";
                $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='{$id}' AND userid='{$cfg_ml->M_ID}'";
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:shops_products.php

示例3: VALUES

                            $row3 = "INSERT INTO\r\n                `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`)\r\n                VALUES ('admin','{$row['id']}','{$cfg_ml->M_ID}','{$cfg_ml->M_LoginID}','inbox','{$row['subject']}','{$row['sendtime']}','{$row['writetime']}','{$row['hasview']}','{$row['isadmin']}','{$row['message']}')";
                            $dsql->ExecuteNoneQuery($row3);
                        }
                    }
                    if ($state == "1") {
                        $wsql = " toid='{$cfg_ml->M_ID}' AND folder='inbox' AND writetime!='' and hasview=1";
                        $tname = "收件箱";
                    } else {
                        if ($state == "-1") {
                            $wsql = "toid='{$cfg_ml->M_ID}' AND folder='inbox' AND writetime!='' and hasview=0";
                            $tname = "收件箱";
                        } else {
                            $wsql = " toid='{$cfg_ml->M_ID}' AND folder='inbox' AND writetime!=''";
                            $tname = "收件箱";
                        }
                    }
                } else {
                    $wsql = " `fromid` ='{$cfg_ml->M_ID}' AND folder LIKE 'outbox'";
                    $tname = "已发信息";
                }
                $query = "SELECT * FROM `#@__member_pms` WHERE {$wsql} ORDER BY sendtime DESC";
                $dlist = new DataListCP();
                $dlist->pageSize = 20;
                $dlist->SetParameter("dopost", $dopost);
                $dlist->SetTemplate(DEDEMEMBER . '/templets/pm-main.htm');
                $dlist->SetSource($query);
                $dlist->Display();
            }
        }
    }
}
开发者ID:Miliup,项目名称:miliofficeweb,代码行数:31,代码来源:pm.php

示例4: DataListCP

                $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

示例5: GetSta

        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

示例6: GetSta

 */
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) {
            return '<font color="red">已付款,等发货</font>';
        } else {
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:shops_operations_cart.php

示例7: getUserInfo

            $tname = "所有好友";
        } else {
            if ($ftype == 1) {
                $wsql = " F.mid='{$cfg_ml->M_ID}' AND F.ftype =  '1' ";
                $tname = "特别关注";
            } else {
                if ($ftype == -1) {
                    $wsql = " F.mid='{$cfg_ml->M_ID}' AND F.ftype =  '-1' ";
                    $tname = "黑名单";
                }
            }
        }
        $query = "SELECT F.*,G.groupname FROM `#@__member_group` AS G  LEFT JOIN #@__member_friends AS F ON F.groupid=G.id WHERE {$wsql} ORDER BY F.id DESC";
        $dlist = new DataListCP();
        $dlist->pageSize = 20;
        $dlist->SetParameter("ftype", $ftype);
        $dlist->SetTemplate(dirname(__FILE__) . '/templets/myfriend.htm');
        $dlist->SetSource($query);
        $dlist->Display();
    }
}
/**
 *  获取用户信息
 *
 * @param     int  $uid  用户UID
 * @param     string  $_field  用户字段
 * @return    string
 */
function getUserInfo($uid, $_field = 'uname')
{
    global $dsql;
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:myfriend.php

示例8: ShowMsg

}
$arcsta = $cInfos['arcsta'];
//禁止访问无权限的模型
if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) {
    ShowMsg('你无权限访问该部分', '-1');
    exit;
}
if ($cid == 0) {
    $positionname = $cInfos['typename'] . " &gt;&gt; ";
} else {
    $positionname = str_replace($cfg_list_symbol, " &gt;&gt; ", $tl->GetPositionName()) . " &gt;&gt; ";
}
$whereSql = " where arc.channel = '{$channelid}' And arc.mid='{$mid}' ";
if ($keyword != '') {
    $keyword = cn_substr(trim(ereg_replace("[><\\|\"\r\n\t%\\*\\.\\?\\(\\)\$ ;,'%-]", "", stripslashes($keyword))), 30);
    $keyword = addslashes($keyword);
    $whereSql .= " And (arc.title like '%{$keyword}%') ";
}
if ($cid != 0) {
    $whereSql .= " And arc.typeid in (" . GetSonIds($cid) . ")";
}
$query = "select arc.aid,arc.aid as id,arc.typeid,arc.senddate,arc.channel,arc.click,arc.title,arc.mid,tp.typename\r\n        from `{$cInfos['addtable']}` arc\r\n        left join `#@__arctype` tp on tp.id=arc.typeid\r\n        {$whereSql}\r\n        order by arc.aid desc ";
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetParameter("dopost", "listArchives");
$dlist->SetParameter("keyword", $keyword);
$dlist->SetParameter("cid", $cid);
$dlist->SetParameter("channelid", $channelid);
$dlist->SetTemplate(DEDEMEMBER . "/templets/content_sg_list.htm");
$dlist->SetSource($query);
$dlist->Display();
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:content_sg_list.php

示例9: GetSta

}
$addsql = '';
if (empty($oid)) {
    $oid = 0;
}
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
if (isset($buyid)) {
    $buyid = preg_replace("#[^-0-9A-Z]#", "", $buyid);
    $addsql = "WHERE s.oid='" . $buyid . "'";
}
if (isset($sta)) {
    $addsql = "WHERE s.`state`='{$sta}'";
}
$sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount,s.dprice,s.paytype,u.`consignee`,u.`tel`,s.`userid` FROM #@__shops_orders AS s LEFT JOIN #@__shops_userinfo AS u ON s.oid=u.oid {$addsql} ORDER BY `stime` DESC";
$dlist = new DataListCP();
$dlist->SetParameter("oid", $oid);
if (isset($sta)) {
    $dlist->SetParameter("sta", $sta);
}
$tplfile = DEDEADMIN . "/templets/shops_operations.htm";
//这两句的顺序不能更换
$dlist->SetTemplate($tplfile);
//载入模板
$dlist->SetSource($sql);
//设定查询SQLexit('dd');
$dlist->Display();
function GetSta($sta)
{
    if ($sta == 0) {
        return '未付款';
    } else {
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:shops_operations.php

示例10: dirname

require_once dirname(__FILE__) . "/config.php";
CheckPurview('member_Operations');
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/");
require_once DEDEINC . '/datalistcp.class.php';
if (empty($buyid)) {
    $buyid = '';
}
$addsql = " WHERE buyid LIKE '%{$buyid}%' ";
if (isset($sta)) {
    $addsql .= " AND sta='{$sta}' ";
}
$sql = "SELECT * FROM `#@__member_operation` {$addsql} ORDER BY aid DESC";
$dlist = new DataListCP();
//设定每页显示记录数(默认25条)
$dlist->pageSize = 25;
$dlist->SetParameter("buyid", $buyid);
if (isset($sta)) {
    $dlist->SetParameter("sta", $sta);
}
$dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type ");
$dlist->dsql->Execute('ts');
while ($rw = $dlist->dsql->GetArray('ts')) {
    $TypeNames[$rw['tid']] = $rw['pname'];
}
$tplfile = DEDEADMIN . "/templets/member_operations.htm";
//这两句的顺序不能更换
$dlist->SetTemplate($tplfile);
//载入模板
$dlist->SetSource($sql);
//设定查询SQL
$dlist->Display();
开发者ID:iabing,项目名称:mzzyc,代码行数:31,代码来源:member_operations.php

示例11: GetArcUrl

        $query = "SELECT addon.*, arctype.* FROM {$addontable} addon \n        LEFT JOIN #@__arctype arctype ON arctype.id = addon.typeid\n        {$where} {$orderby}";
    } else {
        $query = "SELECT main.id AS aid,main.*,main.description AS description1, type.* \n    FROM {$maintable} main \n    LEFT JOIN #@__arctype type ON type.id = main.typeid \n    LEFT JOIN {$addontable} addon ON addon.aid = main.id \n    {$where}  {$orderby}";
    }
    $sql = $query;
} else {
    $sql = urldecode($sql);
    $query = $sql;
}
$sql = urlencode($sql);
//生成sql的唯一序列化字符串,并将sql语句记录到session中去
$sqlhash = md5($sql);
$_SESSION[$sqlhash] = $sql;
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetParameter("hash", $sqlhash);
$dlist->SetParameter("mid", $mid);
if (file_exists(DEDEROOT . "/templets/default/{$template}")) {
    $templatefile = DEDEROOT . "/templets/default/{$template}";
} else {
    $templatefile = DEDEROOT . "/templets/default/advancedsearch.htm";
}
$dlist->SetTemplate($templatefile);
$dlist->SetSource($query);
require_once DEDEINC . "/channelunit.class.php";
//获得一个指定档案的链接
function GetArcUrl($aid, $typeid, $timetag, $title, $ismake = 0, $rank = 0, $namerule = '', $artdir = '', $money = 0)
{
    return GetFileUrl($aid, $typeid, $timetag, $title, $ismake, $rank, $namerule, $artdir, $money);
}
$dlist->Display();
开发者ID:bthtml,项目名称:web-hwxf,代码行数:31,代码来源:advancedsearch.php

示例12: empty

if (empty($tag)) {
    $tag = '';
}
if (empty($action)) {
    $orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z]#i", '', $orderby);
    $orderway = isset($orderway) && $orderway == 'asc' ? 'asc' : 'desc';
    if (!empty($tag)) {
        $where = " where tag like '%{$tag}%'";
    } else {
        $where = '';
    }
    $neworderway = $orderway == 'desc' ? 'asc' : 'desc';
    $query = "SELECT * FROM `#@__tagindex` {$where} ORDER BY {$orderby} {$orderway}";
    $dlist = new DataListCP();
    $tag = stripslashes($tag);
    $dlist->SetParameter("tag", $tag);
    $dlist->SetParameter("orderway", $orderway);
    $dlist->SetParameter("orderby", $orderby);
    $dlist->pageSize = 20;
    $dlist->SetTemplet(DEDEADMIN . "/templets/tags_main.htm");
    $dlist->SetSource($query);
    $dlist->Display();
    exit;
} else {
    if ($action == 'update') {
        $tid = empty($tid) ? 0 : intval($tid);
        if (empty($tid)) {
            ShowMsg('没有选择要删除的tag!', '-1');
            exit;
        }
        $query = "UPDATE `#@__tagindex` SET `count`='{$count}' WHERE id='{$tid}' ";
开发者ID:stonelf,项目名称:mcgmh,代码行数:31,代码来源:tags_main.php

示例13: filter

                }
            }
            ShowMsg("成功添加用户:{$uname}", "-1");
            exit;
        }
    }
}
//列表加载模板
$wheresql = "WHERE gid='{$gid}'";
if (!empty($username)) {
    $wheresql .= " AND username like '%" . $username . "%'";
}
$sql = "SELECT * FROM #@__group_user {$wheresql} ORDER BY jointime DESC";
$dl = new DataListCP();
$dl->pageSize = 20;
$dl->SetParameter("username", $username);
$dl->SetParameter("id", $id);
$dl->SetParameter("gid", $gid);
//这两句的顺序不能更换
$dl->SetTemplate(DEDEADMIN . "/templets/group_user.htm");
//载入模板
$dl->SetSource($sql);
//设定查询SQL
$dl->Display();
//显示
function filter($var)
{
    return $var == '' ? false : true;
}
function GetMaster($user)
{
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:group_user.php

示例14: time

    $cip = "";
}
if (empty($dtime)) {
    $dtime = 0;
}
if ($adminid > 0) {
    $where .= " AND #@__log.adminid='{$adminid}' ";
}
if ($cip != "") {
    $where .= " AND #@__log.cip LIKE '%{$cip}%' ";
}
if ($dtime > 0) {
    $nowtime = time();
    $starttime = $nowtime - $dtime * 24 * 3600;
    $where .= " AND #@__log.dtime>'{$starttime}' ";
}
$sql = "SELECT #@__log.*,#@__admin.userid FROM #@__log\n     LEFT JOIN #@__admin ON #@__admin.id=#@__log.adminid\n     WHERE 1=1 {$where} ORDER BY #@__log.lid DESC";
$adminlist = "";
$dsql->SetQuery("SELECT id,uname FROM #@__admin");
$dsql->Execute('admin');
while ($myrow = $dsql->GetObject('admin')) {
    $adminlist .= "<option value='{$myrow->id}'>{$myrow->uname}</option>\r\n";
}
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetParameter("adminid", $adminid);
$dlist->SetParameter("cip", $cip);
$dlist->SetParameter("dtime", $dtime);
$dlist->SetTemplate(DEDEADMIN . "/templets/log_list.htm");
$dlist->SetSource($sql);
$dlist->Display();
开发者ID:hensonvip,项目名称:ymroad,代码行数:31,代码来源:log_list.php

示例15: 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


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