<% #Read Field List File $OFile = "MMFields.txt"; open (ORDNUM, $OFile); while () { $FieldList = $_; } $ONum = ++$ONum; close (ORDNUM); @Fields = split(/,/,($FieldList)); #print $FieldList; #Setup Search Variables if ( $Request->Form('flash_make') ne "" ) { $Mode="FIND"; $Group=$Request->Form('flash_make'); $SubGroup=$Request->Form('flash_model'); } elsif ( $Request->QueryString('flash_make') ne "" ) { $Mode="FIND"; $Group=$Request->QueryString('flash_make'); $SubGroup=$Request->QueryString('flash_model'); } else { $Mode="SHOW"; } if ($SubGroup=="~any~") { $Mode="SHOW"; } if ( $Mode eq 'FIND' ){ &ProcessRecords; } else { print "

Please, select a flash make and model.

"; } %>
<% #Process Search Records sub ProcessRecords { $SearchFile = "MMProduct.txt"; $Matched=0; $Found=0; open (LISTINGS, $SearchFile); while ($Listing = ) { #$VAR{'hidden_fields'} = $hidden_fields; @data_fields = split(/\|/,$Listing); $Show=1; #Check Model Match if ($SubGroup){ if (@data_fields[1] ne $SubGroup){ $Show=0; } } #If Record Passed Search Criteria then Show the records\ $Matched =0; $ctr=0; if ($Show) { $Matched = ++$Matched; foreach $rfield (@Fields) { $VAR{$rfield} = @data_fields[$ctr]; #print $ctr . $rfield . "=" . @data_fields[$ctr] . "
"; $ctr = ++$ctr; } %>
<% #Show Omni if(@data_fields[4]) { $Found=1; %> <% } #Show TwoWay if(@data_fields[8]) { $Found=1; %> <% } #Show Color Set if(@data_fields[20]) { $Found=1; %> <% } #Show Green if(@data_fields[12]) { $Found=1; %> <% } #Show Gold if(@data_fields[16]) { $Found=1; %> <% } #Show Snoot if(@data_fields[24]) { $Found=1; %> <% } #Show Sensor if(@data_fields[28]) { $Found=1; %> <% } #Show Omni Adapter if(@data_fields[36]) { $Found=1; %> <% } else { $VAR{"ADPMSG"} = "display:none;" } #Show Two-Way Adapter if(@data_fields[32]) { $Found=1; %> <% } %>
<%="" . $VAR{"Make"} . " " . $VAR{"Model"} %>
Product Price
<%= $VAR{"Omni_Name"} %> <%= $VAR{"Omni_Price"} %> &function=add"> Add to Cart
<%= $VAR{"TwoWay_Name"} %> <%= $VAR{"TwoWay_Price"} %> &function=add"> Add to Cart
<%= $VAR{"ColorSet_Name"} %> <%= $VAR{"ColorSet_Price"} %> &function=add"> Add to Cart
<%= $VAR{"Green_Name"} %> <%= $VAR{"Green_Price"} %> &function=add"> Add to Cart
<%= $VAR{"Gold_Name"} %> <%= $VAR{"Gold_Price"} %> &function=add"> Add to Cart
<%= $VAR{"Snoot_Name"} %> <%= $VAR{"Snoot_Price"} %> &function=add"> Add to Cart
<%= $VAR{"Sensor_Name"} %> <%= $VAR{"Sensor_Price"} %> &function=add"> Add to Cart
<%= $VAR{"OMA_Name"} %> <%= $VAR{"OMA_Price"} %> &function=add"> Add to Cart
<%= $VAR{"TWA_Name"} %> <%= $VAR{"TWA_Price"} %> &function=add"> Add to Cart

NOTE: Omni-Adapter is NOT included with Green, Gold and Color Sets
<% } } close (LISTINGS); if ($Found eq 0){ %>
<%="" . $VAR{"Make"} . " " . $VAR{"Model"} %> Coming Soon!
<% } } %>