function Delete_Selected() { $instance_table = new Table($this->FG_TABLE_NAME, $this->FG_COL_QUERY); $result = $instance_table->Delete_Selected($this->DBHandle, $this->FG_TABLE_CLAUSE, $this->FG_ORDER, $this->FG_SENS, null, null, $this->FG_LIMITE_DISPLAY, $this->CV_CURRENT_PAGE * $this->FG_LIMITE_DISPLAY, $this->SQL_GROUP); }
$instance_sub_table = new Table("cc_receipt_item", "*"); $result = $instance_sub_table->Get_list($DBHandle, "id = {$idc}"); if (!is_array($result) || sizeof($result) == 0) { Header("Location: A2B_receipt_edit.php?" . "id=" . $id); } else { $description = $result[0]['description']; $price = $result[0]['price']; $date = $result[0]['date']; } } break; case 'delete': if (!empty($idc) && is_numeric($idc)) { $DBHandle = DbConnect(); $instance_sub_table = new Table("cc_receipt_item", "*"); $instance_sub_table->Delete_Selected($DBHandle, "id = {$idc}"); } Header("Location: A2B_receipt_edit.php?" . "id=" . $id); break; case 'update': if (!empty($idc) && is_numeric($idc)) { if (empty($date) || strtotime($date) === FALSE) { $error_msg .= gettext("Date inserted is invalid, it must respect a date format YYYY-MM-DD HH:MM:SS (time is optional).<br/>"); } if (empty($price) || !is_numeric($price)) { $error_msg .= gettext("Amount inserted is invalid, it must be a number. Check the format."); } if (!empty($error_msg)) { break; } $DBHandle = DbConnect();
function Delete_Selected() { //if ( $form_action == "list" && $this->FG_FILTER_SEARCH_FORM) { $instance_table = new Table($this -> FG_TABLE_NAME, $this -> FG_COL_QUERY); $result = $instance_table -> Delete_Selected ($this -> DBHandle, $this -> FG_TABLE_CLAUSE, $this->FG_ORDER, $this->FG_SENS, null, null, $this -> FG_LIMITE_DISPLAY, $this -> CV_CURRENT_PAGE * $this -> FG_LIMITE_DISPLAY, $this -> SQL_GROUP); } }