addDataParam('i', $encoding_order_id); if ($a == "delete_encoding_order") { if (empty($encoding_order_id) || !is_numeric($encoding_order_id)) { $msg = 'f5s8sdag'; $url = "encoding_order_delete.php?err_msg=$msg"; header("Location: $url"); exit(); } else { //check if encoding_order_id exists $check_encoding_order_id = 'SELECT * FROM encoding_order WHERE encoding_order_id = ?'; $check_query = $wrapperObj->executeQuery($check_encoding_order_id, $data_params); if ($check_query === false) { showierror($check_encoding_order_id); } if (!count($check_query)) { $msg = 'fd32ds5e'; $url = "encoding_order_delete.php?err_msg=$msg"; header("Location: $url"); exit(); } // before we can delete the encoding order, we need to check what is the encoding order type. $get_type = 'SELECT if(eo.type is null or eo.type = "", "track", eo.type) as type FROM encoding_order eo WHERE eo.encoding_order_id = ?'; $get_type_result = $wrapperObj->executeQuery($get_type, $data_params); if ($get_type_result === false) { showierror($get_type); } $get_type_row = $get_type_result[0]; $type = $get_type_row["type"]; $delete_dms_query = 'DELETE eodd FROM encoding_order_detail_dms eodd , encoding_order_detail eod WHERE eod.encoding_order_detail_id = eodd.encoding_order_detail_id AND eod.encoding_order_id = ?'; if ($wrapperObj->executeQuery($delete_dms_query, $data_params, MysqliWrapper::RETURN_AFFECTED_ROWS) === false) { showierror($delete_dms_query); } $delete_release_query = 'DELETE FROM encoding_order_detail WHERE encoding_order_id = ?'; if ($wrapperObj->executeQuery($delete_release_query, $data_params, MysqliWrapper::RETURN_AFFECTED_ROWS) === false) { showierror($delete_release_query); } // finally delete the order. $delete_order_query = 'DELETE FROM encoding_order WHERE encoding_order_id = ? LIMIT 1'; if ($wrapperObj->executeQuery($delete_order_query, $data_params, MysqliWrapper::RETURN_AFFECTED_ROWS) === false) { showierror($delete_order_query); } $msg = 'fd55g45g'; $url = "encoding_order_delete.php?confirm_msg=$msg"; header("Location: $url"); exit(); } } if (empty($encoding_order_id) || !is_numeric($encoding_order_id)) { ?>

Delete Encoding Order

Please Enter Encoding Order ID:
executeQuery($check_encoding_order_id, $data_params); if ($check_query === false) { showierror($check_encoding_order_id); } if (!count($check_query)) { $msg = 'fd32ds5e'; $url = "encoding_order_delete.php?err_msg=$msg"; header("Location: $url"); exit(); } // first get the encoding_order_type. $get_type = 'SELECT if(eo.type is null or eo.type = "", "track", eo.type) as type FROM encoding_order eo WHERE eo.encoding_order_id = ?'; $get_type_result = $wrapperObj->executeQuery($get_type, $data_params); if ($get_type_result === false) { showierror($get_type); } $get_type_row = $get_type_result[0]; $type = $get_type_row["type"]; $encoding_order_query = 'SELECT eo.encoding_order_id, e.encoder, eo.entry_date, eo.dms_list, eo.order_status, ou.f_name, ou.l_name, count(distinct eod.encoding_order_detail_id) AS total_product, count(distinct eodd.dms_customer_id) AS total_dms, eo.type, eo.clip_type, eo.encoder_delivery_date, eo.due_date, eo.delivery_spec FROM encoder e INNER JOIN encoding_order eo ON e.encoder_id = eo.encoder_id INNER JOIN orchadmin_users ou ON ou.id = orchadmin_user_id LEFT JOIN encoding_order_detail eod ON eod.encoding_order_id = eo.encoding_order_id LEFT JOIN encoding_order_detail_dms eodd ON eodd.encoding_order_detail_id = eod.encoding_order_detail_id WHERE eo.encoding_order_id = ? GROUP BY eo.encoding_order_id'; $encoding_order_result = $wrapperObj->executeQuery($encoding_order_query, $data_params); if ($encoding_order_result === false) { showierror($encoding_order_query); } $encoding_order_row = $encoding_order_result[0]; ?>

Encoding Order Detail

Encoding Order ID:
Order Entered by:
Order Status:
Encoder Name:
Order Entry Date:
Encoder Delivery Date:
Total :
Total DMS: