3 if (!isset($language) || (!isset(
$lang)))
7 include
'../system/plugins/booking/classes/booking.php';
11 $booking = new \YAWK\PLUGINS\BOOKING\booking();
15 <!-- Content Wrapper. Contains page content -->
16 <div class=\"content-wrapper\" id=\"content-FX\">
17 <!-- Content Header (Page header) -->
18 <section class=\"content-header\">";
20 echo \YAWK\backend::getTitle(
$lang[
'BOOKING'],
$lang[
'BOOKING_DETAILS']);
21 echo
"<ol class=\"breadcrumb\">
22 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
23 <li><a href=\"index.php?page=plugins\" title=\"$lang[PLUGINS]\"> $lang[PLUGINS]</a></li>
24 <li class=\"active\"><a href=\"index.php?plugin=booking\" title=\"$lang[BOOKING]\"> $lang[BOOKING]</a></li>
28 <section class=\"content\">";
32 if (isset($_POST[
'create'])){
33 if (isset(
$_GET[
'id'])){
36 if (isset($_POST[
'income'])){
42 if (isset($_POST[
'grade'])){
46 if (isset($_POST[
'comment'])){
50 if (isset($_POST[
'date_wish'])){
51 $booking->date_wish =
$db->quote($_POST[
'date_wish']);
53 if (isset($_POST[
'date_alternative'])){
54 $booking->date_alternative =
$db->quote($_POST[
'date_alternative']);
57 \YAWK\alert::draw(
"warning",
"$lang[ERROR]",
"$lang[BOOKING_SAVE_FAILED]",
"",4200);
62 if (isset(
$_GET[
'id'])){
73 $year_created = $splitDate_created[
'year'];
74 $day_created = $splitDate_created[
'day'];
75 $month_created = $splitDate_created[
'month'];
76 $time_created = $splitDate_created[
'time'];
78 $year_wish = $splitDate_wish[
'year'];
79 $day_wish = $splitDate_wish[
'day'];
80 $month_wish = $splitDate_wish[
'month'];
81 $time_wish = $splitDate_wish[
'time'];
83 $year_alt = $splitDate_alternative[
'year'];
84 $day_alt = $splitDate_alternative[
'day'];
85 $month_alt = $splitDate_alternative[
'month'];
86 $time_alt = $splitDate_alternative[
'time'];
88 $prettydate_created =
"$day_created.$month_created $year, $time_created";
89 $prettydate_wish =
"$day_wish.$month_wish, $time_wish ";
90 $prettydate_alternative =
"$day_alt.$month_alt, $time_alt ";
93 if ($prettydate_alternative ===
"0.00, 00:00 Uhr"){
94 $prettydate_alternative =
' ';
97 $inviteHtml =
"<a class=\"btn btn-success\" href=\"index.php?plugin=booking&pluginpage=booking-toggle&id=$booking->id&invite=1\" style=\"float:right;\">
98 <i class=\"fa fa-envelope-o\"></i> $lang[BOOKING_INVITATION_SENT]</a>";
101 $inviteHtml =
"<a class=\"btn btn-warning\" href=\"index.php?plugin=booking&pluginpage=booking-toggle&id=$booking->id&invite=1\" style=\"float:right;\">
102 <i class=\"fa fa-envelope-o\"></i> $lang[BOOKING_INVITATION_SEND]</a>";
105 $confirmedHtml =
"<span class='text-success'>$lang[CONFIRMED]</span>";
106 $confirmedIcon =
"<i class='fa fa-check'></i>";
108 $confirmedHtml =
"<span class='text-warning'>$lang[NOT_CONFIRMED]</span>";
109 $confirmedIcon =
"<i class='fa fa-times'></i>";
112 $confirmedHtml =
"<span class='text-info'>$lang[SUCCESSFUL]</span>";
113 $confirmedIcon =
"<i class='fa fa-trophy'></i>";
116 $confirmedHtml =
"<span class='text-inverse'>$lang[OUTDATED]</span>";
121 $filename =
'../media/images/users/user_'.$booking->name.
'.jpg';
123 $imgHtml =
"<img src=\"$filename\" width=\"180\" class=\"img-thumbnail\">";
126 $imgHtml =
"<i class=\"fa fa-user fa-5x\"></i>";
130 $imgHtml =
"<i class=\"fa fa-user fa-5x\"></i>";
134 <div
class=
"box box-default">
135 <div
class=
"box-body">
137 <div
class=
"col-md-8">
138 <ul
class=
"list-group">
139 <li
class=
"list-group-item"><h4><?php echo
"$lang[DETAILS] <small>$lang[OF_THIS_BOOKING]</small>"; ?></h4></li>
140 <li
class=
"list-group-item"><h4><strong><?php echo
$booking->name; ?></strong> <?php echo
"$lang[SENT_FOLLOWING_BOOKING] :"; ?> <strong><?php echo $prettydate_wish; ?></strong></h4></li>
141 <li
class=
"list-group-item"><
i class=
"fa fa-envelope"></
i> &
nbsp;<strong><?php echo
"<a href=\"mailto:$booking->email\">$booking->email</a>"; ?></strong></li>
142 <li
class=
"list-group-item"><
i class=
"fa fa-phone"></
i> &
nbsp;<strong><?php echo
$booking->phone; ?></strong></li>
143 <li
class=
"list-group-item"><
i class=
"fa fa-clock-o"></
i> &
nbsp;<strong><?php echo $prettydate_alternative; ?></strong> <small>[alternativ]</small></li>
145 <ul
class=
"list-group">
146 <li
class=
"list-group-item"><
i class=
"fa fa-comments-o"></
i> &
nbsp;<strong><?php echo
$booking->text; ?></strong></li>
148 <ul
class=
"list-group">
149 <li
class=
"list-group-item"><h6>sent from<strong>&
nbsp;<?php echo
$booking->name; ?>&
nbsp;</strong>
150 am <?php echo
"$prettydate_created $lang[VIA_IP_ADDRESS]"; ?> <?php echo
$booking->ip; ?><br><small>
152 <br><?php echo
$booking->referer; ?></small></h6></li>
154 <ul
class=
"list-group">
155 <li
class=
"list-group-item">
156 <form
class=
"form-inline" method=
"post" action=
"index.php?plugin=booking&pluginpage=booking-edit&id=<?php echo $booking->id; ?>">
157 <label
for=
"cut"><
i class=
"fa fa-scissors"></
i>&
nbsp;</label>
158 <label
for=
"income">€&
nbsp;</label>
159 <input
type=
"text" value=
"<?php echo $booking->income;?>" size=
"5" class=
"form-control" placeholder=
"150" id=
"income" name=
"income">&
nbsp;&
nbsp;&
nbsp;
160 <label
for=
"income"><
i class=
"fa fa-line-chart"></
i>&
nbsp; </label>
161 <label
for=
"grade"><?php echo
"$lang[VOTING]"; ?></label>
162 <select
class=
"form-control" name=
"grade" id=
"grade">
163 <option value=
"0" selected disabled>&
nbsp;</option>
164 <option value=
"1">1</option>
165 <option value=
"2">2</option>
166 <option value=
"3">3</option>
167 <option value=
"4">4</option>
168 <option value=
"5">5</option>
170 <label
for=
"comment"><
i class=
"fa fa-commenting-o"></
i></label>
171 <textarea
name=
"comment" id=
"comment" class=
"form-control" cols=
"46" rows=
"2"><?php echo
$booking->comment;?></textarea>
174 <li
class=
"list-group-item">
175 <label
for=
"date_wish"><?php echo
"$lang[EDIT_DATE]"; ?></label>
176 <input
type=
"text" class=
"form-control" name=
"date_wish" size=
"10" id=
"date_wish" value=
"<?php echo $booking->date_wish;?>"><br>
177 <label
for=
"date_alternative"><?php echo
"$lang[ALT_DATE]"; ?> </label>
178 <input
type=
"text" class=
"form-control" name=
"date_alternative" size=
"10" id=
"date_alternative" value=
"<?php echo $booking->date_alternative;?>">
180 <input
id=
"savebutton" class=
"btn btn-success" type=
"submit" name=
"create" style=
"margin-left:14px;" value=
"<?php echo $lang['SAVE']; ?>">
185 <div
class=
"col-md-4">
186 <ul
class=
"list-group">
187 <li
class=
"list-group-item"><?php echo $imgHtml; ?></li>
190 <ul
class=
"list-group">
191 <li
class=
"list-group-item"><?php echo $confirmedIcon; ?>
192 &
nbsp;Status: <h3 style=
"margin-top:-4%; margin-left: 50%;"><?php echo $confirmedHtml; ?></h3>
194 <li
class=
"list-group-item"><
i class=
"fa fa-trophy"></
i>
195 &
nbsp;Success: <h3 style=
"margin-top:-4%; margin-left: 50%;"><?php echo
$booking->success; ?></h3>
197 <li
class=
"list-group-item"><
i class=
"fa fa-money"></
i>
198 &
nbsp;Earned: <h3 style=
"margin-top:-4%; margin-left: 50%;">€&
nbsp;<?php echo
$booking->income; ?></h3>
200 <li
class=
"list-group-item"><
i class=
"fa fa-line-chart"></
i>
201 &
nbsp;Vote: <h3 style=
"margin-top:-4%; margin-left: 50%;"><?php echo
$booking->grade; ?></h3>
203 <li
class=
"list-group-item"><
i class=
"fa fa-heart"></
i>
204 &
nbsp;Visits:<h3 style=
"margin-top:-4%; margin-left: 50%;"><?php echo
$booking->countVisits(
$db,
$booking->email); ?></h3>
206 <li
class=
"list-group-item"><
i class=
"fa fa-commenting-o"></
i>
207 &
nbsp;Comment: <h4 style=
"margin-top:-4%; margin-left: 50%;"><?php echo
$booking->comment; ?></h4>
210 <?php echo $inviteHtml; ?>
211 <
a class=
"btn btn-info" href=
"index.php?plugin=booking&pluginpage=booking-toggle&toggle=1&id=<?php echo $booking->id; ?>&success=1" style=
"float:right;">
212 <
i class=
"fa fa-trophy"></
i> &
nbsp;<?php print
$lang[
'BOOKING_TOGGLE']; ?></
a>
213 <
a class=
"btn btn-default" href=
"index.php?plugin=booking" style=
"float:right;">
214 <
i class=
"glyphicon glyphicon-backward"></
i> &
nbsp;<?php print
$lang[
'BACK']; ?></
a>
print $lang['FILEMAN_UPLOAD']
static draw($type, $title, $text, $redirect, $delay)
static inject(array $lang, string $pathToFile)
allow plugins to inject language tags to $lang array
static splitDate($date)
split a date to month, day, year and time
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp