Administrator Guide
This guide covers all administrative functions for managing the mountain refuge reservation system, including user management, reservation approval, and dashboard monitoring.Getting Started
Accessing the Admin Panel
Login to the system
Navigate to
login.php and enter your administrator credentials:- Email: Your admin email address
- Password: Your admin password
The main admin user (
admin@hostel.com) cannot be modified or deleted to ensure system access is always available.Dashboard Overview
The dashboard provides a comprehensive view of the refuge’s current status.Key Statistics
The dashboard displays three main statistics cards:Total Rooms
Shows the total number of rooms in the refuge
Pending Reservations
Number of reservations awaiting approval
Total Beds
Total bed capacity (26 beds)
Calendar View
The calendar shows a monthly overview with color-coded indicators:- Yellow background: Days with pending reservations
- Green background: Days with approved reservations
- Blue gradient: Days with both pending and approved reservations
- White: Days with no reservations
- Gray: Past days
- Number of free beds vs. total beds (e.g., “15/26 libres”)
- Number of pending reservations
- Number of approved reservations
Pending Reservations Section
Below the calendar, you’ll see a table of all pending reservations requiring approval. For each reservation, you can see:- Requester name and email
- Room number
- Number of beds
- Check-in and check-out dates
- Request date and time
- Approve: Click the green “Aprobar” button to approve the reservation
- Reject: Click the red “Rechazar” button to reject and cancel the reservation
Room Status
The dashboard also displays the current occupancy status for each room with:- Progress bar showing available beds
- Color coding: green (more than 50% available), yellow (20-50% available), red (less than 20% available)
User Management
Access user management by clicking Usuarios in the sidebar.Viewing Users
The user list displays:- Member number (Nº Socio)
- Full name
- Email address
- Phone number
- DNI
- Role (Admin or User)
- Search: Use the search box to find users by name, email, DNI, or member number
- Sort: Click column headers or use the sort dropdown to organize users
- Pagination: Navigate through pages if you have more than 10 users
Creating a New User
Fill in user details
In the modal form, enter:
- Nº Socio: Member number (required)
- DNI: National ID number (required)
- Teléfono: Phone number (required)
- Email: Email address (required, must be unique)
- Nombre: First name (required)
- Apellido 1: First surname (required)
- Apellido 2: Second surname (optional)
- Contraseña: Password (required, min 6 characters recommended)
- Rol: Select either “user” or “admin”
Passwords are automatically hashed using bcrypt (PASSWORD_BCRYPT) before storage. Users will receive a success message upon creation.
Editing a User
Modify user details
Update any field as needed. Leave the password field empty to keep the current password unchanged.
Deleting a User
Exporting Users
Click the “Exportar CSV” button to download a CSV file containing all user data with current filters and sorting applied. CSV includes: Member number, name, surnames, DNI, email, phone, and role.Reservation Management
Access reservation management by clicking Reservas in the sidebar.Viewing Reservations
Reservations are organized into three tabs:- Pendientes: Reservations awaiting approval
- Aprobadas: Confirmed reservations
- Canceladas: Rejected or canceled reservations
- User information (name, email)
- Room and bed details
- Check-in and check-out dates
- Reservation creation date
- Current status
- Search: Filter by user name, email, or member number
- Sort: Order by creation date, check-in date, check-out date, or user name
- Pagination: 5 reservations per page
Approving Reservations
The reservation status changes to “reservada” and beds are marked as reserved in the system.
Rejecting Reservations
The reservation is moved to the “Canceladas” tab and beds are released.
Editing Reservations
Administrators can modify approved reservations:Update details
Modify:
- Check-in date
- Check-out date
- Room (if available)
- Number of beds (if available)
The system automatically checks bed availability when editing. If the requested changes cannot be accommodated, you’ll see an error message.
Canceling Approved Reservations
Click the red “Cancelar” button next to any approved reservation to cancel it. This releases the beds and moves the reservation to the “Canceladas” tab.Creating Reservations for Members
Administrators can create pre-approved reservations:Creating Special Reservations
For events or maintenance, administrators can create special reservations:Enter details
- Motivo: Reason for the special reservation
- Dates: Start and end dates
- Room: Select a specific room or “Todo el Refugio” (entire refuge)
- Beds: Number of beds to reserve
Exporting Reservations
Click “Exportar CSV” to download reservation data: CSV includes: ID, user info, room, beds, dates, status, and creation date The export respects current filters and sorting, allowing you to export specific subsets of reservations.Best Practices
Daily Tasks
- Review pending reservations at least once daily
- Check the calendar for upcoming high-occupancy periods
- Monitor room availability status
Weekly Tasks
- Review approved reservations for the coming weeks
- Check for any conflicts or overbookings
- Export reservation data for record-keeping
User Management
- Regularly audit user accounts
- Remove inactive users if necessary
- Keep member information up to date
- Export user lists for backup purposes
Troubleshooting
Cannot approve a reservation
Possible causes:- Not enough beds available in the selected room
- Dates conflict with an existing reservation
- The room is already fully booked for those dates
User cannot login
Possible causes:- Incorrect email or password
- Account not yet created
- Wrong role assigned
Reservation conflicts
If you see unexpected booking conflicts:- Check for special reservations (“Todo el Refugio”)
- Review all pending reservations for the dates
- Verify bed assignments in the database if needed
- Consider canceling overlapping reservations and recreating them
Security Notes
As an administrator, you have access to sensitive data:- Never share your admin credentials
- Always log out when finished using the “Cerrar Sesión” option
- Use strong passwords for all admin accounts
- Regularly review user accounts for suspicious activity
- Monitor reservation patterns for unusual booking behavior