- Tell the user if there are no stats

This commit is contained in:
dave 2010-01-21 20:32:54 +00:00
parent e20ff584cb
commit c463c13f01

View File

@ -102,7 +102,7 @@ $server_config['info'] = false;
$server_config['next_chair'] = false;
$server_config['scholarships'] = false;
$server_config['delegates'] = false;
$server_any_stats = false;
$year = intval($_POST['year']);
if($year < 1900) $year = $config['FAIRYEAR'];
@ -113,7 +113,11 @@ echo mysql_error();
$fair = mysql_fetch_assoc($q);
$s = split(',', $fair['gather_stats']);
foreach($s as $k) $server_config[$k] = true;
foreach($s as $k) {
if(trim($k) == '') continue;
$server_config[$k] = true;
$server_any_stats = true;
}
/*
@ -323,7 +327,13 @@ $stats = mysql_fetch_assoc($q);
echo '<br />';
}
if($server_any_stats == false) {
/* Every condition below will fail, tell the user something */
echo i18n("No stats to gather. Contact the admins if you believe this is an error.");
} else {
echo "<input type=\"submit\" onClick=\"stats_save(); return false;\"value=\"".i18n('Save Fair Information')."\" />";
}
echo '</form>';
echo "<br />";
echo "<br />";