🏨 Hotel Booking Enhancements: - Implemented Eagle Booking Advanced Pricing add-on - Added Booking.com-style rate management system - Created professional calendar interface for pricing - Integrated deals and discounts functionality 💰 Advanced Pricing Features: - Dynamic pricing models (per room, per person, per adult) - Base rates, adult rates, and child rates management - Length of stay discounts and early bird deals - Mobile rates and secret deals implementation - Seasonal promotions and flash sales 📅 Availability Management: - Real-time availability tracking - Stop sell and restriction controls - Closed to arrival/departure functionality - Minimum/maximum stay requirements - Automatic sold-out management 💳 Payment Integration: - Maintained Redsys payment gateway integration - Seamless integration with existing Eagle Booking - No modifications to core Eagle Booking plugin 🛠️ Technical Implementation: - Custom database tables for advanced pricing - WordPress hooks and filters integration - AJAX-powered admin interface - Data migration from existing Eagle Booking - Professional calendar view for revenue management 📊 Admin Interface: - Booking.com-style management dashboard - Visual rate and availability calendar - Bulk operations for date ranges - Statistics and analytics dashboard - Modal dialogs for quick editing 🔧 Code Quality: - WordPress coding standards compliance - Secure database operations with prepared statements - Proper input validation and sanitization - Error handling and logging - Responsive admin interface 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
55 lines
1.3 KiB
PHP
55 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Replace hash()
|
|
*
|
|
* @category PHP
|
|
* @package PHP_Compat
|
|
* @license LGPL - http://www.gnu.org/licenses/lgpl.html
|
|
* @copyright 2004-2007 Aidan Lister <aidan@php.net>, Arpad Ray <arpad@php.net>
|
|
* @link http://php.net/function.hash
|
|
* @author revulo <revulon@gmail.com>
|
|
* @since PHP 5.1.2
|
|
* @require PHP 4.0.0 (user_error)
|
|
*/
|
|
function php_compat_hash($algo, $data, $raw_output = false)
|
|
{
|
|
$algo = strtolower($algo);
|
|
switch ($algo) {
|
|
case 'md5':
|
|
$hash = md5($data);
|
|
break;
|
|
|
|
case 'sha1':
|
|
if (!function_exists('sha1')) {
|
|
require dirname(__FILE__) . '/sha1.php';
|
|
}
|
|
$hash = sha1($data);
|
|
break;
|
|
|
|
case 'sha256':
|
|
require_once dirname(__FILE__) . '/sha256.php';
|
|
$hash = SHA256::hash($data);
|
|
break;
|
|
|
|
default:
|
|
user_error('hash(): Unknown hashing algorithm: ' . $algo, E_USER_WARNING);
|
|
return false;
|
|
}
|
|
|
|
if ($raw_output) {
|
|
return pack('H*', $hash);
|
|
} else {
|
|
return $hash;
|
|
}
|
|
}
|
|
|
|
|
|
// Define
|
|
if (!function_exists('hash')) {
|
|
function hash($algo, $data, $raw_output = false)
|
|
{
|
|
return php_compat_hash($algo, $data, $raw_output);
|
|
}
|
|
}
|
|
?>
|