ORIGINAL CODES:
COUNTRY CODE (If you click on a country the fannumber is shown and the members of this country are listed =
Australia 2 members
ID Name Email URL
[067] becky lorraine @ www
[062] Kassandra @ www )
MEMBER CODE (Shows Fannumber per country =Code:<? <? include("config.php"); include("$header"); $query="SELECT * FROM $table WHERE apr='y' AND country='$id' ORDER BY $countrysort ASC"; $result=mysql_query($query); $num=mysql_numrows($result); ?> <h2> <? if ($num == "1"){ echo "$num Member"; } else { echo "$num Members"; } ?> from <?=$id?></h2> <p>See also the <a href="members.php?id=all">complete list</a> or <a href="members.php">browse by country</a>.</p> <div align="center"><table border="0" cellspacing="0" cellpadding="5"> <tr> <td><strong>ID</strong></td> <td><strong>Name</strong></td> <td><strong>Email</strong></td> <td><strong>URL</strong></td> </tr> <? $i=0; while ($i < $num) { $id=mysql_result($result,$i,"id"); $name=mysql_result($result,$i,"name"); $email=mysql_result($result,$i,"email"); $url=mysql_result($result,$i,"url"); $hide=mysql_result($result,$i,"hideemail"); $id = sprintf("%03.0f", $id); echo "<td>[$id]</td> <td>$name</td>"; if ($hide != "h"){ $array = explode("@", $email); $first = $array[0]; $last = $array[1];?> <td><SCRIPT TYPE="text/javascript"> emailE=('<?=$first?>' + '@' + '<?=$last?>') document.write( '<A HREF="mailto:' + emailE + '">' + '@' +'</a>' ) </SCRIPT></td> <? } else { echo "<td><s>@</s></td>"; } if ($url == "") { echo "<td><s>www</s></td>"; } elseif ($url !== "") { echo "<td><a href=\"$url\" target=\"_blank\">www</a></td>"; } { echo "</tr>"; } ++$i; } echo "</table></div>"; include("$footer"); ?>
Australia 3 fans
Belgium 1 fan
and
lists fannames, urls, @ - sorted by =
ID Name Email URL Country
[019] Alicia @ www USA
[036] Ally @ www Canada
[040] Alyssia @ www Switzerland )
Please show me what I have to add or to change, if I want:Code:<? <? include("config.php"); include("$header"); if ($id == 'all'){ $query="SELECT * FROM $table WHERE apr='y' ORDER BY $allsort ASC"; $result=mysql_query($query); $num=mysql_numrows($result); ?> <h2><?=$num?> Members</h2> <p>The complete list (view <a href="members.php">sorted by country</a>):</p> <div align="center"><table border="0" cellspacing="0" cellpadding="5"> <tr> <td><strong>ID</strong></td> <td><strong>Name</strong></td> <td><strong>Email</strong></td> <td><strong>URL</strong></td> <td><strong>Country</strong></td> </tr> <? $i=0; while ($i < $num) { $id=mysql_result($result,$i,"id"); $name=mysql_result($result,$i,"name"); $email=mysql_result($result,$i,"email"); $url=mysql_result($result,$i,"url"); $country=mysql_result($result,$i,"country"); $hide=mysql_result($result,$i,"hideemail"); $id = sprintf("%03.0f", $id); echo "<td>[$id]</td> <td>$name</td>"; if ($hide != "h"){ $array = explode("@", $email); $first = $array[0]; $last = $array[1];?> <td><SCRIPT TYPE="text/javascript"> emailE=('<?=$first?>' + '@' + '<?=$last?>') document.write( '<A HREF="mailto:' + emailE + '">' + '@' +'</a>' ) </SCRIPT></td> <? } else { echo "<td><s>@</s></td>"; } if ($url == "") { echo "<td><s>www</s></td>"; } elseif ($url !== "") { echo "<td><a href=\"$url\" target=\"_blank\">www</a></td>"; } echo "<td>$country</td>"; { echo "</tr>"; } ++$i; } echo "</table></div>"; ?> <div align="center"><p>Powered by <a href="http://nothing-less.net/Nothing/you/script_fanbase.php" target="_blank">PHPFanBase</a> 2.0</p></div> <? } else { $query="SELECT DISTINCT country FROM $table WHERE apr='y' ORDER BY country ASC"; $result=mysql_query($query); $num=mysql_numrows($result); ?> <h2><?=$num?> Countries</h2> <p>Here you can view the members sorted by country (click <a href="members.php?id=all">here</a> to view the whole list). Click on the country name to see the members from that country.</p> <div align="center"><table border="0" cellspacing="0" cellpadding="5"> <tr> <td><strong>Country</strong></td> <td><strong>Fans</strong></td></tr> <? $i=0; while ($i < $num) { $country=mysql_result($result,$i,"country"); $query2="SELECT id FROM $table WHERE apr='y' AND country='$country'"; $result2=mysql_query($query2); $num2=mysql_numrows($result2); echo "<td><a href=\"country.php?id=$country\">$country</a></td>"; if ($num2 == "1"){ echo "<td>$num2 fan</td></tr>"; } else { echo "<td>$num2 fans</td></tr>"; } ++$i; } echo "</table></div>";} include("$footer"); ?>
=> all countries sorted in alphabetical order
including the total fannumber of the country
if you click on a country
=> view states and regions of this country including the
fannumber of those states or regions
if you click on a state or region
=> view cities of this state or region including the
fannumber of those cities
if you click on a city
=> view name, year of birth, m/f, url and @ of the fans in this city!



Reply With Quote

Bookmarks