当前位置: 首页>>代码示例>>PHP>>正文


PHP get_bk_option函数代码示例

本文整理汇总了PHP中get_bk_option函数的典型用法代码示例。如果您正苦于以下问题:PHP get_bk_option函数的具体用法?PHP get_bk_option怎么用?PHP get_bk_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_bk_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wpdev_ajax_check_bk_news

function wpdev_ajax_check_bk_news()
{
    $v = array();
    if (class_exists('wpdev_bk_personal')) {
        $v[] = 'wpdev_bk_personal';
    }
    if (class_exists('wpdev_bk_biz_s')) {
        $v[] = 'wpdev_bk_biz_s';
    }
    if (class_exists('wpdev_bk_biz_m')) {
        $v[] = 'wpdev_bk_biz_m';
    }
    if (class_exists('wpdev_bk_biz_l')) {
        $v[] = 'wpdev_bk_biz_l';
    }
    if (class_exists('wpdev_bk_multiuser')) {
        $v[] = 'wpdev_bk_multiuser';
    }
    $obc_settings = array();
    $ver = get_bk_option('bk_version_data');
    if ($ver !== false) {
        $obc_settings = array('subscription_key' => maybe_serialize($ver));
    }
    $params = array('action' => 'get_news', 'subscription_email' => isset($obc_settings['subscription_email']) ? $obc_settings['subscription_email'] : false, 'subscription_key' => isset($obc_settings['subscription_key']) ? $obc_settings['subscription_key'] : false, 'bk' => array('bk_ver' => WPDEV_BK_VERSION, 'bk_url' => WPDEV_BK_PLUGIN_URL, 'bk_dir' => WPDEV_BK_PLUGIN_DIR, 'bk_clss' => $v), 'siteurl' => get_option('siteurl'), 'siteip' => $_SERVER['SERVER_ADDR'], 'admin_email' => get_option('admin_email'));
    $request = new WP_Http();
    $result = $request->request(OBC_CHECK_URL . 'info/', array('method' => 'POST', 'timeout' => 15, 'body' => $params));
    if (!is_wp_error($result) && $result['response']['code'] == '200' && true) {
        $string = $result['body'];
        //$string = str_replace( "'", ''', $string );
        echo $string;
    } else {
        // Some error appear
        echo '<div id="bk_errror_loading">';
        if (is_wp_error($result)) {
            echo $result->get_error_message();
        } else {
            echo $result['response']['message'];
        }
        echo '</div>';
        echo ' <script type="text/javascript"> ';
        echo '    document.getElementById("bk_news").style.display="none";';
        echo '    jQuery("#bk_news_section").animate({opacity:1},3000).slideUp(1500);';
        echo ' </script> ';
    }
}
开发者ID:narayanan-git,项目名称:hostel-reservations,代码行数:45,代码来源:common_functions.php

示例2: get_booking_info_4_tooltip

function get_booking_info_4_tooltip($bk_id, $bookings, $booking_types, $title_in_day = '', $title = '', $title_hint = '')
{
    $user = wp_get_current_user();
    $user_bk_id = $user->ID;
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Gathering data  about the booking to  show in the calendar !!! ////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Get it from the option settings
    $what_show_in_day_template = get_bk_option('booking_default_title_in_day_for_calendar_view_mode');
    // '<span style="font-size:07px;">[id]</span>:[name]';
    if ($title != '') {
        $title .= ' / ';
    }
    // Other Booking in the same day
    $title .= $bk_id;
    if ($title_in_day != '') {
        $title_in_day .= ',';
    }
    // Other Booking in the same day
    //$title_in_day .=  $bk_id ;
    if (function_exists('get_title_for_showing_in_day')) {
        $title_in_day .= get_title_for_showing_in_day($bk_id, $bookings, $what_show_in_day_template);
    } else {
        $title_in_day .= $bk_id . ':' . $bookings[$bk_id]->form_data['_all_fields_']['name'];
    }
    if ($title_hint != '') {
        $title_hint .= ' <hr style="margin:10px 5px;" /> ';
    }
    // Other Booking in the same day
    $title_hint .= '<div class=\'booking-listing-collumn\' >';
    if (function_exists('get_booking_title')) {
        if (isset($booking_types[$bookings[$bk_id]->booking_type])) {
            $bk_title = $booking_types[$bookings[$bk_id]->booking_type]->title;
        } else {
            $bk_title = get_booking_title($bookings[$bk_id]->booking_type);
        }
        $bk_title = '<span class=\'label label-resource label-info\'>' . $bk_title . '</span>';
    } else {
        $bk_title = '';
    }
    $title_hint .= '<span class=\'field-id\'>' . $bk_id . '</span>' . ' ' . $bk_title;
    if (class_exists('wpdev_bk_biz_s')) {
        $title_hint .= '<div style=\'float:right;\'>';
        if (function_exists('wpdev_bk_get_payment_status_simple')) {
            $pay_status = wpdev_bk_get_payment_status_simple($bookings[$bk_id]->pay_status);
            $pay_status = '<span class=\'label label-payment-status payment-label-unknown\'><span style=\'font-size:07px;\'>' . __('Payment', 'wpdev-booking') . '</span> ' . $pay_status . '</span>';
        } else {
            $pay_status = '';
        }
        $title_hint .= ' ' . $pay_status;
        $currency = apply_bk_filter('get_currency_info');
        $show_cost_value = wpdev_bk_cost_number_format($bookings[$bk_id]->cost);
        $title_hint .= ' <div class="cost-fields-group" style=\'float:right; margin:2px;\'>' . $currency . ' ' . $show_cost_value . '</div>';
        $title_hint .= '</div>';
    }
    $title_hint .= '<div>' . $bookings[$bk_id]->form_show . '</div>';
    //$bookings[$bk_id]->form_data['name'].' ' . $bookings[$bk_id]->form_data['secondname'] ;
    //$title_hint .= ' '. $bookings[$bk_id]->remark;
    //BL
    $bk_dates_short_id = array();
    if (count($bookings[$bk_id]->dates) > 0) {
        $bk_dates_short_id = isset($bookings[$bk_id]->dates_short_id) ? $bookings[$bk_id]->dates_short_id : array();
    }
    // Array ([0] => [1] => .... [4] => 6... [11] => [12] => 8 )
    $is_approved = 0;
    if (count($bookings[$bk_id]->dates) > 0) {
        $is_approved = $bookings[$bk_id]->dates[0]->approved;
    }
    $short_dates_content = wpdevbk_get_str_from_dates_short($bookings[$bk_id]->dates_short, $is_approved, $bk_dates_short_id, $booking_types);
    $short_dates_content = str_replace('"', "'", $short_dates_content);
    $title_hint .= '<div style=\'margin-top:5px;\'>' . $short_dates_content . '</div>';
    // $reload_time = 2000;
    // setTimeout(function ( ) {location.reload(true);} ,'.$reload_time.');
    /**
       $title_hint .= '<div style=\'text-align:right;\'>';
       if ( class_exists('wpdev_bk_personal') ) {
            $bk_url_add         = 'admin.php?page=' . WPDEV_BK_PLUGIN_DIRNAME . '/'. WPDEV_BK_PLUGIN_FILENAME . 'wpdev-booking-reservation' ;        
            $bk_hash            = (isset($bookings[$bk_id]->hash))?$bookings[$bk_id]->hash:'';         
            $bk_booking_type    = $bookings[$bk_id]->booking_type;
            $edit_booking_url = $bk_url_add . '&booking_type='.$bk_booking_type.'&booking_hash='.$bk_hash.'&parent_res=1' ; 
            $title_hint .= '<a style=\'margin:-60px 20px 0 2px;position:absolute;right:0px;\' href=\''.$edit_booking_url .'\' onclick=\'\' ><i class=\'icon-edit\'></i><!--img src=\'' . WPDEV_BK_PLUGIN_URL .'/img/edit_type.png\' style=\'width:12px; height:13px;\'--></a>';
       }
       $title_hint .= '<a style=\'margin:-40px 20px 0 0;position:absolute;right:0px;\' href=\'javascript:;\' onclick=\'javascript:approve_unapprove_booking('. $bk_id.',1, '. $user_bk_id .', &quot;'. getBookingLocale() .'&quot; , 1   );\' ><i class=\'icon-ok-circle\'></i><!--img src=\'' . WPDEV_BK_PLUGIN_URL .'/img/accept-24x24.gif\' style=\'width:14px; height:14px;\'--></a>';   
       $title_hint .= '<a style=\'margin:-22px 20px 0 0;position:absolute;right:0px;\' href=\'javascript:;\' onclick=\'javascript:approve_unapprove_booking('. $bk_id.',0, '. $user_bk_id .', &quot;'. getBookingLocale() .'&quot; , 1   );\' ><i class=\'icon-ban-circle\'></i><!--img src=\'' . WPDEV_BK_PLUGIN_URL .'/img/remove-16x16.png\' style=\'margin:0px 5px;width:15px; height:15px;\'--></a>';
       $title_hint .= '<a href=\'javascript:;\' onclick=\'javascript:delete_booking('. $bk_id.', '. $user_bk_id .', &quot;'. getBookingLocale() .'&quot; , 1   );\' ><i class=\'icon-trash\'></i><!--img src=\'' . WPDEV_BK_PLUGIN_URL .'/img/delete_type.png\' style=\'width:13px; height:13px;\'--></a>';
       $title_hint .= '</div>';
       /**/
    $is_approved = 0;
    if (!empty($bookings[$bk_id]->dates)) {
        $is_approved = $bookings[$bk_id]->dates[0]->approved;
    }
    $title .= '<div class=\'timeline_info_bk_actionsbar_' . $bk_id . '\'  style=\'display: inline;
    line-height: 1em;
    padding: 10px;
    vertical-align: text-top;\'>';
    if (class_exists('wpdev_bk_personal')) {
        $bk_url_add = 'admin.php?page=' . WPDEV_BK_PLUGIN_DIRNAME . '/' . WPDEV_BK_PLUGIN_FILENAME . 'wpdev-booking-reservation';
        $bk_hash = isset($bookings[$bk_id]->hash) ? $bookings[$bk_id]->hash : '';
        $bk_booking_type = $bookings[$bk_id]->booking_type;
        $edit_booking_url = $bk_url_add . '&booking_type=' . $bk_booking_type . '&booking_hash=' . $bk_hash . '&parent_res=1';
//.........这里部分代码省略.........
开发者ID:dev-lav,项目名称:htdocs,代码行数:101,代码来源:wpdev-bk-timeline.php

示例3: get_booking_info_4_tooltip

function get_booking_info_4_tooltip($bk_id, $bookings, $booking_types, $title_in_day = '', $title = '', $title_hint = '')
{
    $user = wp_get_current_user();
    $user_bk_id = $user->ID;
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Gathering data  about the booking to  show in the calendar !!! ////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Get it from the option settings
    $what_show_in_day_template = get_bk_option('booking_default_title_in_day_for_calendar_view_mode');
    // '<span style="font-size:07px;">[id]</span>:[name]';
    if ($title != '') {
        $title .= ' / ';
    }
    // Other Booking in the same day
    $title .= $bk_id;
    if ($title_in_day != '') {
        $title_in_day .= ',';
    }
    // Other Booking in the same day
    //$title_in_day .=  $bk_id ;
    if (function_exists('get_title_for_showing_in_day')) {
        $title_in_day .= get_title_for_showing_in_day($bk_id, $bookings, $what_show_in_day_template);
    } else {
        $title_in_day .= $bk_id . ':' . $bookings[$bk_id]->form_data['_all_fields_']['name'];
    }
    if ($title_hint != '') {
        $title_hint .= ' <hr style="margin:10px 5px;" /> ';
    }
    // Other Booking in the same day
    $title_hint .= '<div class=\'booking-listing-collumn\' >';
    if (function_exists('get_booking_title')) {
        if (isset($booking_types[$bookings[$bk_id]->booking_type])) {
            $bk_title = $booking_types[$bookings[$bk_id]->booking_type]->title;
        } else {
            $bk_title = get_booking_title($bookings[$bk_id]->booking_type);
        }
        $bk_title = '<span class=\'label label-resource label-info\'>' . $bk_title . '</span>';
    } else {
        $bk_title = '';
    }
    $title_hint .= '<span class=\'field-id\'>' . $bk_id . '</span>' . ' ' . $bk_title;
    if (class_exists('wpdev_bk_biz_s')) {
        $title_hint .= '<div style=\'float:right;\'>';
        if (function_exists('wpdev_bk_get_payment_status_simple')) {
            $pay_status = wpdev_bk_get_payment_status_simple($bookings[$bk_id]->pay_status);
            $pay_status = '<span class=\'label label-payment-status payment-label-unknown\'><span style=\'font-size:07px;\'>' . __('Payment', 'booking') . '</span> ' . $pay_status . '</span>';
        } else {
            $pay_status = '';
        }
        $title_hint .= ' ' . $pay_status;
        $currency = apply_bk_filter('get_currency_info');
        $show_cost_value = wpdev_bk_cost_number_format($bookings[$bk_id]->cost);
        $title_hint .= ' <div class="cost-fields-group" style=\'float:right; margin:2px;\'>' . $currency . ' ' . $show_cost_value . '</div>';
        $title_hint .= '</div>';
    }
    $title_hint .= '<div>' . $bookings[$bk_id]->form_show . '</div>';
    //$bookings[$bk_id]->form_data['name'].' ' . $bookings[$bk_id]->form_data['secondname'] ;
    //$title_hint .= ' '. $bookings[$bk_id]->remark;
    //BL
    $bk_dates_short_id = array();
    if (count($bookings[$bk_id]->dates) > 0) {
        $bk_dates_short_id = isset($bookings[$bk_id]->dates_short_id) ? $bookings[$bk_id]->dates_short_id : array();
    }
    // Array ([0] => [1] => .... [4] => 6... [11] => [12] => 8 )
    $is_approved = 0;
    if (count($bookings[$bk_id]->dates) > 0) {
        $is_approved = $bookings[$bk_id]->dates[0]->approved;
    }
    $short_dates_content = wpdevbk_get_str_from_dates_short($bookings[$bk_id]->dates_short, $is_approved, $bk_dates_short_id, $booking_types);
    $short_dates_content = str_replace('"', "'", $short_dates_content);
    $title_hint .= '<div style=\'margin-top:5px;\'>' . $short_dates_content . '</div>';
    $is_approved = 0;
    if (!empty($bookings[$bk_id]->dates)) {
        $is_approved = $bookings[$bk_id]->dates[0]->approved;
    }
    $title .= '<div class=\'timeline_info_bk_actionsbar_' . $bk_id . '\'  style=\'display: inline;
    line-height: 1em;
    padding: 10px;
    vertical-align: text-top;\'>';
    $is_can = true;
    //current_user_can( 'edit_posts' );
    if ($is_can) {
        if (class_exists('wpdev_bk_personal')) {
            $bk_url_add = 'admin.php?page=' . WPDEV_BK_PLUGIN_DIRNAME . '/' . WPDEV_BK_PLUGIN_FILENAME . 'wpdev-booking-reservation';
            $bk_hash = isset($bookings[$bk_id]->hash) ? $bookings[$bk_id]->hash : '';
            $bk_booking_type = $bookings[$bk_id]->booking_type;
            $edit_booking_url = $bk_url_add . '&booking_type=' . $bk_booking_type . '&booking_hash=' . $bk_hash . '&parent_res=1';
            $title .= '<a class=\'button button-secondary\' style=\'margin-right:5px;\' href=\'' . $edit_booking_url . '\' onclick=\'\' ><i class=\'icon-edit\'></i></a>';
        }
        $title .= '<a class=\'button button-secondary approve_bk_link ' . ($is_approved ? 'hidden_items' : '') . '\' style=\'margin-right:5px;\' href=\'javascript:;\' onclick=\'javascript:approve_unapprove_booking(' . $bk_id . ',1, ' . $user_bk_id . ', &quot;' . getBookingLocale() . '&quot; , 1   );\' ><i class=\'icon-ok-circle\'></i></a>';
        $title .= '<a class=\'button button-secondary pending_bk_link ' . ($is_approved ? '' : 'hidden_items') . '\' style=\'margin-right:5px;\' href=\'javascript:;\' onclick=\'javascript:approve_unapprove_booking(' . $bk_id . ',0, ' . $user_bk_id . ', &quot;' . getBookingLocale() . '&quot; , 1   );\' ><i class=\'icon-ban-circle\'></i></a>';
        $title .= '<a class=\'button button-secondary\' style=\'margin-right:5px;\' href=\'javascript:;\' onclick=\'javascript:delete_booking(' . $bk_id . ', ' . $user_bk_id . ', &quot;' . getBookingLocale() . '&quot; , 1   );\' ><i class=\'icon-trash\'></i></a>';
    }
    $title .= '</div>';
    $title_hint .= '</div>';
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    return array($title_in_day, $title, $title_hint, $is_approved);
}
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:99,代码来源:wpdev-bk-timeline.php

示例4: wpdevbk_booking_listing_write_js

function wpdevbk_booking_listing_write_js()
{
    ?>
            <script type="text/javascript">
              jQuery(document).ready( function(){
                  
                function applyCSStoDays(date ){
                    return [true, 'date_available']; 
                }
                jQuery('input.wpdevbk-filters-section-calendar').datepick(
                    {   beforeShowDay: applyCSStoDays,
                        showOn: 'focus',
                        multiSelect: 0,
                        numberOfMonths: 1,
                        stepMonths: 1,
                        prevText: '&laquo;',
                        nextText: '&raquo;',
                        dateFormat: 'yy-mm-dd',
                        changeMonth: false,
                        changeYear: false,
                        minDate: null, 
                        maxDate: null, //'1Y',
                        showStatus: false,
                        multiSeparator: ', ',
                        closeAtTop: false,
                        firstDay:<?php 
    echo get_bk_option('booking_start_day_weeek');
    ?>
,
                        gotoCurrent: false,
                        hideIfNoPrevNext:true,
                        useThemeRoller :false,
                        mandatory: true
                    }
                );

                jQuery('a.popover_here').popover( {
                    placement: 'top'
                  , delay: { show: 100, hide: 200 }
                  , content: ''
                  , template: '<div class="wpdevbk popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
                });
                jQuery('.popover_left').popover( {
                    placement: 'left'
                  , delay: { show: 100, hide: 500 }
                  , content: ''
                  , template: '<div class="wpdevbk popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
                });
                jQuery('.popover_right').popover( {
                    placement: 'right'
                  , delay: { show: 100, hide: 200 }
                  , content: ''
                  , template: '<div class="wpdevbk popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
                });
                jQuery('.popover_top').popover( {
                    placement: 'top'
                  , delay: { show: 100, hide: 200 }
                  , content: ''
                  , template: '<div class="wpdevbk popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
                });
                jQuery('.popover_bottom').popover( {
                    placement: 'bottom'
                  //, trigger:'click'  
                  , delay: { show: 100, hide: 800 }
                  , content: ''
                  , template: '<div class="wpdevbk popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
                });
                
                // Repositioning of PopOver, which out of Window
                jQuery( ".popover_bottom" ).on( "mouseenter", function() {
                    setTimeout(function(){
                        if ( jQuery( '.wpdevbk.popover.fade.bottom.in' ).length ) {
                            var right_pos = parseInt( jQuery( '.wpdevbk.popover.fade.bottom.in' ).css('right').replace('px', '') ); 
                            var left_pos  = parseInt( jQuery( '.wpdevbk.popover.fade.bottom.in' ).css('left').replace('px', '') );

                            if ( ( left_pos < 0 ) ) {
                                jQuery('.wpdevbk.popover.fade.bottom.in').css( {left: "10px"} );
                            }
                            if ( ( right_pos < 0 ) ) {
                                jQuery('.wpdevbk.popover.fade.bottom.in').css( {left: ( ( left_pos - Math.abs(right_pos) - 10) + "px" ) } );
                            }

                            setTimeout(function(){
                                var right_pos = parseInt( jQuery( '.wpdevbk.popover.fade.bottom.in' ).css('right').replace('px', '') ); 
                                var left_pos  = parseInt( jQuery( '.wpdevbk.popover.fade.bottom.in' ).css('left').replace('px', '') );

                                if ( ( left_pos < 0 ) || ( right_pos<0 ) ) {
                                    jQuery('.wpdevbk.popover.fade.bottom.in').css({'left':'10px','width':'95%'}) ;
                                    jQuery('.wpdevbk.popover.fade.bottom.in .popover-inner').css({'width':'95%'}) ;
                                } else {
                                    jQuery('.wpdevbk.popover.fade.bottom.in').css({'width':'auto'}) ;
                                    jQuery('.wpdevbk.popover.fade.bottom.in .popover-inner').css({'width':'350px'}) ;
                                }
                            },5);
                        }
                     },110);   
                });
            <?php 
    $is_use_hints = get_bk_option('booking_is_use_hints_at_admin_panel');
    if ($is_use_hints == 'On') {
//.........这里部分代码省略.........
开发者ID:RetinaInc,项目名称:booking-2,代码行数:101,代码来源:wpdev-bk-lib.php

示例5: wpdevbk_show_booking_footer

function wpdevbk_show_booking_footer()
{
    $wpdev_copyright_adminpanel = get_bk_option('booking_wpdev_copyright_adminpanel');
    // check
    if ($wpdev_copyright_adminpanel !== 'Off' && !wpdev_bk_is_this_demo()) {
        $message = '';
        $message .= '<a target="_blank" href="http://wpbookingcalendar.com/">Booking Calendar</a> ' . __('version', 'wpdev-booking') . ' ' . WP_BK_VERSION_NUM;
        $message .= ' | ' . sprintf(__('Add your %s on %swordpress.org%s, if you enjoyed by this plugin.', 'wpdev-booking'), '<a target="_blank" href="http://goo.gl/tcrrpK" >&#9733;&#9733;&#9733;&#9733;&#9733;</a>', '<a target="_blank" href="http://goo.gl/tcrrpK" >', '</a>');
        echo '<div id="wpbc-footer" style="position:absolute;bottom:40px;text-align:left;width:100%;font-size:10px;text-shadow:0 1px 0 #fff;margin:0;color:#888;">' . $message . '</div>';
        ?>
            <script type="text/javascript">
                jQuery(document).ready(function(){
                    jQuery('#wpfooter').append( jQuery('#wpbc-footer') );
                });
            </script>
            <?php 
    }
}
开发者ID:dev-lav,项目名称:htdocs,代码行数:18,代码来源:wpdev-booking-functions.php

示例6: toolbar_top_sub_menu

    public function toolbar_top_sub_menu()
    {
        if (isset($_GET['tab']) && $_GET['tab'] == $this->term && count($this->sub_menu) > 0) {
            $active_itmes_in_top_menu = array();
            ?>
            <div class="booking-submenu-tab-container">
                <div class="nav-tabs booking-submenu-tab-insidecontainer"><?php 
            foreach ($this->sub_menu as $sub_menu_item) {
                ?>
 <a href="javascript:void(0)" 
                                 onclick="javascript:jQuery('.visibility_container').css('display','none');
                                     jQuery('#<?php 
                echo $sub_menu_item['visibility_container'];
                ?>
').css('display','block');
                                     jQuery('.nav-tab').removeClass('booking-submenu-tab-selected');
                                     jQuery(this).addClass('booking-submenu-tab-selected');"
                                 rel="tooltip" class="tooltip_bottom nav-tab booking-submenu-tab <?php 
                if ($sub_menu_item['selected']) {
                    echo 'booking-submenu-tab-selected ';
                }
                if (!empty($sub_menu_item['active_status'])) {
                    if (get_bk_option($sub_menu_item['active_status']) != 'On') {
                        echo ' booking-submenu-tab-disabled ';
                    }
                }
                ?>
"
                                 original-title="<?php 
                echo $sub_menu_item['description'];
                ?>
"
                                 style="<?php 
                echo $sub_menu_item['style'];
                ?>
"
                               > <?php 
                echo $sub_menu_item['title'];
                if (!empty($sub_menu_item['active_status'])) {
                    $active_itmes_in_top_menu[] = array($sub_menu_item['active_status'], $sub_menu_item['active_status'] . '_dublicated');
                    ?>
 <input 
                                   type="checkbox" <?php 
                    if (get_bk_option($sub_menu_item['active_status']) == 'On') {
                        echo ' checked="CHECKED" ';
                    }
                    ?>
  
                                   name="<?php 
                    echo $sub_menu_item['active_status'] . '_dublicated';
                    ?>
" 
                                   id="<?php 
                    echo $sub_menu_item['active_status'] . '_dublicated';
                    ?>
" 
                                   onchange="if ( jQuery('#' + '<?php 
                    echo $sub_menu_item['active_status'];
                    ?>
' ).length ) {document.getElementById('<?php 
                    echo $sub_menu_item['active_status'];
                    ?>
').checked=this.checked;}" 
                                 /><?php 
                }
                ?>
 </a> <?php 
            }
            // Set Submit button to toolbar
            if ($this->submit_in_toolbar) {
                ?>
 <input type="button" class="button-primary button" value="<?php 
                echo $this->submit_title;
                ?>
" 
                                       style="float:right;"
                                       onclick="document.forms['<?php 
                echo $this->submit_form;
                ?>
'].submit();" />
                                <div class="clear" style="height:0px;"></div><?php 
            }
            if (count($active_itmes_in_top_menu) > 0) {
                ?>
 <script type="text/javascript">
                            function recheck_active_itmes_in_top_menu( internal_checkbox, top_checkbox ){
                                
                                if ( ( jQuery('#' + internal_checkbox ).length ) && ( jQuery('#' + top_checkbox ).length ) ) {
                                    if (document.getElementById( internal_checkbox ).checked != document.getElementById( top_checkbox ).checked ) {
                                        document.getElementById( top_checkbox ).checked = document.getElementById( internal_checkbox ).checked;
                                        if ( document.getElementById( top_checkbox ).checked )
                                            jQuery('#' + top_checkbox ).parent().removeClass('booking-submenu-tab-disabled');
                                        else
                                            jQuery('#' + top_checkbox ).parent().addClass('booking-submenu-tab-disabled');
                                    }
                                }
                            }
                            
                            jQuery(document).ready( function(){
                                <?php 
//.........这里部分代码省略.........
开发者ID:RetinaInc,项目名称:booking-2,代码行数:101,代码来源:wpbc-class-settings.php

示例7: delete

 public function delete($action_name)
 {
     if (isset($this->actions[$action_name])) {
         unset($this->actions[$action_name]);
     }
     // Update to DB
     $booking_cron = get_bk_option('booking_cron');
     if ($booking_cron === false) {
         $booking_cron = array();
     } else {
         if (is_serialized($booking_cron)) {
             $booking_cron = unserialize($booking_cron);
         }
         if (isset($booking_cron[$action_name])) {
             unset($booking_cron[$action_name]);
         }
     }
     ////////////////////////////////////////////////////////////////////
     update_bk_option('booking_cron', $booking_cron);
 }
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:20,代码来源:wpbc-cron.php

示例8: wpbc_is_load_CSS_JS_on_this_page

/**
 * Check if we activated loading of JS/CSS only on specific pages and then load or no it
 *
 * @return TRUE | FALSE
 */
function wpbc_is_load_CSS_JS_on_this_page()
{
    $booking_is_load_js_css_on_specific_pages = get_bk_option('booking_is_load_js_css_on_specific_pages');
    if ($booking_is_load_js_css_on_specific_pages == 'On') {
        $booking_pages_for_load_js_css = get_bk_option('booking_pages_for_load_js_css');
        $booking_pages_for_load_js_css = preg_split('/[\\r\\n]+/', $booking_pages_for_load_js_css, -1, PREG_SPLIT_NO_EMPTY);
        $request_uri = $_SERVER['REQUEST_URI'];
        // FixIn:5.4.1
        if (strpos($request_uri, 'booking_hash=') !== false) {
            $request_uri = parse_url($request_uri);
            if (!empty($request_uri) && isset($request_uri['path'])) {
                $request_uri = $request_uri['path'];
            } else {
                $request_uri = $_SERVER['REQUEST_URI'];
            }
        }
        if (!empty($booking_pages_for_load_js_css) && !in_array($request_uri, $booking_pages_for_load_js_css)) {
            return false;
        }
    }
    return true;
}
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:27,代码来源:wpbc-scripts.php

示例9: wpbc_check_if_dates_free

/**
 * Checking for  bookings in the same session and prevention of the double booking 
 * 
 * @param type $bktype
 * @param type $formdata
 * @param type $str_dates__dd_mm_yyyy
 * @param type $start_time
 * @param type $end_time
 * @return true|false - free or unavailable
 */
function wpbc_check_if_dates_free($bktype, $formdata, $dates_in_diff_formats, $start_time, $end_time)
{
    if (get_bk_option('booking_check_on_server_if_dates_free') == 'Off' || get_bk_option('booking_is_days_always_available') == 'On') {
        return true;
    }
    //TODO: Finish  checking for parent booking resources
    //      We need to  get  availabaility  for the specific dates
    //      We need to rewrite
    //      function show_availability_at_calendar
    //      for getting availability  only  for the specific dates
    //      and then  based on the availability approve or decline this current booking.
    if (class_exists('wpdev_bk_biz_l')) {
        $number_of_child_resources = apply_bk_filter('wpbc_get_number_of_child_resources', $bktype);
        if ($number_of_child_resources > 1) {
            // if this booking resources - parent,  then  do  not chekc it, yet!
            return true;
        }
    }
    //    $is_days_free =  true;
    ////////////////////////////////////////////////////////////////////////////
    // Get Selected Dates Array in full format - all possible dates and times //
    ////////////////////////////////////////////////////////////////////////////
    //Example:
    //            [0] => 2014-11-21 10:00:01
    //            [1] => 2014-11-21 12:00:02
    //            [2] => 2014-11-22 10:00:01
    //            [3] => 2014-11-22 12:00:02
    $selected_dates_array = array();
    $i = 0;
    //debuge('$dates_in_diff_formats["array]',$dates_in_diff_formats['array'])    ;
    // if we selected only 1 day,  system  retur in this array 2 same dates. But in situation with recurenttime we need only one day
    if (get_bk_option('booking_recurrent_time') == 'On') {
        $dates_in_diff_formats['array'] = array_unique($dates_in_diff_formats['array']);
    }
    foreach ($dates_in_diff_formats['array'] as $my_date) {
        $i++;
        $my_date = explode('-', $my_date);
        // For start and end times we cut 10 seconds,  so we can  check for sure if this times inside of the booked times or not
        if (get_bk_option('booking_recurrent_time') !== 'On') {
            if ($i == 1) {
                $date = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $my_date[0], $my_date[1], $my_date[2], $start_time[0], $start_time[1], $start_time[2]);
                $date = date('Y-m-d H:i:s', strtotime('+20 second', strtotime($date)));
            } elseif ($i == count($dates_in_diff_formats['array'])) {
                $date = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $my_date[0], $my_date[1], $my_date[2], $end_time[0], $end_time[1], $end_time[2]);
                $date = date('Y-m-d H:i:s', strtotime('-20 second', strtotime($date)));
            } else {
                $date = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $my_date[0], $my_date[1], $my_date[2], '00', '00', '00');
            }
            $selected_dates_array[] = $date;
        } else {
            $date = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $my_date[0], $my_date[1], $my_date[2], $start_time[0], $start_time[1], $start_time[2]);
            $date = date('Y-m-d H:i:s', strtotime('+20 second', strtotime($date)));
            $selected_dates_array[] = $date;
            $date = sprintf("%04d-%02d-%02d %02d:%02d:%02d", $my_date[0], $my_date[1], $my_date[2], $end_time[0], $end_time[1], $end_time[2]);
            $date = date('Y-m-d H:i:s', strtotime('-20 second', strtotime($date)));
            $selected_dates_array[] = $date;
        }
    }
    ////////////////////////////////////////////////////////////////////////////
    // SQL condition for getting any booked dates,  which  inside of  selected dates intervals
    $dates_sql_where = '';
    foreach ($dates_in_diff_formats['array'] as $selected_date) {
        $selected_date = explode('-', $selected_date);
        $my_check_in_date_sql = sprintf("%04d-%02d-%02d 00:00:00", $selected_date[0], $selected_date[1], $selected_date[2]);
        $my_check_out_date_sql = sprintf("%04d-%02d-%02d 23:59:59", $selected_date[0], $selected_date[1], $selected_date[2]);
        if (!empty($dates_sql_where)) {
            $dates_sql_where .= " OR ";
        }
        $dates_sql_where .= " ( dt.booking_date >= '{$my_check_in_date_sql}' AND dt.booking_date <= '{$my_check_out_date_sql}' ) ";
    }
    if (!empty($dates_sql_where)) {
        $dates_sql_where = " ({$dates_sql_where}) ";
    }
    ////////////////////////////////////////////////////////////////////////////
    /*  
        // WE can not use this type of days condition  for check  in and check out dates,  because user can  select several not consecutive days      
        $my_check_in_date = explode( '-', $dates_in_diff_formats['array'][0] );
        $my_check_in_date_sql = sprintf( "%04d-%02d-%02d 00:00:00", $my_check_in_date[0], $my_check_in_date[1], $my_check_in_date[2] );
        
        $my_check_out_date = explode( '-', $dates_in_diff_formats['array'][ ( count($dates_in_diff_formats['array']) - 1 ) ] );
        $my_check_out_date_sql = sprintf( "%04d-%02d-%02d 23:59:59", $my_check_out_date[0], $my_check_out_date[1], $my_check_out_date[2] );
        
        $dates_sql_where = " ( dt.booking_date >= '{$my_check_in_date_sql}' AND dt.booking_date <= '{$my_check_out_date_sql}' ) ";
        /**/
    global $wpdb;
    // Checking only for approved bookings,  if pending days available is active
    if (get_bk_option('booking_is_show_pending_days_as_available') == 'On') {
        $approved_only = ' dt.approved = 1 AND ';
    } else {
        $approved_only = '';
//.........这里部分代码省略.........
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:101,代码来源:wpbc-booking-new.php

示例10: welcome

 public function welcome()
 {
     $booking_activation_process = get_bk_option('booking_activation_process');
     if ($booking_activation_process == 'On') {
         return;
     }
     // Bail if no activation redirect transient is set
     if (!get_transient('_wpbc_activation_redirect')) {
         return;
     }
     // Delete the redirect transient
     delete_transient('_wpbc_activation_redirect');
     // Bail if DEMO or activating from network, or bulk, or within an iFrame
     if (wpdev_bk_is_this_demo() || is_network_admin() || isset($_GET['activate-multi']) || defined('IFRAME_REQUEST')) {
         return;
     }
     wp_safe_redirect(admin_url('index.php?page=wpbc-about'));
     exit;
 }
开发者ID:RetinaInc,项目名称:booking-2,代码行数:19,代码来源:wpbc-welcome.php

示例11: wpbc_booking_settings_top_menu_submenu_line

function wpbc_booking_settings_top_menu_submenu_line()
{
    if (isset($_GET['tab']) && $_GET['tab'] == 'email') {
        ?>
        <div class="booking-submenu-tab-container">
            <div class="nav-tabs booking-submenu-tab-insidecontainer">

                <a href="javascript:void(0)" onclick="javascript:jQuery('.visibility_container').css('display','none');jQuery('#visibility_container_email_new_to_admin').css('display','block');jQuery('.nav-tab').removeClass('booking-submenu-tab-selected');jQuery(this).addClass('booking-submenu-tab-selected');"
                   rel="tooltip" class="tooltip_bottom nav-tab  booking-submenu-tab booking-submenu-tab-selected <?php 
        if (get_bk_option('booking_is_email_reservation_adress') != 'On') {
            echo ' booking-submenu-tab-disabled ';
        }
        ?>
"
                   original-title="<?php 
        _e('Customization of email template, which is sending to Admin after new booking', 'booking');
        ?>
" >
                        <?php 
        _e('New for Admin', 'booking');
        ?>
                    <input type="checkbox" <?php 
        if (get_bk_option('booking_is_email_reservation_adress') == 'On') {
            echo ' checked="CHECKED" ';
        }
        ?>
  name="booking_is_email_reservation_adress_dublicated" id="booking_is_email_reservation_adress_dublicated"
                           onchange="document.getElementById('is_email_reservation_adress').checked=this.checked;"
                           >
                </a>

                <a href="javascript:void(0)" onclick="javascript:jQuery('.visibility_container').css('display','none');jQuery('#visibility_container_email_new_to_visitor').css('display','block');jQuery('.nav-tab').removeClass('booking-submenu-tab-selected');jQuery(this).addClass('booking-submenu-tab-selected');"
                   rel="tooltip" class="tooltip_bottom nav-tab  booking-submenu-tab <?php 
        if (get_bk_option('booking_is_email_newbookingbyperson_adress') != 'On') {
            echo ' booking-submenu-tab-disabled ';
        }
        ?>
"
                   original-title="<?php 
        _e('Customization of email template, which is sending to Visitor after new booking', 'booking');
        ?>
" >
                        <?php 
        _e('New for Visitor', 'booking');
        ?>
                    <input type="checkbox" <?php 
        if (get_bk_option('booking_is_email_newbookingbyperson_adress') == 'On') {
            echo ' checked="CHECKED" ';
        }
        ?>
  name="booking_is_email_newbookingbyperson_adress_dublicated" id="booking_is_email_newbookingbyperson_adress_dublicated"
                           onchange="document.getElementById('is_email_newbookingbyperson_adress').checked=this.checked;"
                           >
                </a>

                <a href="javascript:void(0)" onclick="javascript:jQuery('.visibility_container').css('display','none');jQuery('#visibility_container_email_approved').css('display','block');jQuery('.nav-tab').removeClass('booking-submenu-tab-selected');jQuery(this).addClass('booking-submenu-tab-selected');"
                   rel="tooltip" class="tooltip_bottom nav-tab  booking-submenu-tab <?php 
        if (get_bk_option('booking_is_email_approval_adress') != 'On') {
            echo ' booking-submenu-tab-disabled ';
        }
        ?>
"
                   original-title="<?php 
        _e('Customization of email template, which is sending to Visitor after approval of booking', 'booking');
        ?>
" >
                        <?php 
        _e('Approved', 'booking');
        ?>
                    <input type="checkbox" <?php 
        if (get_bk_option('booking_is_email_approval_adress') == 'On') {
            echo ' checked="CHECKED" ';
        }
        ?>
  name="booking_is_email_approval_adress_dublicated" id="booking_is_email_approval_adress_dublicated"
                           onchange="document.getElementById('is_email_approval_adress').checked=this.checked;"
                           >
                </a>

                <a href="javascript:void(0)" onclick="javascript:jQuery('.visibility_container').css('display','none');jQuery('#visibility_container_email_declined').css('display','block');jQuery('.nav-tab').removeClass('booking-submenu-tab-selected');jQuery(this).addClass('booking-submenu-tab-selected');"
                   rel="tooltip" class="tooltip_bottom nav-tab  booking-submenu-tab <?php 
        if (get_bk_option('booking_is_email_deny_adress') != 'On') {
            echo ' booking-submenu-tab-disabled ';
        }
        ?>
"
                   original-title="<?php 
        _e('Customization of email template, which is sending to Visitor after Cancellation of booking', 'booking');
        ?>
" >
                        <?php 
        _e('Declined', 'booking');
        ?>
                    <input type="checkbox" <?php 
        if (get_bk_option('booking_is_email_deny_adress') == 'On') {
            echo ' checked="CHECKED" ';
        }
        ?>
  name="booking_is_email_declined_adress_dublicated" id="booking_is_email_declined_adress_dublicated"
                           onchange="document.getElementById('is_email_deny_adress').checked=this.checked;"
//.........这里部分代码省略.........
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:101,代码来源:wpdev-settings-general.php

示例12: wpbc_get_fields_list_in_booking_form_free

function wpbc_get_fields_list_in_booking_form_free()
{
    $booking_form_fields_names = array("name", "secondname", "email", "phone", "details");
    $booking_form_fields = array('num' => 1, 'listing' => array('labels' => array(), 'fields' => array()), 'name' => 'free');
    $booking_form_fields['listing']['labels'][] = __('None', 'booking');
    $booking_form_fields['listing']['fields'][] = '';
    $booking_form_fields['listing']['fields_type'][] = 'text';
    $key = 0;
    foreach ($booking_form_fields_names as $name) {
        $key++;
        if (get_bk_option("booking_form_field_active{$key}") != 'Off') {
            $booking_form_field_label = get_bk_option("booking_form_field_label{$key}");
            $booking_form_field_label = apply_bk_filter('wpdev_check_for_active_language', $booking_form_field_label);
            $booking_form_fields['listing']['labels'][] = $booking_form_field_label;
            $booking_form_fields['listing']['fields'][] = $name;
            $booking_form_fields['listing']['fields_type'][] = 'text';
            $booking_form_fields['num']++;
        }
    }
    if ($booking_form_fields['num'] == 0) {
        return false;
    } else {
        return $booking_form_fields;
    }
}
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:25,代码来源:wpbc-gcal.php

示例13: welcome

 public function welcome()
 {
     $booking_activation_process = get_bk_option('booking_activation_process');
     if ($booking_activation_process == 'On') {
         return;
     }
     // Bail if no activation redirect transient is set
     if (!get_transient('_wpbc_activation_redirect')) {
         return;
     }
     // Delete the redirect transient
     delete_transient('_wpbc_activation_redirect');
     // Bail if DEMO or activating from network, or bulk, or within an iFrame
     if (wpdev_bk_is_this_demo() || is_network_admin() || isset($_GET['activate-multi']) || defined('IFRAME_REQUEST')) {
         return;
     }
     // Set mark,  that  we already redirected to About screen               //FixIn: 5.4.5
     $redirect_for_version = get_bk_option('booking_activation_redirect_for_version');
     if ($redirect_for_version == WP_BK_VERSION_NUM) {
         return;
     } else {
         update_bk_option('booking_activation_redirect_for_version', WP_BK_VERSION_NUM);
     }
     wp_safe_redirect(admin_url('index.php?page=wpbc-about'));
     exit;
 }
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:26,代码来源:wpbc-welcome.php

示例14: wpdev_bk_custom_button_dalog_structure_DIV

function wpdev_bk_custom_button_dalog_structure_DIV()
{
    ?>
    <div class="hidden">
        <div id="wpdev_bk-dialog" style="width:90%;height:90%;">
            <div class="wpdev_bk-dialog-content">
                <div class="wpdev_bk-dialog-inputs">
                    <?php 
    $is_can = apply_bk_filter('multiuser_is_user_can_be_here', true, 'only_super_admin');
    if ($is_can) {
        make_bk_action('show_tabs_inside_insertion_popup_window');
    }
    ?>
                    <div id="popup_new_reservation" style="display:block;" class="booking_configuration_dialog">

                      <div id="popup_new_reservation_main_content"><?php 
    if (get_bk_version() !== 'free') {
        $types_list = get_bk_types(false, false);
        ?>
<div class="field">
                                  <fieldset>
                                        <label for="calendar_type"><?php 
        _e('Booking resource:', 'booking');
        ?>
</label>
                                        <select id="calendar_type" name="calendar_type">
                                            <?php 
        foreach ($types_list as $tl) {
            ?>
                                            <option value="<?php 
            echo $tl->id;
            ?>
"
                                                        style="<?php 
            if (isset($tl->parent)) {
                if ($tl->parent == 0) {
                    echo 'font-weight:bold;';
                } else {
                    echo 'font-size:11px;padding-left:20px;';
                }
            }
            ?>
"
                                                    ><?php 
            echo $tl->title;
            ?>
</option>
                                            <?php 
        }
        ?>
                                        </select>
                                      <span class="description"><?php 
        _e('Select booking resource', 'booking');
        ?>
</span>
                                  </fieldset>
                              </div>                              
                        <?php 
    }
    ?>

                        <?php 
    if ($is_can || WP_BK_CUSTOM_FORMS_FOR_REGULAR_USERS) {
        make_bk_action('wpdev_show_bk_form_selection');
    }
    ?>

                        <div class="field">
                            <fieldset>
                                <label for="calendar_count"><?php 
    _e('Visible months:', 'booking');
    ?>
</label>
                                <select  id="calendar_count"  name="calendar_count" >
                                    <option value="1" <?php 
    if (get_bk_option('booking_client_cal_count') == '1') {
        echo ' selected="SELECTED" ';
    }
    ?>
 >1</option>
                                    <option value="2" <?php 
    if (get_bk_option('booking_client_cal_count') == '2') {
        echo ' selected="SELECTED" ';
    }
    ?>
 >2</option>
                                    <option value="3" <?php 
    if (get_bk_option('booking_client_cal_count') == '3') {
        echo ' selected="SELECTED" ';
    }
    ?>
 >3</option>
                                    <option value="4" <?php 
    if (get_bk_option('booking_client_cal_count') == '4') {
        echo ' selected="SELECTED" ';
    }
    ?>
 >4</option>
                                    <option value="5" <?php 
    if (get_bk_option('booking_client_cal_count') == '5') {
//.........这里部分代码省略.........
开发者ID:ahmedalaahagag,项目名称:HospitalManagementSystem,代码行数:101,代码来源:wpdev-bk-edit-toolbar-buttons.php

示例15: wpdev_bk_insert_new_booking


//.........这里部分代码省略.........
        }
        $delete_sql = "DELETE FROM {$wpdb->prefix}bookingdates WHERE booking_id IN ({$my_booking_id})";
        if (false === $wpdb->query($delete_sql)) {
            ?>
 <script type="text/javascript"> document.getElementById('submiting<?php 
            echo $bktype;
            ?>
').innerHTML = '<div style=&quot;height:20px;width:100%;text-align:center;margin:15px auto;&quot;><?php 
            bk_error('Error during updating exist booking for deleting dates in DB', __FILE__, __LINE__);
            ?>
</div>'; </script> <?php 
            die;
        }
        $booking_id = (int) $my_booking_id;
        //Get ID  of reservation
    } else {
        // Add new booking
        $sql_insertion = "INSERT INTO {$wpdb->prefix}booking (form, booking_type, modification_date) VALUES ('{$formdata}',  {$bktype}, {$my_modification_date} )";
        if (false === $wpdb->query($sql_insertion)) {
            ?>
 <script type="text/javascript"> document.getElementById('submiting<?php 
            echo $bktype;
            ?>
').innerHTML = '<div style=&quot;height:20px;width:100%;text-align:center;margin:15px auto;&quot;><?php 
            bk_error('Error during inserting into DB', __FILE__, __LINE__);
            ?>
</div>'; </script> <?php 
            die;
        }
        // Make insertion into BOOKINGDATES
        $booking_id = (int) $wpdb->insert_id;
        //Get ID  of reservation
        $is_approved_dates = '0';
        $auto_approve_new_bookings_is_active = get_bk_option('booking_auto_approve_new_bookings_is_active');
        if (trim($auto_approve_new_bookings_is_active) == 'On') {
            $is_approved_dates = '1';
        }
    }
    $my_dates = explode(",", $dates);
    $i = 0;
    foreach ($my_dates as $md) {
        $my_dates[$i] = trim($my_dates[$i]);
        $i++;
    }
    $start_end_time = get_times_from_bk_form($formdata, $my_dates, $bktype);
    $start_time = $start_end_time[0];
    $end_time = $start_end_time[1];
    $my_dates = $start_end_time[2];
    make_bk_action('wpdev_booking_post_inserted', $booking_id, $bktype, str_replace('|', ',', $dates), array($start_time, $end_time));
    $my_cost = apply_bk_filter('get_booking_cost_from_db', '', $booking_id);
    $i = 0;
    foreach ($my_dates as $md) {
        // Set in dates in such format: yyyy.mm.dd
        if ($md != '') {
            $md = explode('.', $md);
            $my_dates[$i] = $md[2] . '.' . (intval($md[1]) < 10 ? '0' . intval($md[1]) : $md[1]) . '.' . (intval($md[0]) < 10 ? '0' . intval($md[0]) : $md[0]);
        } else {
            unset($my_dates[$i]);
        }
        // If some dates is empty so remove it   // This situation can be if using several bk calendars and some calendars is not checked
        $i++;
    }
    //debuge($my_dates);
    sort($my_dates);
    // Sort dates
    //debuge($my_dates);
开发者ID:dev-lav,项目名称:htdocs,代码行数:67,代码来源:wpdev-booking-ajax.php


注:本文中的get_bk_option函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。