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


PHP delete_local函数代码示例

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


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

示例1: delete

 function delete($itemid)
 {
     global $MOD, $DT_PRE;
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         if ($r) {
             $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
             $this->db->query("DELETE FROM {$DT_PRE}know_vote WHERE aid={$itemid}");
             if ($r['content']) {
                 delete_local($r['content'], get_user($r['username']));
             }
             if ($r['username'] && $MOD['credit_del_answer']) {
                 credit_add($r['username'], -$MOD['credit_del_answer']);
                 credit_record($r['username'], -$MOD['credit_del_answer'], 'system', lang('my->credit_record_answer_del'), 'ID:' . $r['qid']);
             }
         }
     }
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:23,代码来源:answer.class.php

示例2: _delete

 function _delete($itemid)
 {
     $this->itemid = $itemid;
     $r = $this->get_one();
     if ($r['fromuser']) {
         $userid = get_user($r['fromuser']);
         if ($r['content']) {
             delete_local($r['content'], $userid);
         }
     }
     $this->db->query("DELETE FROM {$this->pre}message WHERE itemid='{$itemid}' ");
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:12,代码来源:message.class.php

示例3: delete

 function delete($itemid, $all = true)
 {
     global $MOD, $L;
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         $userid = get_user($r['username']);
         if ($r['content']) {
             delete_local($r['content'], $userid);
         }
         $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
         $this->db->query("DELETE FROM {$this->table_data} WHERE itemid={$itemid}");
         if ($r['username'] && $MOD['credit_del_page']) {
             credit_add($r['username'], -$MOD['credit_del_page']);
             credit_record($r['username'], -$MOD['credit_del_page'], 'system', $L['page_record_del'], 'ID:' . $this->itemid);
         }
     }
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:22,代码来源:page.class.php

示例4: delete

 function delete($itemid, $all = true)
 {
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v, $all);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         if (!$r['islink']) {
             $_file = DT_ROOT . '/' . $r['linkurl'];
             if (is_file($_file)) {
                 unlink($_file);
             }
         }
         if ($all) {
             $userid = get_user($r['editor']);
             if ($r['content']) {
                 delete_local($r['content'], $userid);
             }
             $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
         }
     }
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:24,代码来源:webpage.class.php

示例5: delete

 function delete($itemid)
 {
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v, $all);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         $userid = get_user($r['editor']);
         if ($r['content']) {
             delete_local($r['content'], $userid);
         }
         $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
         $this->db->query("DELETE FROM {$this->table_item} WHERE formid={$itemid}");
         $this->db->query("DELETE FROM {$this->table_record} WHERE formid={$itemid}");
     }
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:18,代码来源:form.class.php

示例6: delete

 function delete($itemid, $all = true)
 {
     global $MOD;
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v, $all);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         if ($MOD['show_html']) {
             $_file = DT_ROOT . '/' . $MOD['moduledir'] . '/' . $r['linkurl'];
             if (is_file($_file)) {
                 unlink($_file);
             }
         }
         if ($all) {
             $userid = get_user($r['username']);
             if ($r['thumb']) {
                 delete_upload($r['thumb'], $userid);
             }
             if ($r['video']) {
                 delete_upload($r['video'], $userid);
             }
             if ($r['content']) {
                 delete_local($r['content'], $userid);
             }
             $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
             $content_table = content_table($this->moduleid, $this->itemid, $this->split, $this->table_data);
             $this->db->query("DELETE FROM {$content_table} WHERE itemid={$itemid}");
             if ($MOD['cat_property']) {
                 $this->db->query("DELETE FROM {$this->db->pre}category_value WHERE moduleid={$this->moduleid} AND itemid={$itemid}");
             }
             if ($r['username'] && $MOD['credit_del']) {
                 credit_add($r['username'], -$MOD['credit_del']);
                 credit_record($r['username'], -$MOD['credit_del'], 'system', lang('my->credit_record_del', array($MOD['name'])), 'ID:' . $this->itemid);
             }
         }
     }
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:40,代码来源:video.class.php

示例7: delete

 function delete($itemid, $all = true)
 {
     global $DT;
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v, $all);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         if ($all) {
             $userid = get_user($r['editor']);
             if ($r['content']) {
                 delete_local($r['content'], $userid);
             }
             $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
             $fileurl = DT_ROOT . '/announce/' . $itemid . '.' . $DT['file_ext'];
             if (is_file($fileurl)) {
                 unlink($fileurl);
             }
         }
     }
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:23,代码来源:announce.class.php

示例8: delete

 function delete($itemid, $all = true)
 {
     global $MOD;
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v, $all);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         if ($all) {
             $userid = get_user($r['username']);
             if ($r['thumb']) {
                 delete_upload($r['thumb'], $userid);
             }
             if ($r['content']) {
                 delete_local($r['content'], $userid);
             }
             $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
             $this->db->query("DELETE FROM {$this->table_data} WHERE itemid={$itemid}");
             if ($r['username'] && $MOD['credit_del_resume']) {
                 credit_add($r['username'], -$MOD['credit_del_resume']);
                 credit_record($r['username'], -$MOD['credit_del_resume'], 'system', lang('my->credit_record_resume_del'), 'ID:' . $this->itemid);
             }
         }
     }
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:27,代码来源:resume.class.php

示例9: delete

 function delete($itemid)
 {
     global $MOD, $L;
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v);
         }
     } else {
         $this->itemid = $itemid;
         $r = $this->get_one();
         $userid = get_user($r['username']);
         if ($r['content']) {
             delete_local($r['content'], $userid);
         }
         $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
     }
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:17,代码来源:product.inc.php

示例10: delete

 function delete($itemid)
 {
     global $MOD, $DT_PRE;
     if (is_array($itemid)) {
         foreach ($itemid as $v) {
             $this->delete($v);
         }
     } else {
         $this->itemid = $itemid;
         $item = $this->get_one();
         if ($item) {
             $this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
             if ($item['content']) {
                 delete_local($item['content'], get_user($item['username']));
             }
             if ($item['username'] && $MOD['credit_del_reply']) {
                 credit_add($item['username'], -$MOD['credit_del_reply']);
                 credit_record($item['username'], -$MOD['credit_del_reply'], 'system', lang('my->credit_record_reply_del'), 'ID:' . $itemid);
             }
             $this->tohtml($item['tid']);
         }
     }
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:23,代码来源:reply.class.php


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