Client name begins with : "; for ($x=0;$x<26;$x=$x+1) { $num_other_clients_query=$num_other_clients_query."clientname NOT LIKE \"".chr($x+65)."%\" AND clientname NOT like \"".chr($x+97)."%\" AND "; $res_num_clients = db_query("SELECT count(clientID) FROM $phpAds_tbl_clients where clientname like \"".chr($x+65)."%\" or clientname like \"".chr($x+97)."%\"") or mysql_die(); if ($res_num_clients && MYSQL_RESULT($res_num_clients,0,"count(clientID)") > 0) print "".chr($x+97)." "; else print chr($x+97)." "; } $num_other_clients_query=substr($num_other_clients_query,0,strlen($num_other_clients_query)-4); $num_other_clients_query_complete="SELECT count(clientID) FROM $phpAds_tbl_clients WHERE ".$num_other_clients_query; $res_num_other_clients = db_query($num_other_clients_query_complete); if ($res_num_other_clients && MYSQL_RESULT($res_num_other_clients,0,"count(clientID)") > 0) print "Other"; else print "Other"; print "
\n"; $client_query=" SELECT clientID, clientname, contact, email, views, clicks, expire FROM $phpAds_tbl_clients"; if (isset($startletter) && strlen($startletter)>0) { if ($startletter=="other") $client_query=$client_query." WHERE ".$num_other_clients_query; else $client_query=$client_query." WHERE clientname like \"".strtolower($startletter)."%\" or clientname like \"".strtoupper($startletter)."%\""; } else { $client_query=$client_query." WHERE clientname like \"a%\" or clientname like \"A%\""; } $client_query=$client_query." ORDER BY clientID"; $res_clients = db_query($client_query) or mysql_die() ; ?> \n"; print "\n"; ?>
$row_clients[contact]"; ?>
"; ?> : :
: : : :
"; if ($row_clients[clicks]==-1) print " "; else print "