• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_bk_option函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_block函数代码示例发布时间:2022-05-15
下一篇:
PHP get_bean_select_array函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap