I am currently having a problem with my code:
setlocale(LC_TIME, "de_DE");
$date = new DateTime(helper('com://site/ohanah.date.format', array(
'date' => $event->start,
'format' => 'Y-m-d H:i',
'timezone' => 'UTC'
)));
$date_scn = new DateTime(helper('com://site/ohanah.date.format', array(
'date' => $event->end,
'format' => 'H:i',
'timezone' => 'UTC'
)));
echo '<div id="my-id" class="uk-modal"><div class="uk-modal-dialog"><a class="uk-modal-close uk-close"></a><div style="font-weight: 400;font-size:18px;padding-bottom: 10px;">text 1</div><hr><br/>';
echo '<span style="font-weight: 400;">1. text: </span>'.helper('com://site/ohanah.date.format', array('date' => $event->start, 'format' => 'l, j. F Y, H:i','timezone'=>'UTC')), ' - ', helper('com://site/ohanah.date.format', array('date' => $event->end, 'format' => 'H:i', 'timezone'=>'UTC')).'</span><br>';
$cnt = 2;
$raw_amount = object('com://site/ohanah.controller.ticket_type')->ohanah_event_id($event->id)->render(array('event' => $event));
$filtered_output = strip_tags($raw_amount);
$filtered_numbers = array_filter(preg_split("/\D/", $filtered_output));
$first_occurence = reset($filtered_numbers);
$filtered_amount = $first_occurence - 1;
for($i=0;$i<$filtered_amount;$i++) {
$date->add(new DateInterval('P1W'));
$formatted_time = strftime("%A, %d. %B %Y, %H:%M", $date->getTimestamp());
$formatted_time_scnpart = strftime("%H:%M", $date_scn->getTimestamp());
echo '<span style="font-weight:400;">'.$cnt++.'. '.'Termin: '.'</span>';
echo '<span>'.$formatted_time.' - '.$formatted_time_scnpart.'</span>';
echo '<br/>';
}
echo '</div></div>';
I already commented on the line with the problem ( // this line causes the problem)
How does this code:
$raw_amount displays the html with some comments, I filter these unwanted tags using: $filtered_output = strip_tags($raw_amount);.
This refers to my line that causes problems:
$filtered_numbers = array_filter(preg_split("/\D/", $filtered_output));
and then delete 1from the output. I do this because the output is $first_occurencetoo large 1(due to the way I import the data into it.)
, ?
$filtered_numbers 987654321, , 9. , , , $raw_output, <strong>, , . ?
$filtered_output, .:
if (typeof Koowa === 'object' && Koowa !== null) {
if (typeof Koowa.translator === 'object' && Koowa.translator !== null) {
Koowa.translator.loadTranslations({"KLS_OHANAH_TICKET_GET":"Tickets beziehen","KLS_OHANAH_PAY_OFFLINE":"Buchung absenden","KLS_OHANAH_PAY_WITH_PAYPAL":"Mit PayPal bezahlen","KLS_OHANAH_TICKET_PAY":"Kurs bezahlen"});
}
}
example1
example2
Persons
event - 5 x 15 min
1241,2423€
0
1
2
event - 4 x 78 min (example)
1241241,2423€
0
1
2