示例#1
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
$MG['sell_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback');
$MTYPE = get_type('product-' . $_userid);
require DT_ROOT . '/include/post.func.php';
include load($module . '.lang');
include load('my.lang');
require MD_ROOT . '/sell.class.php';
$do = new sell($moduleid);
if (in_array($action, array('add', 'edit'))) {
    $FD = cache_read('fields-' . substr($table, strlen($DT_PRE)) . '.php');
    if ($FD) {
        require DT_ROOT . '/include/fields.func.php';
    }
    isset($post_fields) or $post_fields = array();
    $CP = $MOD['cat_property'];
    if ($CP) {
        require DT_ROOT . '/include/property.func.php';
    }
    isset($post_ppt) or $post_ppt = array();
}
$sql = $_userid ? "username='******'" : "ip='{$DT_IP}'";
$limit_used = $limit_free = $need_password = $need_captcha = $need_question = $fee_add = 0;
if (in_array($action, array('', 'add'))) {
    $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE {$sql} AND status>1");
    $limit_used = $r['num'];
    $limit_free = $MG['sell_limit'] > $limit_used ? $MG['sell_limit'] - $limit_used : 0;
}
if (check_group($_groupid, $MOD['group_refresh'])) {
示例#2
0
     $all ? msg($MOD['name'] . '生成成功', $this_forward) : dmsg($MOD['name'] . '生成成功', $this_forward);
 }
 $catid = isset($catid) ? intval($catid) : '';
 $sql = $catid ? " AND catid={$catid}" : '';
 if (!isset($fid)) {
     $r = $db->get_one("SELECT min(itemid) AS fid FROM {$table} WHERE status>2 {$sql}");
     $fid = $r['fid'] ? $r['fid'] : 0;
 }
 isset($sid) or $sid = $fid;
 if (!isset($tid)) {
     $r = $db->get_one("SELECT max(itemid) AS tid FROM {$table} WHERE status>2 {$sql}");
     $tid = $r['tid'] ? $r['tid'] : 0;
 }
 if ($update) {
     require MD_ROOT . '/sell.class.php';
     $do = new sell($moduleid);
 }
 isset($num) or $num = 100;
 if ($fid <= $tid) {
     $result = $db->query("SELECT itemid FROM {$table} WHERE status>2 AND itemid>={$fid} {$sql} ORDER BY itemid LIMIT 0,{$num} ");
     if ($db->affected_rows($result)) {
         while ($r = $db->fetch_array($result)) {
             $itemid = $r['itemid'];
             $update ? $do->update($itemid) : tohtml('show', $module);
         }
         $itemid += 1;
     } else {
         $itemid = $fid + $num;
     }
 } else {
     if ($update) {
示例#3
0
<?php

defined('DT_ADMIN') or exit('Access Denied');
require MD_ROOT . '/sell.class.php';
$do = new sell($moduleid);
$menus = array(array('添加' . $MOD['name'], '?moduleid=' . $moduleid . '&action=add'), array($MOD['name'] . '列表', '?moduleid=' . $moduleid), array('审核' . $MOD['name'], '?moduleid=' . $moduleid . '&action=check'), array('过期' . $MOD['name'], '?moduleid=' . $moduleid . '&action=expire'), array('未通过' . $MOD['name'], '?moduleid=' . $moduleid . '&action=reject'), array('回收站', '?moduleid=' . $moduleid . '&action=recycle'), array('移动分类', '?moduleid=' . $moduleid . '&action=move'));
if (in_array($action, array('add', 'edit'))) {
    $FD = cache_read('fields-' . substr($table, strlen($DT_PRE)) . '.php');
    if ($FD) {
        require DT_ROOT . '/include/fields.func.php';
    }
    isset($post_fields) or $post_fields = array();
    $CP = $MOD['cat_property'];
    if ($CP) {
        require DT_ROOT . '/include/property.func.php';
    }
    isset($post_ppt) or $post_ppt = array();
}
if ($_catids || $_areaids) {
    require DT_ROOT . '/admin/admin_check.inc.php';
}
if (in_array($action, array('', 'check', 'expire', 'reject', 'recycle'))) {
    $sfields = array('模糊', '标题', '产品品牌', '计量单位', '简介', '公司名', '联系人', '联系电话', '联系地址', '电子邮件', '联系MSN', '联系QQ', '会员名', '编辑', 'IP', '参数名1', '参数名2', '参数名3', '参数值1', '参数值2', '参数值3', '文件路径', '内容模板');
    $dfields = array('keyword', 'title', 'brand', 'unit', 'introduce', 'company', 'truename', 'telephone', 'address', 'email', 'msn', 'qq', 'username', 'editor', 'ip', 'n1', 'n2', 'n3', 'v1', 'v2', 'v3', 'filepath', 'template');
    $sorder = array('结果排序方式', '更新时间降序', '更新时间升序', '添加时间降序', '添加时间升序', VIP . '级别降序', VIP . '级别升序', '产品单价降序', '产品单价升序', '供货总量降序', '供货总量升序', '最小起订降序', '最小起订升序', '浏览次数降序', '浏览次数升序', '信息ID降序', '信息ID升序');
    $dorder = array($MOD['order'], 'edittime DESC', 'edittime ASC', 'addtime DESC', 'addtime ASC', 'vip DESC', 'vip ASC', 'price DESC', 'price ASC', 'amount DESC', 'amount ASC', 'minamount DESC', 'minamount ASC', 'hits DESC', 'hits ASC', 'itemid DESC', 'itemid ASC');
    $level = isset($level) ? intval($level) : 0;
    $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1;
    isset($fields) && isset($dfields[$fields]) or $fields = 0;
    isset($order) && isset($dorder[$order]) or $order = 0;
    $thumb = isset($thumb) ? intval($thumb) : 0;