query($query_punkte) or die("Cannot execute punkte"); $row_cnt_punkte = $result_punkte->num_rows; $smarty->assign('anz_punkte', $row_cnt_punkte); while ($row_punkte = $result_punkte->fetch_array()) { $row_punkte['hzb_form'] = number_format($row_punkte['hzb'], 2, ',', '.'); $row_punkte['hzb_punkte_form'] = number_format($row_punkte['hzb_punkte'], 2, ',', '.'); $table_punkte[] = $row_punkte; } $smarty->assign('table_punkte', $table_punkte); # 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 , hzb , id , mail , rang1 FROM bpm_tmp_jahrgang_kandidat ORDER BY rang1 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['rangliste'] = $row1['rang1']; $table_data1[] = $row1; } $smarty->assign('table_data1', $table_data1); } $smarty->assign('action', "$action"); $smarty->display("$template/admin/$templatename"); ?>