示例#1
0
                             $user = _userinfo($fields, $email);
                             eval("\$title = \"{$title}\";");
                             $content = ob_template($template, 'mail');
                         }
                         send_mail($email, $title, $content, $sender);
                     }
                 }
                 if ($id < count($emails)) {
                     msg('已发送 ' . $id . ' 封邮件,系统将自动继续,请稍候...', '?moduleid=' . $moduleid . '&file=' . $file . '&sendtype=3&id=' . $id . '&pernum=' . $pernum . '&pertime=' . $pertime . '&send=1', $pertime);
                 }
                 cache_delete($_username . '_sendmail.php');
                 $forward = '?moduleid=' . $moduleid . '&file=' . $file;
             }
         }
     }
     dmsg('邮件发送成功', $forward);
 } else {
     $sendtype = isset($sendtype) ? intval($sendtype) : 1;
     isset($email) or $email = '';
     $emails = '';
     if (isset($userid)) {
         if ($userid) {
             $userids = is_array($userid) ? implode(',', $userid) : $userid;
             $result = $db->query("SELECT email FROM {$DT_PRE}member WHERE userid IN ({$userids})");
             while ($r = $db->fetch_array($result)) {
                 $emails .= $r['email'] . "\n";
             }
         }
     }
     if ($email) {
         if (strpos($email, ',') !== false) {
示例#2
0
         $type_select = type_select($TYPE, 0, 'post[typeid]', $L['default_type'], $typeid);
         $head_title = $L['news_title_edit'];
     }
     break;
 case 'delete':
     $itemid or message($L['news_msg_choose']);
     $itemids = is_array($itemid) ? $itemid : array($itemid);
     foreach ($itemids as $itemid) {
         $do->itemid = $itemid;
         $item = $do->get_one();
         if (!$item || $item['username'] != $_username) {
             message();
         }
         $do->recycle($itemid);
     }
     dmsg($L['op_del_success'], $forward);
     break;
 default:
     $status = isset($status) ? intval($status) : 3;
     in_array($status, array(1, 2, 3)) or $status = 3;
     $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1;
     $type_select = type_select($TYPE, 0, 'typeid', $L['default_type'], $typeid, '', $L['all_type']);
     $condition = "username='******' AND status={$status}";
     if ($keyword) {
         $condition .= " AND title LIKE '%{$keyword}%'";
     }
     if ($typeid > -1) {
         $condition .= " AND typeid={$typeid}";
     }
     $lists = $do->get_list($condition);
     foreach ($lists as $k => $v) {
示例#3
0
        }
        break;
    case 'check':
        if ($itemid) {
            $do->check($itemid);
            dmsg('审核成功', $forward);
        } else {
            $lists = $do->get_list("status=2 AND username=''" . $condition, $dorder[$order]);
            include tpl('link_check', $module);
        }
        break;
    case 'order':
        $do->order($listorder);
        dmsg('排序成功', $forward);
        break;
    case 'delete':
        $itemid or msg('请选择链接');
        $do->delete($itemid);
        dmsg('删除成功', $forward);
        break;
    case 'level':
        $itemid or msg('请选择链接');
        $level = intval($level);
        $do->level($itemid, $level);
        dmsg('级别设置成功', $forward);
        break;
    default:
        $lists = $do->get_list("status=3 AND username=''" . $condition, $dorder[$order]);
        include tpl('link', $module);
        break;
}
示例#4
0
        dmsg('更新成功', $this_forward);
        break;
    case 'delete':
        if ($areaid) {
            $areaids = $areaid;
        }
        $areaids or msg();
        $do->delete($areaids);
        dmsg('删除成功', $this_forward);
        break;
    case 'update':
        if (!$area || !is_array($area)) {
            msg();
        }
        $do->update($area);
        dmsg('更新成功', $this_forward);
        break;
    default:
        $DAREA = array();
        $condition = $keyword ? "areaname LIKE '%{$keyword}%'" : "parentid={$parentid}";
        $result = $db->query("SELECT * FROM {$table} WHERE {$condition} ORDER BY listorder,areaid");
        while ($r = $db->fetch_array($result)) {
            $r['childs'] = substr_count($r['arrchildid'], ',');
            $DAREA[$r['areaid']] = $r;
        }
        include tpl('area');
        break;
}
class area
{
    var $areaid;
示例#5
0
        msg('ID从' . $fid . '至' . ($itemid - 1) . $MOD['name'] . ($update ? '更新' : '生成') . '成功' . progress($sid, $fid, $tid), "?moduleid={$moduleid}&file={$file}&action={$action}&sid={$sid}&fid={$itemid}&tid={$tid}&num={$num}&update={$update}&all={$all}&one={$one}");
        break;
    case 'cate':
        $catid or msg('请选择分类');
        isset($num) or $num = 50;
        isset($fid) or $fid = 1;
        $total = max(ceil($CAT['item'] / $MOD['pagesize']), 1);
        if ($fpage && $tpage) {
            $fid = $fpage;
            $num = $tpage - $fpage + 1;
            tohtml('list', $module);
            dmsg('生成成功', $this_forward);
        }
        if ($fid <= $total) {
            tohtml('list', $module);
            msg('第' . $fid . '页至第' . ($fid + $num - 1) . '页生成成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=' . $action . '&catid=' . $catid . '&fid=' . ($fid + $num) . '&num=' . $num . '&fpage=' . $fpage . '&tpage=' . $tpage);
        } else {
            dmsg('生成成功', $this_forward);
        }
        break;
    case 'item':
        $catid or msg('请选择分类');
        msg('', '?moduleid=' . $moduleid . '&file=' . $file . '&action=show&catid=' . $catid . '&num=' . $num);
        break;
    default:
        $r = $db->get_one("SELECT min(itemid) AS fid,max(itemid) AS tid FROM {$table} WHERE status=3");
        $fid = $r['fid'] ? $r['fid'] : 0;
        $tid = $r['tid'] ? $r['tid'] : 0;
        include tpl('html', $module);
        break;
}
示例#6
0
         $reply = addslashes(save_remote(save_local(stripslashes($reply))));
         $db->query("UPDATE {$DT_PRE}ask SET status={$status},admin='{$_username}',admintime='{$DT_TIME}',reply='{$reply}' WHERE itemid={$itemid}");
         dmsg('受理成功', $forward);
     } else {
         $r = $db->get_one("SELECT * FROM {$DT_PRE}ask WHERE itemid={$itemid}");
         $r or msg();
         extract($r);
         $addtime = timetodate($addtime, 5);
         $admintime = timetodate($admintime, 5);
         include tpl('ask_edit', $module);
     }
     break;
 case 'delete':
     $itemid or msg();
     $db->query("DELETE FROM {$DT_PRE}ask WHERE itemid={$itemid} ");
     dmsg('删除成功', '?moduleid=' . $moduleid . '&file=' . $file);
     break;
 default:
     $_status = array('待受理', '<span style="color:blue;">受理中</span>', '<span style="color:green;">已解决</span>', '<span style="color:red;">未解决</span>');
     $sfields = array('按条件', '标题', '内容', '会员名', '回复', '受理人');
     $dfields = array('title', 'title', 'content', 'username', 'reply', 'admin');
     $dstatus = array('待受理', '受理中', '已解决', '未解决');
     $sorder = array('结果排序方式', '提交时间降序', '提交时间升序', '受理时间降序', '受理时间升序', '会员评分降序', '会员评分升序');
     $dorder = array('itemid DESC', 'itemid DESC', 'itemid ASC', 'admintime DESC', 'admintime ASC', 'star DESC', 'star ASC');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     isset($typeid) or $typeid = 0;
     $status = isset($status) && isset($dstatus[$status]) ? intval($status) : '';
     isset($order) && isset($dorder[$order]) or $order = 0;
     $fields_select = dselect($sfields, 'fields', '', $fields);
     $type_select = type_select('ask', 1, 'typeid', '请选择分类', $typeid);
     $status_select = dselect($dstatus, 'status', '受理状态', $status, '', 1, '', 1);
示例#7
0
             send_sms($U['mobile'], '您的会员资料修改审核结果已通过站内信发送,请注意查阅');
         }
         if ($wec) {
             send_weixin($username, '您的会员资料修改审核结果已通过站内信发送,请注意查阅');
         }
         if ($sql1) {
             $db->query("UPDATE {$DT_PRE}member SET " . substr($sql1, 1) . " WHERE userid={$userid}");
         }
         if ($sql2) {
             $db->query("UPDATE {$DT_PRE}company SET " . substr($sql2, 1) . " WHERE userid={$userid}");
         }
         if ($sql3) {
             $db->query("UPDATE {$content_table} SET " . substr($sql3, 1) . " WHERE userid={$userid}");
         }
         $db->query("DELETE FROM {$DT_PRE}member_check WHERE username='******'");
         dmsg('操作成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=member');
     } else {
         include tpl('validate_show', $module);
     }
     break;
 default:
     $menuid = $S[$action];
     $sfields = array('按条件', '认证项', '会员名', '操作人');
     $dfields = array('title', 'title', 'username', 'editor');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     isset($fromtime) or $fromtime = '';
     isset($totime) or $totime = '';
     isset($type) or $type = '';
     $status = isset($status) ? intval($status) : 0;
     $fields_select = dselect($sfields, 'fields', '', $fields);
     $condition = '1';
示例#8
0
<?php

/*
	[Destoon B2B System] Copyright (c) 2008-2013 Destoon.COM
	This is NOT a freeware, use is subject to license.txt
*/
defined('IN_DESTOON') or exit('Access Denied');
isset($item) or msg();
require DT_ROOT . '/include/type.class.php';
$forward = '?file=' . $file . '&item=' . $item;
$do = new dtype();
$do->item = $item;
$do->cache = 1;
if ($submit) {
    $do->update($post);
    dmsg('更新成功', $forward);
} else {
    $lists = $do->get_list();
    include tpl('type');
}
示例#9
0
             }
         }
         isset($mobile) && is_mobile($mobile) or $mobile = '';
         $head_title = $L['send_passport_title'];
         include template('send', $module);
     }
     break;
 case 'passport':
     $_username == $_passport or dheader('edit.php');
     if ($submit) {
         isset($npassport) or $npassport = '';
         require MD_ROOT . '/member.class.php';
         $do = new member();
         $do->userid = $_userid;
         if ($do->edit_passport($_passport, $npassport, $_username)) {
             dmsg($L['op_edit_success'], 'edit.php');
         } else {
             message($do->errmsg);
         }
     } else {
         $head_title = $L['send_passport_title'];
         include template('send', $module);
     }
     break;
 default:
     if ($_userid) {
         dheader($MOD['linkurl']);
     }
     if ($auth) {
         $user = check_auth($auth);
         auth_time($user['authtime']);
示例#10
0
     if ($submit) {
         if ($black) {
             $blacks = array();
             $tmp = explode(' ', trim($black));
             foreach ($tmp as $v) {
                 if (($do->is_member($v) || $v == 'Guest') && !in_array($v, $blacks)) {
                     $blacks[] = $v;
                 }
             }
             $black = $blacks ? implode(' ', $blacks) : '';
         } else {
             $black = '';
         }
         $send = $send ? 1 : 0;
         $db->query("UPDATE {$DT_PRE}member SET black='{$black}',send='{$send}' WHERE userid={$_userid}");
         dmsg($L['op_update_success'], '?action=setting');
     } else {
         $head_title = $L['message_title_black'] . $DT['seo_delimiter'] . $head_title;
         $user = $db->get_one("SELECT black,send FROM {$DT_PRE}member WHERE userid={$_userid}");
         $could_send = false;
         if ($DT['message_email'] && $DT['mail_type'] != 'close') {
             if (check_group($_groupid, $DT['message_group'])) {
                 $could_send = true;
             }
         }
     }
     break;
 case 'outbox':
     $status = 2;
     $name = $L['message_title_outbox'];
     $condition = "fromuser='******' AND status={$status} " . $condition;
示例#11
0
        if ($user['edittime'] == 0 && $user['inviter'] && $MOD['credit_user']) {
            $inviter = $user['inviter'];
            $r = $db->get_one("SELECT itemid FROM {$DT_PRE}finance_credit WHERE note='{$_username}' AND username='******'");
            if (!$r) {
                credit_add($inviter, $MOD['credit_user']);
                credit_record($inviter, $MOD['credit_user'], 'system', $L['edit_invite'], $_username);
            }
        }
        if ($user['edittime'] == 0 && $MOD['credit_edit']) {
            credit_add($_username, $MOD['credit_edit']);
            credit_record($_username, $MOD['credit_edit'], 'system', $L['edit_profile'], $DT_IP);
        }
        if ($post['password']) {
            message($L['edit_msg_success'] . $L['edit_msg_password'], '?tab=' . $tab . '&success=1');
        }
        dmsg($L['edit_msg_success'], '?tab=' . $tab . '&success=1');
    } else {
        message($do->errmsg);
    }
} else {
    $COM_TYPE = explode('|', $MOD['com_type']);
    $COM_SIZE = explode('|', $MOD['com_size']);
    $COM_MODE = explode('|', $MOD['com_mode']);
    $MONEY_UNIT = explode('|', $MOD['money_unit']);
    $head_title = $L['edit_title'];
    extract($user);
    $mode_check = dcheckbox($COM_MODE, 'post[mode][]', $mode, 'onclick="check_mode(this, ' . $MOD['mode_max'] . ');"', 0);
    $content_table = content_table(4, $userid, is_file(DT_CACHE . '/4.part'), $DT_PRE . 'company_data');
    $t = $db->get_one("SELECT * FROM {$content_table} WHERE userid={$userid}");
    if ($t) {
        $introduce = $t['content'];
示例#12
0
                     } else {
                         $menu[$i]['type'] = 'click';
                         $menu[$i]['key'] = $post[$i][0]['key'];
                     }
                 } else {
                     msg('菜单' . ($i + 1) . ' 地址/事件 不能为空');
                 }
             }
         }
     }
     $btn['button'] = $menu;
     $par = stripslashes(urldecode(json_encode($btn)));
     $url = 'https://api.weixin.qq.com/cgi-bin/menu/create?access_token=' . $access_token;
     $arr = $wx->http_post($url, $par);
     if ($arr['errcode'] == 0) {
         dmsg('同步成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=' . $action);
     } else {
         msg('同步失败 - ' . $arr['errcode'] . ':' . $arr['errmsg']);
     }
 } else {
     #print_r($wx->http_get('https://api.weixin.qq.com/cgi-bin/menu/get?access_token='.$access_token));
     cache_weixin();
     $menu = cache_read('weixin-menu.php');
     if (!is_array($menu) || count($menu) < 1 || count($menu) > 3) {
         $menu = array();
         for ($i = 0; $i < 3; $i++) {
             for ($j = 0; $j < 6; $j++) {
                 $menu[$i][$j]['name'] = '';
                 $menu[$i][$j]['key'] = '';
             }
         }
示例#13
0
        }
        dmsg('更新成功', '?file=' . $file);
        break;
    case 'delete':
        if ($areaid) {
            $areaids = $areaid;
        }
        $areaids or msg();
        $do->delete($areaids);
        dmsg('删除成功', '?file=' . $file);
        break;
    case 'update':
        foreach ($post as $v) {
            $do->update($v);
        }
        dmsg('更新成功', '?file=' . $file);
        break;
    default:
        $condition = '1';
        if ($kw) {
            $condition .= " AND (name LIKE '%{$keyword}%' OR domain LIKE '%{$keyword}%')";
        }
        $lists = $do->get_list($condition);
        include tpl('city');
        break;
}
class city
{
    var $areaid;
    var $db;
    var $table;
示例#14
0
}
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if ($action == 'logout' && $admin_user) {
    set_cookie('admin_user', '');
    dmsg($L['index_msg_logout'], $MODULE[2]['linkurl']);
}
require MD_ROOT . '/member.class.php';
require DT_ROOT . '/include/post.func.php';
$do = new member();
if ($submit) {
    if (word_count($note) > 1000) {
        message($L['index_msg_note_limit']);
    }
    $note = '<?php exit;?>' . htmlspecialchars(stripslashes($note));
    file_put(DT_ROOT . '/file/user/' . dalloc($_userid) . '/' . $_userid . '/note.php', $note);
    dmsg($L['op_update_success'], $MODULE[2]['linkurl']);
} else {
    $head_title = '';
    $do->userid = $_userid;
    $user = $do->get_one();
    extract($user);
    $logintime = timetodate($logintime, 5);
    $regtime = timetodate($regtime, 5);
    $userurl = userurl($_username, '', $domain);
    $sys = array();
    $i = 0;
    $result = $db->query("SELECT itemid,title,addtime,groupids FROM {$DT_PRE}message WHERE groupids<>'' ORDER BY itemid DESC", 'CACHE');
    while ($r = $db->fetch_array($result)) {
        $groupids = explode(',', $r['groupids']);
        if (!in_array($_groupid, $groupids)) {
            continue;
示例#15
0
<?php

/*
	[Destoon B2B System] Copyright (c) 2008-2013 Destoon.COM
	This is NOT a freeware, use is subject to license.txt
*/
defined('IN_DESTOON') or exit('Access Denied');
$menus = array(array('操作日志', '?file=' . $file), array('日志清理', '?file=' . $file . '&action=delete', 'onclick="if(!confirm(\'为了系统安全,系统仅删除90天之前的日志\')) return false"'));
switch ($action) {
    case 'delete':
        $time = $today_endtime - 90 * 86400;
        $db->query("DELETE FROM {$DT_PRE}admin_log WHERE logtime<{$time}");
        dmsg('清理成功', '?file=' . $file);
        break;
    default:
        $sfields = array('按条件', '网址', '管理员', 'IP');
        $dfields = array('qstring', 'qstring', 'username', 'ip');
        isset($fields) && isset($dfields[$fields]) or $fields = 0;
        $ip = isset($ip) ? $ip : '';
        $username = isset($username) ? $username : '';
        $fromdate = isset($fromdate) ? $fromdate : '';
        $fromtime = is_date($fromdate) ? strtotime($fromdate . ' 0:0:0') : 0;
        $todate = isset($todate) ? $todate : '';
        $totime = is_date($todate) ? strtotime($todate . ' 23:59:59') : 0;
        $fields_select = dselect($sfields, 'fields', '', $fields);
        $condition = '1';
        if ($keyword) {
            $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
        }
        if ($fromtime) {
            $condition .= " AND logtime>{$fromtime}";
示例#16
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
login();
$MOD['oauth'] or dheader('./');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
require DT_ROOT . '/include/post.func.php';
switch ($action) {
    case 'delete':
        $itemid or message();
        $U = $db->get_one("SELECT * FROM {$DT_PRE}oauth WHERE itemid={$itemid}");
        if (!$U || $U['username'] != $_username) {
            message();
        }
        $db->query("DELETE FROM {$DT_PRE}oauth WHERE itemid={$itemid}");
        dmsg($L['oauth_quit'], '?action=index');
        break;
    default:
        $lists = array();
        $result = $db->query("SELECT * FROM {$DT_PRE}oauth WHERE username='******'");
        while ($r = $db->fetch_array($result)) {
            $r['adddate'] = timetodate($r['addtime'], 5);
            $r['logindate'] = timetodate($r['logintime'], 5);
            $r['nickname'] or $r['nickname'] = '-';
            $lists[$r['site']] = $r;
        }
        $OAUTH = cache_read('oauth.php');
        $head_title = $L['oauth_title'];
        break;
}
include template('oauth', $module);
示例#17
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
login();
require DT_ROOT . '/module/' . $module . '/common.inc.php';
require DT_ROOT . '/include/post.func.php';
isset($item) or message();
$names = $L['type_names'];
isset($names[$item]) or message();
require DT_ROOT . '/include/type.class.php';
$do = new dtype();
$do->item = $item . '-' . $_userid;
if ($submit) {
    if ($MG['type_limit'] && $type[0]['typename'] && count($type) > $MG['type_limit']) {
        dalert(lang($L['type_msg_limit'], array($MG['type_limit'])), 'goback');
    }
    $do->update($type);
    dmsg($L['op_update_success'], '?item=' . $item);
} else {
    $head_title = lang($L['type_title'], array($names[$item]));
    $types = $do->get_list();
    foreach ($types as $k => $v) {
        $types[$k]['style_select'] = dstyle('type[' . $v['typeid'] . '][style]', $v['style']);
    }
    $new_style = dstyle('type[0][style]');
    include template('type', $module);
}
示例#18
0
 case 'delete':
     $itemid or msg('请选择信息');
     isset($recycle) ? $do->recycle($itemid) : $do->delete($itemid);
     dmsg('删除成功', $forward);
     break;
 case 'level':
     $itemid or msg('请选择信息');
     $level = intval($level);
     $do->level($itemid, $level);
     dmsg('级别设置成功', $forward);
     break;
 case 'type':
     $itemid or msg('请选择信息');
     $typeid = intval($typeid);
     $do->type($itemid, $typeid);
     dmsg('分类设置成功', $forward);
     break;
 default:
     $sfields = array('标题', '简介', '会员名');
     $dfields = array('title', 'introduce', 'username');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     $level = isset($level) ? intval($level) : 0;
     $typeid = isset($typeid) ? intval($typeid) : 0;
     $thumb = isset($thumb) ? intval($thumb) : 0;
     $itemid or $itemid = '';
     $fields_select = dselect($sfields, 'fields', '', $fields);
     $level_select = level_select('level', '级别', $level);
     $type_select = type_select($tid, 0, 'typeid', '默认', $typeid);
     $condition = "specialid={$specialid}";
     if ($keyword) {
         $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
示例#19
0
            $setting['oauth'] = 1;
        }
        update_setting('oauth-' . $k, $v);
    }
    update_setting($moduleid, $setting);
    cache_module($moduleid);
    $ext_oauth = $setting['oauth'];
    if ($oauth['sina']['enable'] && $oauth['sina']['sync']) {
        $ext_oauth .= ',sina';
    }
    if ($oauth['qq']['enable'] && $oauth['qq']['sync']) {
        $ext_oauth .= ',qq';
    }
    $db->query("UPDATE {$DT_PRE}setting SET item_value='{$ext_oauth}' WHERE item_key='oauth' AND item='3'");
    cache_module(3);
    dmsg('更新成功', '?moduleid=' . $moduleid . '&file=' . $file . '&tab=' . $tab);
} else {
    extract(dhtmlspecialchars($MOD));
    cache_pay();
    $P = cache_read('pay.php');
    extract($P);
    cache_oauth();
    $O = cache_read('oauth.php');
    extract($O);
    $tenpay['keycode'] = pass_encode($tenpay['keycode']);
    $weixin['keycode'] = pass_encode($weixin['keycode']);
    $alipay['keycode'] = pass_encode($alipay['keycode']);
    $chinabank['keycode'] = pass_encode($chinabank['keycode']);
    $yeepay['keycode'] = pass_encode($yeepay['keycode']);
    $paypal['keycode'] = pass_encode($paypal['keycode']);
    $uc_dbpwd = pass_encode($uc_dbpwd);
示例#20
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
$menus = array(array('一键登录', '?moduleid=' . $moduleid . '&file=' . $file), array('接口设置', '?moduleid=' . $moduleid . '&file=setting&tab=5'));
switch ($action) {
    case 'delete':
        $itemid or msg('请选择记录');
        $itemids = is_array($itemid) ? implode(',', $itemid) : $itemid;
        $db->query("DELETE FROM {$DT_PRE}oauth WHERE itemid IN ({$itemids})");
        dmsg('解除成功', $forward);
        break;
    default:
        $OAUTH = cache_read('oauth.php');
        $sfields = array('按条件', '会员名', '昵称', '平台', '头像', '网址');
        $dfields = array('username', 'username', 'nickname', 'site', 'avatar', 'url');
        $sorder = array('结果排序方式', '绑定时间降序', '绑定时间升序', '登录时间降序', '登录时间升序', '登录次数降序', '登录次数升序');
        $dorder = array('itemid DESC', 'addtime DESC', 'addtime ASC', 'logintime DESC', 'logintime ASC', 'logintimes DESC', 'logintimes ASC');
        isset($fields) && isset($dfields[$fields]) or $fields = 0;
        isset($site) or $site = '';
        isset($order) && isset($dorder[$order]) or $order = 0;
        $thumb = isset($thumb) ? intval($thumb) : 0;
        $link = isset($link) ? intval($link) : 0;
        $fields_select = dselect($sfields, 'fields', '', $fields);
        $order_select = dselect($sorder, 'order', '', $order);
        $condition = '1';
        if ($keyword) {
            $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
        }
        if ($site) {
            $condition .= " AND site='{$site}'";
        }
示例#21
0
                $to_year = $next_year + $year - 1;
            } else {
                $to_month = $months % 12;
                $to_year = $next_year + $year;
            }
            $totime = strtotime($to_year . '-' . $to_month . '-1');
            $status = $EXT['spread_check'] ? 2 : 3;
            if ($currency == 'money') {
                money_add($_username, -$amount);
                money_record($_username, -$amount, $L['in_site'], 'system', $MODULE[$mid]['name'] . $L['spread_title'], $word . '(' . $L['spread_infoid'] . $buy_tid . ')');
            } else {
                credit_add($_username, -$amount);
                credit_record($_username, -$amount, 'system', $MODULE[$mid]['name'] . $L['spread_title'], $word . '(ID:' . $buy_tid . ')');
            }
            $db->query("INSERT INTO {$DT_PRE}spread (mid,tid,word,price,currency,company,username,addtime,fromtime,totime,status) VALUES ('{$mid}','{$buy_tid}','{$word}','{$buy_price}','{$currency}','{$_company}','{$_username}','{$DT_TIME}','{$next_time}','{$totime}','{$status}')");
            dmsg($L['spread_msg_success'], '?status=' . $status);
        } else {
            //
        }
    } else {
        dheader($EXT['spread_url']);
    }
} else {
    $status = isset($status) ? intval($status) : 3;
    in_array($status, array(2, 3)) or $status = 3;
    $condition = "username='******' AND status={$status}";
    $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}spread WHERE {$condition}");
    $pages = pages($r['num'], $page, $pagesize);
    $lists = array();
    $result = $db->query("SELECT * FROM {$DT_PRE}spread WHERE {$condition} ORDER BY itemid DESC LIMIT {$offset},{$pagesize}");
    while ($r = $db->fetch_array($result)) {
示例#22
0
            extract($r);
            $head_title = $L['style_title_buy'];
        }
    } else {
        if ($r['fee']) {
            dheader('?action=buy&itemid=' . $itemid);
        }
        $c = $db->get_one("SELECT skin FROM {$DT_PRE}company WHERE userid={$_userid}");
        $c['skin'] or $c['skin'] = 'default';
        $o = $db->get_one("SELECT itemid FROM {$DT_PRE}style WHERE skin='{$c['skin']}'");
        if ($o) {
            $db->query("UPDATE {$DT_PRE}style SET hits=hits-1 WHERE itemid={$o['itemid']} AND hits>1");
        }
        $db->query("UPDATE {$DT_PRE}style SET hits=hits+1 WHERE itemid={$itemid}");
        $db->query("UPDATE {$DT_PRE}company SET template='{$r['template']}',skin='{$r['skin']}',styletime=0 WHERE userid={$_userid}");
        dmsg($L['style_msg_use_success'], $forward);
    }
} else {
    if ($action == 'view') {
        $c = $db->get_one("SELECT skin FROM {$DT_PRE}company WHERE userid={$_userid}");
        $c['skin'] or $c['skin'] = 'default';
        $c['thumb'] = is_file(DT_ROOT . '/' . $MODULE[4]['moduledir'] . '/skin/' . $c['skin'] . '/thumb.gif') ? $MODULE[4]['linkurl'] . 'skin/' . $c['skin'] . '/thumb.gif' : $MODULE[4]['linkurl'] . 'image/nothumb.gif';
    } else {
        $TYPE = get_type('style', 1);
        $pagesize = 12;
        $offset = ($page - 1) * $pagesize;
        $sfields = $L['style_sfields'];
        $dfields = array('title', 'title', 'author');
        $sorder = $L['style_sorder'];
        $dorder = array('listorder desc,addtime desc', 'addtime DESC', 'addtime ASC', 'hits DESC', 'hits ASC');
        isset($fields) && isset($dfields[$fields]) or $fields = 0;
示例#23
0
     } else {
         $r = $db->get_one("SELECT * FROM {$DT_PRE}mail WHERE itemid={$itemid}");
         $r or msg();
         extract($r);
         include tpl('mail_edit', $module);
     }
     break;
 case 'delete':
     $itemid or msg();
     $db->query("DELETE FROM {$DT_PRE}mail WHERE itemid={$itemid} ");
     dmsg('删除成功', '?moduleid=' . $moduleid . '&file=' . $file);
     break;
 case 'list_delete':
     $itemid or msg();
     $db->query("DELETE FROM {$DT_PRE}mail_list WHERE itemid={$itemid} ");
     dmsg('删除成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=list');
     break;
 case 'list':
     $sfields = array('按条件', '邮件地址', '会员名');
     $dfields = array('email', 'email', 'username');
     $dstatus = array('处理中', '受理中', '已解决', '未解决');
     $sorder = array('结果排序方式', '订阅时间降序', '订阅时间升序', '更新时间降序', '更新时间升序');
     $dorder = array('itemid DESC', 'addtime DESC', 'addtime ASC', 'edittime DESC', 'edittime ASC');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1;
     isset($order) && isset($dorder[$order]) or $order = 0;
     $fields_select = dselect($sfields, 'fields', '', $fields);
     $type_select = type_select($TYPE, 1, 'typeid', '请选择分类', $typeid);
     $order_select = dselect($sorder, 'order', '', $order);
     $condition = '1';
     if ($keyword) {
示例#24
0
                 $_credit = $_credit - $MOD['credit_refresh'];
             }
         } else {
             $f++;
         }
     }
     if ($MOD['credit_refresh'] && $s) {
         $credit = $s * $MOD['credit_refresh'];
         credit_add($_username, -$credit);
         credit_record($_username, -$credit, 'system', lang($L['credit_record_refresh'], array($MOD['name'])), lang($L['refresh_total'], array($s)));
     }
     $msg = lang($L['refresh_success'], array($s));
     if ($f) {
         $msg = $msg . ' ' . lang($L['refresh_fail'], array($f));
     }
     dmsg($msg, $forward);
     break;
 default:
     $_process = $L['group_process'];
     $sorder = $L['group_orderby'];
     $dorder = array($MOD['order'], 'orders DESC', 'orders ASC', 'sales DESC', 'sales ASC', 'price DESC', 'price ASC', 'marketprice DESC', 'marketprice ASC', 'savemoney DESC', 'savemoney ASC', 'discount DESC', 'discount ASC', 'amount DESC', 'amount ASC', 'minamount DESC', 'minamount ASC', 'hits DESC', 'hits ASC');
     isset($order) && isset($dorder[$order]) or $order = 0;
     $status = isset($status) ? intval($status) : 3;
     in_array($status, array(1, 2, 3, 4)) or $status = 3;
     $process = isset($process) ? intval($process) : '-1';
     $order_select = dselect($sorder, 'order', '', $order);
     $condition = "username='******' AND status={$status}";
     if ($keyword) {
         $condition .= " AND keyword LIKE '%{$keyword}%'";
     }
     if ($catid) {
示例#25
0
         extract($item);
     }
     break;
 case 'delete':
     $MG['delete'] or message();
     $itemid or message();
     $itemids = is_array($itemid) ? $itemid : array($itemid);
     foreach ($itemids as $itemid) {
         $do->itemid = $itemid;
         $item = $do->get_one();
         if (!$item || $item['username'] != $_username) {
             message();
         }
         $do->recycle($itemid);
     }
     dmsg($L['success_delete'], $forward);
     break;
 default:
     $status = isset($status) ? intval($status) : 3;
     in_array($status, array(1, 2, 3)) or $status = 3;
     $condition = "username='******'";
     $condition .= " AND status={$status}";
     if ($keyword) {
         $condition .= " AND keyword LIKE '%{$keyword}%'";
     }
     if ($catid) {
         $condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
     }
     $timetype = strpos($MOD['order'], 'edit') === false ? 'add' : '';
     $lists = $do->get_list($condition, $MOD['order']);
     break;
示例#26
0
$menus = array(array('文件备份', '?file=patch'), array('木马扫描', '?file=scan'), array('文件校验', '?file=md5'));
$sys = array('admin', 'api', 'file', 'include', 'lang', 'module', 'skin', 'template', 'mobile', $MODULE[2]['moduledir']);
$ext = 'php|htm|css|js|jpg|gif|png';
if ($action == 'view') {
    isset($fid) or msg();
    preg_match("/^[0-9\\.\\-\\s~]{33}\$/", $fid) or msg();
    is_dir(DT_ROOT . '/file/patch/' . $fid) or msg();
    $lists = get_file(DT_ROOT . '/file/patch/' . $fid);
    include tpl('patch_view');
} else {
    if ($action == 'delete') {
        isset($fid) or msg();
        preg_match("/^[0-9\\.\\-\\s~]{33}\$/", $fid) or msg();
        is_dir(DT_ROOT . '/file/patch/' . $fid) or msg();
        dir_delete(DT_ROOT . '/file/patch/' . $fid);
        dmsg('删除成功', '?file=' . $file);
    } else {
        if ($submit) {
            is_date($fd) or $fd = timetodate($DT_TIME, 3);
            if ($fh < 0 || $fh > 23) {
                $fh = 0;
            }
            if ($fm < 0 || $fm > 59) {
                $fm = 0;
            }
            $ft = strtotime($fd . ' ' . ($fh > 9 ? $fh : '0' . $fh) . ':' . ($fm > 9 ? $fm : '0' . $fm) . ':00');
            is_date($td) or $td = timetodate($DT_TIME, 3);
            if ($th < 0 || $th > 23) {
                $th = 23;
            }
            if ($tm < 0 || $tm > 59) {
示例#27
0
    case 'recycle':
        $lists = $do->get_list('status=0' . $condition, $dorder[$order]);
        $menuid = 4;
        include tpl('index', $module);
        break;
    case 'reject':
        if ($itemid && !$psize) {
            $do->reject($itemid);
            dmsg('拒绝成功', $forward);
        } else {
            $lists = $do->get_list('status=1' . $condition, $dorder[$order]);
            $menuid = 3;
            include tpl('index', $module);
        }
        break;
    case 'check':
        if ($itemid && !$psize) {
            $do->check($itemid);
            dmsg('审核成功', $forward);
        } else {
            $lists = $do->get_list('status=2' . $condition, $dorder[$order]);
            $menuid = 2;
            include tpl('index', $module);
        }
        break;
    default:
        $lists = $do->get_list('status=3' . $condition, $dorder[$order]);
        $menuid = 1;
        include tpl('index', $module);
        break;
}
示例#28
0
        } else {
            $condition = 1;
            if ($mid) {
                $condition = "moduleid={$mid}";
            }
            $lists = $do->get_ban_list($condition);
            include tpl('comment_ban', $module);
        }
        break;
    case 'delete':
        $itemid or msg('请选择评论');
        $do->delete($itemid);
        dmsg('删除成功', $this_forward);
        break;
    case 'check':
        if ($itemid) {
            $status = $status == 3 ? 3 : 2;
            $do->check($itemid, $status);
            dmsg($status == 3 ? '审核成功' : '取消成功', $forward);
        } else {
            $lists = $do->get_list('status=2' . $condition, $dorder[$order]);
            $menuid = 1;
            include tpl('comment', $module);
        }
        break;
    default:
        $lists = $do->get_list('status=3' . $condition, $dorder[$order]);
        $menuid = 0;
        include tpl('comment', $module);
        break;
}
示例#29
0
         $fromtime = timetodate($DT_TIME, 3);
         $days = $promo_amount && $promo_type == 1 ? $promo_amount : 365;
         $totime = timetodate($DT_TIME + 86400 * $days);
         $UG = cache_read('group-' . $groupid . '.php');
         $fee = $UG['fee'];
         $pay = $fee - $amount;
         if ($promo_amount) {
             $pay = $promo_type == 1 ? 0 : $pay - $promo_amount;
         }
         include tpl('grade_edit', $module);
     }
     break;
 case 'delete':
     $itemid or msg('请选择记录');
     $do->delete($itemid);
     dmsg('删除成功', $forward);
     break;
 case 'reject':
     $status = 1;
     $lists = $do->get_list('status=' . $status . $condition, $dorder[$order]);
     include tpl('grade', $module);
     break;
 case 'check':
     $status = 2;
     $lists = $do->get_list('status=' . $status . $condition, $dorder[$order]);
     include tpl('grade', $module);
     break;
 default:
     $status = 3;
     $lists = $do->get_list('status=' . $status . $condition, $dorder[$order]);
     include tpl('grade', $module);
示例#30
0
         $r['dstatus'] = $_status[$r['status']];
         $amount += $r['amount'];
         $fee += $r['fee'];
         $cashs[] = $r;
     }
     $head_title = $L['cash_title_record'];
     break;
 case 'setting':
     $vbank = $member['vbank'];
     if ($submit && !$vbank) {
         is_payword($_username, $password) or message($L['error_payword']);
         in_array($bank, $BANKS) or message($L['cash_pass_bank']);
         $account or message($L['cash_pass_account']);
         $account = htmlspecialchars($account);
         $db->query("UPDATE {$DT_PRE}member SET bank='{$bank}',account='{$account}' WHERE username='******' ");
         dmsg($L['op_set_success'], $MOD['linkurl'] . 'cash.php');
     } else {
         $bank_select = '<select name="bank"><option value="">' . $L['choose'] . '</option>';
         foreach ($BANKS as $k => $v) {
             $bank_select .= '<option value="' . $v . '"' . ($v == $member['bank'] ? 'selected' : '') . '>' . $v . '</option>';
         }
         $bank_select .= '</select>';
         $head_title = $L['cash_title_setting'];
     }
     break;
 case 'confirm':
     $amount or message($L['cash_pass_amount']);
     if ($MOD['cash_min'] && $amount < $MOD['cash_min']) {
         message($L['cash_pass_amount_min'] . $MOD['cash_min']);
     }
     if ($MOD['cash_max'] && $amount > $MOD['cash_max']) {