index_new.php 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. <?php
  2. $pageTitle = 'Site Settings - Admin Panel';
  3. $headerTitle = 'Site Settings';
  4. $activeTab = 'content';
  5. $tabs = [
  6. 'content' => [
  7. 'label' => 'Content',
  8. 'icon' => 'M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z'
  9. ],
  10. 'options' => [
  11. 'label' => 'Options',
  12. 'icon' => 'M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z'
  13. ],
  14. 'styles' => [
  15. 'label' => 'Styles',
  16. 'icon' => 'M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z'
  17. ],
  18. 'seo' => [
  19. 'label' => 'SEO & Meta',
  20. 'icon' => 'M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z'
  21. ]
  22. ];
  23. ob_start();
  24. ?>
  25. <?php include __DIR__ . '/partials/tabs.php'; ?>
  26. <!-- Form -->
  27. <form method="POST" action="" enctype="multipart/form-data">
  28. <input type="hidden" name="form_submitted" value="1">
  29. <!-- Content Tab -->
  30. <div x-show="activeTab === 'content'" class="bg-white rounded-lg shadow-sm">
  31. <div class="p-6 space-y-8">
  32. <!-- Basic Content Section -->
  33. <div>
  34. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  35. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  36. <path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
  37. </svg>
  38. Basic Content
  39. </h3>
  40. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  41. <div>
  42. <label class="block text-sm font-medium text-gray-700 mb-2">Page Title (H1)</label>
  43. <input type="text" name='content[title]' value="<?= htmlspecialchars($content['title'] ?? '') ?>"
  44. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  45. </div>
  46. <div>
  47. <label class="block text-sm font-medium text-gray-700 mb-2">FAQ Title</label>
  48. <input type="text" name='content[faq-title]' value="<?= htmlspecialchars($content['faq-title'] ?? '') ?>"
  49. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  50. </div>
  51. <div class="lg:col-span-2">
  52. <label class="block text-sm font-medium text-gray-700 mb-2">Top Text</label>
  53. <textarea name='content[top_text]' rows="6"
  54. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['top_text'] ?? '') ?></textarea>
  55. </div>
  56. <div class="lg:col-span-2">
  57. <label class="block text-sm font-medium text-gray-700 mb-2">Bottom Text</label>
  58. <textarea name='content[bottom_text]' rows="6"
  59. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['bottom_text'] ?? '') ?></textarea>
  60. </div>
  61. </div>
  62. </div>
  63. <!-- Author & Meta Section -->
  64. <div>
  65. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  66. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  67. <path fill-rule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clip-rule="evenodd"/>
  68. </svg>
  69. Author & Meta
  70. </h3>
  71. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  72. <div>
  73. <label class="block text-sm font-medium text-gray-700 mb-2">Author Name</label>
  74. <input type="text" name='content[author-name]' value="<?= htmlspecialchars($content['author-name'] ?? '') ?>"
  75. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  76. </div>
  77. <div>
  78. <label class="block text-sm font-medium text-gray-700 mb-2">Modified Date</label>
  79. <input type="date" name='content[modified-date]' value="<?= htmlspecialchars($content['modified-date'] ?? '') ?>"
  80. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  81. </div>
  82. </div>
  83. </div>
  84. <!-- Button Settings -->
  85. <div>
  86. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  87. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  88. <path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
  89. </svg>
  90. Button Settings
  91. </h3>
  92. <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
  93. <div>
  94. <label class="block text-sm font-medium text-gray-700 mb-2">Login Button Text</label>
  95. <input type="text" name='content[login]' value="<?= htmlspecialchars($content['login'] ?? '') ?>"
  96. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  97. </div>
  98. <div>
  99. <label class="block text-sm font-medium text-gray-700 mb-2">Password Button Text</label>
  100. <input type="text" name='content[password]' value="<?= htmlspecialchars($content['password'] ?? '') ?>"
  101. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  102. </div>
  103. <div>
  104. <label class="block text-sm font-medium text-gray-700 mb-2">Content Button Text</label>
  105. <input type="text" name='content[content_btn]' value="<?= htmlspecialchars($content['content_btn'] ?? '') ?>"
  106. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  107. </div>
  108. </div>
  109. </div>
  110. <!-- Casino Settings -->
  111. <div>
  112. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  113. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  114. <path fill-rule="evenodd" d="M3 5a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2h-2.22l.123.489.804.804A1 1 0 0113 18H7a1 1 0 01-.707-1.707l.804-.804L7.22 15H5a2 2 0 01-2-2V5zm5.771 7H5V5h10v7H8.771z" clip-rule="evenodd"/>
  115. </svg>
  116. Casino/Review Settings
  117. </h3>
  118. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  119. <div>
  120. <label class="block text-sm font-medium text-gray-700 mb-2">Casino Listing Title (H2)</label>
  121. <input type="text" name='content[listing]' value="<?= htmlspecialchars($content['listing'] ?? '') ?>"
  122. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  123. </div>
  124. <div>
  125. <label class="block text-sm font-medium text-gray-700 mb-2">Review Count</label>
  126. <input type="text" name='content[review-count]' value="<?= htmlspecialchars($content['review-count'] ?? '') ?>"
  127. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  128. </div>
  129. <div class="flex items-center">
  130. <input type="hidden" name="content[hide-btns]" value="0">
  131. <input type="checkbox" name="content[hide-btns]" value="1" <?= !empty($content['hide-btns']) ? 'checked' : '' ?>
  132. class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
  133. <label class="ml-2 block text-sm text-gray-900">Hide login/password buttons</label>
  134. </div>
  135. </div>
  136. </div>
  137. <!-- Images & Media Section -->
  138. <div>
  139. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  140. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  141. <path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/>
  142. </svg>
  143. Images & Media
  144. </h3>
  145. <!-- Header Logo -->
  146. <div class="bg-gray-50 p-4 rounded-lg mb-6">
  147. <h4 class="text-md font-medium text-gray-800 mb-4">Header Logo</h4>
  148. <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
  149. <div>
  150. <?php
  151. $headerLogo = [];
  152. if (isset($content['header-logo']) && !empty($content['header-logo'])) {
  153. $headerLogo = json_decode($content['header-logo'], true) ?: [];
  154. }
  155. ?>
  156. <?php if (!empty($headerLogo['src'])): ?>
  157. <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $headerLogo['src'] ?>" alt="Header Logo">
  158. <?php endif; ?>
  159. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Header Logo</label>
  160. <input type="file" name="content[header-logo]" accept="image/*"
  161. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  162. </div>
  163. <div>
  164. <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
  165. <input type="text" name='content[header-logo][title]' value="<?= htmlspecialchars($headerLogo['title'] ?? '') ?>"
  166. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  167. </div>
  168. <div>
  169. <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
  170. <input type="text" name='content[header-logo][alt]' value="<?= htmlspecialchars($headerLogo['alt'] ?? '') ?>"
  171. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  172. </div>
  173. </div>
  174. </div>
  175. <!-- Banner Logo -->
  176. <div class="bg-gray-50 p-4 rounded-lg mb-6">
  177. <h4 class="text-md font-medium text-gray-800 mb-4">Banner Image</h4>
  178. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  179. <div>
  180. <?php
  181. $bannerLogo = [];
  182. if (isset($content['banner-logo']) && !empty($content['banner-logo'])) {
  183. $bannerLogo = json_decode($content['banner-logo'], true) ?: [];
  184. }
  185. ?>
  186. <?php if (!empty($bannerLogo['src'])): ?>
  187. <img class="w-full h-24 object-cover rounded-lg border mb-2" src="../<?= $bannerLogo['src'] ?>" alt="Banner Image">
  188. <?php endif; ?>
  189. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Banner Image</label>
  190. <input type="file" name="content[banner-logo]" accept="image/*"
  191. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  192. </div>
  193. <div class="space-y-4">
  194. <div>
  195. <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
  196. <input type="text" name='content[banner-logo][title]' value="<?= htmlspecialchars($bannerLogo['title'] ?? '') ?>"
  197. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  198. </div>
  199. <div>
  200. <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
  201. <input type="text" name='content[banner-logo][alt]' value="<?= htmlspecialchars($bannerLogo['alt'] ?? '') ?>"
  202. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  203. </div>
  204. <div class="grid grid-cols-2 gap-4">
  205. <div>
  206. <label class="block text-sm font-medium text-gray-700 mb-2">Width</label>
  207. <input type="text" name='content[banner-logo][width]' value="<?= htmlspecialchars($bannerLogo['width'] ?? '') ?>"
  208. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  209. </div>
  210. <div>
  211. <label class="block text-sm font-medium text-gray-700 mb-2">Height</label>
  212. <input type="text" name='content[banner-logo][height]' value="<?= htmlspecialchars($bannerLogo['height'] ?? '') ?>"
  213. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. <!-- Footer Logo -->
  220. <div class="bg-gray-50 p-4 rounded-lg mb-6">
  221. <h4 class="text-md font-medium text-gray-800 mb-4">Footer Logo</h4>
  222. <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
  223. <div>
  224. <?php
  225. $footerLogo = [];
  226. if (isset($content['footer-logo']) && !empty($content['footer-logo'])) {
  227. $footerLogo = json_decode($content['footer-logo'], true) ?: [];
  228. }
  229. ?>
  230. <?php if (!empty($footerLogo['src'])): ?>
  231. <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $footerLogo['src'] ?>" alt="Footer Logo">
  232. <?php endif; ?>
  233. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Footer Logo</label>
  234. <input type="file" name="content[footer-logo]" accept="image/*"
  235. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  236. </div>
  237. <div>
  238. <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
  239. <input type="text" name='content[footer-logo][title]' value="<?= htmlspecialchars($footerLogo['title'] ?? '') ?>"
  240. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  241. </div>
  242. <div>
  243. <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
  244. <input type="text" name='content[footer-logo][alt]' value="<?= htmlspecialchars($footerLogo['alt'] ?? '') ?>"
  245. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  246. </div>
  247. </div>
  248. </div>
  249. <!-- Other Images -->
  250. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  251. <div class="bg-gray-50 p-4 rounded-lg">
  252. <h4 class="text-md font-medium text-gray-800 mb-4">Favicon</h4>
  253. <?php if (!empty($content['favicon'])): ?>
  254. <img class="w-16 h-16 object-cover rounded border mb-2" src="../<?= $content['favicon'] ?>" alt="Favicon">
  255. <?php endif; ?>
  256. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Favicon</label>
  257. <input type="file" name="content[favicon]" accept="image/*"
  258. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  259. </div>
  260. <div class="bg-gray-50 p-4 rounded-lg">
  261. <h4 class="text-md font-medium text-gray-800 mb-4">Author Image</h4>
  262. <?php if (!empty($content['author-img'])): ?>
  263. <img class="w-16 h-16 object-cover rounded-full border mb-2" src="../<?= $content['author-img'] ?>" alt="Author Image">
  264. <?php endif; ?>
  265. <label class="block text-sm font-medium text-gray-700 mb-2">Upload Author Image</label>
  266. <input type="file" name="content[author-img]" accept="image/*"
  267. class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
  268. </div>
  269. </div>
  270. </div>
  271. <!-- Footer Settings -->
  272. <div>
  273. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  274. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  275. <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
  276. </svg>
  277. Footer Content
  278. </h3>
  279. <div class="grid grid-cols-1 gap-6">
  280. <div>
  281. <label class="block text-sm font-medium text-gray-700 mb-2">Footer Text</label>
  282. <textarea name='content[footer__text]' rows="4"
  283. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['footer__text'] ?? '') ?></textarea>
  284. </div>
  285. <div>
  286. <label class="block text-sm font-medium text-gray-700 mb-2">Copyright</label>
  287. <textarea name='content[copyright]' rows="2"
  288. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['copyright'] ?? '') ?></textarea>
  289. </div>
  290. </div>
  291. </div>
  292. <!-- Save Button -->
  293. <div class="pt-6 border-t border-gray-200">
  294. <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
  295. <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
  296. <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
  297. </svg>
  298. Save Changes
  299. </button>
  300. </div>
  301. </div>
  302. </div>
  303. <!-- Options Tab -->
  304. <div x-show="activeTab === 'options'" class="bg-white rounded-lg shadow-sm">
  305. <div class="p-6 space-y-8">
  306. <!-- Hash Fields Section -->
  307. <div>
  308. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  309. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  310. <path fill-rule="evenodd" d="M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z" clip-rule="evenodd"/>
  311. </svg>
  312. Hash Fields
  313. </h3>
  314. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  315. <div>
  316. <label class="block text-sm font-medium text-gray-700 mb-2">Hash</label>
  317. <input type="text" name='content[hash]' value="<?= htmlspecialchars($content['hash'] ?? '') ?>"
  318. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  319. </div>
  320. <div>
  321. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 1</label>
  322. <input type="text" name='content[hash-1]' value="<?= htmlspecialchars($content['hash-1'] ?? '') ?>"
  323. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  324. </div>
  325. <div>
  326. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 2</label>
  327. <input type="text" name='content[hash-2]' value="<?= htmlspecialchars($content['hash-2'] ?? '') ?>"
  328. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  329. </div>
  330. <div>
  331. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 3</label>
  332. <input type="text" name='content[hash-3]' value="<?= htmlspecialchars($content['hash-3'] ?? '') ?>"
  333. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  334. </div>
  335. <div>
  336. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 4</label>
  337. <input type="text" name='content[hash-4]' value="<?= htmlspecialchars($content['hash-4'] ?? '') ?>"
  338. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  339. </div>
  340. <div>
  341. <label class="block text-sm font-medium text-gray-700 mb-2">Hash 5</label>
  342. <input type="text" name='content[hash-5]' value="<?= htmlspecialchars($content['hash-5'] ?? '') ?>"
  343. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  344. </div>
  345. </div>
  346. </div>
  347. <!-- Save Button -->
  348. <div class="pt-6 border-t border-gray-200">
  349. <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
  350. <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
  351. <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
  352. </svg>
  353. Save Changes
  354. </button>
  355. </div>
  356. </div>
  357. </div>
  358. <!-- Styles Tab -->
  359. <div x-show="activeTab === 'styles'" class="bg-white rounded-lg shadow-sm">
  360. <div class="p-6 space-y-8">
  361. <!-- Background Colors Section -->
  362. <div>
  363. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  364. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  365. <path fill-rule="evenodd" d="M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z" clip-rule="evenodd"/>
  366. </svg>
  367. Background Colors
  368. </h3>
  369. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  370. <div>
  371. <label class="block text-sm font-medium text-gray-700 mb-2">Main Color (Body Background)</label>
  372. <div class="flex gap-3">
  373. <input type="color" value="<?= $styles['main_color'] ?? '#1a1a2e' ?>"
  374. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  375. onchange="this.nextElementSibling.value = this.value">
  376. <input type="text" name='styles[main_color]' value="<?= htmlspecialchars($styles['main_color'] ?? '') ?>"
  377. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  378. </div>
  379. </div>
  380. <div>
  381. <label class="block text-sm font-medium text-gray-700 mb-2">Secondary Color</label>
  382. <div class="flex gap-3">
  383. <input type="color" value="<?= $styles['secondary_color'] ?? '#16213e' ?>"
  384. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  385. onchange="this.nextElementSibling.value = this.value">
  386. <input type="text" name='styles[secondary_color]' value="<?= htmlspecialchars($styles['secondary_color'] ?? '') ?>"
  387. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  388. </div>
  389. </div>
  390. <div>
  391. <label class="block text-sm font-medium text-gray-700 mb-2">Header Color</label>
  392. <div class="flex gap-3">
  393. <input type="color" value="<?= $styles['header_color'] ?? '#2c2c54' ?>"
  394. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  395. onchange="this.nextElementSibling.value = this.value">
  396. <input type="text" name='styles[header_color]' value="<?= htmlspecialchars($styles['header_color'] ?? '') ?>"
  397. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  398. </div>
  399. </div>
  400. <div>
  401. <label class="block text-sm font-medium text-gray-700 mb-2">Footer Color</label>
  402. <div class="flex gap-3">
  403. <input type="color" value="<?= $styles['footer_color'] ?? '#0f0f23' ?>"
  404. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  405. onchange="this.nextElementSibling.value = this.value">
  406. <input type="text" name='styles[footer_color]' value="<?= htmlspecialchars($styles['footer_color'] ?? '') ?>"
  407. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. <!-- Accent & Text Colors Section -->
  413. <div>
  414. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  415. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  416. <path d="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"/>
  417. </svg>
  418. Accent & Text Colors
  419. </h3>
  420. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  421. <div>
  422. <label class="block text-sm font-medium text-gray-700 mb-2">Accent Color</label>
  423. <div class="flex gap-3">
  424. <input type="color" value="<?= $styles['accent_color'] ?? '#e94560' ?>"
  425. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  426. onchange="this.nextElementSibling.value = this.value">
  427. <input type="text" name='styles[accent_color]' value="<?= htmlspecialchars($styles['accent_color'] ?? '') ?>"
  428. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  429. </div>
  430. </div>
  431. <div>
  432. <label class="block text-sm font-medium text-gray-700 mb-2">Font Color</label>
  433. <div class="flex gap-3">
  434. <input type="color" value="<?= $styles['font_color'] ?? '#ffffff' ?>"
  435. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  436. onchange="this.nextElementSibling.value = this.value">
  437. <input type="text" name='styles[font_color]' value="<?= htmlspecialchars($styles['font_color'] ?? '') ?>"
  438. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  439. </div>
  440. </div>
  441. <div>
  442. <label class="block text-sm font-medium text-gray-700 mb-2">Link Color</label>
  443. <div class="flex gap-3">
  444. <input type="color" value="<?= $styles['link_color'] ?? '#3498db' ?>"
  445. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  446. onchange="this.nextElementSibling.value = this.value">
  447. <input type="text" name='styles[link_color]' value="<?= htmlspecialchars($styles['link_color'] ?? '') ?>"
  448. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  449. </div>
  450. </div>
  451. <div>
  452. <label class="block text-sm font-medium text-gray-700 mb-2">Main Font Family</label>
  453. <input type="text" name='styles[main-fz]' value="<?= htmlspecialchars($styles['main-fz'] ?? '') ?>"
  454. placeholder="Arial, sans-serif"
  455. class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  456. </div>
  457. </div>
  458. </div>
  459. <!-- Button Colors Section -->
  460. <div>
  461. <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
  462. <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
  463. <path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
  464. </svg>
  465. Button Colors
  466. </h3>
  467. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  468. <div>
  469. <label class="block text-sm font-medium text-gray-700 mb-2">Login Button Color</label>
  470. <div class="flex gap-3">
  471. <input type="color" value="<?= $styles['login_btn_color'] ?? '#27ae60' ?>"
  472. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  473. onchange="this.nextElementSibling.value = this.value">
  474. <input type="text" name='styles[login_btn_color]' value="<?= htmlspecialchars($styles['login_btn_color'] ?? '') ?>"
  475. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  476. </div>
  477. </div>
  478. <div>
  479. <label class="block text-sm font-medium text-gray-700 mb-2">Password Button Color</label>
  480. <div class="flex gap-3">
  481. <input type="color" value="<?= $styles['pass_btn_color'] ?? '#e74c3c' ?>"
  482. class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
  483. onchange="this.nextElementSibling.value = this.value">
  484. <input type="text" name='styles[pass_btn_color]' value="<?= htmlspecialchars($styles['pass_btn_color'] ?? '') ?>"
  485. class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
  486. </div>
  487. </div>
  488. </div>
  489. </div>
  490. <!-- Save Button -->
  491. <div class="pt-6 border-t border-gray-200">
  492. <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
  493. <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
  494. <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
  495. </svg>
  496. Save Changes
  497. </button>
  498. </div>
  499. </div>
  500. </div>
  501. <!-- SEO Tab -->
  502. <div x-show="activeTab === 'seo'" class="bg-white rounded-lg shadow-sm">
  503. <div class="p-6">
  504. <div class="text-center py-12">
  505. <svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  506. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
  507. </svg>
  508. <h3 class="mt-2 text-sm font-medium text-gray-900">SEO Coming Soon</h3>
  509. <p class="mt-1 text-sm text-gray-500">SEO settings will be implemented in the next update.</p>
  510. </div>
  511. </div>
  512. </div>
  513. </form>
  514. <?php
  515. $content = ob_get_clean();
  516. include __DIR__ . '/partials/layout.php';
  517. ?>