|
|
@ -52,47 +52,29 @@
|
|
|
|
if(intval($_GET['ccid']) <= 0)
|
|
|
|
if(intval($_GET['ccid']) <= 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
echo "<ul>\n";
|
|
|
|
echo "<ul>\n";
|
|
|
|
$res = mysql_query("select distinct `ccid`,`countries`.`name` from `users`,`notary`,`countries` where `listme`='1' and `ccid` > 0 and
|
|
|
|
$query = "select * from countries where acount>0 order by `name`";
|
|
|
|
`users`.`id`=`notary`.`to` and `ccid`=`countries`.`id` group by `notary`.`to` HAVING SUM(`points`) >= 100
|
|
|
|
$res = mysql_query($query);
|
|
|
|
order by `countries`.`name`");
|
|
|
|
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$query = "select sum(`users`.`id`) as `listed` from `users`,`notary`
|
|
|
|
echo "<li><a href='wot.php?id=1&ccid=$row[id]'>$row[name] ("._("Listed").": $row[acount])</a></li>\n";
|
|
|
|
where `listme`='1' and `ccid` = '$row[ccid]' and `users`.`id`=`notary`.`to`
|
|
|
|
|
|
|
|
group by `notary`.`to` HAVING SUM(`points`) >= 100";
|
|
|
|
|
|
|
|
$listed = mysql_num_rows(mysql_query($query));
|
|
|
|
|
|
|
|
echo "<li><a href='wot.php?id=1&ccid=$row[ccid]'>$row[name] ("._("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 distinct `regid`,`regions`.`name` from `users`,`notary`,`regions` where `listme`='1' and `users`.`id`=`notary`.`to` and
|
|
|
|
$query = "select * from regions where ccid='".intval($_GET['ccid'])."' and acount>0 order by `name`";
|
|
|
|
`regid`=`regions`.`id` and `users`.`ccid`='".intval($_GET['ccid'])."' group by `notary`.`to`
|
|
|
|
|
|
|
|
HAVING SUM(`points`) >= 100 order by `regions`.`name`";
|
|
|
|
|
|
|
|
$res = mysql_query($query);
|
|
|
|
$res = mysql_query($query);
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$query = "select sum(`users`.`id`) as `listed` from `users`,`notary`
|
|
|
|
echo "<li><a href='wot.php?id=1®id=$row[id]'>$row[name] ("._("Listed").": $row[acount])</a></li>\n";
|
|
|
|
where `listme`='1' and `regid` = '$row[regid]' and `users`.`id`=`notary`.`to`
|
|
|
|
|
|
|
|
group by `notary`.`to` HAVING SUM(`points`) >= 100";
|
|
|
|
|
|
|
|
$listed = mysql_num_rows(mysql_query($query));
|
|
|
|
|
|
|
|
echo "<li><a href='wot.php?id=1®id=$row[regid]'>$row[name] ("._("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) {
|
|
|
|
echo "<ul>\n";
|
|
|
|
echo "<ul>\n";
|
|
|
|
$query = "select * from `users`,`notary` where `listme`='1' and `regid`='".intval($_GET['regid'])."' and
|
|
|
|
$query = "select * from locations where regid='".intval($_GET['regid'])."' and acount>0 order by `name`";
|
|
|
|
`users`.`id`=`notary`.`to` group by `locid` HAVING SUM(`points`) >= 100";
|
|
|
|
|
|
|
|
$res = mysql_query($query);
|
|
|
|
$res = mysql_query($query);
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$loc = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='$row[locid]'"));
|
|
|
|
echo "<li><a href='wot.php?id=1&locid=$row[id]'>$row[name] ("._("Listed").": $row[acount])</a></li>\n";
|
|
|
|
$listed = mysql_num_rows(mysql_query("select * from `users`,`notary` where `listme`='1' and
|
|
|
|
|
|
|
|
`locid`='".$row['locid']."' and `locid`!=0 and `users`.`id`=`notary`.`to`
|
|
|
|
|
|
|
|
group by `notary`.`to` HAVING SUM(`points`) >= 100"));
|
|
|
|
|
|
|
|
if($listed > 0)
|
|
|
|
|
|
|
|
echo "<li><a href='wot.php?id=1&locid=$loc[id]'>$loc[name] ("._("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['locid']) > 0){
|
|
|
|
} elseif(intval($_GET['locid']) > 0){
|
|
|
|