<?php /* [Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com This is NOT a freeware, use is subject to license.txt */ define('DT_MOBILE', true); require substr(str_replace("\\", '/', dirname(__FILE__)), 0, -7) . '/common.inc.php'; if (DT_CHARSET != 'UTF-8') { header("Content-type:text/html; charset=utf-8"); } require DT_ROOT . '/mobile/include/global.func.php'; include load('mobile.lang'); $EXT['mobile_enable'] or mobile_msg($L['msg_mobile_close']); $UA = strtoupper($_SERVER['HTTP_USER_AGENT']); if (strpos($UA, 'WINDOWS NT') !== false && !DT_DEBUG) { dheader($EXT['mobile_url'] . 'mobile.php?action=device'); } $_mobile = get_cookie('mobile'); if ($_mobile == '' || $_mobile == 'pc') { set_cookie('mobile', 'touch', $DT_TIME + 30 * 86400); } $back_link = $head_link = $head_name = ''; $mobile_modules = array('member', 'sell', 'buy', 'quote', 'company', 'exhibit', 'article', 'info', 'job', 'know', 'brand', 'mall', 'group', 'video', 'photo', 'club'); $pages = ''; $areaid = isset($areaid) ? intval($areaid) : 0; $site_name = $head_title = $EXT['mobile_sitename'] ? $EXT['mobile_sitename'] : $DT['sitename'] . $L['mobile_version']; $kw = $kw ? strip_kw(decrypt($kw, DT_KEY . 'KW')) : ''; if (strlen($kw) < $DT['min_kw'] || strlen($kw) > $DT['max_kw']) { $kw = ''; }
require 'common.inc.php'; mobile_login(); $addr = array(); $addr_id = intval(get_cookie('addr_id')); $addr_url = 'address.php?auth=' . encrypt($DT_URL, DT_KEY . 'ADDR'); if ($addr_id) { $t = $db->get_one("SELECT * FROM {$DT_PRE}address WHERE itemid={$addr_id}"); if ($t && $t['username'] == $_username) { $addr = $t; } } if (!$addr) { $addr = $db->get_one("SELECT * FROM {$DT_PRE}address WHERE username='******' ORDER BY listorder ASC,itemid ASC"); } if (!$addr) { mobile_msg($L['msg_no_address'], $addr_url); } if ($addr['areaid']) { $addr['address'] = area_pos($addr['areaid'], '') . $addr['address']; } $need_addr = 1; $order_name = 'trade'; require DT_ROOT . '/module/' . $module . '/common.inc.php'; require DT_ROOT . '/include/post.func.php'; require DT_ROOT . '/module/' . $module . '/cart.class.php'; include load('misc.lang'); include load('member.lang'); include load('order.lang'); $back_link = mobileurl($moduleid, 0, $itemid); $head_name = $L['cart_title']; $head_title = $head_name . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title;
$data = '<div class="main"><div style="padding:40px 0;text-align:center;">' . $L['chat_empty'] . '</div></div>'; } exit(convert($data, DT_CHARSET, 'UTF-8')); break; default: if (isset($touser) && check_name($touser)) { if ($touser == $_username) { mobile_msg($L['chat_msg_self'], '?action=index'); } $MG['chat'] or mobile_msg($L['chat_msg_no_rights']); $user = userinfo($touser); $user or mobile_msg($L['chat_msg_user'], '?action=index'); if ($user['black']) { $black = explode(' ', $user['black']); if (in_array($_username, $black)) { mobile_msg($L['chat_msg_refuse'], '?action=index'); } } $online = online($user['userid']); $chatid = get_chat_id($_username, $touser); $chat_id = $chatid; $head_name = lang($L['chat_with'], array($user['username'])); $head_title = $head_name . $DT['seo_delimiter'] . $head_title; $forward = is_url($forward) ? addslashes(dhtmlspecialchars($forward)) : ''; if (strpos($forward, $MOD['linkurl']) !== false) { $forward = ''; } $chat = $db->get_one("SELECT * FROM {$table} WHERE chatid='{$chatid}'"); if ($chat) { $db->query("UPDATE {$table} SET forward='{$forward}' WHERE chatid='{$chatid}'"); } else {
if ($feedback) { $do->feedback(); } } } else { if ($status == 2 || $status == 1) { if ($fromuser != $_username) { mobile_msg($L['msg_no_right']); } } } $adddate = timetodate($addtime, 5); $head_name = $L['message_detail']; $head_title = $title . $DT['seo_delimiter'] . $L['message_title'] . $DT['seo_delimiter'] . $head_title; } else { mobile_msg($L['not_message']); } break; default: $TYPE = $L['message_type']; $typeid = isset($typeid) ? intval($typeid) : -1; $lists = array(); if ($_userid) { $condition = "touser='******' AND status=3"; if ($typeid != -1) { $condition .= " AND typeid={$typeid}"; } if ($keyword) { $condition .= " AND title LIKE '%{$keyword}%'"; } $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}message WHERE {$condition}");
<?php require 'common.inc.php'; if (strpos($_SERVER['QUERY_STRING'], '404;') !== false) { $DT_URL = str_replace('404;', '', $_SERVER['QUERY_STRING']); $DT_URL = str_replace(':80', '', $DT_URL); } if ($DT['log_404'] && strpos($DT_URL, '/404.php') === false) { require DT_ROOT . '/file/config/robot.inc.php'; $url = addslashes(dhtmlspecialchars($DT_URL)); $refer = addslashes(dhtmlspecialchars($DT_REF)); $time = $DT_TIME - 86400; $r = $db->get_one("SELECT itemid FROM {$DT_PRE}404 WHERE addtime>{$time} AND url='{$url}'"); if (!$r) { $db->query("INSERT INTO {$DT_PRE}404 (url,refer,robot,username,ip,addtime) VALUES ('{$url}','{$refer}','" . get_robot() . "','{$_username}','{$DT_IP}','{$DT_TIME}')"); } } dhttp(404, $DT_BOT); mobile_msg('404 Not Found');
$r = $do->get_one(); if (!$r || $r['username'] != $_username) { exit('ko'); } set_cookie('addr_id', $itemid, $DT_TIME + 86400 * 30); exit('ok'); break; default: $auth = isset($auth) ? decrypt($auth, DT_KEY . 'ADDR') : ''; if ($auth) { $back_link = $auth; set_cookie('addr_back', $back_link); } else { $back_link = get_cookie('addr_back'); } $back_link or mobile_msg($L['address_expire'], 'index.php?reload=' . $DT_TIME); $cancel_url = 'channel.php'; if (strpos($back_link, 'cart.php') !== false || strpos($back_link, 'mall') !== false) { $cancel_url = mobileurl(16); } else { if (strpos($back_link, 'group') !== false) { $cancel_url = mobileurl(17); } else { if (strpos($back_link, 'moduleid=5') !== false) { $cancel_url = mobileurl(5); } } } $condition = "username='******'"; $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}address WHERE {$condition}"); $items = $r['num'];
mobile_msg($L['post_too_many']); } if ($MG['day_limit']) { $today = $today_endtime - 86400; $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE {$sql} AND addtime>{$today}"); if ($r && $r['num'] >= $MG['day_limit']) { mobile_msg($L['post_too_many_today']); } } if ($MG['club_free_limit'] >= 0) { $fee_add = $MOD['fee_add'] && (!$MOD['fee_mode'] || !$MG['fee_mode']) && $limit_used >= $MG['club_free_limit'] && $_userid ? dround($MOD['fee_add']) : 0; } else { $fee_add = 0; } if ($fee_add) { mobile_msg($L['post_msg_fee'] . '<a href="' . $MODULE[2]['linkurl'] . $DT['file_my'] . '?mid=' . $moduleid . '&action=add&gid=' . $gid . '" rel="external" class="b">' . $L['post_msg_advance'] . '</a>'); } $need_captcha = $MOD['captcha_add'] == 2 ? $MG['captcha'] : $MOD['captcha_add']; $need_question = $MOD['question_add'] == 2 ? $MG['question'] : $MOD['question_add']; if ($need_question) { $need_captcha = 1; } if (isset($_POST['ok'])) { $captcha = isset($captcha) ? convert(input_trim($captcha), 'UTF-8', DT_CHARSET) : ''; $msg = captcha($captcha, $need_captcha, true); if ($msg) { exit('captcha'); } $post = array(); $post['gid'] = $GRP['itemid']; $post['catid'] = $GRP['catid'];
$itemid or dheader(mobileurl($moduleid)); $_userid or dheader('login.php?forward=' . urlencode('know.php?action=' . $action . '&itemid=' . $itemid)); check_group($_groupid, $MOD['group_answer']) or mobile_msg($L['know_msg_right']); $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}"); $item && $item['status'] > 2 or mobile_msg($L['know_msg_not_question']); if ($item['process'] != 1 || $_username && $_username == $item['username']) { mobile_msg($L['know_msg_right']); } if (!$MOD['answer_repeat']) { if ($_username) { $r = $db->get_one("SELECT itemid FROM {$table_answer} WHERE username='******' AND qid={$itemid}"); } else { $r = $db->get_one("SELECT itemid FROM {$table_answer} WHERE ip='{$DT_IP}' AND qid={$itemid} AND addtime>{$DT_TIME}-86400"); } if ($r) { mobile_msg($L['know_msg_has_answered']); } } $need_captcha = $MOD['captcha_answer'] == 2 ? $MG['captcha'] : $MOD['captcha_answer']; $need_question = $MOD['question_answer'] == 2 ? $MG['question'] : $MOD['question_answer']; if ($need_question) { $need_captcha = 1; } if (isset($_POST['ok'])) { require_once DT_ROOT . '/include/post.func.php'; $captcha = isset($captcha) ? convert(input_trim($captcha), 'UTF-8', DT_CHARSET) : ''; $msg = captcha($captcha, $need_captcha, true); if ($msg) { exit('captcha'); } $content = isset($content) ? convert(input_trim(nl2br($content)), 'UTF-8', DT_CHARSET) : '';
<?php require 'common.inc.php'; if (in_array($module, $mobile_modules) && $moduleid > 4 && $itemid) { $item = $db->get_one("SELECT * FROM " . get_table($moduleid) . " WHERE itemid={$itemid}"); $item && $item['status'] > 2 or mobile_msg($L['msg_not_exist']); $linkurl = $EXT['mobile_url'] . mobileurl($moduleid, 0, $itemid); $auth = urlencode(str_replace('amp;', '', $linkurl)); } else { mobile_msg($L['share_not_support']); } $sms = 'sms:?body=' . $linkurl; if (preg_match("/(iPhone|iPod|iPad)/i", $UA)) { $sms = 'sms: &body=' . $item['title'] . $linkurl; } $foot = ''; $head_title = $L['share_title'] . $DT['seo_delimiter'] . $head_title; include template('share', 'mobile'); if (DT_CHARSET != 'UTF-8') { toutf8(); }
<?php /* [Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com This is NOT a freeware, use is subject to license.txt */ require 'common.inc.php'; $table = $DT_PRE . 'announce'; if ($itemid) { $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}"); $item or mobile_msg($L['msg_not_exist']); extract($item); $content = video5($content); $adddate = timetodate($addtime, 3); $db->query("UPDATE {$table} SET hits=hits+1 WHERE itemid={$itemid}"); $back_link = 'announce.php'; $foot = ''; $head_title = $title . $DT['seo_delimiter'] . $L['announce_title'] . $DT['seo_delimiter'] . $head_title; } else { $lists = array(); $result = $db->query("SELECT * FROM {$table} WHERE totime=0 OR totime>{$DT_TIME} ORDER BY listorder DESC,itemid DESC LIMIT 10"); while ($r = $db->fetch_array($result)) { $r['date'] = timetodate($r['addtime'], 3); $lists[] = $r; } $db->free_result($result); $back_link = 'more.php'; $foot = 'more'; $head_title = $L['announce_title'] . $DT['seo_delimiter'] . $head_title; } include template('announce', 'mobile');
$linkurl = $item['linkurl']; } else { $item = $db->get_one("SELECT title,linkurl,username,status,thumb FROM " . get_table($mid) . " WHERE itemid={$itemid}"); $item or exit; $item['status'] > 2 or mobile_msg($L['msg_not_exist']); $linkurl = $MODULE[$mid]['linkurl'] . $item['linkurl']; } $title = $item['title']; $thumb = $item['thumb']; switch ($action) { case 'user': isset($username) && check_name($username) or $username = ''; $username or mobile_msg($L['msg_not_user']); $_userid or dheader('login.php?forward=' . urlencode('comment.php?action=' . $action . '&username='******'&mid=' . $mid . '&itemid=' . $itemid)); $user = userinfo($username); $user or mobile_msg($L['msg_not_user']); $condition = "status=3 AND username='******' AND hidden=0"; $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}comment WHERE {$condition}", 'CACHE'); $items = $r['num']; $pages = mobile_pages($items, $page, $pagesize); $lists = array(); if ($items) { $result = $db->query("SELECT * FROM {$DT_PRE}comment WHERE {$condition} ORDER BY itemid DESC LIMIT {$offset},{$pagesize}"); while ($r = $db->fetch_array($result)) { $lists[] = $r; } $db->free_result($result); } $head_name = $L['comment_user']; $head_title = $head_name . $DT['seo_delimiter'] . $head_title; $foot = '';
$item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}"); $item or mobile_msg($L['not_exists']); if ($item['fromtime'] && $DT_TIME > $item['fromtime']) { mobile_msg($L['has_started']); } if ($item['totime'] && $DT_TIME > $item['totime']) { mobile_msg($L['has_expired']); } $item['status'] == 3 or mobile_msg($L['not_exists']); $item['username'] or mobile_msg($L['com_not_member']); $_username != $item['username'] or mobile_msg($L['sign_self']); $today = $today_endtime - 86400; $sql = $_userid ? "username='******'" : "addtime>{$today} AND ip='{$DT_IP}'"; $t = $db->get_one("SELECT id FROM {$table_order} WHERE id={$itemid} AND {$sql}"); if ($t) { mobile_msg($L['sign_again']); } $linkurl = mobileurl($moduleid, 0, $itemid); $need_captcha = $MOD['captcha_sign'] == 2 ? $MG['captcha'] : $MOD['captcha_sign']; $head_name = $L['sign_title']; $head_title = $head_name . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title; $foot = ''; require DT_ROOT . '/include/post.func.php'; if (isset($_POST['ok'])) { $captcha = isset($captcha) ? convert(input_trim($captcha), 'UTF-8', DT_CHARSET) : ''; $msg = captcha($captcha, $need_captcha, true); if ($msg) { exit('captcha'); } $amount = intval($amount); if ($amount < 1) {
if (is_mobile($username)) { $r = $db->get_one("SELECT username,vmobile FROM {$DT_PRE}member WHERE mobile='{$username}'"); if ($r && $r['vmobile']) { $username = $r['username']; } } } $user = $do->login($username, $password, 86400 * 365); if ($user) { if (get_cookie('weixin_openid')) { set_cookie('weixin_url', $forward); mobile_msg('', 'weixin.php?action=bind'); } mobile_msg('', $forward ? $forward : 'my.php'); } else { mobile_msg($do->errmsg); } } else { isset($username) or $username = $_username; $username or $username = get_cookie('username'); check_name($username) || is_email($username) || is_mobile($username) or $username = ''; if (strpos($forward, '://') === false) { $forward = $EXT['mobile_url'] . $forward; } $head_title = $L['member_login'] . $DT['seo_delimiter'] . $head_title; $foot = 'my'; include template('login', 'mobile'); } if (DT_CHARSET != 'UTF-8') { toutf8(); }
send_sms($post['mobile'], $message); } if ($MOD['welcome_message'] || $MOD['welcome_email']) { $title = $L['register_msg_welcome']; $content = ob_template('welcome', 'mail'); if ($MOD['welcome_message']) { send_message($username, $title, $content); } if ($MOD['welcome_email'] && $DT['mail_type'] != 'close') { send_mail($post['email'], $title, $content); } } unset($_SESSION['m_name']); unset($_SESSION['m_pass']); } mobile_msg($L['register_success'], 'my.php?reload=' . $DT_TIME); } } } $back_link = 'javascript:Dback(\'my.php\');'; break; case 'send': isset($_SESSION['m_name']) && check_name($_SESSION['m_name']) or exit('ko'); $username = $_SESSION['m_name']; if ($verify_type == 'mobile') { $t = $db->get_one("SELECT mobile,groupid FROM {$DT_PRE}member WHERE username='******'"); $t or exit('ko'); $t['groupid'] == 4 or exit('ko'); is_mobile($t['mobile']) or exit('ko'); $mobile = $t['mobile']; isset($_SESSION['mobile_send']) or $_SESSION['mobile_send'] = 0;
<?php /* [Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com This is NOT a freeware, use is subject to license.txt */ require 'common.inc.php'; $table = $DT_PRE . 'webpage'; if ($itemid) { $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}"); $item && $item['item'] == 1 or mobile_msg($L['msg_not_exist']); $_item = $item['item']; unset($item['item']); extract($item); $content = video5($content); $editdate = timetodate($edittime, 5); $db->query("UPDATE {$table} SET hits=hits+1 WHERE itemid={$itemid}"); $head_name = $title; $back_link = 'about.php'; $foot = ''; $head_title = $title . $DT['seo_delimiter'] . $L['about_title'] . $DT['seo_delimiter'] . $head_title; } else { $lists = array(); $result = $db->query("SELECT * FROM {$table} WHERE item=1 ORDER BY listorder DESC,itemid DESC LIMIT 50"); while ($r = $db->fetch_array($result)) { $lists[] = $r; } $db->free_result($result); $head_name = $L['about_title']; $back_link = 'more.php'; $foot = 'more';
$t or mobile_msg($L['msg_error']); if ($t['groupid'] == 2) { mobile_msg($L['forgot_msg_2']); } if ($t['groupid'] == 4) { mobile_msg($L['forgot_msg_4']); } if (is_email($_SESSION['f_key'])) { $email = $_SESSION['f_key']; $email == $t['email'] or mobile_msg($L['msg_error']); $type = 'email'; $head_name = $L['forgot_email_title']; $head_title = $head_name . $DT['seo_delimiter'] . $head_title; } else { $mobile = $_SESSION['f_key']; $mobile == $t['mobile'] && $t['vmobile'] or mobile_msg($L['msg_error']); $type = 'mobile'; $head_name = $L['forgot_mobile_title']; $head_title = $head_name . $DT['seo_delimiter'] . $head_title; } $back_link = '?action=user&type=' . $type; break; case 'send': isset($_SESSION['f_uid']) && isset($_SESSION['f_key']) or exit('ko'); $userid = intval($_SESSION['f_uid']); $t = $db->get_one("SELECT email,mobile,vmobile,groupid FROM {$DT_PRE}member WHERE userid='{$userid}'"); $t or exit('ko'); if ($t['groupid'] == 2 || $t['groupid'] == 4) { exit('ko'); } if (is_email($_SESSION['f_key'])) {
is_payword($_username, $password) or mobile_msg($L['not_payword']); $discount = $MG['discount'] > 0 && $MG['discount'] < 100 ? $MG['discount'] : 100; $discount = dround($discount / 100); $_fee = dround($fee * $discount); $_money >= $_fee or mobile_msg($L['need_charge']); $db->query("INSERT INTO {$DT_PRE}finance_pay (moduleid,itemid,username,fee,currency,paytime,ip,title) VALUES ('{$moduleid}','{$itemid}','{$_username}','{$fee}','{$currency}','{$DT_TIME}','{$DT_IP}','" . addslashes($title) . "')"); money_add($_username, -$fee); money_record($_username, -$fee, $L['pay_by_site'], 'system', $L['pay_info'], $note); mobile_msg($L['pay_success'], mobileurl($moduleid, 0, $itemid)); } else { $head_title = $L['pay_title'] . $DT['seo_delimiter'] . $head_title; $foot = 'channel'; include template('pay', 'mobile'); if (DT_CHARSET != 'UTF-8') { toutf8(); } } } else { if ($currency == 'credit') { if ($_credit >= $fee) { $db->query("INSERT INTO {$DT_PRE}finance_pay (moduleid,itemid,username,fee,currency,paytime,ip,title) VALUES ('{$moduleid}','{$itemid}','{$_username}','{$fee}','{$currency}','{$DT_TIME}','{$DT_IP}','" . addslashes($title) . "')"); credit_add($_username, -$fee); credit_record($_username, -$fee, 'system', $L['pay_info'], $note); dheader(mobileurl($moduleid, 0, $itemid)); } else { mobile_msg($L['need_credit']); } } else { dheader('channel.php?reload=' . $DT_TIME); } }
include DT_ROOT . '/include/update.inc.php'; $head_title = $title . $DT['seo_delimiter'] . $MOD['name'] . $DT['seo_delimiter'] . $head_title; $head_name = $CAT['catname']; $back_link = 'javascript:Dback(\'' . mobileurl($moduleid, $catid) . '\', \'' . $DT_REF . '\', \'share|comment|purchase\');'; $foot = ''; } else { if ($kw) { check_group($_groupid, $MOD['group_search']) or mobile_msg($L['msg_no_search']); } else { if ($catid) { $CAT or mobile_msg($L['msg_not_cate']); if (!check_group($_groupid, $MOD['group_list']) || !check_group($_groupid, $CAT['group_list'])) { mobile_msg($L['msg_no_right']); } } else { check_group($_groupid, $MOD['group_index']) or mobile_msg($L['msg_no_right']); } } $head_title = $MOD['name'] . $DT['seo_delimiter'] . $head_title; if ($kw) { $head_title = $kw . $DT['seo_delimiter'] . $head_title; } $condition = "status=3"; if ($keyword) { $condition .= " AND keyword LIKE '%{$keyword}%'"; } if ($catid) { $condition .= $CAT ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}"; } if ($areaid) { $condition .= $ARE['child'] ? " AND areaid IN (" . $ARE['arrchildid'] . ")" : " AND areaid={$areaid}";
$note = dhtmlspecialchars($note); $title = addslashes($item['title']); $db->query("INSERT INTO {$DT_PRE}group_order (gid,buyer,seller,title,thumb,price,number,amount,logistic,addtime,updatetime,note, buyer_postcode,buyer_address,buyer_name,buyer_phone,buyer_mobile,status) VALUES ('{$itemid}','{$_username}','{$item['username']}','{$title}','{$item['thumb']}','{$item['price']}','{$number}','{$amount}','{$item['logistic']}','{$DT_TIME}','{$DT_TIME}','{$note}','{$buyer_postcode}','{$buyer_address}','{$buyer_name}','{$buyer_phone}','{$buyer_mobile}', 6)"); $oid = $db->insert_id(); exit('ok|' . $oid); } break; case 'sell': $itemid or dheader(mobileurl($moduleid)); SELL_ORDER or dheader(mobileurl($moduleid, 0, $itemid)); $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}"); if (!$item || $item['status'] != 3 || $item['price'] < 0.01 || $item['amount'] < 1 || $item['minamount'] < 1 || !$item['unit']) { mobile_msg($L['purchase_msg_online_buy']); } if ($item['username'] == $_username) { mobile_msg($L['purchase_msg_self']); } $t = $item; if (isset($_POST['ok'])) { $buyer_postcode = addslashes($addr['postcode']); $buyer_address = addslashes($addr['address']); $buyer_name = addslashes($addr['truename']); $buyer_phone = addslashes($addr['telephone']); $buyer_mobile = addslashes($addr['mobile']); $number = intval($number); if ($number < $item['minamount']) { $number = $item['minamount']; } if ($number > $item['amount']) { $number = $item['amount']; }