/** * Find all yyyy-mm-yy date in input string and replace it with new date format given by format parameter * @param type $string * @param type $format */ function reformat_date_string($string, $format = '', $timeFormat = 24) { if ($format == '' && $timeFormat == 24) { return $string; } $dateArray = preg_match_all("/(\\d{4}-\\d{2}-\\d{2})/", $string, $match); if (is_array($match)) { $match = $match[0]; } foreach ($match as $d) { $string = str_replace($d, date(date_format_php($format), strtotime($d)), $string); } if ($timeFormat != 24) { $timeArray = preg_match_all("/(\\d{2}:\\d{2}:\\d{2})/", $string, $match); if (is_array($match)) { $match = $match[0]; } foreach ($match as $d) { $string = str_replace($d, carrental_time_format(substr($d, 0, 5), $timeFormat), $string); } } $disable_time = get_option('carrental_disable_time'); if ($disable_time == 'yes') { $timeArray = preg_match_all("/(\\d{2}:\\d{2}:\\d{2})/", $string, $match); if (is_array($match)) { $match = $match[0]; } foreach ($match as $d) { $string = str_replace($d, '', $string); } } return $string; }
echo $b['vehicle']; ?> </span></td> <td class="resp-table-hide"><?php echo $b['vehicle']; ?> </td> <td><span><?php echo Date(date_format_php(isset($theme_options['date_format']) ? $theme_options['date_format'] : '') . ' H:i:s', strtotime($b['enter_date'])); ?> </span><span class="resp-table-show"><?php echo Date(date_format_php(isset($theme_options['date_format']) ? $theme_options['date_format'] : '') . ' H:i:s', strtotime($b['return_date'])); ?> </span></td> <td class="resp-table-hide"><?php echo Date(date_format_php(isset($theme_options['date_format']) ? $theme_options['date_format'] : '') . ' H:i:s', strtotime($b['return_date'])); ?> </td> <td><a href="<?php echo home_url() . '?page=carrental&summary=' . CarRental::generate_hash($b['id_order'], $b['email']); ?> " target="_blank"><?php echo CarRental::t('show details'); ?> </a></td> </tr> <?php } ?> </tbody> </table>
?> <div class="h2 additional"><?php echo CarRental::t('Summary of Charges'); ?> </div> <div class="row row-boxed"> <?php echo $vehicle->name; ?> , <?php echo Date(date_format_php(isset($theme_options['date_format']) ? $theme_options['date_format'] : ''), strtotime($_GET['fd'])); ?> – <?php echo Date(date_format_php(isset($theme_options['date_format']) ? $theme_options['date_format'] : ''), strtotime($_GET['td'])); ?> <?php if (isset($vehicle->prices) && !empty($vehicle->prices)) { ?> <span class="pull-right carrental_total_price carrental_currency" data-value-in="1" data-value="<?php echo number_format($vehicle->prices['total_rental_clear'], 2, '.', ''); ?> " data-currency-before="<?php echo $vehicle->prices['cc_before']; ?> " data-currency-after="<?php echo $vehicle->prices['cc_after']; ?> "><?php echo $vehicle->prices['cc_before'];
<!-- .column --> <div class="column"> <h5><?php echo CarRental::t('Drop Off'); ?> </h5> <p class="point-location"><?php echo $summary['info']->return_loc; ?> </p> <div class="icon-text"> <span class="sprite-calendar"></span><?php echo Date(date_format_php(isset($theme_options['date_format']) ? $theme_options['date_format'] : ''), strtotime($summary['info']->return_date)); ?> </div> <?php if (!$disable_time) { ?> <div class="icon-text"> <span class="sprite-time"></span><?php echo carrental_time_format(Date('H:i', strtotime($summary['info']->return_date)), isset($theme_options) && isset($theme_options['time_format']) ? $theme_options['time_format'] : 24); ?> </div> <?php } ?> </div>