diff --git a/includes/lang.php b/includes/lang.php index fd1a86f..546a44d 100644 --- a/includes/lang.php +++ b/includes/lang.php @@ -31,6 +31,13 @@ $translations = [ 'comment' => 'Comment', 'rating_type' => 'Type', 'staff' => 'Staff', + 'rate_us' => 'Rate Us', + 'rate_staff' => 'Rate Staff', + 'rate_services' => 'Rate Our Services', + 'clear_ratings' => 'Clear Ratings', + 'confirm_clear_ratings' => 'Are you sure you want to clear all ratings?', + 'ratings_cleared' => 'All ratings have been cleared successfully.', + 'error_clearing_ratings' => 'Error clearing ratings.', 'service' => 'Service', 'average_rating' => 'Average Rating', 'total_ratings' => 'Total Ratings', @@ -214,6 +221,13 @@ $translations = [ 'ready_orders' => 'Ready Orders', 'recent_orders' => 'Recent Orders', 'reports' => 'Reports', + 'rate_us' => 'Rate Us', + 'rate_staff' => 'Rate Staff', + 'rate_services' => 'Rate Our Services', + 'clear_ratings' => 'Clear Ratings', + 'confirm_clear_ratings' => 'Are you sure you want to clear all ratings?', + 'ratings_cleared' => 'All ratings have been cleared successfully.', + 'error_clearing_ratings' => 'Error clearing ratings.', 'service' => 'Service', 'service_pricing' => 'Service Pricing', 'services_management' => 'Services Management', @@ -291,6 +305,13 @@ $translations = [ 'comment' => 'تعليق', 'rating_type' => 'النوع', 'staff' => 'موظف', + 'rate_us' => 'قيمنا', + 'rate_staff' => 'تقييم الموظفين', + 'rate_services' => 'تقييم خدماتنا', + 'clear_ratings' => 'مسح التقييمات', + 'confirm_clear_ratings' => 'هل أنت متأكد من مسح جميع التقييمات؟', + 'ratings_cleared' => 'تم مسح جميع التقييمات بنجاح.', + 'error_clearing_ratings' => 'حدث خطأ أثناء مسح التقييمات.', 'service' => 'خدمة', 'average_rating' => 'متوسط التقييم', 'total_ratings' => 'إجمالي التقييمات', @@ -474,6 +495,13 @@ $translations = [ 'ready_orders' => 'طلبات جاهزة', 'recent_orders' => 'آخر الطلبات', 'reports' => 'التقارير', + 'rate_us' => 'قيمنا', + 'rate_staff' => 'تقييم الموظفين', + 'rate_services' => 'تقييم خدماتنا', + 'clear_ratings' => 'مسح التقييمات', + 'confirm_clear_ratings' => 'هل أنت متأكد من مسح جميع التقييمات؟', + 'ratings_cleared' => 'تم مسح جميع التقييمات بنجاح.', + 'error_clearing_ratings' => 'حدث خطأ أثناء مسح التقييمات.', 'service' => 'خدمة', 'service_pricing' => 'أسعار الخدمات', 'services_management' => 'إدارة الخدمات', diff --git a/rate.php b/rate.php new file mode 100644 index 0000000..c7b159a --- /dev/null +++ b/rate.php @@ -0,0 +1,130 @@ +prepare("SELECT b.id AS branch_id, b.name_en AS branch_name_en, b.name_ar AS branch_name_ar, c.id AS company_id, c.name_en AS comp_name_en, c.name_ar AS comp_name_ar, c.logo FROM branches b JOIN companies c ON b.company_id = c.id WHERE b.id = ?"); + $stmt->execute([$branch_id_get]); + $info = $stmt->fetch(PDO::FETCH_ASSOC); +} + +if (empty($info)) { + $stmt = db()->query("SELECT b.id AS branch_id, b.name_en AS branch_name_en, b.name_ar AS branch_name_ar, c.id AS company_id, c.name_en AS comp_name_en, c.name_ar AS comp_name_ar, c.logo FROM branches b JOIN companies c ON b.company_id = c.id LIMIT 1"); + $info = $stmt->fetch(PDO::FETCH_ASSOC); +} + +$branch_id = $info['branch_id'] ?? null; +$company_name = $_SESSION['lang'] === 'ar' ? ($info['comp_name_ar'] ?? '') : ($info['comp_name_en'] ?? ''); +$branch_name = $_SESSION['lang'] === 'ar' ? ($info['branch_name_ar'] ?? '') : ($info['branch_name_en'] ?? ''); +$logo = $info['logo'] ?? null; + +$branch_query = $branch_id ? '?branch_id=' . $branch_id : ''; +?> + + +
+ + +