-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathajaxRequest.php
More file actions
106 lines (89 loc) · 3.55 KB
/
ajaxRequest.php
File metadata and controls
106 lines (89 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
session_start();
include "function.php";
$link = connectDB();
$_GET = filterParameters($_GET);
$_POST = filterParameters($_POST);
if(isset($_GET['func'])) {
if($_GET['func'] == 'selectVeranstaltung') { selectVeranstaltung($_GET['id']); }
if($_GET['func'] == 'lockRace') { lockRace($_GET['lid']); }
if($_GET['func'] == 'addKlasse') { addKlasse($_GET['id']); }
if($_GET['func'] == 'deleteKlasse') { deleteKlasse($_GET['id']); }
if($_GET['func'] == 'deleteFullKlasse') { deleteFullKlasse(); }
if($_GET['func'] == 'getVerein') { getVerein(); }
if($_GET['func'] == 'getKlasse') { getKlasse($_GET['jg'], $_GET['sex'], $_GET['lid'], 1); }
if($_GET['func'] == 'getLastRaceUpdate') { getLastRaceUpdate(); }
if($_GET['func'] == 'showStartliste') { showStartliste(); }
if($_GET['func'] == 'showErgebnisse') { showErgebnisse(); }
if($_GET['func'] == 'showErgebnisseM') { showErgebnisseM(); }
if($_GET['func'] == 'setNumOfResults') { setNumOfResults(); }
if($_GET['func'] == 'doAuswertung') { doAuswertung(); }
if($_GET['func'] == 'clearRaceId') { clearRaceId(); }
if($_GET['func'] == 'showEinlaufListe') { showEinlaufListe(); }
if($_GET['func'] == 'saveManZielzeit') { saveManZielzeit(); }
if($_GET['func'] == 'showZielAnalyse') { showZielAnalyse(); }
if($_GET['func'] == 'deleteManReaderTime') { deleteManReaderTime(); }
if($_GET['func'] == 'specialReporting') { specialReporting(); }
if($_GET['func'] == 'chat') { getChatMessage( $_GET['id']); }
if($_GET['func'] == 'getHelpMessage') { getHelpMessage( $_GET['id']); }
}
if(isset($_POST['form'])) {
if($_POST['form'] == 'saveVeranstaltung') { saveVeranstaltung(); }
if($_POST['form'] == 'saveRennen') { saveRennen(); }
if($_POST['form'] == 'saveKlasse') { saveKlasse(); }
if($_POST['form'] == 'saveTeilnehmer') { saveTeilnehmer(); }
if($_POST['form'] == 'uploadTeilnehmer') { tImport(); }
if($_POST['form'] == 'uploadZeit') { zImport(); }
if($_POST['form'] == 'saveManReaderTime') { saveManReaderTime(); }
if($_POST['form'] == 'getReaderData') { getReaderData(); }
if($_POST['form'] == 'setConfig') { setConfig(); }
if($_POST['form'] == 'showReaderResults') { showReaderResults(); }
if($_POST['form'] == 'loadReaderResults') { loadReaderResults(); }
if($_POST['form'] == 'addChatMessage') { addChatMessage(); }
}
//phpinfo(32);
$link->close();
exit;
function getVerein() {
//$link = connectDB();
$term = htmlspecialchars($_GET['term'], ENT_QUOTES, 'UTF-8');
$term = trim(strip_tags($_GET['term']));
$a_json = array();
$sql = "select distinct verein from teilnehmer where verein LIKE '$term%'";
$result = dbRequest($sql, 'SELECT');
if($result[1] > 0) {
$i = 0;
foreach ($result[0] as $row) {
$verein = stripslashes($row['verein']);
$a_json[$i] = $verein;
$i++;
}
echo json_encode($a_json);
flush();
}
//$link->close();
}
function getLastRaceUpdate() {
$sql = "select aktualisierung from lauf where id = ".$_GET['id'];
$result = dbRequest($sql, 'SELECT');
if($result[1] > 0) {
foreach ($result[0] as $row) {
$a = stripslashes($row['aktualisierung']);
}
}
echo $a;
}
function specialReporting() {
include "specialReporting/s".$_SESSION['vSpecial'].".php";
$call = "s".$_SESSION['vSpecial'];
$call();
}
function setNumOfResults() {
$_SESSION['anzUrkunden-'.$_GET['id']] = $_GET['num'];
echo "ok";
}
function clearRaceId() {
$_SESSION['rID'] = 0;
echo "ok";
}
?>