@ -63,28 +63,24 @@
if(intval($_GET['ccid']) < = 0)
if(intval($_GET['ccid']) < = 0)
{
{
echo "< ul > \n";
echo "< ul > \n";
$query = "select * from `countries` order by `long`";
$res = mysql_query("select distinct `ccid`,`countries`.`long` from `users`,`notary`,`countries` where `listme`='1' and `ccid` > 0 and
$res = mysql_query($query);
`users`.`id`=`notary`.`to` and `ccid`=`countries`.`id` group by `notary`.`to` HAVING SUM(`points`) >= 100
order by `countries`.`long`");
while($row = mysql_fetch_assoc($res))
while($row = mysql_fetch_assoc($res))
{
{
$listed = mysql_num_rows(mysql_query("select * from `users`,`notary` where `listme`='1' and
echo "< li > < a href = 'wot.php?id=1&ccid=$row[ccid]' > $row[long] ("._("Listed").": $listed)< / a > < / li > \n";
`ccid`='".$row['id']."' and `users`.`id`=`notary`.`to`
group by `notary`.`to` HAVING SUM(`points`) >= 100"));
if($listed > 0)
echo "< li > < a href = 'wot.php?id=1&ccid=$row[id]' > $row[long] ("._("Listed").": $listed)< / a > < / li > \n";
}
}
echo "< / ul > \n< / li > \n< / ul > \n< br > \n";
echo "< / ul > \n< / li > \n< / ul > \n< br > \n";
} elseif(intval($_GET['ccid']) > 0 & & intval($_GET['regid']) < = 0 & & intval($_GET['locid']) < = 0) {
} elseif(intval($_GET['ccid']) > 0 & & intval($_GET['regid']) < = 0 & & intval($_GET['locid']) < = 0) {
echo "< ul > \n";
echo "< ul > \n";
$query = "select * from `regions` where `ccid`='".$_GET['ccid']."' order by `long`";
$query = "select distinct `regid`,`regions`.`long` from `users`,`notary`,`regions` where `listme`='1' and `users`.`id`=`notary`.`to` and
`regid`=`regions`.`id` and `users`.`ccid`='".$_GET['ccid']."' group by `notary`.`to`
HAVING SUM(`points`) >= 100 order by `regions`.`long`";
$res = mysql_query($query);
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
while($row = mysql_fetch_assoc($res))
{
{
$listed = mysql_num_rows(mysql_query("select * from `users`,`notary` where `listme`='1' and
echo "< li > < a href = 'wot.php?id=1®id=$row[regid]' > $row[long] ("._("Listed").": $listed)< / a > < / li > \n";
`regid`='".$row['id']."' and `users`.`id`=`notary`.`to`
group by `notary`.`to` HAVING SUM(`points`) >= 100"));
if($listed > 0)
echo "< li > < a href = 'wot.php?id=1®id=$row[id]' > $row[long] ("._("Listed").": $listed)< / a > < / li > \n";
}
}
echo "< / ul > \n< / li > \n< / ul > \n< / li > \n< / ul > \n< br > \n";
echo "< / ul > \n< / li > \n< / ul > \n< / li > \n< / ul > \n< br > \n";
} elseif(intval($_GET['regid']) > 0 & & intval($_GET['locid']) < = 0) {
} elseif(intval($_GET['regid']) > 0 & & intval($_GET['locid']) < = 0) {