0) { foreach ($ds_list as $ds) { /* create a null entry in every ds for this field */ db_execute("replace into src_data (id,fieldid,dsid,value) values (0,$id,$ds[ID],\"\")"); } } } header ("Location: data.php?action=edit&id=$fid"); break; case 'edit': include_once ('include/top_header.php'); if ($id != "") { $field = db_fetch_row("select * from src_fields where id=$id"); } DrawFormHeader("Data Input Source Configuration","",false); DrawFormItem("Name","The name of this data source; only used by the front end."); DrawFormItemTextBox("Name",$field[Name],"",""); DrawFormItem("Data Name","The name of the data source field used by the frontend to identify each field."); DrawFormItemTextBox("DataName",$field[DataName],"",""); DrawFormItem("Input/Output Field","Whether this field is for output; or requires input to be sent to the program."); DrawFormItemDropDownCustomHeader("InputOutput"); DrawFormItemDropDownCustomItem("InputOutput","in","Input",$field[InputOutput]); DrawFormItemDropDownCustomItem("InputOutput","out","Output",$field[InputOutput]); DrawFormItemDropDownCustomItem("InputOutput","hcin","HC Input",$field[InputOutput]); DrawFormItemDropDownCustomItem("InputOutput","hcout","HC Output",$field[InputOutput]); DrawFormItemDropDownCustomFooter(); DrawFormItem("Use for RRA","Whether this data source field should be used to update the RRA with; there can only be one of these fields per data input source and it must be an output field."); DrawFormItemCheckBox("UpdateRRA",$field[UpdateRRA],"Field Used to Update RRA",""); DrawFormSaveButton(); DrawFormItemHiddenIDField("ID",$id); DrawFormItemHiddenIDField("FID",$fid); DrawFormFooter(); include_once ("include/bottom_footer.php"); break; } ?>