} } // update desc $data_desc = "wt_desc = '{$i_desc}'\n\t\t\t\t\t\t\t\t\t"; update_config2("widget_tmp", $data_desc, "wt_id={$wt_id}"); header("Location: transaction.php?page=list&table_id={$table_id}"); break; case 'get_menu': $keyword = $_GET['keyword']; $data['menu_id'] = select_menu($keyword); return $data; break; case 'delete_history': $id = get_isset($_GET['id']); $table_id = get_isset($_GET['table_id']); delete_history($id); header("Location: transaction.php?table_id={$table_id}&did=3"); break; case 'list_history': //get_header($title); $table_id = get_isset($_GET['table_id']); $check_table = check_table($table_id); if ($check_table > 0) { $query_history = select_history($table_id); include '../views/transaction/history_order.php'; } //get_footer(); break; case 'form_widget': $menu_id = $_GET['menu_id']; $jumlah = $_GET['jumlah'];
function history_request($config, $uri) { switch ($_SERVER['REQUEST_METHOD']) { case 'GET': find_history($config); break; case 'PUT': //update update_history($config, $uri[3]); break; case 'DELETE': delete_history($config, $uri[3]); break; case 'POST': //create //create case 'HEAD': case 'OPTION': default: error_activity(); break; } }