Files
admin
old
Import_CSV_Hogrefe.xlsx
bewerber_daten.php
datencheck.php
dokverw.php
downpdf.php
ergebnisse.php
fetch.php
kand_del.php
liste_tn.php
logout.php
mail_test.php
parameter.php
praxisstellen_edit.php
praxisstellen_news.php
prx_search.php
rangliste2.php
rangliste2_excel.php
save_note.php
tanimport.php
termine.php_bcc
termine_kandidat.php
test_csv.php
upload.php
phpqrcode
#config.php
2022-01-12_unzugeordnet.php
administration_frame.php
fill_qr.php
gd_verwaltung.php
hauptframe.php
index.php
indexframe.php
liste_qr_name.php
liste_tn.php
logout.php
menu_administration.php
menu_qr.php
menu_survey.php
menu_verwaltung.php
menu_youtube.php
parameter.php
qr_code.php
qr_frame.php
result_latest.php
save_platz.php
sitz_koord.php
sitzplatz.php
sort_table.html
sort_table.php
survey_erfassen.php
survey_frame.php
termine.php
titel.php
unzugeordnet.php
verwaltung_frame.php
warteliste.php
youtube_frame.php
auswertung
bootstrap
classes
config
controller
dashboard
dashboard_bak
datepicker
jquery
js
language
lib
media
mpdf
sql
survey
templates
templates_c
test
test2
config.inc.php
todo.txt
survey/admin/old/rangliste2.php
2023-03-14 14:47:50 +01:00

72 lines
2.1 KiB
PHP

<?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 == '') {
# Gespeicherte Werte
$query1 = "SELECT a.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
, summe
, id
, mail
FROM bpm_kandidat a, bpm_term_kand b, bpm_termine c, bpm_ergebnisse d, bpm_tanpool e
WHERE a.ka_id = b.ka_id
AND b.tm_id = c.tm_id
AND a.ka_id = d.ka_id
AND b.tp_id = e.tp_id
AND a.ka_id IN (SELECT distinct ka_id FROM bpm_ergebnisse)
AND a.ka_id IN (SELECT distinct ka_id FROM bpm_upload WHERE upload_dat != '0000-00-00 00:00:00')
AND d.bestanden = '1'
AND e.tan=d.tan
ORDER BY summe DESC, nachname ASC, vorname ASC
";
$result1 = $db->query($query1) or die("Cannot execute query1");
$row_cnt = $result1->num_rows;
$smarty->assign('dokverw_anzdb', $row_cnt);
$rangliste = 0;
$lfd_nr2 = 0;
$lfd_nr3 = 0;
$summevorher = 0;
while ($row1 = $result1->fetch_array()) {
$lfd_nr2++;
$summe = $row1['summe'];
if($summe == $summevorher){
$rangliste = $lfd_nr3;
}else{
$rangliste = $lfd_nr2;
$lfd_nr3 = $lfd_nr2;
}
$summevorher = $row1['summe'];
$row1['rangliste'] = $rangliste;
$table_data1[] = $row1;
}
$smarty->assign('table_data1', $table_data1);
}
$smarty->assign('action', "$action");
$smarty->display("$template/admin/$templatename");
?>