Ben#8
Open
BenardMpanga wants to merge 17 commits into
Open
Conversation
Insert a 'Payments' menu item linking to admin_payments.php into the navigation list in booking_history.php so admins can access the Payments page directly from the booking history/admin menu.
Insert a 'Payments' menu item into the admin navigation in admin_room_history.php, linking to admin_payments.php so admins can access the payments page from the sidebar.
Insert a 'Payments' navigation item (admin_payments.php) into admin_room_removed1.php so admins can access the payments page from the sidebar navigation.
Insert a Payments entry into the admin navigation menu in admin_room_status.php. Adds <li><a href="admin_payments.php">Payments</a></li> to provide quick access to the payments page (placed before Logout).
Add a 'Payments' navigation item in admin_view.php that links to admin_payments.php so admins can access the payments page from the main admin menu.
Add a 'Payments' item to the admin navigation by linking to admin_payments.php, making the payments section accessible from the sidebar.
Add a Payment Status column and visual status pills to confirmed_bookings.php. Introduces CSS classes (.status-pill, .status-paid, .status-unpaid), adds a Payments link to the admin menu, adjusts the table colspan to accommodate the new column, and queries booked_hist to mark each booking as Paid or Not Paid and render a colored pill accordingly.
payment.php: enforce that the payment action can only be performed by the booking owner by reading the current user's phone from temp_session and comparing it to the confirmed_booking record. Use a safe default for missing session data. Update post-payment redirect to user_payment.php with status=success and the URL-encoded book_id parameter.
Insert a 'Payments' navigation item pointing to admin_payments.php in remove_room_admin.php so admins can access the payments page from the sidebar navigation.
Scope the booked_hist query to the current user by adding WHERE phone='$phone' AND idproof='$id'. Rename the inner loop variable from $row to $history to avoid clobbering the outer $row and remove the redundant in-loop identity check; update the echoed columns to use $history indices. Keeps mysqli_free_result on completion.
Add a dismissible flash message for payment success (with close button and auto-hide JS) shown when ?status=success; include optional booking id. Improve security and clarity by renaming the temp_session result to $user_row, escaping output with htmlspecialchars, and using $conn->real_escape_string to filter confirmed_booking by the user's phone. Also add CSS for .flash-message and minor formatting/whitespace cleanups.
Add visual payment status to booking history: new CSS classes (.status-pill, .status-paid, .status-unpaid) to render a pill indicator, increase table colspan from 6 to 7 and add a "Payment Status" header. The PHP loop was updated to output a status cell using a $paid variable (currently hardcoded true as a placeholder). Replace the placeholder with the actual payment field from the DB when wiring up real data. Minor brace/formatting cleanup in the loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add status to booking