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


PHP delete_orphans函数代码示例

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


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

示例1: delete

 public function delete($id = NULL)
 {
     // Get the invoice id before deleting payment
     $this->db->select('invoice_id');
     $this->db->where('payment_id', $id);
     $invoice_id = $this->db->get('fi_payments')->row()->invoice_id;
     // Delete the payment
     parent::delete($id);
     // Recalculate invoice amounts
     $this->load->model('invoices/mdl_invoice_amounts');
     $this->mdl_invoice_amounts->calculate($invoice_id);
     $this->load->helper('orphan');
     delete_orphans();
 }
开发者ID:rumahkecil,项目名称:fusioninvoice-1,代码行数:14,代码来源:mdl_payments.php

示例2: implode

<table class="aligntop" cellspacing="0">
<tr>
<td>';
        echo implode('<br/>', $log);
        echo '</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<br />';
    }
    if (isset($_POST['delete_orphans'])) {
        //confirm_referrer('admin_files.php');
        $log = delete_orphans();
        echo '<div id="imageupload" class="blockform">
<h2><span>Отчет о "сиротах"</span></h2>
<div class="box">
<div class="inform">
<div class="infldset">
<table class="aligntop" cellspacing="0">
<tr>
<td>';
        echo implode('<br/>', $log);
        echo '</td>
</tr>
</table>
</div>
</div>
</div>
开发者ID:tipsun91,项目名称:punbb-mod,代码行数:31,代码来源:admin_files.php

示例3: delete

 public function delete($id)
 {
     parent::delete($id);
     $this->load->helper('orphan');
     delete_orphans();
 }
开发者ID:yalmasri,项目名称:fusioninvoice,代码行数:6,代码来源:mdl_users.php

示例4: delete

 public function delete($import_id)
 {
     // Gather the import details
     $import_details = $this->db->where('import_id', $import_id)->get('ip_import_details')->result();
     // Loop through details and delete each of the imported records
     foreach ($import_details as $import_detail) {
         $this->db->query("DELETE FROM " . $import_detail->import_table_name . " WHERE " . $this->primary_keys[$import_detail->import_table_name] . ' = ' . $import_detail->import_record_id);
     }
     // Delete the master import record
     parent::delete($import_id);
     // Delete the detail records
     $this->db->where('import_id', $import_id);
     $this->db->delete('ip_import_details');
     // Delete any orphaned records
     $this->load->helper('orphan');
     delete_orphans();
 }
开发者ID:Thewafflication,项目名称:InvoicePlane,代码行数:17,代码来源:mdl_import.php

示例5: intval

} else {
    if (isset($_GET['del_forum'])) {
        $forum_to_delete = intval($_GET['del_forum']);
        if ($forum_to_delete < 1) {
            message($lang_common['Bad request']);
        }
        // User pressed the cancel button
        if (isset($_POST['del_forum_cancel'])) {
            redirect(forum_link($forum_url['admin_forums']), $lang_admin_common['Cancel redirect']);
        }
        ($hook = get_hook('afo_del_forum_form_submitted')) ? eval($hook) : null;
        if (isset($_POST['del_forum_comply'])) {
            @set_time_limit(0);
            // Prune all posts and topics
            prune($forum_to_delete, 1, -1);
            delete_orphans();
            // Delete the forum and any forum specific group permissions
            $query = array('DELETE' => 'forums', 'WHERE' => 'id=' . $forum_to_delete);
            ($hook = get_hook('afo_del_forum_qr_delete_forum')) ? eval($hook) : null;
            $forum_db->query_build($query) or error(__FILE__, __LINE__);
            $query = array('DELETE' => 'forum_perms', 'WHERE' => 'forum_id=' . $forum_to_delete);
            ($hook = get_hook('afo_del_forum_qr_delete_forum_perms')) ? eval($hook) : null;
            $forum_db->query_build($query) or error(__FILE__, __LINE__);
            // Regenerate the quickjump cache
            if (!defined('FORUM_CACHE_FUNCTIONS_LOADED')) {
                require FORUM_ROOT . 'include/cache.php';
            }
            generate_quickjump_cache();
            ($hook = get_hook('afo_del_forum_pre_redirect')) ? eval($hook) : null;
            redirect(forum_link($forum_url['admin_forums']), $lang_admin_forums['Forum deleted'] . ' ' . $lang_admin_common['Redirect']);
        } else {
开发者ID:vebnz,项目名称:lifelitup,代码行数:31,代码来源:forums.php

示例6: delete

 public function delete($id = NULL)
 {
     // Get the invoice id before deleting payment
     $this->db->select('invoice_id');
     $this->db->where('payment_id', $id);
     $invoice_id = $this->db->get('ip_payments')->row()->invoice_id;
     // Delete the payment
     parent::delete($id);
     // Recalculate invoice amounts
     $this->load->model('invoices/mdl_invoice_amounts');
     $this->mdl_invoice_amounts->calculate($invoice_id);
     // Change invoice status back to sent
     $this->db->select('invoice_status_id');
     $this->db->where('invoice_id', $invoice_id);
     $invoice = $this->db->get('ip_invoices')->row();
     if ($invoice->invoice_status_id == 4) {
         $this->db->where('invoice_id', $invoice_id);
         $this->db->set('invoice_status_id', 2);
         $this->db->update('ip_invoices');
     }
     $this->load->helper('orphan');
     delete_orphans();
 }
开发者ID:quantumsized,项目名称:InvoicePlane,代码行数:23,代码来源:mdl_payments.php


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