Exemplo n.º 1
0
<?php

@set_time_limit(0);
include_once dirname(__FILE__) . "/../../../../wp-load.php";
//include_once dirname(__FILE__).'/admin/include/db_conn.php';
//include_once dirname(__FILE__).'/include/lang.php';
global $wpdb;
include_once dirname(__FILE__) . '/class/settings.class.php';
$bookingSettingObj = new wp_booking_calendar_public_setting();
//handling timezone in php and mysql
date_default_timezone_set($bookingSettingObj->getTimezone());
$now = new DateTime();
$mins = $now->getOffset() / 60;
$sgn = $mins < 0 ? -1 : 1;
$mins = abs($mins);
$hrs = floor($mins / 60);
$mins -= $hrs * 60;
$offset = sprintf('%+d:%02d', $hrs * $sgn, $mins);
$wpdb->query("SET time_zone='{$offset}';");
include_once dirname(__FILE__) . '/class/list.class.php';
include_once dirname(__FILE__) . '/class/holiday.class.php';
include_once dirname(__FILE__) . '/class/slot.class.php';
include_once dirname(__FILE__) . '/class/reservation.class.php';
include_once dirname(__FILE__) . '/class/calendar.class.php';
include_once dirname(__FILE__) . '/class/mail.class.php';
include_once dirname(__FILE__) . '/class/category.class.php';
include_once dirname(__FILE__) . '/class/lang.class.php';
$bookingListObj = new wp_booking_calendar_public_lists();
$bookingHolidayObj = new wp_booking_calendar_public_holiday();
$bookingSlotsObj = new wp_booking_calendar_public_slot();
$bookingReservationObj = new wp_booking_calendar_public_reservation();
Exemplo n.º 2
0
function booking_calendar_public_scripts()
{
    global $wpdb;
    wp_enqueue_script('jquery');
    wp_enqueue_style('wp-booking-calendar-public-mainStyle-css', plugins_url('wp-booking-calendar/public/css/mainstyle.css'));
    wp_enqueue_style('wp-booking-calendar-public-ie-style', plugins_url('wp-booking-calendar/public/css/ie.css'));
    global $wp_styles;
    $wp_styles->add_data('wp-booking-calendar-public-ie-style', 'conditional', 'lte IE 7');
    $wp_styles->add_data('wp-booking-calendar-public-ie-style', 'conditional', 'lte IE 8');
    include 'public/class/settings.class.php';
    $bookingSettingObj = new wp_booking_calendar_public_setting();
    if ($bookingSettingObj->getRecaptchaEnabled() == "1") {
        wp_enqueue_script('wp-booking-calendar-public-recaptcha', 'http://www.google.com/recaptcha/api/js/recaptcha_ajax.js');
    }
    wp_enqueue_script('wp-booking-calendar-public-bxslider-js', plugins_url('wp-booking-calendar/public/js/jquery.bxSlider.min.js'), array('jquery'));
    wp_enqueue_script('wp-booking-calendar-public-tmt_core-js', plugins_url('wp-booking-calendar/public/js/tmt_libs/tmt_core.js'));
    wp_enqueue_script('wp-booking-calendar-public-tmt_form-js', plugins_url('wp-booking-calendar/public/js/tmt_libs/tmt_form.js'));
    wp_enqueue_script('wp-booking-calendar-public-tmt_validator-js', plugins_url('wp-booking-calendar/public/js/tmt_libs/tmt_validator.js'));
    wp_enqueue_script('wp-booking-calendar-public-lib-js', plugins_url('wp-booking-calendar/public/js/lib.js'), array('jquery'));
    wp_enqueue_script('wp-booking-calendar-public-calendar_js', plugins_url('wp-booking-calendar/public/js/wach.calendar.js'), array('jquery'));
    wp_localize_script('wp-booking-calendar-public-calendar_js', 'WPBookingCalendarSettings', array('path' => plugins_url('wp-booking-calendar/public'), 'day_white_bg' => $bookingSettingObj->getDayWhiteBg(), 'day_white_bg_hover' => $bookingSettingObj->getDayWhiteBgHover(), 'day_black_bg' => $bookingSettingObj->getDayBlackBg(), 'day_black_bg_hover' => $bookingSettingObj->getDayBlackBgHover(), 'day_white_line1_color' => $bookingSettingObj->getDayWhiteLine1Color(), 'day_white_line1_color_hover' => $bookingSettingObj->getDayWhiteLine1ColorHover(), 'day_white_line2_color' => $bookingSettingObj->getDayWhiteLine2Color(), 'day_white_line2_color_hover' => $bookingSettingObj->getDayWhiteLine2ColorHover(), 'day_black_line1_color' => $bookingSettingObj->getDayBlackLine1Color(), 'day_black_line1_color_hover' => $bookingSettingObj->getDayBlackLine1ColorHover(), 'day_black_line2_color' => $bookingSettingObj->getDayBlackLine2Color(), 'day_black_line2_color_hover' => $bookingSettingObj->getDayBlackLine2ColorHover(), 'recaptcha_style' => $bookingSettingObj->getRecaptchaStyle()));
}
Exemplo n.º 3
0
 public function getRegistrationText()
 {
     global $wpdb;
     global $blog_id;
     return wp_booking_calendar_public_setting::doSettingQuery('registration_text');
 }