当前位置: 首页>>代码示例>>PHP>>正文


PHP clear_link函数代码示例

本文整理汇总了PHP中clear_link函数的典型用法代码示例。如果您正苦于以下问题:PHP clear_link函数的具体用法?PHP clear_link怎么用?PHP clear_link使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了clear_link函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: set

 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);
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:60,代码来源:sell.class.php

示例2: set

 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);
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:33,代码来源:page.class.php

示例3: set

 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);
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:53,代码来源:resume.class.php

示例4: set

 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);
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:50,代码来源:special.class.php

示例5: set

 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);
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:48,代码来源:article.class.php

示例6: set

 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);
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:47,代码来源:exhibit.class.php

示例7: set

 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);
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:46,代码来源:job.class.php

示例8: set

 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);
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:46,代码来源:group.class.php

示例9: set

 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);
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:45,代码来源:video.class.php

示例10: set

 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);
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:39,代码来源:honor.class.php

示例11: captcha

 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) {
         $t = $db->get_one("SELECT itemid FROM {$table}_expert WHERE username='{$_username}'");
         if ($t) {
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:answer.inc.php

示例12: set_member

 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;
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:83,代码来源:member.class.php

示例13: set

 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);
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:94,代码来源:mall.class.php


注:本文中的clear_link函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。