Download index.html from Saul7cold/aa: direct link, hf CLI and curl.
- Browser
- Download file 71.5 kB
-
https://huggingface.co/spaces/Saul7cold/aa/resolve/main/index.html
- Command line
-
hf download hf://spaces/Saul7cold/aa/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Saul7cold/aa/resolve/main/index.html
71.5 kB
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>کارنپ - تحویل خودرو با راننده</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');
body {
font-family: 'Vazirmatn', sans-serif;
}
.road-progress {
position: relative;
height: 100px;
margin: 40px 0;
}
.road-line {
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 8px;
background-color: #e5e7eb;
transform: translateY(-50%);
}
.progress-line {
position: absolute;
top: 50%;
left: 0;
width: 0%;
height: 8px;
background-color: #3b82f6;
transform: translateY(-50%);
transition: width 1s ease;
}
.car-icon {
position: absolute;
top: 50%;
left: 0;
transform: translate(-50%, -50%);
font-size: 24px;
color: #3b82f6;
transition: left 1s ease;
}
.progress-point {
position: absolute;
top: 50%;
width: 16px;
height: 16px;
border-radius: 50%;
background-color: #e5e7eb;
transform: translate(-50%, -50%);
}
.progress-point.active {
background-color: #3b82f6;
}
.progress-label {
position: absolute;
top: 70px;
transform: translateX(-50%);
text-align: center;
font-size: 14px;
color: #6b7280;
}
.progress-label.active {
color: #3b82f6;
font-weight: 500;
}
.modal {
display: none;
position: fixed;
z-index: 50;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.modal-content {
background-color: white;
margin: 10% auto;
padding: 20px;
border-radius: 8px;
width: 80%;
max-width: 500px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.close {
color: #aaa;
float: left;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}
.close:hover {
color: black;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
.tab-button.active {
border-bottom: 2px solid #3b82f6;
color: #3b82f6;
}
.sidebar-item.active {
background-color: #eff6ff;
color: #3b82f6;
border-right: 3px solid #3b82f6;
}
.login-container {
display: none;
position: fixed;
z-index: 50;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.login-content {
background-color: white;
margin: 10% auto;
padding: 20px;
border-radius: 8px;
width: 90%;
max-width: 400px;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-8">
<h1 class="text-2xl font-bold text-blue-600">کارنپ</h1>
<nav class="hidden md:flex space-x-6">
<a href="#" class="text-blue-600 font-medium">خانه</a>
<a href="#" class="text-gray-600 hover:text-blue-600">سوالات متداول</a>
<a href="#" class="text-gray-600 hover:text-blue-600">درباره ما</a>
<a href="#" class="text-gray-600 hover:text-blue-600">تماس با ما</a>
</nav>
</div>
<button id="loginBtn" class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
ورود به حساب کاربری
</button>
</div>
</header>
<!-- Hero Section -->
<section class="bg-white py-12">
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-8 md:mb-0">
<img src="https://images.unsplash.com/photo-1583121274602-3e2820c6988f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80"
alt="تحویل خودرو" class="rounded-lg shadow-md w-full h-auto">
</div>
<div class="md:w-1/2 md:pr-8">
<h2 class="text-3xl md:text-4xl font-bold text-gray-800 mb-4">تحویل خودرو با راننده - بدون دردسر، در محل شما</h2>
<p class="text-gray-600 mb-6">رانندههای ما خودروی شما را شخصاً میرانند و در محل مورد نظرتان تحویل میدهند</p>
<button id="orderBtn" class="bg-blue-600 text-white px-6 py-3 rounded-md hover:bg-blue-700 transition">
ثبت سفارش
</button>
</div>
</div>
</section>
<!-- Login Modal -->
<div id="loginModal" class="login-container">
<div class="login-content relative">
<span class="close absolute left-4 top-2 text-2xl cursor-pointer">×</span>
<h2 class="text-xl font-bold text-gray-800 mb-6 text-center">ورود به حساب کاربری</h2>
<form id="loginForm" class="space-y-4">
<div>
<label for="username" class="block text-sm font-medium text-gray-700 mb-1">نام کاربری</label>
<input type="text" id="username" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<div>
<label for="password" class="block text-sm font-medium text-gray-700 mb-1">رمز عبور</label>
<input type="password" id="password" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
</div>
<button type="submit" class="w-full bg-blue-600 text-white py-2 rounded-md hover:bg-blue-700 transition">
ورود
</button>
</form>
<div id="loginError" class="mt-4 text-red-500 text-sm hidden">نام کاربری یا رمز عبور اشتباه است</div>
</div>
</div>
<!-- Customer Dashboard -->
<div id="customerDashboard" class="hidden">
<div class="container mx-auto px-4 py-8 flex flex-col md:flex-row">
<!-- Sidebar -->
<div class="md:w-1/4 bg-white rounded-lg shadow-sm p-4 mb-6 md:mb-0 md:mr-6">
<div class="space-y-2">
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="trackOrder">
پیگیری سفارش
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="newOrder">
سفارش جدید
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="orderHistory">
تاریخچه سفارشات
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="support">
پشتیبانی
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="rules">
قوانین
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="accounting">
حسابداری
</button>
</div>
</div>
<!-- Main Content -->
<div class="md:w-3/4 bg-white rounded-lg shadow-sm p-6">
<!-- Track Order (Default Tab) -->
<div id="trackOrder" class="tab-content active">
<h2 class="text-xl font-bold text-gray-800 mb-6">پیگیری سفارش</h2>
<div class="road-progress">
<div class="road-line"></div>
<div class="progress-line" id="progressLine"></div>
<div class="car-icon" id="carIcon"><i class="fas fa-car"></i></div>
<div class="progress-point" style="left: 0%;"></div>
<div class="progress-point" style="left: 25%;"></div>
<div class="progress-point" style="left: 75%;"></div>
<div class="progress-point" style="left: 100%;"></div>
<div class="progress-label" style="left: 0%;">سفارش درحال بررسی است</div>
<div class="progress-label" style="left: 25%;">راننده به زودی خودرو را تحویل میگیرد</div>
<div class="progress-label" style="left: 75%;">راننده حرکت کرد</div>
<div class="progress-label" style="left: 100%;">خودرو به مقصد رسید</div>
</div>
<div class="mt-8">
<h3 class="text-lg font-medium text-gray-800 mb-4">جزئیات سفارش</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<p class="text-gray-600">شماره سفارش: <span class="text-gray-800">CNP-2023-001</span></p>
<p class="text-gray-600">تاریخ ثبت سفارش: <span class="text-gray-800">1402/05/15</span></p>
<p class="text-gray-600">مبدا: <span class="text-gray-800">تهران</span></p>
</div>
<div>
<p class="text-gray-600">وضعیت سفارش: <span class="text-blue-600">در حال انجام</span></p>
<p class="text-gray-600">تاریخ تحویل: <span class="text-gray-800">1402/05/17</span></p>
<p class="text-gray-600">مقصد: <span class="text-gray-800">مشهد</span></p>
</div>
</div>
</div>
</div>
<!-- New Order -->
<div id="newOrder" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">سفارش جدید</h2>
<form id="orderForm" class="space-y-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label for="origin" class="block text-sm font-medium text-gray-700 mb-1">مبدا</label>
<select id="origin" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
<option value="">-- انتخاب کنید --</option>
<option value="tehran">تهران</option>
<option value="mashhad">مشهد</option>
<option value="zahedan">زاهدان</option>
</select>
</div>
<div>
<label for="destination" class="block text-sm font-medium text-gray-700 mb-1">مقصد</label>
<select id="destination" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
<option value="">-- انتخاب کنید --</option>
<option value="tehran">تهران</option>
<option value="mashhad">مشهد</option>
<option value="zahedan">زاهدان</option>
</select>
</div>
</div>
<div id="distanceResult" class="hidden bg-blue-50 p-4 rounded-md">
<p class="text-blue-800">فاصله بین مبدا و مقصد: <span id="distance">0</span> کیلومتر</p>
<p class="text-blue-800">هزینه سفر: <span id="cost">0</span> تومان</p>
</div>
<div class="flex items-center mt-4">
<input type="checkbox" id="insurance" class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500">
<label for="insurance" class="mr-2 text-sm font-medium text-gray-700">میخواهم از خدمات بیمه استفاده کنم</label>
<button type="button" id="insuranceInfoBtn" class="text-blue-500 hover:text-blue-700">
<i class="fas fa-question-circle"></i>
</button>
</div>
<div id="finalCost" class="hidden bg-green-50 p-4 rounded-md mt-4">
<p class="text-green-800 font-medium">هزینه نهایی: <span id="totalCost">0</span> تومان</p>
</div>
<button type="button" id="calculateBtn" class="bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 transition">
محاسبه هزینه
</button>
<button type="button" id="paymentBtn" class="hidden bg-green-600 text-white px-6 py-2 rounded-md hover:bg-green-700 transition">
پرداخت وجه
</button>
</form>
</div>
<!-- Order History -->
<div id="orderHistory" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">تاریخچه سفارشات</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره سفارش</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مبدا</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مقصد</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">وضعیت</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-001</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشهد</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/15</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">تکمیل شده</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-002</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشهد</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/04/28</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">تکمیل شده</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Support -->
<div id="support" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">پشتیبانی</h2>
<div class="flex border-b mb-6">
<button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="supportTickets">پیگیری موارد</button>
<button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="newTicket">ثبت مورد جدید</button>
</div>
<div id="supportTickets" class="tab-content active">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">موضوع</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ ثبت</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">وضعیت</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">عملیات</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشکل در پرداخت</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/10</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پاسخ داده شده</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="view-ticket-btn" data-ticket-id="1">مشاهده</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سوال درباره بیمه</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/05</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پاسخ داده شده</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="view-ticket-btn" data-ticket-id="2">مشاهده</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="newTicket" class="tab-content">
<form id="ticketForm" class="space-y-4">
<div>
<label for="ticketSubject" class="block text-sm font-medium text-gray-700 mb-1">موضوع مشکل یا سوال</label>
<input type="text" id="ticketSubject" maxlength="40" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
<p class="text-xs text-gray-500 mt-1">حداکثر 40 حرف</p>
</div>
<div>
<label for="ticketDescription" class="block text-sm font-medium text-gray-700 mb-1">توضیح کامل سوال یا مشکل</label>
<textarea id="ticketDescription" rows="4" maxlength="500" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
<p class="text-xs text-gray-500 mt-1">حداکثر 500 حرف</p>
</div>
<div>
<label for="ticketFile" class="block text-sm font-medium text-gray-700 mb-1">بارگذاری مستندات (اختیاری)</label>
<input type="file" id="ticketFile" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
<p class="text-xs text-gray-500 mt-1">فایلهای مجاز: عکس، ورد، پی دی اف (حداکثر 6 مگابایت)</p>
</div>
<button type="submit" class="bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 transition">
ثبت مورد
</button>
</form>
</div>
</div>
<!-- Rules -->
<div id="rules" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">قوانین مشتری کارنپ</h2>
<div class="space-y-6">
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">مسئولیت اطلاعات خودرو</h3>
<p class="text-gray-600">اطلاعات مربوط به خودرو (شامل مدل، رنگ و پلاک) توسط مشتری ثبت میشود و اصالت این اطلاعات بهعهده مشتری است.</p>
</div>
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">بارگذاری مدارک پس از ثبت سفارش</h3>
<p class="text-gray-600">پس از پرداخت اولیه، مشتری موظف است مدارک زیر را برای تأیید نهایی سفارش بارگذاری کند: کارت خودرو وکارت ملی درکنار هم دریک عکس.</p>
</div>
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">تأیید مدارک توسط کارشناس پشتیبانی</h3>
<p class="text-gray-600">تمام مدارک بارگذاریشده توسط تیم پشتیبانی سفارشها بررسی و تأیید میشود. تا زمان تأیید، سفارش وارد مرحله اجرایی نمیشود.</p>
</div>
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">استفاده قانونی از خدمات</h3>
<p class="text-gray-600">مشتری موظف است خدمات کارنپ را تنها برای مقاصد قانونی استفاده کند. در صورت سوءاستفاده از خدمات کارنپ برای فعالیتهای غیرقانونی (مانند جاسازی اشیای غیرمجاز)، کارنپ مجاز است خودرو و اطلاعات مرتبط را در اختیار مراجع قانونی قرار دهد و هیچگونه مسئولیتی در این زمینه ندارد.</p>
</div>
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">لغو مأموریت</h3>
<p class="text-gray-600">در صورت لغو سفارش پس از تخصیص راننده، مبلغی به عنوان جریمه لغو از مبلغ پرداختی کسر خواهد شد (میزان آن بسته به شرایط مأموریت توسط کارنپ تعیین میشود).</p>
</div>
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">ثبت شکایات و بازخورد</h3>
<p class="text-gray-600">مشتری میتواند از طریق فرمهای شکایات، نارضایتی یا تخلف راننده را اعلام کند. فرم امتیازدهی نیز شامل توضیح بازخورد است و فقط یکبار و غیرقابلویرایش است.</p>
</div>
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">پرداخت خسارت در صورت بروز مشکل</h3>
<p class="text-gray-600">در صورتی که مشتری تقصیری در ایجاد خسارت نداشته باشد، کارنپ موظف است حداکثر ظرف ۱۹ روز پس از بررسی کارشناسی، خسارت را پرداخت نماید.</p>
</div>
<div>
<h3 class="text-lg font-medium text-gray-800 mb-2">عدم همکاری مستقیم با راننده</h3>
<p class="text-gray-600">مشتری حق ندارد خارج از بستر رسمی کارنپ با راننده همکاری مستقیم داشته باشد. در صورت تخلف، کارنپ هیچگونه مسئولیتی در قبال خدمات ارائهشده نخواهد داشت.</p>
</div>
</div>
</div>
<!-- Accounting -->
<div id="accounting" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">حسابداری</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شرح</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مبلغ (تومان)</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">وضعیت</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/15</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سفارش CNP-2023-001</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">600,000</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پرداخت شده</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/04/28</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سفارش CNP-2023-002</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">480,000</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">پرداخت شده</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Admin Dashboard -->
<div id="adminDashboard" class="hidden">
<div class="container mx-auto px-4 py-8 flex flex-col md:flex-row">
<!-- Sidebar -->
<div class="md:w-1/4 bg-white rounded-lg shadow-sm p-4 mb-6 md:mb-0 md:mr-6">
<div class="space-y-2">
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminCurrentOrders">
سفارشات جاری
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminPastOrders">
سفارشات گذشته
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminCustomers">
مشتریان
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminVIPCustomers">
مشتریان وی آی پی
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminDrivers">
راننده ها
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminSupport">
پشتیبانی
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminFinancial">
مالی
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminReports">
گزارشات
</button>
<button class="sidebar-item w-full text-right px-4 py-2 rounded-md hover:bg-gray-100" data-tab="adminStaff">
کارکنان
</button>
</div>
</div>
<!-- Main Content -->
<div class="md:w-3/4 bg-white rounded-lg shadow-sm p-6">
<!-- Current Orders (Default Tab) -->
<div id="adminCurrentOrders" class="tab-content active">
<h2 class="text-xl font-bold text-gray-800 mb-6">سفارشات جاری</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد رهگیری</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارش دهنده</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تحویل گیرنده</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">پلاک خودرو</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">راننده</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ تحویل</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">وضعیت</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-003</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی محمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">رضا احمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12-345-67</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محسن کریمی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/18</td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<select class="border border-gray-300 rounded-md px-2 py-1">
<option>کنسل شده</option>
<option selected>تحویل شده</option>
<option>مشکل دارد</option>
</select>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-004</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مریم حسینی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سارا محمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">98-765-43</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">حسن رضایی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/19</td>
<td class="px-6 py-4 whitespace-nowrap text-sm">
<select class="border border-gray-300 rounded-md px-2 py-1">
<option>کنسل شده</option>
<option>تحویل شده</option>
<option selected>مشکل دارد</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Past Orders -->
<div id="adminPastOrders" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">سفارشات گذشته</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد رهگیری</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارش دهنده</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تحویل گیرنده</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">پلاک خودرو</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">راننده</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاریخ تحویل</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">وضعیت</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-001</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محمد رضایی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی احمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12-345-67</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">رضا محمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/05/15</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">تحویل شده</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">CNP-2023-002</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">فاطمه حسینی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">زهرا محمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">98-765-43</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مریم کریمی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1402/04/28</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-red-500">کنسل شده</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Customers -->
<div id="adminCustomers" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">مشتریان</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام و نام خانوادگی</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد ملی</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">آدرس</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارشات</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مجموع واریزی ها</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">عملیات</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محمد رضایی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09123456789</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1234567890</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران، خیابان آزادی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1,800,000</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="edit-customer-btn">ویرایش</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">فاطمه حسینی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09198765432</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">0987654321</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشهد، بلوار وکیل آباد</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1,200,000</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="edit-customer-btn">ویرایش</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- VIP Customers -->
<div id="adminVIPCustomers" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">مشتریان وی آی پی</h2>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام و نام خانوادگی</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد ملی</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">آدرس</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">سفارشات</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مجموع واریزی ها</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">عملیات</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی محمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09111111111</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1111111111</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">تهران، خیابان ولیعصر</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">6,000,000</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="edit-customer-btn">ویرایش</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Drivers -->
<div id="adminDrivers" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">راننده ها</h2>
<p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
</div>
<!-- Admin Support -->
<div id="adminSupport" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">پشتیبانی</h2>
<div class="flex border-b mb-6">
<button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="adminAnsweredTickets">تیکت های پاسخ داده شده</button>
<button class="tab-button px-4 py-2 font-medium text-gray-600 hover:text-blue-600" data-tab="adminNewTickets">تیکت جدید</button>
</div>
<div id="adminAnsweredTickets" class="tab-content active">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">موضوع</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام مشتری</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">عملیات</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشکل در پرداخت</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">محمد رضایی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09123456789</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="view-ticket-btn">پاسخ</button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">سوال درباره بیمه</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">فاطمه حسینی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09198765432</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="view-ticket-btn">پاسخ</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="adminNewTickets" class="tab-content">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">موضوع</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام مشتری</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">شماره تلفن</th>
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">عملیات</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">مشکل در ثبت سفارش</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">علی محمدی</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">09111111111</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-500">
<button class="view-ticket-btn">پاسخ</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Financial -->
<div id="adminFinancial" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">مالی</h2>
<p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
</div>
<!-- Reports -->
<div id="adminReports" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">گزارشات</h2>
<p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
</div>
<!-- Staff -->
<div id="adminStaff" class="tab-content">
<h2 class="text-xl font-bold text-gray-800 mb-6">کارکنان</h2>
<p class="text-gray-600 mb-4">این بخش در حال توسعه است و به زودی فعال خواهد شد.</p>
</div>
</div>
</div>
</div>
<!-- Insurance Info Modal -->
<div id="insuranceModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h3 class="text-lg font-bold text-gray-800 mb-4">اطلاعات بیمه</h3>
<p class="text-gray-600">درصورت بروز حادثه و سانحه تا سقف ۷۰ میلیون تومان خسارت را کارنپ برعهده میگیرد</p>
</div>
</div>
<!-- Ticket Info Modal -->
<div id="ticketModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h3 class="text-lg font-bold text-gray-800 mb-4" id="ticketModalTitle">مشکل در پرداخت</h3>
<div class="mb-4">
<h4 class="font-medium text-gray-700 mb-1">توضیحات مشتری:</h4>
<p class="text-gray-600" id="ticketModalDescription">نمیتوانم پرداخت را انجام دهم و خطا میگیرم</p>
</div>
<div class="mb-4">
<h4 class="font-medium text-gray-700 mb-1">پاسخ پشتیبانی:</h4>
<p class="text-gray-600">لطفاً از کارت بانکی دیگری استفاده نمایید. در صورت عدم حل مشکل، با پشتیبانی تماس بگیرید.</p>
</div>
</div>
</div>
<!-- Ticket Submitted Modal -->
<div id="ticketSubmittedModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h3 class="text-lg font-bold text-gray-800 mb-4">تیکت با موفقیت ثبت شد</h3>
<p class="text-gray-600">مشکل یا سوال شما برای پشتیبانی ارسال گردید. پاسخ آن به زودی در همین بخش نمایش داده میشود یا با شما تماس گرفته میشود.</p>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-bold mb-4">کارنپ</h3>
<p class="text-gray-300">ما یک استارت اپ آنلاین مطمئن هستیم که قراره خودروی شما را با اطمینان به شما تحویل بدیم</p>
</div>
<div>
<h3 class="text-lg font-bold mb-4">دسترسی سریع</h3>
<ul class="space-y-2">
<li><a href="#" class="text-gray-300 hover:text-white">پنل مشتری</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">پنل رانندگان</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">پنل مشتریان سازمانی</a></li>
<li><a href="#" class="text-gray-300 hover:text-white">نمایشگاه داران</a></li>
<li><button id="staffLoginBtn" class="text-gray-300 hover:text-white">پنل کارکنان</button></li>
</ul>
</div>
<div>
<h3 class="text-lg font-bold mb-4">تماس با ما</h3>
<ul class="space-y-2">
<li class="flex items-center">
<i class="fas fa-phone ml-2"></i>
<span>09157208247</span>
</li>
<li class="flex items-center">
<i class="fas fa-envelope ml-2"></i>
<span>carnap.ir@gmail.com</span>
</li>
<li class="flex items-center">
<i class="fas fa-map-marker-alt ml-2"></i>
<span>خراسان جنوبی، نهبندان، بلوار امام علی، پلاک 3</span>
</li>
</ul>
</div>
<div>
<h3 class="text-lg font-bold mb-4">مجوزها</h3>
<div class="flex space-x-4">
<img src="https://trustseal.enamad.ir/logo.aspx?id=1234567890&p=1" alt="نماد اعتماد الکترونیکی" class="h-16">
<img src="https://www.zarinpal.com/trustLogo/1" alt="زرین پال" class="h-16">
</div>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
<p>© 2023 کارنپ. تمام حقوق محفوظ است.</p>
</div>
</div>
</footer>
<script>
// Login Modal
const loginBtn = document.getElementById('loginBtn');
const loginModal = document.getElementById('loginModal');
const closeLoginModal = document.querySelector('#loginModal .close');
const loginForm = document.getElementById('loginForm');
const loginError = document.getElementById('loginError');
const customerDashboard = document.getElementById('customerDashboard');
const adminDashboard = document.getElementById('adminDashboard');
const orderBtn = document.getElementById('orderBtn');
const staffLoginBtn = document.getElementById('staffLoginBtn');
loginBtn.addEventListener('click', () => {
loginModal.style.display = 'block';
});
closeLoginModal.addEventListener('click', () => {
loginModal.style.display = 'none';
});
window.addEventListener('click', (e) => {
if (e.target === loginModal) {
loginModal.style.display = 'none';
}
});
loginForm.addEventListener('submit', (e) => {
e.preventDefault();
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
if (username === 'saul' && password === 'saul') {
// Customer login
loginModal.style.display = 'none';
customerDashboard.classList.remove('hidden');
document.querySelector('.sidebar-item[data-tab="trackOrder"]').classList.add('active');
} else if (username === 'adm' && password === 'adm') {
// Admin login
loginModal.style.display = 'none';
adminDashboard.classList.remove('hidden');
document.querySelector('.sidebar-item[data-tab="adminCurrentOrders"]').classList.add('active');
} else {
loginError.classList.remove('hidden');
}
});
orderBtn.addEventListener('click', () => {
loginModal.style.display = 'block';
});
staffLoginBtn.addEventListener('click', () => {
loginModal.style.display = 'block';
});
// Customer Dashboard Tabs
const customerTabButtons = document.querySelectorAll('.sidebar-item');
customerTabButtons.forEach(button => {
button.addEventListener('click', () => {
// Remove active class from all buttons and tabs
document.querySelectorAll('.sidebar-item').forEach(btn => btn.classList.remove('active'));
document.querySelectorAll('.tab-content').forEach(tab => tab.classList.remove('active'));
// Add active class to clicked button
button.classList.add('active');
// Show corresponding tab
const tabId = button.getAttribute('data-tab');
document.getElementById(tabId).classList.add('active');
});
});
// Admin Dashboard Tabs
const adminTabButtons = document.querySelectorAll('#adminDashboard .sidebar-item');
adminTabButtons.forEach(button => {
button.addEventListener('click', () => {
// Remove active class from all buttons and tabs
document.querySelectorAll('#adminDashboard .sidebar-item').forEach(btn => btn.classList.remove('active'));
document.querySelectorAll('#adminDashboard .tab-content').forEach(tab => tab.classList.remove('active'));
// Add active class to clicked button
button.classList.add('active');
// Show corresponding tab
const tabId = button.getAttribute('data-tab');
document.getElementById(tabId).classList.add('active');
});
});
// Support Tabs
const supportTabButtons = document.querySelectorAll('.tab-button');
supportTabButtons.forEach(button => {
button.addEventListener('click', () => {
// Remove active class from all buttons and tabs
document.querySelectorAll('.tab-button').forEach(btn => btn.classList.remove('active'));
document.querySelectorAll('#support .tab-content').forEach(tab => tab.classList.remove('active'));
// Add active class to clicked button
button.classList.add('active');
// Show corresponding tab
const tabId = button.getAttribute('data-tab');
document.getElementById(tabId).classList.add('active');
});
});
// Admin Support Tabs
const adminSupportTabButtons = document.querySelectorAll('#adminSupport .tab-button');
adminSupportTabButtons.forEach(button => {
button.addEventListener('click', () => {
// Remove active class from all buttons and tabs
document.querySelectorAll('#adminSupport .tab-button').forEach(btn => btn.classList.remove('active'));
document.querySelectorAll('#adminSupport .tab-content').forEach(tab => tab.classList.remove('active'));
// Add active class to clicked button
button.classList.add('active');
// Show corresponding tab
const tabId = button.getAttribute('data-tab');
document.getElementById(tabId).classList.add('active');
});
});
// Insurance Info Modal
const insuranceInfoBtn = document.getElementById('insuranceInfoBtn');
const insuranceModal = document.getElementById('insuranceModal');
const closeInsuranceModal = insuranceModal.querySelector('.close');
insuranceInfoBtn.addEventListener('click', () => {
insuranceModal.style.display = 'block';
});
closeInsuranceModal.addEventListener('click', () => {
insuranceModal.style.display = 'none';
});
window.addEventListener('click', (e) => {
if (e.target === insuranceModal) {
insuranceModal.style.display = 'none';
}
});
// Ticket Info Modal
const ticketModal = document.getElementById('ticketModal');
const closeTicketModal = ticketModal.querySelector('.close');
const viewTicketButtons = document.querySelectorAll('.view-ticket-btn');
viewTicketButtons.forEach(button => {
button.addEventListener('click', () => {
const ticketId = button.getAttribute('data-ticket-id');
// Here you would normally fetch ticket data based on ticketId
// For demo purposes, we'll just show the modal with sample data
document.getElementById('ticketModalTitle').textContent = 'مشکل در پرداخت';
document.getElementById('ticketModalDescription').textContent = 'نمیتوانم پرداخت را انجام دهم و خطا میگیرم';
ticketModal.style.display = 'block';
});
});
closeTicketModal.addEventListener('click', () => {
ticketModal.style.display = 'none';
});
window.addEventListener('click', (e) => {
if (e.target === ticketModal) {
ticketModal.style.display = 'none';
}
});
// Ticket Submitted Modal
const ticketSubmittedModal = document.getElementById('ticketSubmittedModal');
const closeTicketSubmittedModal = ticketSubmittedModal.querySelector('.close');
const ticketForm = document.getElementById('ticketForm');
ticketForm.addEventListener('submit', (e) => {
e.preventDefault();
ticketSubmittedModal.style.display = 'block';
// Here you would normally submit the form data to the server
// For demo purposes, we'll just show the success modal
});
closeTicketSubmittedModal.addEventListener('click', () => {
ticketSubmittedModal.style.display = 'none';
});
window.addEventListener('click', (e) => {
if (e.target === ticketSubmittedModal) {
ticketSubmittedModal.style.display = 'none';
}
});
// Order Form Calculation
const originSelect = document.getElementById('origin');
const destinationSelect = document.getElementById('destination');
const distanceResult = document.getElementById('distanceResult');
const distanceSpan = document.getElementById('distance');
const costSpan = document.getElementById('cost');
const insuranceCheckbox = document.getElementById('insurance');
const finalCost = document.getElementById('finalCost');
const totalCostSpan = document.getElementById('totalCost');
const calculateBtn = document.getElementById('calculateBtn');
const paymentBtn = document.getElementById('paymentBtn');
// Distance between cities (in km)
const distances = {
'tehran-mashhad': 900,
'tehran-zahedan': 1400,
'mashhad-tehran': 900,
'mashhad-zahedan': 600,
'zahedan-tehran': 1400,
'zahedan-mashhad': 600
};
calculateBtn.addEventListener('click', () => {
const origin = originSelect.value;
const destination = destinationSelect.value;
if (!origin || !destination) {
alert('لطفاً مبدا و مقصد را انتخاب کنید');
return;
}
if (origin === destination) {
alert('مبدا و مقصد نمیتوانند یکسان باشند');
return;
}
const distanceKey = `${origin}-${destination}`;
const distance = distances[distanceKey];
const cost = distance * 6000;
distanceSpan.textContent = distance;
costSpan.textContent = cost.toLocaleString();
distanceResult.classList.remove('hidden');
// Calculate total cost with insurance
let totalCost = cost;
if (insuranceCheckbox.checked) {
totalCost += 250000;
}
totalCostSpan.textContent = totalCost.toLocaleString();
finalCost.classList.remove('hidden');
paymentBtn.classList.remove('hidden');
});
// Road Progress Animation
const progressLine = document.getElementById('progressLine');
const carIcon = document.getElementById('carIcon');
// Animate progress line and car icon
setTimeout(() => {
progressLine.style.width = '75%';
carIcon.style.left = '75%';
// Update progress points
document.querySelectorAll('.progress-point').forEach((point, index) => {
if (index <= 2) {
point.classList.add('active');
}
});
document.querySelectorAll('.progress-label').forEach((label, index) => {
if (index <= 2) {
label.classList.add('active');
}
});
}, 1000);
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Saul7cold/aa" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>کارنپ - تحویل خودرو با راننده</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');
body {
font-family: 'Vazirmatn', sans-serif;
}
.road-progress {
position: relative;
height: 100px;
margin: 40px 0;
}
.road-line {
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 8px;
background-color: #e5e7eb;
transform: translateY(-50%);
}
.progress-line {
position: absolute;
top: 50%;
left: 0;
width: 0%;
height: 8px;
background-color: #3b82f6;
transform: translateY(-50%);
transition: width 1s ease;
}
.car-icon {
position: absolute;
top: 50%;
left: 0;
transform: translate(-50%, -50%);
font-size: 24px;
color: #3b82f6;
transition: left 1s ease;
}
.progress-point {
position: absolute;
top: 50%;
width: 16px;
height: 16px;
border-radius: 50%;
background-color: #e5e7eb;
transform: translate(-50%, -50%);
}
.progress-point.active {
background-color: #3b82f6;
}
.progress-label {
position: absolute;
top: 70px;
transform: translateX(-50%);
text-align: center;
font-size: 14px;
color: #6b7280;
}
.progress-label.active {
color: #3b82f6;
font-weight: 500;
}
.modal {
display: none;
position: fixed;
z-index: 50;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.modal-content {
background-color: white;
margin: 10% auto;
padding: 20px;
border-radius: 8px;
width: 80%;
max-width: 500px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}