本文整理汇总了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']);
}
}
}
}
示例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}' ");
}
示例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);
}
}
}
示例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}");
}
}
}
示例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}");
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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}");
}
}
示例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']);
}
}
}