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 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); }