+
+ +

+ +

+ +
+ +
+ + + + +

Vendor Characteristic Reference

+ + +
+ +
+
Code of Conduct Vendor
/>CCV
+ +
Enhanced Code of Conduct Vendor
/>CCV+
+ +
Connecticut Based Business
/>CTB
+ +
Disabled Based Business
/>DISBE
+ +
Minority Business
/>MBE
+ +
Small Business
/>SBE
+ +
Women Based Business
/>WBE
+
+
+
+   + +
+
+ 0){ + foreach($vc as $c){ + $urlvc .= 'vc[]='.$c.'&'; + } + } + ?> + + + + + + + + + + + + + + + + 'uc_contract', + 'posts_per_page' => -1, + 'order' => 'ASC', + 'exclude_empty_meta' => false, // alleged patch to include NULL field values + 'exclude_empty' => false, // alleged patch to include NULL field values + 'relation' => 'OR', + + '_meta_or_title' => $search_for, + 'meta_query' => array( + 'exclude_empty_meta' => false, + 'exclude_empty' => false, + 'relation' => 'AND', + array( + 'value' => $search_for, + 'compare' => 'LIKE', + ), + array( + 'key' => 'contract_type', + 'value' => get_post_meta( get_the_ID(), 'uc-purchasing', true ), + 'compare' => 'LIKE', + ) + ), + ); + if($order_by_column == 'contract_name'){ + $query_args['orderby'] = 'title'; + } + else { + $query_args['orderby'] = 'meta_value'; + $query_args['meta_key'] = $order_by_column; //'contract_name', etc. + } + foreach($vc as $c){ + $query_args['meta_query'][] = array( + // + // should be able to switch these to just $vc (without the quotes) and LIKE can become + // OR vc1 OR vc2 OR vc3... etc. (How would we do IN( CCV, MBE, SBE...) + // + 'key' => 'contract_vendor_characteristics', + 'value' => ( empty($vc) ? 'null' : ('"'.$c.'"') ), + 'compare' => ( empty($vc) ? 'NOT EXISTS' : 'LIKE' ), + ); + } + + // + // run the query, and show our resulting post data + // + $my_query = new WP_Query($query_args); + + while( $my_query->have_posts() ){ + $my_query->the_post(); + + // FILE Attachment Link - + // We want to create a link using the Contract Number + // + // Note that we have 2 scenarios here... + // One is adding new contract files from the Dashboard. + // In this case, we get back an array (File type) + // When new contracts are created from the add_contract page + // we only get the URL. + // So here we check for an array - + // + + $file_url = ''; + + $file_url = get_field('contract_file'); + + if( is_array($file_url)){ + $file_url = $file_url['url']; + } + elseif( is_numeric($file_url)){ + $file_url = wp_get_attachment_url($file_url); + } + + ?> + + + + + + + + + + + + + + + + + + + + +
Contract NameContract No.ExpiresVendor NameContact NameContact PhoneVendor Characteristics
+ +
+ + '.$alt.'
'.$caption.'
'; + + } // foreach + + } // if ! empty checkbox_values + + ?> + + +
+
+