<?php /* [Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com This is NOT a freeware, use is subject to license.txt */ defined('DT_ADMIN') or exit('Access Denied'); isset($item) or msg(); require DT_ROOT . '/include/module.func.php'; require DT_ROOT . '/include/type.class.php'; $forward = '?file=' . $file . '&item=' . $item; $do = new dtype(); $do->item = $item; $do->cache = 1; $TYPE = $do->get_list(); if ($submit) { $do->update($post); dmsg('更新成功', $forward); } else { $types = $TYPE; $parent_option = '<option value="0">上级分类</option>' . $do->parent_option($TYPE); $parent_select = '<select name="post[0][parentid]">' . $parent_option . '</select>'; foreach ($types as $k => $v) { $types[$k]['style_select'] = dstyle('post[' . $v['typeid'] . '][style]', $v['style']); $types[$k]['parent_select'] = '<select name="post[' . $v['typeid'] . '][parentid]">' . str_replace('"' . $v['parentid'] . '"', '"' . $v['parentid'] . '" selected', $parent_option) . '</select>'; } $new_style = dstyle('post[0][style]'); $lists = sort_type($types); include tpl('type'); }
$_TYPE = get_type('product-' . $userid); $head_name = $L['com_type_sell']; } else { if ($item == 'mall') { $_TYPE = get_type('mall-' . $userid); $head_name = $L['com_type_mall']; } else { if ($item == 'news') { $_TYPE = get_type('news-' . $userid); $head_name = $L['com_type_news']; } else { dheader($HURL); } } } $_TP = $_TYPE ? sort_type($_TYPE) : array(); $head_title = $head_name . $DT['seo_delimiter'] . $head_title; $back_link = $HURL . '&action=' . $item; include template('homepage-' . $action, 'mobile'); break; case 'mall': $moduleid = 16; break; case 'sell': $moduleid = 5; break; case 'buy': isset($_MENU[$action]) or dheader($HURL); $could_buy = check_group($_groupid, $MOD['group_buy']); if ($username == $_username) { $could_buy = true;
<?php defined('IN_DESTOON') or exit('Access Denied'); require DT_ROOT . '/module/' . $module . '/common.inc.php'; $MOD['vote_enable'] or dheader(DT_PATH); require DT_ROOT . '/include/post.func.php'; $ext = 'vote'; $url = $EXT[$ext . '_url']; $TYPE = get_type($ext, 1); $_TP = sort_type($TYPE); require MD_ROOT . '/' . $ext . '.class.php'; $do = new $ext(); $typeid = isset($typeid) ? intval($typeid) : 0; $destoon_task = rand_task(); if ($itemid) { $do->itemid = $itemid; $item = $do->get_one(); $item or dheader($url); extract($item); if ($submit) { if ($verify == 1) { captcha($captcha, 1); } if ($verify == 2) { question($answer, 1); } $could_vote = true; $condition = $_username ? "AND username='******'" : "AND ip='{$DT_IP}'"; $r = $db->get_one("SELECT rid FROM {$DT_PRE}vote_record WHERE itemid={$itemid} {$condition}"); if ($r) { $could_vote = false;