first commit
This commit is contained in:
72
admin/rangliste3.php
Executable file
72
admin/rangliste3.php
Executable file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
if (!isset($_SESSION))
|
||||
{
|
||||
session_start();
|
||||
}
|
||||
include_once '../classes/TestProjektSmarty.class_subdir.php';
|
||||
require_once ("../config.inc.php");
|
||||
$templatename = substr(basename($_SERVER['PHP_SELF']) , 0, -3) . "html";
|
||||
$smarty = new SmartyAdmin();
|
||||
require_once "../language/german.inc.php";
|
||||
|
||||
if (isset($_GET['action']))
|
||||
{
|
||||
$action = $_GET['action'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$action = '';
|
||||
}
|
||||
|
||||
if ($action == '')
|
||||
{
|
||||
# Wann wurden die Ranglisten berechnet
|
||||
$query_tab_created = $db->query("SELECT date_format(create_time, '%d.%m.%Y - %H:%i:%s') create_time
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE table_schema = 'bpm'
|
||||
AND table_name = 'bpm_tmp_jahrgang_kandidat'
|
||||
");
|
||||
$row_tab_created = $query_tab_created->fetch_array();
|
||||
$smarty->assign('create_time', $row_tab_created['create_time']);
|
||||
|
||||
# Gespeicherte Werte
|
||||
$query1 = "SELECT ka_id
|
||||
, vorname
|
||||
, nachname, date_format(tm_datum, '%d.%m.%Y um %H:%i Uhr') tm_datum
|
||||
, CASE tm_standort
|
||||
WHEN 'L' THEN 'Ludwigsburg'
|
||||
WHEN 'K' THEN 'Kehl'
|
||||
ELSE ''
|
||||
END as tm_standort
|
||||
, testergebnis
|
||||
, id
|
||||
, mail
|
||||
, hzb
|
||||
, testergebnis
|
||||
, rang1
|
||||
, rang2
|
||||
, rang3
|
||||
, (rang1+rang2)/2 rang3_berech
|
||||
FROM bpm_tmp_jahrgang_kandidat
|
||||
ORDER BY rang3 ASC
|
||||
";
|
||||
|
||||
$result1 = $db->query($query1) or die("Cannot execute query1");
|
||||
$row_cnt = $result1->num_rows;
|
||||
$smarty->assign('dokverw_anzdb', $row_cnt);
|
||||
|
||||
while ($row1 = $result1->fetch_array())
|
||||
{
|
||||
$row1['hzb_form'] = number_format($row1['hzb'], 2, ',', '.');
|
||||
$row1['rang3_berech_form'] = number_format($row1['rang3_berech'], 2, ',', '.');
|
||||
$row1['rangliste'] = $row1['rang3'];
|
||||
$table_data1[] = $row1;
|
||||
}
|
||||
$smarty->assign('table_data1', $table_data1);
|
||||
|
||||
}
|
||||
|
||||
$smarty->assign('action', "$action");
|
||||
$smarty->display("$template/admin/$templatename");
|
||||
|
||||
?>
|
Reference in New Issue
Block a user