Files
xciptv/panel.php
2026-02-22 17:32:39 +03:00

464 lines
16 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
session_start();
if (!isset($_SESSION['admin_logged_in']) || $_SESSION['admin_logged_in'] !== true) {
header('Location: login.html');
exit;
}
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>XC IPTV Panel - Portal Yönetimi</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1400px;
margin: 0 auto;
background: white;
color: #333;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
color: white;
padding: 30px;
text-align: center;
}
.header h1 {
font-size: 28px;
margin-bottom: 10px;
}
.header p {
opacity: 0.8;
font-size: 14px;
}
.content {
padding: 30px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 30px;
}
.section {
background: #f8f9fa;
border-radius: 8px;
padding: 25px;
border: 1px solid #e0e0e0;
}
.section h2 {
font-size: 18px;
margin-bottom: 20px;
color: #2c3e50;
border-bottom: 2px solid #667eea;
padding-bottom: 10px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #555;
font-size: 14px;
}
.form-group input,
.form-group select {
width: 100%;
padding: 12px 15px;
border: 2px solid #e0e0e0;
border-radius: 6px;
font-size: 14px;
transition: all 0.3s;
color: #333;
background-color: #fff;
color-scheme: light;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.portal-box {
background: white;
border-radius: 8px;
padding: 20px;
margin-bottom: 15px;
border: 2px solid #e0e0e0;
position: relative;
}
.portal-box.active {
border-color: #27ae60;
background: #f0fff4;
}
.portal-box h3 {
font-size: 16px;
margin-bottom: 15px;
color: #2c3e50;
}
.portal-status {
position: absolute;
top: 15px;
right: 15px;
padding: 5px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
}
.portal-status.active {
background: #27ae60;
color: white;
}
.portal-status.inactive {
background: #e74c3c;
color: white;
}
.btn {
padding: 12px 25px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}
.btn-success {
background: #27ae60;
color: white;
}
.btn-danger {
background: #e74c3c;
color: white;
}
.checkbox-group {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 10px;
}
.checkbox-item {
display: flex;
align-items: center;
gap: 8px;
}
.checkbox-item input[type="checkbox"] {
width: 18px;
height: 18px;
}
.api-url {
background: #2c3e50;
color: white;
padding: 15px;
border-radius: 6px;
font-family: 'Courier New', monospace;
font-size: 13px;
margin-top: 20px;
word-break: break-all;
}
.copy-btn {
background: #3498db;
color: white;
border: none;
padding: 8px 15px;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
font-size: 12px;
}
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px;
margin-top: 20px;
}
.stat-box {
background: white;
padding: 20px;
border-radius: 8px;
text-align: center;
border: 2px solid #e0e0e0;
}
.stat-value {
font-size: 32px;
font-weight: bold;
color: #667eea;
}
.stat-label {
font-size: 12px;
color: #666;
margin-top: 5px;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>📺 XC IPTV Panel Yönetimi</h1>
<p>appsnscripts Style - Multi Portal Manager</p>
</div>
<div class="content">
<!-- APP SETTINGS -->
<div class="section">
<h2>📱 App Settings</h2>
<div class="form-group">
<label>App Name</label>
<input type="text" value="MAGTV Android Player" id="appName">
</div>
<div class="form-group">
<label>Customer ID Number</label>
<input type="text" value="v2000" id="customerId">
</div>
<div class="form-group">
<label>App Expiry</label>
<select id="expiry">
<option value="LIFETIME" selected>LIFETIME</option>
<option value="2025-12-31">2025-12-31</option>
<option value="2026-12-31">2026-12-31</option>
</select>
</div>
<div class="form-group">
<label>Developer Name</label>
<input type="text" value="Ayris.Dev" id="developerName">
</div>
<div class="form-group">
<label>Developer Contact</label>
<input type="url" value="https://ayris.dev" id="developerContact">
</div>
<div class="form-group">
<label>Backup URL (API Endpoint)</label>
<input type="url" value="https://hc28.otttrun.com/api3/" id="backupUrl">
</div>
<button class="btn btn-primary" onclick="saveAppSettings()">💾 Kaydet</button>
</div>
<!-- PORTAL SETTINGS -->
<div class="section" style="grid-column: span 2;">
<h2>🌐 Portal Settings</h2>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;">
<!-- Portal 1 -->
<div class="portal-box active">
<span class="portal-status active">ACTIVE</span>
<h3>Portal 1</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" value="GİRİŞ 1">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" value="http://hdd.inoon.uk:8080">
</div>
</div>
<!-- Portal 2 -->
<div class="portal-box active">
<span class="portal-status active">ACTIVE</span>
<h3>Portal 2</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" value="GİRİŞ 2">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" value="http://hdd.inoon.uk:8080">
</div>
</div>
<!-- Portal 3 -->
<div class="portal-box active">
<span class="portal-status active">ACTIVE</span>
<h3>Portal 3</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" value="GİRİŞ 3">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" value="http://imagson.site:8080">
</div>
</div>
<!-- Portal 4 -->
<div class="portal-box">
<span class="portal-status inactive">INACTIVE</span>
<h3>Portal 4</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" placeholder="Portal 4 Name">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" placeholder="http://example.com:8080">
</div>
</div>
<!-- Portal 5 -->
<div class="portal-box">
<span class="portal-status inactive">INACTIVE</span>
<h3>Portal 5</h3>
<div class="form-group">
<label>Portal Name</label>
<input type="text" placeholder="Portal 5 Name">
</div>
<div class="form-group">
<label>Portal Address</label>
<input type="text" placeholder="http://example.com:8080">
</div>
</div>
</div>
<button class="btn btn-success" onclick="savePortals()" style="margin-top: 20px;">💾 Portalları Kaydet</button>
</div>
<!-- UI CONTROL -->
<div class="section">
<h2>🎨 UI Control</h2>
<div class="form-group">
<label>Show Live TV Icon?</label>
<div class="checkbox-group">
<div class="checkbox-item"><input type="checkbox" checked> Portal 1</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 2</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 3</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 4</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 5</div>
</div>
</div>
<div class="form-group">
<label>Show VOD Icon?</label>
<div class="checkbox-group">
<div class="checkbox-item"><input type="checkbox" checked> Portal 1</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 2</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 3</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 4</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 5</div>
</div>
</div>
<div class="form-group">
<label>Show Series Icon?</label>
<div class="checkbox-group">
<div class="checkbox-item"><input type="checkbox" checked> Portal 1</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 2</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 3</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 4</div>
<div class="checkbox-item"><input type="checkbox" checked> Portal 5</div>
</div>
</div>
</div>
<!-- API INFO -->
<div class="section">
<h2>🔗 API Information</h2>
<div class="stats">
<div class="stat-box">
<div class="stat-value">3</div>
<div class="stat-label">Active Portals</div>
</div>
<div class="stat-box">
<div class="stat-value">∞</div>
<div class="stat-label">License Status</div>
</div>
</div>
<div class="api-url" id="apiUrl">
<?php
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
$host = $_SERVER['HTTP_HOST'];
echo $protocol . "://" . $host . "/api";
?>
</div>
<button class="copy-btn" onclick="copyApiUrl()">📋 Kopyala</button>
<button class="btn btn-primary" onclick="testApi()" style="width: 100%; margin-top: 15px;">
🧪 API'yi Test Et
</button>
</div>
</div>
</div>
<script>
function saveAppSettings() {
alert('✅ App ayarları kaydedildi!');
}
function savePortals() {
alert('✅ Portal ayarları kaydedildi!');
}
function copyApiUrl() {
const url = document.getElementById('apiUrl').textContent;
navigator.clipboard.writeText(url);
alert('📋 API URL kopyalandı!');
}
function testApi() {
const apiUrl = document.getElementById('apiUrl').textContent;
window.open(apiUrl, '_blank');
}
</script>
</body>
</html>