Spaces:
Sleeping
Sleeping
| <html lang="uz" data-theme="dark"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Admin Panel — M-TEXTILE</title> | |
| <link rel="stylesheet" href="css/global.css"> | |
| <link rel="stylesheet" href="css/components.css"> | |
| <link rel="stylesheet" href="css/admin.css"> | |
| <!-- AOS CSS --> | |
| <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <!-- Global Preloader --> | |
| <div id="global-preloader" class="preloader"> | |
| <div class="preloader-spinner"></div> | |
| </div> | |
| <!-- Login Modal --> | |
| <div class="admin-login-overlay" id="adminLogin"> | |
| <div class="admin-login-box"> | |
| <h2>Admin Kirish</h2> | |
| <input type="password" id="adminPass" class="form-input" placeholder="Parolni kiriting..." | |
| style="margin-bottom:1rem;"> | |
| <button class="btn btn-primary" style="width:100%" onclick="checkAdmin()">Kirish</button> | |
| </div> | |
| </div> | |
| <!-- Dashboard --> | |
| <div class="admin-layout" id="adminDashboard" style="display:none;"> | |
| <aside class="admin-sidebar"> | |
| <div class="admin-logo">M-TEXTILE ADMIN</div> | |
| <nav class="admin-nav"> | |
| <a href="#stats" class="active" onclick="showSection('stats', this)">📊 Statistika</a> | |
| <a href="#products" onclick="showSection('products', this)">📦 Mahsulotlar</a> | |
| <a href="#orders" onclick="showSection('orders', this)">🛒 Buyurtmalar</a> | |
| <a href="#settings" onclick="showSection('settings', this)">⚙️ Sozlamalar</a> | |
| <a href="index.html" style="margin-top:auto">🔙 Saytga qaytish</a> | |
| </nav> | |
| </aside> | |
| <main class="admin-content"> | |
| <header class="admin-header"> | |
| <h2>Boshqaruv Paneli</h2> | |
| <div style="display:flex;gap:1rem;align-items:center;"> | |
| <input type="text" id="adminProductSearch" placeholder="Mahsulot qidirish..." | |
| oninput="filterAdminProducts(this.value)" class="form-input" style="width:250px;"> | |
| <button class="btn btn-primary" onclick="openProductModal()">+ Yangi Mahsulot</button> | |
| </div> | |
| </header> | |
| <div class="admin-stats"> | |
| <div class="stat-card"> | |
| <div class="stat-title">Jami Mahsulotlar</div> | |
| <div class="stat-value" id="statProducts">0</div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-title">Buyurtmalar</div> | |
| <div class="stat-value" id="statOrders">0</div> | |
| </div> | |
| <div class="stat-card"> | |
| <div class="stat-title">Umumiy Daromad</div> | |
| <div class="stat-value" id="statRevenue">0 so'm</div> | |
| </div> | |
| </div> | |
| <!-- Products Section --> | |
| <section id="section-products" class="admin-section active"> | |
| <div class="card"> | |
| <table class="admin-table"> | |
| <thead> | |
| <tr> | |
| <th>Rasm</th> | |
| <th>Nomi</th> | |
| <th>Kategoriya</th> | |
| <th>Narxi</th> | |
| <th>Holat</th> | |
| <th>Amallar</th> | |
| </tr> | |
| </thead> | |
| <tbody id="adminProductsTable"> | |
| <!-- JS load --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </section> | |
| <!-- Orders Section --> | |
| <section id="section-orders" class="admin-section" style="display:none;"> | |
| <div class="card"> | |
| <table class="admin-table" id="adminOrdersTable"> | |
| <thead> | |
| <tr> | |
| <th>№</th> | |
| <th>Mijoz</th> | |
| <th>Telefon</th> | |
| <th>Summa</th> | |
| <th>Sana</th> | |
| <th>Holat</th> | |
| </tr> | |
| </thead> | |
| <tbody id="ordersTableBody"> | |
| <!-- JS load --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </section> | |
| <!-- Settings Section --> | |
| <section id="section-settings" class="admin-section" style="display:none;"> | |
| <div class="card" style="max-width: 600px;"> | |
| <h3>Do'kon Sozlamalari</h3> | |
| <p style="color:var(--clr-text-secondary);margin-bottom:1.5rem;">Saytning global ma'lumotlari, | |
| do'kon manzili va xaritasini sozlang.</p> | |
| <div class="form-group"> | |
| <label class="form-label">Do'kon Manzili (Matn ko'rinishida)</label> | |
| <input type="text" id="settingAddress" class="form-input" | |
| placeholder="Masalan: Toshkent shahar, Chilonzor tumani, 9-kvartal..."> | |
| </div> | |
| <div class="form-group" style="margin-top:1rem;"> | |
| <label class="form-label">Google Xarita (Iframe URL yoki Embed Code)</label> | |
| <textarea id="settingMap" class="form-input" rows="4" | |
| placeholder="<iframe src='https://www.google.com/maps/embed?...' ...></iframe>"></textarea> | |
| <p style="font-size:0.8rem;color:var(--clr-text-muted);margin-top:0.5rem;">Eslatma: Google | |
| qidiruvdan 'Ulashish' -> 'Xaritani joylashtirish' orqali iframe kodini oling.</p> | |
| </div> | |
| <button class="btn btn-primary mt-2xl" onclick="saveAdminSettings()" style="width:100%">Sozlamalarni | |
| Saqlash</button> | |
| <div id="settingsMapPreview" | |
| style="margin-top:2rem;border-radius:var(--radius-md);overflow:hidden;height:250px;background:var(--clr-surface);display:none;"> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| </div> | |
| <!-- Product Modal --> | |
| <div class="modal-overlay" id="productModal" style="display:none;z-index:99999;"> | |
| <div class="modal" style="max-width:600px;width:90%"> | |
| <div class="modal-header"> | |
| <h3 id="modalTitle">Mahsulot qo'shish</h3> | |
| <button class="modal-close" onclick="closeProductModal()">✕</button> | |
| </div> | |
| <div class="modal-body"> | |
| <form id="productForm"> | |
| <input type="hidden" id="pId"> | |
| <div class="form-group"> | |
| <label>Nomi</label> | |
| <input type="text" id="pName" class="form-input" required> | |
| </div> | |
| <div class="grid grid-2"> | |
| <div class="form-group"> | |
| <label>Kategoriya</label> | |
| <select id="pCat" class="form-input" required> | |
| <option value="kiyimlar">Kiyimlar</option> | |
| <option value="formalar">Formalar</option> | |
| <option value="shimlar">Shimlar</option> | |
| <option value="galistuklar">Galistuklar</option> | |
| <option value="aksessuarlar">Aksessuarlar</option> | |
| </select> | |
| </div> | |
| <div class="form-group"> | |
| <label>Ost-kategoriya (Subcategory)</label> | |
| <input type="text" id="pSubCat" class="form-input" placeholder="Masalan: Ko'ylaklar" | |
| required> | |
| </div> | |
| </div> | |
| <div class="grid grid-2"> | |
| <div class="form-group"> | |
| <label>Narxi (so'm)</label> | |
| <input type="number" id="pPrice" class="form-input" required> | |
| </div> | |
| <div class="form-group"> | |
| <label>Eski Narxi (Yoki bo'sh qoldiring)</label> | |
| <input type="number" id="pOldPrice" class="form-input"> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label>Rasm URL</label> | |
| <input type="url" id="pImg" class="form-input" required> | |
| </div> | |
| <div class="form-group"> | |
| <label>Tavsif</label> | |
| <textarea id="pDesc" class="form-input" rows="3" required></textarea> | |
| </div> | |
| <div class="grid grid-2"> | |
| <label class="filter-option"><input type="checkbox" id="pNew"> Yangi kelgan</label> | |
| <label class="filter-option"><input type="checkbox" id="pFeat"> Tavsiya etilgan</label> | |
| </div> | |
| <button type="submit" class="btn btn-primary mt-md" style="width:100%">Saqlash</button> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| <script src="js/products.js"></script> | |
| <script src="js/admin.js"></script> | |
| <!-- AOS JS --> | |
| <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script> | |
| </body> | |
| </html> |