function validate_s_attribute_type($s_attribute_type, &$description, &$prompt, &$input_type, &$input_type_arg1, &$input_type_arg2, &$input_type_arg3, &$input_type_arg4, &$input_type_arg5, &$display_type, &$display_type_arg1, &$display_type_arg2, &$display_type_arg3, &$display_type_arg4, &$display_type_arg5, &$s_field_type, &$site_type, &$listing_link_ind, &$file_attribute_ind, &$lookup_attribute_ind, &$multi_attribute_ind, &$view_perm) { $description = addslashes(trim(strip_tags($description))); $prompt = addslashes(trim(strip_tags($prompt))); if ($display_type !== FALSE) { $display_type = validate_display_type($display_type); if (strlen($display_type) > 0) { $display_type_arg1 = addslashes(trim(strip_tags($display_type_arg1))); $display_type_arg2 = addslashes(trim(strip_tags($display_type_arg2))); $display_type_arg3 = addslashes(trim(strip_tags($display_type_arg3))); $display_type_arg4 = addslashes(trim(strip_tags($display_type_arg4))); $display_type_arg5 = addslashes(trim(strip_tags($display_type_arg5))); } else { $display_type_arg1 = NULL; $display_type_arg2 = NULL; $display_type_arg3 = NULL; $display_type_arg4 = NULL; $display_type_arg5 = NULL; } } if ($input_type !== FALSE) { $input_type = validate_input_type($input_type); if (strlen($input_type) > 0) { $input_type_arg1 = addslashes(trim(strip_tags($input_type_arg1))); $input_type_arg2 = addslashes(trim(strip_tags($input_type_arg2))); $input_type_arg3 = addslashes(trim(strip_tags($input_type_arg3))); $input_type_arg4 = addslashes(trim(strip_tags($input_type_arg4))); $input_type_arg5 = addslashes(trim(strip_tags($input_type_arg5))); } else { $input_type_arg1 = NULL; $input_type_arg2 = NULL; $input_type_arg3 = NULL; $input_type_arg4 = NULL; $input_type_arg5 = NULL; } } if ($s_field_type !== FALSE) { $s_field_type = validate_s_field_type($s_field_type); } if ($site_type !== FALSE) { $site_type = strtolower(trim($site_type)); } if ($multi_attribute_ind !== FALSE) { $multi_attribute_ind = validate_ind_column($multi_attribute_ind); } if ($lookup_attribute_ind !== FALSE) { $lookup_attribute_ind = validate_ind_column($lookup_attribute_ind); } if ($file_attribute_ind !== FALSE) { $file_attribute_ind = validate_ind_column($file_attribute_ind); } if ($listing_link_ind !== FALSE) { $listing_link_ind = validate_ind_column($listing_link_ind); } // only one of these indicators can be Y if ($lookup_attribute_ind == 'Y') { $multi_attribute_ind = 'N'; $file_attribute_ind = 'N'; // cannot have a lookup type that is also a file_resources } else { if ($file_attribute_ind == 'Y') { $multi_attribute_ind = 'N'; $lookup_attribute_ind = 'N'; } else { if ($multi_attribute_ind == 'Y') { $file_attribute_ind = 'N'; // cannot have a lookup type that is also a file_resources $lookup_attribute_ind = 'N'; } } } if ($view_perm !== FALSE) { $view_perm = strtoupper(trim($view_perm)); } }
function validate_item_column_conf(&$column_no, &$column_type, &$s_field_type, &$s_attribute_type, &$override_prompt, &$printable_support_ind, &$orderby_support_ind, &$orderby_datatype, &$orderby_default_ind, &$orderby_sort_order, &$error) { $column_type = validate_column_type($column_type); if ($column_type !== FALSE) { if ($column_type == 'borrow_status' || $column_type == 'action_links') { $s_field_type = NULL; $s_attribute_type = NULL; $orderby_support_ind = 'N'; $orderby_default_ind = 'N'; $orderby_datatype = NULL; $orderby_sort_order = NULL; } else { if ($column_type == 's_field_type') { $s_field_type = validate_s_field_type($s_field_type); if ($s_field_type === FALSE) { $error = 'Invalid System Field Type'; return FALSE; } if ($s_field_type == 'STATUSCMNT' || $s_field_type == 'RATING') { $orderby_support_ind = 'N'; } } else { $s_field_type = NULL; } if ($column_type == 's_attribute_type') { $s_attribute_type = validate_s_attribute_type($s_attribute_type); if ($s_attribute_type === FALSE) { $error = 'Invalid System Attribute Type'; return FALSE; } } else { $s_attribute_type = NULL; } $orderby_support_ind = validate_ind_column($orderby_support_ind); if ($orderby_support_ind == 'Y') { $orderby_datatype = validate_orderby_datatype($orderby_datatype); } else { $orderby_datatype = NULL; } $orderby_default_ind = validate_ind_column($orderby_default_ind); if ($orderby_default_ind == 'Y') { $orderby_sort_order = validate_orderby_sort_order($orderby_sort_order); } else { $orderby_sort_order = NULL; } $printable_support_ind = validate_ind_column($printable_support_ind); } //else return TRUE; } else { $error = 'Invalid Column Type'; return FALSE; } }