/*
LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ ?>
$res=mysql_fetch_assoc(mysql_query("select sum(acount) as summe from countries"));
$total1 =$res['summe'];
echo "
\n- ";
echo ""._("Home")." ("._("Listed").": $total1)\n";
$display = "";
if(intval($_GET['locid']) > 0)
{
$loc = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='".intval($_GET['locid'])."'"));
$display = "
\n- \n".
"$loc[name] ("._("Listed").": $loc[acount])\n".
$display;
$_GET['regid'] = $loc['regid'];
}
if(intval($_GET['regid']) > 0)
{
$reg = mysql_fetch_assoc(mysql_query("select * from `regions` where `id`='".intval($_GET['regid'])."'"));
$display = "
\n- \n".
"$reg[name] ("._("Listed").": $reg[acount])\n".
$display;
$_GET['ccid'] = $reg['ccid'];
}
if(intval($_GET['ccid']) > 0)
{
$cnt = mysql_fetch_assoc(mysql_query("select * from `countries` where `id`='".intval($_GET['ccid'])."'"));
$display = "\n
\n";
} elseif(intval($_GET['ccid']) > 0 && intval($_GET['regid']) <= 0 && intval($_GET['locid']) <= 0) {
echo "\n";
$query = "select * from regions where ccid='".intval($_GET['ccid'])."' and acount>0 order by `name`";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
echo "- $row[name] ("._("Listed").": $row[acount])
\n";
}
echo "
\n \n
\n \n
\n
\n";
} elseif(intval($_GET['regid']) > 0 && intval($_GET['locid']) <= 0) {
echo "\n";
$query = "select * from locations where regid='".intval($_GET['regid'])."' and acount>0 order by `name`";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
echo "- $row[name] ("._("Listed").": $row[acount])
\n";
}
echo "
\n \n
\n\n\n
\n";
} elseif(intval($_GET['locid']) > 0){
echo "\n\n\n\n\n\n\n
\n";
}
$query = "select *, `users`.`id` as `id` from `users`,`notary` where `listme`='1' and
`ccid`='".intval($_GET['ccid'])."' and `regid`='".intval($_GET['regid'])."' and
`locid`='".intval($_GET['locid'])."' and `users`.`id`=`notary`.`to`
group by `notary`.`to` HAVING SUM(`points`) >= 100 order by `points` desc";
$list = mysql_query($query);
if(mysql_num_rows($list) > 0)
{
?>
=_("Name")?> |
=_("Max Points")?> |
=_("Contact Details")?> |
=_("Email Assurer")?> |
while($row = mysql_fetch_assoc($list)) { ?>
=$row['fname']?> =substr($row['lname'], 0, 1)?> |
=maxpoints($row['id'])?> |
=$row['contactinfo']?> |
=_("Email Me")?> |
} ?>
} ?>