/
index.php
152 lines (147 loc) · 5.31 KB
/
index.php
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
$root = "../../..";
$ueberschrift = "Gäste bearbeiten";
$unterschrift = "Gästeliste";
/*
date: 14.10.05
author: christian osterrieder alpstein-austria
*/
//header einfuegen:
if(isset($_POST["root"])){
$root = $_POST["root"];
}
include($root."/backoffice/templates/header.inc.php");
include_once($root."/backoffice/templates/breadcrumps.inc.php");
$breadcrumps = erzeugenBC($root, "Gäste", "mieterBearbeiten/index.php",
$unterschrift, "mieterBearbeiten/mieterListe/index.php");
include($root."/backoffice/templates/bodyStart.inc.php");
if (isset($_POST["index"]) && $_POST["index"] != ""){
$index = $_POST["index"];
}
else{
$index = 0;
}
include_once($root."/include/mieterFunctions.inc.php");
include_once($root."/backoffice/templates/components.inc.php");
?>
<script language="JavaScript">
<!--
function sicher(){
return confirm('<?php echo(getUebersetzung("Gast wirklich löschen?")); ?>');
}
//-->
</script>
<h2><?php echo(getUebersetzung("Gästeliste")); ?></h2>
<table>
<tr>
<th align="left"> <?php echo getUebersetzung("Vorname") ?></th>
<th align="left"> <?php echo getUebersetzung("Nachname") ?></th>
<th align="left"> <?php echo getUebersetzung("E-Mail-Adresse") ?></th>
</tr> <?php
$res = getMieterListWithLimitAndIndex($gastro_id,$index);
if (getAnzahlMieter($gastro_id) < 1){ ?>
<tr>
<td colspan="3">
<?php echo getUebersetzung("Sie haben noch keine Gäste in ihrer Datenbank.") ?>
</td>
</tr><?php
}
while ($d = $res->FetchNextObject()){
$mieter_id = $d->GAST_ID;
$vorname = $d->VORNAME;
$nachname = $d->NACHNAME;
$email = $d->EMAIL; ?>
<tr>
<td colspan="3"><hr/></td>
</tr>
<tr>
<td> <?php echo $vorname ?></td>
<td> <?php echo $nachname ?></td>
<td> <a href="mailto:<?php echo $email ?>"><?php echo $email ?></a></td>
</tr>
<tr>
<td colspan="3">
<table>
<tr>
<td>
<form action="<?php echo$root?>/backoffice/mieterBearbeiten/mieterListe/mieterBearbeiten/index.php" method="post" name="gastBearbeiten" target="_self">
<div align="right">
<input name="index" type="hidden" value="<?php echo $index ?>"/>
<input name="mieter_id" type="hidden" id="gast_id" value="<?php echo $mieter_id ?>">
<input name="gastBearbeiten" type="submit" id="gastBearbeiten" class="button" value="<?php echo getUebersetzung("Gast bearbeiten") ?>">
</div></form>
</td>
<td>
<form action="<?php echo$root?>/backoffice/mieterBearbeiten/mieterListe/mieterInfos/index.php" method="post" name="gastInfos" target="_self">
<div align="right">
<input name="gastInfos" type="submit" id="gastInfos" class="button" value="<?php echo getUebersetzung("Reservierungs-Informationen") ?>">
<input name="mieter_id" type="hidden" id="gast_id" value="<?php echo $mieter_id ?>">
<input name="index" type="hidden" value="<?php echo $index ?>"/>
</div></form>
</td>
<td>
<form action="<?php echo$root?>/backoffice/mieterBearbeiten/mieterListe/mieterLoeschen/index.php" method="post" name="gastLoeschen" target="_self" onSubmit="return sicher()">
<div align="right">
<input name="gastLoeschen" type="submit" id="gastLoeschen" class="button" value="<?php echo getUebersetzung("Gast löschen") ?>">
<input name="mieter_id" type="hidden" id="gast_id" value="<?php echo $mieter_id ?>">
<input name="index" type="hidden" value="<?php echo $index ?>"/>
</div></form>
</td>
</tr>
</table>
</td>
</tr> <?php
} //ende while
?>
<tr>
<td colspan="3"><hr/></td>
</tr>
<tr>
<td colspan="3">
<table width="100%">
<tr>
<td>
<div align="right">
<form action="<?php echo$root?>/backoffice/mieterBearbeiten/mieterListe/index.php" method="post" name="zurueck" target="_self" enctype="multipart/form-data"><?php
if (($index - LIMIT_MIETERLISTE) > -1){ ?>
<input name="index" type="hidden" value="<?php echo $index-LIMIT_MIETERLISTE ?>"/>
<?php
showSubmitButton(getUebersetzung("zurückblättern"));
}else{
showSubmitButtonNo(getUebersetzung("zurückblättern"));
}?>
</form>
</div>
</td>
<td>
<form action="<?php echo$root?>/backoffice/mieterBearbeiten/mieterListe/index.php" method="post" name="weiter" target="_self" enctype="multipart/form-data"><?php
if (($index + LIMIT_MIETERLISTE) < getAnzahlMieter($gastro_id)){?>
<input name="index" type="hidden" value="<?php echo $index+LIMIT_MIETERLISTE ?>"/>
<?php
showSubmitButton(getUebersetzung("weiterblättern"));
}else{
showSubmitButtonNo(getUebersetzung("weiterblättern"));
}?>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br/>
<table>
<form action="<?php echo$root?>/backoffice/mieterBearbeiten/mieterListe/export/csv.php" method="post" name="hauptmenue" id="hauptmenue">
<tr>
<td><select name="format" size="1" class="button">
<option value="csv"><?php echo getUebersetzung("Text") ?> CSV</option>
</select></td>
<td><input name="exportieren" type="submit" class="button"
value="<?php echo getUebersetzung("exportieren") ?>"></td>
<td> </td>
</tr>
</form>
</table>
<?php
include_once($root."/backoffice/templates/footer.inc.php");
?>