APmanageur Wi-Fi V1.0

This commit is contained in:
yoannmultigaming committed 2026-11-18 16:24:20 +01:00
1 parent 329ea4f5c3
commit ef6c9a53fd
11 files changed
+2475 -2510

No files matched your search

+15
View File
@@ -8026,6 +8026,21 @@ class Handler(BaseHTTPRequestHandler):
except OSError: pass
self.send_error(404, 'Fichier de langue introuvable')
return
if self.path.startswith('/themes/'):
clean_name = os.path.basename(urllib.parse.urlparse(self.path).path)
theme_path = os.path.join(os.path.dirname(__file__), 'themes', clean_name)
if os.path.isfile(theme_path) and clean_name.endswith('.css'):
try:
body = open(theme_path, 'rb').read()
self.send_response(200)
self.send_header('Content-Type', 'text/css; charset=utf-8')
self.send_header('Content-Length', str(len(body)))
self.end_headers()
self.wfile.write(body)
return
except OSError: pass
self.send_error(404, 'Fichier de thème introuvable')
return
if self.path == '/favicon.png' or self.path.startswith('/images/'):
clean_name = 'favicon.png' if self.path == '/favicon.png' else os.path.basename(urllib.parse.urlparse(self.path).path)
img_path = os.path.join(os.path.dirname(__file__), 'images', clean_name)