diff --git a/pages/wot/1.php b/pages/wot/1.php
index 0e8a519..0c442bd 100644
--- a/pages/wot/1.php
+++ b/pages/wot/1.php
@@ -63,28 +63,24 @@
if(intval($_GET['ccid']) <= 0)
{
echo "
\n";
- $query = "select * from `countries` order by `long`";
- $res = mysql_query($query);
+ $res = mysql_query("select distinct `ccid`,`countries`.`long` from `users`,`notary`,`countries` where `listme`='1' and `ccid` > 0 and
+ `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))
{
- $listed = mysql_num_rows(mysql_query("select * from `users`,`notary` where `listme`='1' and
- `ccid`='".$row['id']."' and `users`.`id`=`notary`.`to`
- group by `notary`.`to` HAVING SUM(`points`) >= 100"));
- if($listed > 0)
- echo "- $row[long] ("._("Listed").": $listed)
\n";
+ echo "- $row[long] ("._("Listed").": $listed)
\n";
}
+
echo "
\n\n\n
\n";
} elseif(intval($_GET['ccid']) > 0 && intval($_GET['regid']) <= 0 && intval($_GET['locid']) <= 0) {
echo "\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);
while($row = mysql_fetch_assoc($res))
{
- $listed = mysql_num_rows(mysql_query("select * from `users`,`notary` where `listme`='1' and
- `regid`='".$row['id']."' and `users`.`id`=`notary`.`to`
- group by `notary`.`to` HAVING SUM(`points`) >= 100"));
- if($listed > 0)
- echo "- $row[long] ("._("Listed").": $listed)
\n";
+ echo "- $row[long] ("._("Listed").": $listed)
\n";
}
echo "
\n\n\n\n\n
\n";
} elseif(intval($_GET['regid']) > 0 && intval($_GET['locid']) <= 0) {
diff --git a/pages/wot/5.php b/pages/wot/5.php
index d4e74be..39dc402 100644
--- a/pages/wot/5.php
+++ b/pages/wot/5.php
@@ -13,6 +13,13 @@
PARTICULAR PURPOSE. See the License for more details.
*/ ?>
if($_SESSION['_config']['error'] != "") { ?>ERROR: =$_SESSION['_config']['error']?>
unset($_SESSION['_config']['error']); } ?>
+ if($_SESSION['_config']['noemailfound'] == 1) { ?>
+
+ unset($_SESSION['_config']['noemailfound']); } ?>