$rst = mysql_wrap ("SELECT *, COUNT(*) as count, sum(rank_avg) as sum_avg, sum(rank_overall) as sum_overall , sum(rank_teachers) as sum_teachers , sum(rank_admin) as sum_admin , sum(rank_support) as sum_support, sum(rank_technology) as sum_technology FROM rankings WHERE auth_admin_confirmed=1 AND school =\"$school\" GROUP BY school LIMIT 1");
//print_r($rst);
$totalRecords = $rst['count'];
$thisPage = ceil(($firstRecord/$display)+1);
$totalPages = ceil($totalRecords/$display);
?>
if (isset ($firstRecord)) { $start = "$firstRecord,"; }
$sql = "SELECT * FROM rankings WHERE auth_admin_confirmed=1 AND school =\"$school\" ORDER BY rank_date DESC LIMIT $start $display";
//echo $sql;
$rst = mysql_wrap ($sql);
foreach ($rst as $v)
{
?>
}?>
Reviews for =$school?>
Ranking Summary
(=number_format(($rst['sum_avg']/$rst['count'])*20, 1)?>%)
Average Ranking:
(=number_format(($rst['sum_overall']/$rst['count'])*20, 1)?>%)
Overall:
(=number_format(($rst['sum_teachers']/$rst['count'])*20, 1)?>%)
Teachers:
(=number_format(($rst['sum_admin']/$rst['count'])*20, 1)?>%)
Admin:
(=number_format(($rst['sum_support']/$rst['count'])*20, 1)?>%)
Support:
(=number_format(($rst['sum_technology'])*20/$rst['count'], 1)?>%)
Technology:
Total: =$totalRecords?> reviews
Page =$thisPage?> of =$totalPages?>
if ($thisPage-1 != 0)
{
echo "«";
}
for ($i=1; $i<=$totalPages; $i++)
{
if ($i == $thisPage) { echo "$thisPage"; continue; }
else
{
$limit = ((($i*$display)-$display) != 0)?(($i*$display)-$display):'';
echo "$i";
}
}
if ($thisPage != $totalPages)
{
echo "»";
}
?>
Review: =$v['title']?>
Date: =date('F j, Y', strtotime($v['rank_date']))?>
Degree: =$v['degree']?>
Program: =$v['program']?>
Rankings:
(=number_format($v['rank_overall']*20, 1)?>%)
Overall:
(=number_format($v['rank_teachers']*20, 1)?>%)
Teachers:
(=number_format($v['rank_admin']*20, 1)?>%)
Admin:
(=number_format($v['rank_support']*20, 1)?>%)
Support:
(=number_format($v['rank_technology']*20, 1)?>%)
Technology:
=$v['review']?>
Total: =$totalRecords?> reviews
Page =$thisPage?> of =$totalPages?>
if ($thisPage-1 != 0)
{
echo "«";
}
for ($i=1; $i<=$totalPages; $i++)
{
if ($i == $thisPage) { echo "$thisPage"; continue; }
else
{
$limit = ((($i*$display)-$display) != 0)?(($i*$display)-$display):'';
echo "$i";
}
}
if ($thisPage != $totalPages)
{
echo "»";
}
?>