Exemplo n.º 1
0
 function DelCustomer($id)
 {
     if ($return = HiperusActions::DelCustomer($id)) {
         $this->DB->Execute('DELETE FROM hv_billing WHERE customerid=? AND (ext_billing_id=0 OR ISNULL(ext_billing_id)) ;', array($id));
         $this->DB->Execute('UPDATE hv_pstnusage SET customerid=0, customer_name=? WHERE customerid=? ;', array('', $id));
         $this->DB->Execute('DELETE FROM hv_customers WHERE id=? ;', array($id));
         $this->DB->Execute('DELETE FROM hv_assign WHERE customerid=? ;', array($id));
         $this->DB->Execute('DELETE FROM hv_enduserlist WHERE customerid=? ;', array($id));
         $this->DB->Execute('DELETE FROM hv_terminal WHERE customerid=? ;', array($id));
         $this->DB->Execute('DELETE FROM hv_pstn WHERE customerid=? ;', array($id));
         return true;
     } else {
         return false;
     }
 }