Compare commits
2 Commits
42d3f01176
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
484cf11c07 | ||
|
|
2e77ac243b |
@@ -9,7 +9,8 @@
|
|||||||
$table = $_GET['table'];
|
$table = $_GET['table'];
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-type: text/csv');
|
ob_start('ob_gzhandler'); #compressing data which is sent to the browser, the browser will decompress the data automatically
|
||||||
|
header('Content-type: text/csv; charset="UTF-8" ');
|
||||||
header('Content-Disposition: attachment; filename="table.csv" ');
|
header('Content-Disposition: attachment; filename="table.csv" ');
|
||||||
|
|
||||||
function download_table($stmt) {
|
function download_table($stmt) {
|
||||||
|
|||||||
@@ -235,6 +235,9 @@ function update_points($con, $s_id) {
|
|||||||
$factor = $results[0]['erg']/ 15.0;
|
$factor = $results[0]['erg']/ 15.0;
|
||||||
foreach($results as $row) {
|
foreach($results as $row) {
|
||||||
$points = round($row['erg']/$factor);
|
$points = round($row['erg']/$factor);
|
||||||
|
if ($points == 0 && $row['erg'] != 0) {
|
||||||
|
$points = 1;
|
||||||
|
}
|
||||||
change_points($con, $row['m_id'], $s_id, $points);
|
change_points($con, $row['m_id'], $s_id, $points);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user