function set($post) { global $MOD, $DT_TIME, $DT_IP, $AREA, $_username, $_userid; is_url($post['thumb']) or $post['thumb'] = ''; is_url($post['thumb1']) or $post['thumb1'] = ''; is_url($post['thumb2']) or $post['thumb2'] = ''; $post['filepath'] = isset($post['filepath']) && is_filepath($post['filepath']) ? file_vname($post['filepath']) : ''; $post['editor'] = $_username; $post['islink'] = isset($post['islink']) ? 1 : 0; $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME; $post['adddate'] = timetodate($post['addtime'], 3); $post['edittime'] = $DT_TIME; $post['editdate'] = timetodate($post['edittime'], 3); $post['totime'] = $post['totime'] ? strtotime($post['totime'] . ' 23:59:59') : 0; $post['fee'] = dround($post['fee']); $post['content'] = stripslashes($post['content']); $post['content'] = save_local($post['content']); if ($MOD['clear_link']) { $post['content'] = clear_link($post['content']); } if ($MOD['save_remotepic']) { $post['content'] = save_remote($post['content']); } if ($MOD['introduce_length']) { $post['introduce'] = addslashes(get_intro($post['content'], $MOD['introduce_length'])); } if ($this->itemid) { $new = $post['content']; if ($post['thumb']) { $new .= '<img src="' . $post['thumb'] . '"/>'; } if ($post['thumb1']) { $new .= '<img src="' . $post['thumb1'] . '"/>'; } if ($post['thumb2']) { $new .= '<img src="' . $post['thumb2'] . '"/>'; } $r = $this->get_one(); $old = $r['content']; if ($r['thumb']) { $old .= '<img src="' . $r['thumb'] . '"/>'; } if ($r['thumb1']) { $old .= '<img src="' . $r['thumb1'] . '"/>'; } if ($r['thumb2']) { $old .= '<img src="' . $r['thumb2'] . '"/>'; } delete_diff($new, $old); } else { $post['ip'] = $DT_IP; } $content = $post['content']; unset($post['content']); $post = dhtmlspecialchars($post); $post['content'] = addslashes(dsafe($content)); return array_map("trim", $post); }
function set($post) { global $MOD, $DT_TIME, $DT_IP, $_username, $_userid; is_url($post['thumb']) or $post['thumb'] = ''; $post['filepath'] = isset($post['filepath']) && is_filepath($post['filepath']) ? file_vname($post['filepath']) : ''; $post['islink'] = isset($post['islink']) ? 1 : 0; $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME; $post['edittime'] = $DT_TIME; $post['fee'] = dround($post['fee']); $post['content'] = stripslashes($post['content']); $post['content'] = save_local($post['content']); if ($post['content'] && isset($post['clear_link']) && $post['clear_link']) { $post['content'] = clear_link($post['content']); } if ($post['content'] && isset($post['save_remotepic']) && $post['save_remotepic']) { $post['content'] = save_remote($post['content']); } if ($post['content'] && $post['thumb_no'] && !$post['thumb']) { $post['thumb'] = save_thumb($post['content'], $post['thumb_no'], $MOD['thumb_width'], $MOD['thumb_height']); } if (strpos($post['content'], 'pagebreak') !== false) { $post['content'] = str_replace(array('<hr class="de-pagebreak" /></p>', '<p><hr class="de-pagebreak" />', '<hr class="de-pagebreak" /></div>', '<div><hr class="de-pagebreak" />'), array('</p><hr class="de-pagebreak" />', '<hr class="de-pagebreak" /><p>', '</div><hr class="de-pagebreak" />', '<hr class="de-pagebreak" /><div>'), $post['content']); } if ($post['content'] && !$post['introduce'] && $post['introduce_length']) { $post['introduce'] = addslashes(get_intro($post['content'], $post['introduce_length'])); } if ($this->itemid) { $post['editor'] = $_username; $new = $post['content']; if ($post['thumb']) { $new .= '<img src="' . $post['thumb'] . '"/>'; } $r = $this->get_one(); $old = $r['content']; if ($r['thumb']) { $old .= '<img src="' . $r['thumb'] . '"/>'; } delete_diff($new, $old); } else { $post['username'] = $post['editor'] = $_username; $post['ip'] = $DT_IP; } $content = $post['content']; unset($post['content']); $post = dhtmlspecialchars($post); $post['content'] = addslashes(dsafe($content)); return array_map("trim", $post); }
function set($post) { global $MOD, $DT_TIME, $DT_IP, $_username, $_userid; $post['filepath'] = isset($post['filepath']) && is_filepath($post['filepath']) ? file_vname($post['filepath']) : ''; $post['editor'] = $_username; $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME; $post['edittime'] = $DT_TIME; $post['fee'] = dround($post['fee']); $post['video'] = fix_link($post['video']); $post['video_width'] = intval($post['video_width']); $post['video_height'] = intval($post['video_height']); $post['content'] = stripslashes($post['content']); $post['content'] = save_local($post['content']); if ($MOD['clear_link']) { $post['content'] = clear_link($post['content']); } if ($MOD['save_remotepic']) { $post['content'] = save_remote($post['content']); } if ($MOD['introduce_length']) { $post['introduce'] = addslashes(get_intro($post['content'], $MOD['introduce_length'])); } if ($this->itemid) { $new = $post['content']; if ($post['thumb']) { $new .= '<img src="' . $post['thumb'] . '"/>'; } $r = $this->get_one(); $old = $r['content']; if ($r['thumb']) { $old .= '<img src="' . $r['thumb'] . '"/>'; } delete_diff($new, $old); if ($r['video'] != $post['video']) { delete_upload($r['video'], match_userid($r['video'])); } } else { $post['ip'] = $DT_IP; } $content = $post['content']; unset($post['content']); $post = dhtmlspecialchars($post); $post['content'] = addslashes(dsafe($content)); return array_map("trim", $post); }
function set($post) { global $MOD, $DT_TIME, $DT_IP, $TYPE, $_username, $_userid; $post['filepath'] = isset($post['filepath']) && is_filepath($post['filepath']) ? file_vname($post['filepath']) : ''; $post['editor'] = $_username; $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME; $post['adddate'] = timetodate($post['addtime'], 3); $post['edittime'] = $DT_TIME; $post['editdate'] = timetodate($post['edittime'], 3); $post['totime'] = $post['totime'] ? strtotime($post['totime'] . ' 23:59:59') : 0; $post['fee'] = dround($post['fee']); $post['total'] = intval($post['total']); $post['minsalary'] = intval($post['minsalary']); $post['maxsalary'] = intval($post['maxsalary']); $post['type'] = intval($post['type']); $post['gender'] = intval($post['gender']); $post['education'] = intval($post['education']); $post['experience'] = intval($post['experience']); $post['minage'] = intval($post['minage']); $post['maxage'] = intval($post['maxage']); $post['content'] = stripslashes($post['content']); $post['content'] = save_local($post['content']); if ($MOD['clear_link']) { $post['content'] = clear_link($post['content']); } if ($MOD['save_remotepic']) { $post['content'] = save_remote($post['content']); } if ($MOD['introduce_length']) { $post['introduce'] = addslashes(get_intro($post['content'], $MOD['introduce_length'])); } if ($this->itemid) { $new = $post['content']; $r = $this->get_one(); $old = $r['content']; delete_diff($new, $old); } else { $post['ip'] = $DT_IP; } $content = $post['content']; unset($post['content']); $post = dhtmlspecialchars($post); $post['content'] = addslashes(dsafe($content)); return array_map("trim", $post); }
function itemurl($item, $page = 0) { global $DT, $MOD, $L; if ($MOD['show_html'] && $item['filepath']) { if ($page === 0) { return $item['filepath']; } $ext = file_ext($item['filepath']); return str_replace('.' . $ext, '_' . $page . '.' . $ext, $item['filepath']); } include DT_ROOT . '/api/url.inc.php'; $file_ext = $DT['file_ext']; $index = $DT['index']; $itemid = $item['itemid']; $title = file_vname($item['title']); $addtime = $item['addtime']; $catid = $item['catid']; $year = date('Y', $addtime); $month = date('m', $addtime); $day = date('d', $addtime); $prefix = $MOD['htm_item_prefix']; $urlid = $MOD['show_html'] ? $MOD['htm_item_urlid'] : $MOD['php_item_urlid']; $ext = $MOD['show_html'] ? 'htm' : 'php'; $alloc = dalloc($itemid); $url = $urls[$ext]['item'][$urlid]; $url = $page ? $url['page'] : $url['index']; if (strpos($url, 'cat') !== false && $catid) { $cate = get_cat($catid); $catdir = $cate['catdir']; $catname = $cate['catname']; } eval("\$itemurl = \"{$url}\";"); if (substr($itemurl, 0, 1) == '/') { $itemurl = substr($itemurl, 1); } return $itemurl; }
$fileurl = str_replace($DT['remote_url'], $MIRROR[$mirror]['url'], $fileurl); } dheader($fileurl); } } else { dalert($L['not_mirror'], $linkurl); } } else { if ($local) { if ($MOD['upload'] && filesize($localfile) < $MOD['readsize'] * 1024 * 1024) { $ext = file_ext($localfile); if (!in_array($ext, explode('|', $MOD['upload'])) || in_array($ext, array('php', 'sql')) || strpos($localfile, './') !== false) { dheader($fileurl); } //Safe $title = file_vname($title); $title or dheader($fileurl); if (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== false) { $title = convert($title, DT_CHARSET, 'UTF-8'); } if (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false) { $title = str_replace(' ', '_', $title); } if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) { $title = convert($title, DT_CHARSET, 'GBK'); } $title or dheader($fileurl); file_down($localfile, $title . '.' . $ext); } else { dheader($fileurl); }
<?php defined('IN_DESTOON') or exit('Access Denied'); if ($DT_BOT) { dhttp(403); } require DT_ROOT . '/module/' . $module . '/common.inc.php'; $data = "[InternetShortcut]\r\n"; $data .= "URL=" . DT_PATH . "?from=desktop\r\n"; $data .= "IconFile=" . DT_PATH . "favicon.ico\r\n"; $data .= "IconIndex=1"; $file = file_vname($DT['sitename'] . '.url'); $file = convert($file, DT_CHARSET, 'GBK'); file_down('', $file, $data);
<?php require '../common.inc.php'; if ($DT_BOT) { dhttp(403); } $url = DT_PATH . '?from=desktop'; $ico = DT_PATH . 'favicon.ico'; $name = $DT['sitename']; if ($itemid) { $t = $db->get_one("SELECT company,linkurl,catid FROM {$DT_PRE}company WHERE userid={$itemid}"); if ($t && $t['catid']) { $url = $t['linkurl']; $ico = ''; $name = $t['company']; } } $data = "[InternetShortcut]\r\n"; $data .= "URL=" . $url . "\r\n"; if ($ico) { $data .= "IconFile=" . $ico . "\r\n"; } $data .= "IconIndex=1"; $file = file_vname($name . '.url'); $file = convert($file, DT_CHARSET, 'GBK'); file_down('', $file, $data);
$mail['filename'] = $tmp; $mail['filesize'] = round(filesize($mailfile) / 1024, 2); $mail['mtime'] = timetodate(filemtime($mailfile), 5); $mail['count'] = substr_count(file_get($mailfile), "\n") + 1; $mails[] = $mail; } } include tpl('sendmail_list', $module); break; case 'make': if (isset($make)) { if (isset($first)) { $tb or $tb = $DT_PRE . 'member'; $num or $num = 1000; $sql or $sql = 'groupid>4'; $title = $title ? file_vname('-' . $title) : ''; $random = strtolower(random(10)); $item = array(); $item['tb'] = $tb; $item['num'] = $num; $item['sql'] = $sql; $item['title'] = $title; $item['random'] = $random; cache_write('mail-list-' . $_userid . '.php', $item); } else { $item = cache_read('mail-list-' . $_userid . '.php'); $item or msg(); extract($item); } $pagesize = $num; $offset = ($page - 1) * $pagesize;
function set($post) { global $MOD, $DT_TIME, $DT_IP, $_username, $_userid; is_url($post['thumb']) or $post['thumb'] = ''; is_url($post['thumb1']) or $post['thumb1'] = ''; is_url($post['thumb2']) or $post['thumb2'] = ''; $post['filepath'] = isset($post['filepath']) && is_filepath($post['filepath']) ? file_vname($post['filepath']) : ''; $post['editor'] = $_username; $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME; $post['adddate'] = timetodate($post['addtime'], 3); $post['edittime'] = $DT_TIME; $post['editdate'] = timetodate($post['edittime'], 3); $post['fee'] = dround($post['fee']); $post['step']['a1'] = intval($post['step']['a1']); $post['step']['p1'] = dround($post['step']['p1'], 2, 1); $post['step']['a2'] = intval($post['step']['a2']); $post['step']['p2'] = dround($post['step']['p2'], 2, 1); $post['step']['a3'] = intval($post['step']['a3']); $post['step']['p3'] = dround($post['step']['p3'], 2, 1); $post['price'] = $post['step']['p1']; if ($post['step']['a2'] && $post['step']['a2'] <= $post['step']['a1'] || $post['step']['p2'] && $post['step']['p2'] >= $post['step']['p1']) { $post['step']['a2'] = $post['step']['a3'] = $post['step']['p2'] = $post['step']['p3'] = 0; } if ($post['step']['a3'] && $post['step']['a3'] <= $post['step']['a2'] || $post['step']['p3'] && $post['step']['p3'] >= $post['step']['p2']) { $post['step']['a3'] = $post['step']['p3'] = 0; } $post['step']['is'] = $post['step']['a2'] ? 'Y' : 'N'; count($post['step'] == 7) or exit; $post['amount'] = intval($post['amount']); $post['mycatid'] = intval($post['mycatid']); $post['elite'] = $post['elite'] ? 1 : 0; if (strpos($post['v1'], '|') === false) { $post['n1'] = $post['v1'] = ''; } if (strpos($post['v2'], '|') === false) { $post['n2'] = $post['v2'] = ''; } if (strpos($post['v3'], '|') === false) { $post['n3'] = $post['v3'] = ''; } $post['express_1'] = intval($post['express_1']); $post['fee_start_1'] = dround($post['fee_start_1']); $post['fee_step_1'] = dround($post['fee_step_1']); $post['express_2'] = intval($post['express_2']); $post['fee_start_2'] = dround($post['fee_start_2']); $post['fee_step_2'] = dround($post['fee_step_2']); $post['express_3'] = intval($post['express_3']); $post['fee_start_3'] = dround($post['fee_start_3']); $post['fee_step_3'] = dround($post['fee_step_3']); $post['cod'] = intval($post['cod']); $post['content'] = stripslashes($post['content']); $post['content'] = save_local($post['content']); if ($MOD['clear_link']) { $post['content'] = clear_link($post['content']); } if ($MOD['save_remotepic']) { $post['content'] = save_remote($post['content']); } if ($MOD['introduce_length']) { $post['introduce'] = addslashes(get_intro($post['content'], $MOD['introduce_length'])); } if ($this->itemid) { $new = $post['content']; if ($post['thumb']) { $new .= '<img src="' . $post['thumb'] . '"/>'; } if ($post['thumb1']) { $new .= '<img src="' . $post['thumb1'] . '"/>'; } if ($post['thumb2']) { $new .= '<img src="' . $post['thumb2'] . '"/>'; } $r = $this->get_one(); $old = $r['content']; if ($r['thumb']) { $old .= '<img src="' . $r['thumb'] . '"/>'; } if ($r['thumb1']) { $old .= '<img src="' . $r['thumb1'] . '"/>'; } if ($r['thumb2']) { $old .= '<img src="' . $r['thumb2'] . '"/>'; } delete_diff($new, $old); } else { $post['ip'] = $DT_IP; } $content = $post['content']; unset($post['content']); $post = dhtmlspecialchars($post); $post['step'] = serialize($post['step']); $post['content'] = addslashes(dsafe($content)); return array_map("trim", $post); }