示例#1
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['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['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);
 }
示例#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['groupid'] = implode(',', $post['groupid']);
     $post['verify'] = intval($post['verify']);
     $post['display'] = intval($post['display']);
     return array_map("trim", $post);
 }
示例#3
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);
 }
示例#4
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);
 }
示例#5
0
 function set($post)
 {
     global $MOD, $DT_TIME, $DT_IP, $TYPE, $_username, $_userid, $GENDER, $MARRIAGE, $EDUCATION;
     is_url($post['thumb']) or $post['thumb'] = '';
     $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['status'] = intval($post['status']);
     $post['open'] = intval($post['open']);
     $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['ip'] = $DT_IP;
     }
     $content = $post['content'];
     unset($post['content']);
     $post = dhtmlspecialchars($post);
     $post['content'] = addslashes(dsafe($content));
     return array_map("trim", $post);
 }
示例#6
0
 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);
 }
示例#7
0
 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);
 }
示例#8
0
 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);
 }
示例#9
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'] : '';
     is_url($post['thumb']) or $post['thumb'] = '';
     $post['filepath'] = isset($post['filepath']) && is_filepath($post['filepath']) ? file_vname($post['filepath']) : '';
     $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['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);
 }
示例#10
0
 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['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['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);
 }
示例#11
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);
 }
示例#12
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);
 }
示例#13
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);
 }
示例#14
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);
 }
示例#15
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);
 }
示例#16
0
if ($submit) {
    captcha($captcha);
    $email = trim($email);
    if (!is_email($email)) {
        message($L['sendmail_pass_mailto']);
    }
    $title = trim(stripslashes($title));
    if (strlen($title) < 5) {
        message($L['pass_title']);
    }
    $content = trim(stripslashes($content));
    if (strlen($content) < 10) {
        message($L['pass_content']);
    }
    clear_upload($content);
    $content = dsafe(save_local($content));
    $content = ob_template('send', 'mail');
    $DT['mail_name'] = $_company;
    if (send_mail($email, $title, $content, '', false)) {
        //$_email
        message(lang($L['sendmail_success'], array($email)), 'sendmail.php');
    } else {
        message($L['sendmail_fail']);
    }
} else {
    $head_title = $L['sendmail_title'];
    $email = isset($email) ? trim(stripslashes($email)) : '';
    $title = isset($title) ? trim(stripslashes($title)) : '';
    $content = isset($content) ? trim(stripslashes($content)) : '';
    if ($action == 'page' && isset($title) && isset($linkurl)) {
        $content = lang($L['sendmail_content'], array(userurl($_username), $_username, $title, $linkurl));
示例#17
0
<?php

defined('IN_DESTOON') or exit('Access Denied');
$TYPE = get_type('ask', 1);
$menus = array(array('客服中心', '?moduleid=' . $moduleid . '&file=' . $file), array('问题分类', 'javascript:Dwidget(\'?file=type&item=' . $file . '\', \'问题分类\');'));
$stars = array('', '<span style="color:red;">不满意</span>', '基本满意', '<span style="color:green;">非常满意</span>');
switch ($action) {
    case 'edit':
        $itemid or msg();
        if ($submit) {
            if ($status == 2 && !$reply) {
                msg('回复内容不能为空');
            }
            $reply = addslashes(save_remote(save_local(stripslashes($reply))));
            $db->query("UPDATE {$DT_PRE}ask SET status={$status},admin='{$_username}',admintime='{$DT_TIME}',reply='{$reply}' WHERE itemid={$itemid}");
            dmsg('受理成功', $forward);
        } else {
            $r = $db->get_one("SELECT * FROM {$DT_PRE}ask WHERE itemid={$itemid}");
            $r or msg();
            extract($r);
            $addtime = timetodate($addtime, 5);
            $admintime = timetodate($admintime, 5);
            include tpl('ask_edit', $module);
        }
        break;
    case 'delete':
        $itemid or msg();
        $db->query("DELETE FROM {$DT_PRE}ask WHERE itemid={$itemid} ");
        dmsg('删除成功', '?moduleid=' . $moduleid . '&file=' . $file);
        break;
    default:
示例#18
0
 if ($sendtype == 3) {
     if (isset($id)) {
         $data = cache_read($_username . '_sendmail.php');
         $title = $data['title'];
         $content = $data['content'];
         $sender = $data['sender'];
         $name = $data['name'];
         $template = $data['template'];
         $maillist = $data['maillist'];
         $fields = $data['fields'];
     } else {
         $id = 0;
         $title or msg('请填写邮件标题');
         $maillist or msg('请选择邮件列表');
         $template || $content or msg('请填写邮件内容');
         $content = save_local(stripslashes($content));
         clear_upload($content);
         $data = array();
         $data['title'] = $title;
         $data['content'] = $content;
         $data['sender'] = $sender;
         $data['name'] = $name;
         $data['template'] = $template;
         $data['maillist'] = $maillist;
         $data['fields'] = $fields;
         cache_write($_username . '_sendmail.php', $data);
     }
     $_content = $content;
     $pernum = intval($pernum);
     if (!$pernum) {
         $pernum = 5;
示例#19
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);
 }
示例#20
0
         $title or msg('请填写邮件标题');
         $content or msg('请填写邮件内容');
         $content = addslashes(save_remote(save_local(stripslashes($content))));
         $db->query("INSERT INTO {$DT_PRE}mail (title,typeid,content,addtime,editor,edittime) VALUES ('{$title}','{$typeid}','{$content}','{$DT_TIME}','{$_username}','{$DT_TIME}')");
         dmsg('添加成功', $forward);
     } else {
         include tpl('mail_add', $module);
     }
     break;
 case 'edit':
     $itemid or msg();
     if ($submit) {
         $typeid or msg('请选择邮件分类');
         $title or msg('请填写邮件标题');
         $content or msg('请填写邮件内容');
         $content = addslashes(save_remote(save_local(stripslashes($content))));
         $db->query("UPDATE {$DT_PRE}mail SET title='{$title}',typeid='{$typeid}',content='{$content}',editor='{$_username}',edittime='{$DT_TIME}' WHERE itemid={$itemid}");
         dmsg('修改成功', $forward);
     } else {
         $r = $db->get_one("SELECT * FROM {$DT_PRE}mail WHERE itemid={$itemid}");
         $r or msg();
         extract($r);
         include tpl('mail_edit', $module);
     }
     break;
 case 'delete':
     $itemid or msg();
     $db->query("DELETE FROM {$DT_PRE}mail WHERE itemid={$itemid} ");
     dmsg('删除成功', '?moduleid=' . $moduleid . '&file=' . $file);
     break;
 case 'list_delete':
示例#21
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;
 }
示例#22
0
 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);
 }
示例#23
0
 function _edit($message)
 {
     if (!$this->_is_message($message)) {
         return false;
     }
     clear_upload($message['content']);
     $message['title'] = htmlspecialchars(trim($message['title']));
     $message['content'] = dsafe(addslashes(save_remote(save_local(stripslashes($message['content'])))));
     $message['groupids'] = implode(',', $message['groupids']);
     $this->db->query("UPDATE {$this->pre}message SET title='{$message['title']}',content='{$message['content']}',groupids='{$message['groupids']}' WHERE itemid='{$this->itemid}' ");
     return true;
 }
示例#24
0
     }
 }
 if ($submit && $could_answer) {
     $msg = captcha($captcha, $need_captcha, true);
     if ($msg) {
         dalert($msg);
     }
     $msg = question($answer, $need_question, true);
     if ($msg) {
         dalert($msg);
     }
     $content = stripslashes(trim($content));
     if (!$content) {
         dalert($L['type_answer']);
     }
     $content = save_local($content);
     if ($MOD['clear_alink']) {
         $content = clear_link($content);
     }
     if ($MOD['save_remotepic']) {
         $content = save_remote($content);
     }
     $content = dsafe($content);
     $content = addslashes($content);
     clear_upload($content);
     $url = htmlspecialchars(trim($url));
     $need_check = $MOD['check_add'] == 2 ? $MG['check'] : $MOD['check_answer'];
     $status = get_status(3, $need_check);
     $hidden = isset($hidden) ? 1 : 0;
     $expert = 0;
     if ($_username) {