0) { $sql .= implode(' or ', $qsl); } else { $sql .= '1=0'; } $sql .= ')'; } else { $sql.=' and 1=0'; } return $sql; } function addBandToQuery($band) { $sql = ''; if ($band != 'All') { if ($band == 'SAT') { $sql .= " and col_prop_mode ='" . $band . "'"; } else { $sql .= " and col_prop_mode !='SAT'"; $sql .= " and col_band ='" . $band . "'"; } } return $sql; } function gen_qsl_from_postdata($postdata) { $qsl=''; if ($postdata['confirmed'] != NULL) { if ($postdata['qsl'] != NULL ) { $qsl .= "Q"; } if ($postdata['lotw'] != NULL ) { $qsl .= "L"; } if ($postdata['eqsl'] != NULL ) { $qsl .= "E"; } if ($postdata['qrz'] != NULL ) { $qsl .= "Z"; } } return $qsl; } }