Exemple #1
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $_username, $_userid;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     if ($this->itemid) {
         $post['editor'] = $_username;
         $new = '';
         if ($post['thumb']) {
             $new .= '<img src="' . $post['thumb'] . '"/>';
         }
         $r = $this->get_one();
         $old = '';
         if ($r['thumb']) {
             $old .= '<img src="' . $r['thumb'] . '"/>';
         }
         delete_diff($new, $old);
     } else {
         $post['ip'] = $DT_IP;
     }
     $post['join_type'] = $post['join_type'] ? 1 : 0;
     $post['list_type'] = $post['list_type'] ? 1 : 0;
     $post['show_type'] = $post['show_type'] ? 1 : 0;
     $post['post_type'] = $post['post_type'] ? 1 : 0;
     $post['reply_type'] = $post['reply_type'] ? 1 : 0;
     foreach (array('group_list', 'group_show', 'group_post', 'group_reply') as $v) {
         $post[$v] = isset($post[$v]) ? implode(',', $post[$v]) : '';
     }
     $post = dhtmlspecialchars($post);
     return array_map("trim", $post);
 }
Exemple #2
0
 function set($post)
 {
     global $MOD, $DT_TIME, $_username, $_userid;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     $post['editor'] = $_username;
     $post['content'] = addslashes(save_remote(save_local(stripslashes($post['content']))));
     clear_upload($post['content']);
     if ($this->itemid) {
         $new = $post['content'];
         $r = $this->get_one();
         $old = $r['content'];
         delete_diff($new, $old);
     }
     if ($post['fromtime']) {
         $post['fromtime'] = strtotime($post['fromtime'] . ' 0:0:0');
     }
     if ($post['totime']) {
         $post['totime'] = strtotime($post['totime'] . ' 23:59:59');
     }
     $post['poll_max'] = intval($post['poll_max']);
     $post['poll_page'] = intval($post['poll_page']);
     $post['poll_page'] or $post['poll_page'] = 30;
     $post['poll_cols'] = intval($post['poll_cols']);
     $post['poll_cols'] or $post['poll_cols'] = 1;
     $post['thumb_width'] = intval($post['thumb_width']);
     $post['thumb_width'] or $post['thumb_width'] = 120;
     $post['thumb_height'] = intval($post['thumb_height']);
     $post['thumb_height'] or $post['thumb_height'] = 90;
     return array_map("trim", $post);
 }
Exemple #3
0
 function set($post)
 {
     global $MOD, $DT_TIME, $_username, $_userid;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     $post['editor'] = $_username;
     $post['content'] = addslashes(save_remote(save_local(stripslashes($post['content']))));
     clear_upload($post['content']);
     if ($this->itemid) {
         $new = $post['content'];
         $r = $this->get_one();
         $old = $r['content'];
         delete_diff($new, $old);
     }
     if ($post['fromtime']) {
         $post['fromtime'] = strtotime($post['fromtime'] . ' 0:0:0');
     }
     if ($post['totime']) {
         $post['totime'] = strtotime($post['totime'] . ' 23:59:59');
     }
     $post['groupid'] = implode(',', $post['groupid']);
     $post['verify'] = intval($post['verify']);
     $post['display'] = intval($post['display']);
     return array_map("trim", $post);
 }
Exemple #4
0
 function set($post)
 {
     global $MOD, $DT_TIME, $_username, $_userid;
     $post['edittime'] = $DT_TIME;
     $post['title'] = trim($post['title']);
     $post['listorder'] = intval($post['listorder']);
     clear_upload($post['content']);
     if ($this->itemid) {
         $post['editor'] = $_username;
         $new = $post['content'];
         $r = $this->get_one();
         $old = $r['content'];
         delete_diff($new, $old);
     } else {
         $post['addtime'] = $DT_TIME;
     }
     $content = $post['content'];
     unset($post['content']);
     $post = dhtmlspecialchars($post);
     $post['content'] = dsafe($content);
     if ($MOD['page_clear'] || $MOD['page_save']) {
         $post['content'] = stripslashes($post['content']);
         $post['content'] = save_local($post['content']);
         if ($MOD['page_clear']) {
             $post['content'] = clear_link($post['content']);
         }
         if ($MOD['page_save']) {
             $post['content'] = save_remote($post['content']);
         }
         $post['content'] = addslashes($post['content']);
     }
     return array_map("trim", $post);
 }
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $_username, $_userid;
     is_url($post['banner']) or $post['banner'] = '';
     $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['cfg_photo'] = intval($post['cfg_photo']);
     $post['cfg_video'] = intval($post['cfg_video']);
     $post['cfg_type'] = intval($post['cfg_type']);
     $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 ($MOD['introduce_length']) {
         $post['introduce'] = addslashes(get_intro($post['content'], $MOD['introduce_length']));
     }
     if ($this->itemid) {
         $post['editor'] = $_username;
         $new = $post['content'];
         if ($post['thumb']) {
             $new .= '<img src="' . $post['thumb'] . '"/>';
         }
         if ($post['banner']) {
             $new .= '<img src="' . $post['banner'] . '">';
         }
         $r = $this->get_one();
         $old = $r['content'];
         if ($r['thumb']) {
             $old .= '<img src="' . $r['thumb'] . '"/>';
         }
         if ($r['banner']) {
             $old .= '<img src="' . $r['banner'] . '">';
         }
         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;
     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, $_username, $_userid;
     $post['islink'] = isset($post['islink']) ? 1 : 0;
     $post['edittime'] = $DT_TIME;
     $post['editor'] = $_username;
     $post['content'] = addslashes(save_remote(save_local(stripslashes($post['content']))));
     clear_upload($post['content']);
     if ($this->itemid) {
         $new = $post['content'];
         $r = $this->get_one();
         $old = $r['content'];
         delete_diff($new, $old);
     }
     return array_map("trim", $post);
 }
Exemple #8
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $_username, $_userid;
     $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(trim($post['video']));
     $post['video_width'] = intval($post['video_width']);
     $post['video_height'] = intval($post['video_height']);
     $post['title'] = trim($post['title']);
     $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);
 }
Exemple #9
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $_username, $_userid;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     $post['title'] = trim($post['title']);
     $post['credit'] = intval($post['credit']);
     $post['fee'] = dround($post['fee']);
     $post['hidden'] = isset($post['hidden']) && $post['hidden'] ? 1 : 0;
     $post['editor'] = $_username;
     $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);
     } else {
         $post['aid'] = 0;
         $post['totime'] = $DT_TIME + $MOD['overdays'] * 86400;
         $post['process'] = 1;
         $post['ip'] = $DT_IP;
     }
     $content = $post['content'];
     unset($post['content']);
     $post = dhtmlspecialchars($post);
     $post['content'] = addslashes(dsafe($content));
     return array_map("trim", $post);
 }
Exemple #10
0
 function set($post)
 {
     global $MOD, $DT_TIME, $_username, $_userid;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     $post['content'] = addslashes(save_remote(save_local(stripslashes($post['content']))));
     $post['introduce'] = addslashes(get_intro($post['content'], 120));
     $post['passport'] = addslashes(get_user($post['username'], 'username', 'passport'));
     if ($this->itemid) {
         $post['editor'] = $_username;
         $new = $post['content'];
         $r = $this->get_one();
         $old = $r['content'];
         delete_diff($new, $old);
     }
     $content = $post['content'];
     unset($post['content']);
     $post = dhtmlspecialchars($post);
     $post['content'] = addslashes(dsafe($content));
     clear_upload($post['content']);
     return array_map("trim", $post);
 }
Exemple #11
0
 function set($post)
 {
     global $DT_TIME, $_username;
     $post['status'] = $post['status'] == 3 ? 3 : 2;
     if ($this->itemid) {
         $post['edittime'] = $DT_TIME;
         $post['editor'] = $_username;
         $new = $post['content'];
         $r = $this->get_one();
         $old = $r['content'];
         delete_diff($new, $old);
     } else {
         $post['addtime'] = $DT_TIME;
     }
     $content = $post['content'];
     unset($post['content']);
     $post = dhtmlspecialchars($post);
     $post['content'] = dsafe($content);
     $post['content'] = addslashes(save_remote(save_local(stripslashes($post['content']))));
     clear_upload($post['content']);
     return array_map("trim", $post);
 }
Exemple #12
0
 function set($post)
 {
     global $MOD, $DT_TIME, $_username, $_userid;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? datetotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     $post['fromtime'] = datetotime($post['fromtime'] . ' 00:00:00');
     $post['totime'] = $post['totime'] ? datetotime($post['totime'] . ' 23:59:59') : 0;
     $post['title'] = trim($post['title']);
     clear_upload($post['content'] . $post['thumb']);
     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);
     }
     $content = $post['content'];
     unset($post['content']);
     $post = dhtmlspecialchars($post);
     $post['content'] = dsafe($content);
     if ($MOD['credit_clear'] || $MOD['credit_save']) {
         $post['content'] = stripslashes($post['content']);
         $post['content'] = save_local($post['content']);
         if ($MOD['credit_clear']) {
             $post['content'] = clear_link($post['content']);
         }
         if ($MOD['credit_save']) {
             $post['content'] = save_remote($post['content']);
         }
         $post['content'] = addslashes($post['content']);
     }
     return array_map("trim", $post);
 }
Exemple #13
0
     $sql2 .= ",regyear='" . addslashes($E['regyear']) . "'";
 }
 if (in_array('capital', $pass) && isset($E['capital'])) {
     $sql2 .= ",capital='" . addslashes($E['capital']) . "'";
     if (isset($E['regunit'])) {
         $sql2 .= ",regunit='" . addslashes($E['regunit']) . "'";
     }
 }
 if (in_array('address', $pass) && isset($E['address'])) {
     $sql2 .= ",address='" . addslashes($E['address']) . "'";
 }
 if (in_array('telephone', $pass) && isset($E['telephone'])) {
     $sql2 .= ",telephone='" . addslashes($E['telephone']) . "'";
 }
 if (in_array('content', $pass) && isset($E['content'])) {
     delete_diff($E['content'], $U['content']);
     $sql3 .= ",content='" . addslashes($E['content']) . "'";
 }
 $ECK = array('thumb' => '形象图片', 'areaid' => '所在地区', 'type' => '公司类型', 'business' => '经营范围', 'regyear' => '成立年份', 'capital' => '注册资本', 'address' => '公司地址', 'telephone' => '联系电话', 'content' => '公司介绍');
 $title = '会员资料修改审核结果';
 $content = '尊敬的会员:<br/>您的会员资料修改已经审核,现将结果通知如下:<br/>';
 foreach ($E as $k => $v) {
     if (!isset($ECK[$k])) {
         continue;
     }
     $content .= $ECK[$k] . ' ---------- ' . (in_array($k, $pass) ? '<span style="color:green;">已通过</span>' : '<span style="color:red;">未通过</span>') . '<br/>';
 }
 if ($reason) {
     $content .= '操作原因:' . nl2br($reason) . '<br/>';
 }
 if ($msg) {
Exemple #14
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $TYPE, $_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['totime'] = $post['totime'] ? strtotime($post['totime'] . ' 23:59:59') : 0;
     $post['fee'] = dround($post['fee']);
     $post['price'] = dround($post['price']);
     $post['minamount'] = dround($post['minamount']);
     $post['amount'] = dround($post['amount']);
     $post['mycatid'] = intval($post['mycatid']);
     $post['days'] = intval($post['days']);
     $post['elite'] = $post['elite'] ? 1 : 0;
     $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);
 }
Exemple #15
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $_username, $_userid;
     $post['editor'] = $_username;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     $post['totime'] = $post['totime'] ? strtotime($post['totime'] . ' 23:59:59') : 0;
     $post['discount'] = dround($post['price'] * 10 / $post['marketprice'], 1);
     $post['savemoney'] = dround($post['marketprice'] - $post['price']);
     $post['fee'] = dround($post['fee']);
     $post['price'] = dround($post['price']);
     $post['marketprice'] = dround($post['marketprice']);
     $post['minamount'] = dround($post['minamount']);
     $post['amount'] = dround($post['amount']);
     $post['title'] = trim($post['title']);
     $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 ($post['content'] && !$post['introduce'] && $post['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);
     } else {
         $post['ip'] = $DT_IP;
     }
     $content = $post['content'];
     unset($post['content']);
     $post = dhtmlspecialchars($post);
     $post['content'] = addslashes(dsafe($content));
     return array_map("trim", $post);
 }
Exemple #16
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $_username, $_userid;
     $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['price'] = dround($post['price']);
     $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['express_name_1'] = trim($post['express_name_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['express_name_2'] = trim($post['express_name_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['express_name_3'] = trim($post['express_name_3']);
     $post['fee_start_3'] = dround($post['fee_start_3']);
     $post['fee_step_3'] = dround($post['fee_step_3']);
     $post['title'] = trim($post['title']);
     $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);
 }
Exemple #17
0
 function set($post)
 {
     global $MOD, $DT_TIME, $_username;
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['editor'] = $_username;
     $post['edittime'] = $DT_TIME;
     $post['minprice'] = dround($post['minprice']);
     $post['maxprice'] = dround($post['maxprice']);
     $post['content'] = addslashes(save_remote(save_local(stripslashes($post['content']))));
     clear_upload($post['content']);
     if ($this->itemid) {
         $new = $post['content'];
         $r = $this->get_one();
         $old = $r['content'];
         delete_diff($new, $old);
     }
     return array_map("trim", $post);
 }
Exemple #18
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $TYPE, $_username, $_userid, $GENDER, $MARRIAGE, $EDUCATION;
     $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['birthday'] = intval($post['byear']) . '-' . intval($post['bmonth']) . '-' . intval($post['bday']);
     $post['age'] = date('Y', $DT_TIME) - intval($post['byear']);
     $post['minsalary'] = intval($post['minsalary']);
     $post['maxsalary'] = intval($post['maxsalary']);
     $post['type'] = intval($post['type']);
     $post['marriage'] = intval($post['marriage']);
     $post['height'] = intval($post['height']);
     $post['height'] = intval($post['height']);
     $post['gender'] = intval($post['gender']);
     $post['education'] = intval($post['education']);
     $post['experience'] = intval($post['experience']);
     $post['situation'] = intval($post['situation']);
     $post['email'] = trim($post['email']);
     $post['status'] = intval($post['status']);
     $post['open'] = intval($post['open']);
     $post['title'] = trim($post['title']);
     $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);
 }
Exemple #19
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $TYPE, $_username, $_userid;
     $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['email'] = trim($post['email']);
     $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['title'] = trim($post['title']);
     $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);
 }
Exemple #20
0
 function set_member($member)
 {
     global $MOD;
     $member['email'] = trim($member['email']);
     $member['mail'] = isset($member['mail']) ? trim($member['mail']) : '';
     is_email($member['mail']) or $member['mail'] = '';
     $member['msn'] = isset($member['msn']) ? trim($member['msn']) : '';
     is_email($member['msn']) or $member['msn'] = '';
     $member['qq'] = isset($member['qq']) ? trim($member['qq']) : '';
     is_numeric($member['qq']) or $member['qq'] = '';
     $member['ali'] = isset($member['ali']) ? trim($member['ali']) : '';
     if (!$this->is_clean($member['ali'])) {
         $member['ali'] = '';
     }
     $member['skype'] = isset($member['skype']) ? trim($member['skype']) : '';
     if (!$this->is_clean($member['skype'])) {
         $member['skype'] = '';
     }
     $member['address'] = isset($member['address']) ? trim($member['address']) : '';
     if (!$this->is_clean($member['address'])) {
         $member['address'] = '';
     }
     $member['postcode'] = isset($member['postcode']) ? trim($member['postcode']) : '';
     is_numeric($member['postcode']) or $member['postcode'] = '';
     $member['mode'] = isset($member['mode']) && is_array($member['mode']) && $member['mode'] ? implode(',', $member['mode']) : '';
     $member['keyword'] = $member['company'];
     $member['homepage'] = isset($member['homepage']) ? fix_link($member['homepage']) : '';
     $member['capital'] = isset($member['capital']) ? dround($member['capital']) : '';
     $member['sound'] = intval($member['sound']);
     if ($this->userid) {
         $member['keyword'] = $member['company'] . strip_tags(area_pos($member['areaid'], ',')) . ',' . $member['business'] . ',' . $member['sell'] . ',' . $member['buy'] . ',' . $member['mode'];
         clear_upload($member['thumb'] . $member['introduce'], $this->userid);
         $new = $member['introduce'];
         if ($member['thumb']) {
             $new .= '<img src="' . $member['thumb'] . '">';
         }
         $content_table = content_table(4, $this->userid, is_file(DT_CACHE . '/4.part'), $this->table_company_data);
         $r = $this->db->get_one("SELECT content FROM {$content_table} WHERE userid={$this->userid}");
         $old = $r['content'];
         $r = $this->get_one();
         if ($r['thumb']) {
             $old .= '<img src="' . $r['thumb'] . '">';
         }
         delete_diff($new, $old);
     } else {
         if ($member['thumb']) {
             clear_upload($member['thumb'] . $member['introduce']);
         }
     }
     $member['content'] = $member['introduce'];
     $member['introduce'] = addslashes(get_intro($member['content'], $MOD['introduce_length']));
     if (!defined('DT_ADMIN')) {
         $content = $member['content'];
         unset($member['content']);
         $member = dhtmlspecialchars($member);
         $member['content'] = dsafe($content);
     }
     if ($MOD['introduce_clear'] || $MOD['introduce_save']) {
         $member['content'] = stripslashes($member['content']);
         $member['content'] = save_local($member['content']);
         if ($MOD['introduce_clear']) {
             $member['content'] = clear_link($member['content']);
         }
         if ($MOD['introduce_save']) {
             $member['content'] = save_remote($member['content']);
         }
         $member['content'] = addslashes($member['content']);
     }
     if ($member['catid']) {
         $catids = explode(',', substr($member['catid'], 1, -1));
         $cids = '';
         foreach ($catids as $catid) {
             $C = get_cat($catid);
             if ($C) {
                 $catid = $C['parentid'] ? $C['arrparentid'] . ',' . $catid : $catid;
                 $cids .= $catid . ',';
             }
         }
         $cids = array_unique(explode(',', substr(str_replace(',0,', ',', ',' . $cids), 1, -1)));
         $member['catids'] = ',' . implode(',', $cids) . ',';
     }
     return $member;
 }
Exemple #21
0
 function edit($message)
 {
     global $L;
     if (!$this->is_message($message)) {
         return false;
     }
     $r = $this->get_one();
     if ($r['status'] != 1 || $r['fromuser'] != $this->username) {
         return $this->_($L['message_msg_edit']);
     }
     clear_upload($message['content']);
     $message['title'] = htmlspecialchars(trim($message['title']));
     $message['content'] = dsafe(addslashes(save_remote(save_local(stripslashes($message['content'])))));
     delete_diff($message['content'], $r['content']);
     $this->db->query("UPDATE {$this->pre}message SET title='{$message['title']}',content='{$message['content']}' WHERE itemid='{$this->itemid}' ");
     if (isset($message['send'])) {
         return $this->send($message);
     }
     return true;
 }
Exemple #22
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $AREA, $_username, $_userid;
     $AREA or $AREA = cache_read('area.php');
     $post['city'] or $post['city'] = $post['areaid'] ? $AREA[$post['areaid']]['areaname'] : '';
     $post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
     $post['edittime'] = $DT_TIME;
     $post['fromtime'] = strtotime($post['fromtime'] . ' 0:0:0');
     $post['totime'] = strtotime($post['totime'] . ' 23:59:59');
     $post['homepage'] = fix_link($post['homepage']);
     $post['sign'] = $post['sign'] ? 1 : 0;
     $post['fee'] = dround($post['fee']);
     $post['title'] = trim($post['title']);
     $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) {
         $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);
 }