本文整理汇总了PHP中clear_upload函数的典型用法代码示例。如果您正苦于以下问题:PHP clear_upload函数的具体用法?PHP clear_upload怎么用?PHP clear_upload使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了clear_upload函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set
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);
}
示例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);
}
示例3: set
function set($post)
{
global $MOD, $DT_TIME, $_username, $_userid;
if (!$this->itemid) {
$post['addtime'] = $DT_TIME;
}
$post['edittime'] = $DT_TIME;
$post['editor'] = $_username;
clear_upload($post['thumb']);
return array_map("trim", $post);
}
示例4: edit
function edit($post)
{
$post = $this->set($post);
$sql = '';
foreach ($post as $k => $v) {
$sql .= ",{$k}='{$v}'";
}
$sql = substr($sql, 1);
$this->db->query("UPDATE {$this->table} SET {$sql} WHERE itemid={$this->itemid}");
clear_upload($post['content']);
return true;
}
示例5: set
function set($post)
{
global $MOD, $DT_TIME, $DT_IP, $_username, $_userid;
$post['addtime'] = isset($post['addtime']) && $post['addtime'] ? strtotime($post['addtime']) : $DT_TIME;
$post['adddate'] = timetodate($post['addtime'], 3);
$post['edittime'] = $DT_TIME;
clear_upload($post['thumb'], $this->specialid);
if ($this->itemid) {
$post['editor'] = $_username;
} else {
$post['username'] = $post['editor'] = $_username;
$post['ip'] = $DT_IP;
}
return $post;
}
示例6: set
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);
}
示例7: 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);
}
示例8: set
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);
}
示例9: set
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);
}
示例10: captcha
}
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)) {
示例11: dstripslashes
$post['vcompany'] = $user['vcompany'];
$post['vtrade'] = $user['vtrade'];
$post['trade'] = $user['trade'];
$post['support'] = $user['support'];
$post['inviter'] = $user['inviter'];
if ($post['vmobile']) {
$post['mobile'] = $user['mobile'];
}
if ($post['vtruename']) {
$post['truename'] = $user['truename'];
}
$post = dstripslashes($post);
$post_check = array();
if ($_E) {
if (in_array('thumb', $_E) || in_array('content', $_E)) {
clear_upload($post['thumb'] . $post['content'], $_userid);
}
foreach ($_E as $k) {
if ($post[$k] != $user[$k]) {
$post_check[$k] = $post[$k];
$post[$k] = $user[$k];
}
}
}
$post = daddslashes($post);
$post_check = daddslashes($post_check);
if ($MFD) {
fields_check($post_fields, $MFD);
}
if ($CFD) {
fields_check($post_fields, $CFD);
示例12: set
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);
}
示例13: delete_upload
if ($HOME['banner1'] != $setting['banner1']) {
delete_upload($HOME['banner1'], $_userid);
}
if ($HOME['banner2'] != $setting['banner2']) {
delete_upload($HOME['banner2'], $_userid);
}
if ($HOME['banner3'] != $setting['banner3']) {
delete_upload($HOME['banner3'], $_userid);
}
if ($HOME['banner4'] != $setting['banner4']) {
delete_upload($HOME['banner4'], $_userid);
}
if ($HOME['banner5'] != $setting['banner5']) {
delete_upload($HOME['banner5'], $_userid);
}
clear_upload($setting['background'] . $setting['logo'] . $setting['video'] . $setting['banner'] . $setting['bannerf'] . $setting['banner1'] . $setting['banner2'] . $setting['banner3'] . $setting['banner4'] . $setting['banner5']);
$announce = $setting['announce'];
unset($setting['announce']);
$setting = dhtmlspecialchars($setting);
$setting['announce'] = dsafe($announce);
update_company_setting($_userid, $setting);
dmsg($L['home_msg_save'], 'home.php?tab=' . $tab);
}
} else {
$CS = cache_read('module-4.php');
$api_map = $CS['map'];
$api_stats = $CS['stats'];
$api_kf = $CS['kf'];
$menu_f = ',';
foreach (explode(',', $MG['menu_c']) as $v) {
$menu_f .= $MFILE[$v] . ',';
示例14: edit
function edit($post)
{
$this->delete($this->itemid, false);
$post = $this->set($post);
$sql = '';
foreach ($post as $k => $v) {
if (in_array($k, $this->fields)) {
$sql .= ",{$k}='{$v}'";
}
}
$sql = substr($sql, 1);
$this->db->query("UPDATE {$this->table} SET {$sql} WHERE itemid={$this->itemid}");
$content_table = content_table($this->moduleid, $this->itemid, $this->split, $this->table_data);
$this->db->query("UPDATE {$content_table} SET content='{$post['content']}' WHERE itemid={$this->itemid}");
$this->update($this->itemid);
clear_upload($post['content'] . $post['thumb'] . $post['video'], $this->itemid);
if ($post['status'] > 2) {
$this->tohtml($this->itemid, $post['catid']);
}
return true;
}
示例15: dmsg
}
dmsg(isset($message['save']) ? $L['message_msg_save_draft'] : $L['message_msg_send'], $forward);
} else {
message($do->errmsg);
}
} else {
$touser = isset($touser) ? trim($touser) : '';
$title = isset($title) ? stripslashes($title) : '';
$content = isset($content) ? stripslashes($content) : '';
}
break;
case 'edit':
$itemid or message($L['message_msg_choose']);
$do->itemid = $itemid;
if ($submit) {
clear_upload($message['content']);
if ($do->edit($message)) {
dmsg(isset($message['send']) ? $L['message_msg_send'] : $L['message_msg_edit_draft'], '?action=draft');
} else {
message($do->errmsg);
}
} else {
$message = $do->get_one();
if (!$message || $message['status'] != 1 || $message['fromuser'] != $_username) {
message($L['message_msg_deny']);
}
$touser = $message['touser'];
$title = $message['title'];
$content = $message['content'];
}
break;