public function _delete() { // check data $arrId = array(); if( is_array($_REQUEST['ids']) ) { $arrId = $_REQUEST['ids']; } else { $arrId[] = $_REQUEST['ids']; } foreach( $arrId as $id ) { $r= new JTDocument(); $r->select($id); // delete data $r->delete(); } // list data $this->addAlert(new JAlert('刪除完成','告知訊息',"./")); $this->action('list'); }