0) { $sql.= "(id > ".$mail_broke_at.") "; $xsear = true; } if ($S_email != '') { if ($xsear) $sql.= "AND "; $sql.= "(email LIKE '%".$S_email."%') "; $xsear = true; } if ($S_url != '') { if ($xsear) $sql.= "AND "; $sql.= "(your_url LIKE '%".$S_url."%') "; $xsear = true; } if ($S_demo != '-') { if ($xsear) $sql.= "AND "; $sql.= "(demo = ".$S_demo.") "; $xsear = true; } if ($S_visible != '-') { if ($xsear) $sql.= "AND "; $sql.= "(visible = ".$S_visible.") "; $xsear = true; } if ($S_conf != '-') { if ($xsear) $sql.= "AND "; $sql.= "(conf = ".$S_conf.") "; $xsear = true; } if ($S_hits != '') { if ($xsear) $sql.= "AND "; $sql.= "(hits ".$S_hits_x." '".$S_hits."') "; $xsear = true; } if ($S_timeout != '') { if ($xsear) $sql.= "AND "; $sql.= "(timeout ".$S_timeout_x." '".$S_timeout."') "; $xsear = true; } if ($S_access != '') { if ($xsear) $sql.= "AND "; $sql.= "(ROUND(access_diff/(24*60*60)) ".$S_access_x." ".($S_access).") "; $xsear = true; } if ($S_gmt != '') { if ($xsear) $sql.= "AND "; $sql.= "(gmt ".$S_gmt_x." ".$S_gmt.") "; $xsear = true; } if (!$xsear) $sql = ''; // if an empty search has been submited return $sql; }