<?php
/* Smarty version 4.5.6, created on 2025-12-22 21:02:49
  from '/var/www/html/tivi/panel/templates/admin/settings.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.6',
  'unifunc' => 'content_6949a3e9526f80_71407512',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '60277f3d1da68a6caa9e881dafc36bb844d70fc1' => 
    array (
      0 => '/var/www/html/tivi/panel/templates/admin/settings.tpl',
      1 => 1766433515,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_6949a3e9526f80_71407512 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>


<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_17296433206949a3e951ebd3_49697450', "content");
?>

<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl, "layout.tpl");
}
/* {block "content"} */
class Block_17296433206949a3e951ebd3_49697450 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content' => 
  array (
    0 => 'Block_17296433206949a3e951ebd3_49697450',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<div class="container-fluid">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <h4 class="mb-1">Konfiguracja systemu</h4>
            <p class="text-muted mb-0">Ustawienia globalne aplikacji</p>
        </div>
    </div>

    <?php if ((($tmp = $_smarty_tpl->tpl_vars['error']->value ?? null)===null||$tmp==='' ? false ?? null : $tmp)) {?>
    <div class="alert alert-danger"><i class="bi bi-exclamation-circle me-2"></i><?php echo $_smarty_tpl->tpl_vars['error']->value;?>
</div>
    <?php }?>

    <form method="post">
        <input type="hidden" name="csrf_token" value="<?php echo $_smarty_tpl->tpl_vars['csrfToken']->value;?>
">
        
        <div class="row">
            <div class="col-lg-6">
                <!-- Ogólne -->
                <div class="card mb-4">
                    <div class="card-header">
                        <h5 class="card-title mb-0"><i class="bi bi-gear me-2"></i>Ustawienia ogólne</h5>
                    </div>
                    <div class="card-body">
                        <div class="mb-3">
                            <label class="form-label">Nazwa strony</label>
                            <input type="text" name="site_name" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['site_name'];?>
">
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Opis strony</label>
                            <input type="text" name="site_description" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['site_description'];?>
">
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Elementów na stronę</label>
                            <input type="number" name="items_per_page" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['items_per_page'];?>
" min="5" max="100">
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Czas sesji (sekundy)</label>
                            <input type="number" name="session_lifetime" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['session_lifetime'];?>
" min="300" max="86400">
                            <small class="text-muted">300 = 5 min, 3600 = 1h, 86400 = 24h</small>
                        </div>
                    </div>
                </div>

                <!-- Domyślne limity -->
                <div class="card mb-4">
                    <div class="card-header">
                        <h5 class="card-title mb-0"><i class="bi bi-sliders me-2"></i>Domyślne limity</h5>
                    </div>
                    <div class="card-body">
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Limit urządzeń</label>
                                <input type="number" name="default_device_limit" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['default_device_limit'];?>
" min="1" max="100">
                                <small class="text-muted">Dla nowych użytkowników</small>
                            </div>
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Limit playlist</label>
                                <input type="number" name="default_playlist_limit" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['default_playlist_limit'];?>
" min="1" max="1000">
                                <small class="text-muted">Dla nowych użytkowników</small>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Generator haseł -->
                <div class="card mb-4">
                    <div class="card-header">
                        <h5 class="card-title mb-0"><i class="bi bi-key me-2"></i>Generator haseł</h5>
                    </div>
                    <div class="card-body">
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Długość hasła</label>
                                <input type="number" name="password_length" class="form-control" value="<?php echo (($tmp = $_smarty_tpl->tpl_vars['settings']->value['password_length'] ?? null)===null||$tmp==='' ? 12 ?? null : $tmp);?>
" min="6" max="32">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-check mb-2">
                                    <input type="checkbox" name="password_lowercase" id="password_lowercase" class="form-check-input" value="1" <?php if ((($tmp = $_smarty_tpl->tpl_vars['settings']->value['password_lowercase'] ?? null)===null||$tmp==='' ? 1 ?? null : $tmp)) {?>checked<?php }?>>
                                    <label class="form-check-label" for="password_lowercase">Małe litery (a-z)</label>
                                </div>
                                <div class="form-check mb-2">
                                    <input type="checkbox" name="password_uppercase" id="password_uppercase" class="form-check-input" value="1" <?php if ((($tmp = $_smarty_tpl->tpl_vars['settings']->value['password_uppercase'] ?? null)===null||$tmp==='' ? 1 ?? null : $tmp)) {?>checked<?php }?>>
                                    <label class="form-check-label" for="password_uppercase">Wielkie litery (A-Z)</label>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-check mb-2">
                                    <input type="checkbox" name="password_numbers" id="password_numbers" class="form-check-input" value="1" <?php if ((($tmp = $_smarty_tpl->tpl_vars['settings']->value['password_numbers'] ?? null)===null||$tmp==='' ? 1 ?? null : $tmp)) {?>checked<?php }?>>
                                    <label class="form-check-label" for="password_numbers">Cyfry (0-9)</label>
                                </div>
                                <div class="form-check mb-2">
                                    <input type="checkbox" name="password_symbols" id="password_symbols" class="form-check-input" value="1" <?php if ((($tmp = $_smarty_tpl->tpl_vars['settings']->value['password_symbols'] ?? null)===null||$tmp==='' ? 0 ?? null : $tmp)) {?>checked<?php }?>>
                                    <label class="form-check-label" for="password_symbols">Znaki specjalne (!@#$%)</label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- API -->
                <div class="card mb-4">
                    <div class="card-header">
                        <h5 class="card-title mb-0"><i class="bi bi-hdd-network me-2"></i>API</h5>
                    </div>
                    <div class="card-body">
                        <div class="form-check form-switch mb-3">
                            <input type="checkbox" name="api_enabled" id="api_enabled" class="form-check-input" value="1" <?php if ($_smarty_tpl->tpl_vars['settings']->value['api_enabled']) {?>checked<?php }?>>
                            <label class="form-check-label" for="api_enabled">API włączone</label>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Limit zapytań/minutę</label>
                            <input type="number" name="api_rate_limit" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['api_rate_limit'];?>
" min="10" max="1000">
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-lg-6">
                <!-- Tryb konserwacji -->
                <div class="card mb-4 <?php if ($_smarty_tpl->tpl_vars['settings']->value['maintenance_mode']) {?>border-warning<?php }?>">
                    <div class="card-header <?php if ($_smarty_tpl->tpl_vars['settings']->value['maintenance_mode']) {?>bg-warning bg-opacity-10<?php }?>">
                        <h5 class="card-title mb-0">
                            <i class="bi bi-cone-striped me-2"></i>Tryb konserwacji
                            <?php if ($_smarty_tpl->tpl_vars['settings']->value['maintenance_mode']) {?>
                            <span class="badge bg-warning ms-2">AKTYWNY</span>
                            <?php }?>
                        </h5>
                    </div>
                    <div class="card-body">
                        <div class="form-check form-switch mb-3">
                            <input type="checkbox" name="maintenance_mode" id="maintenance_mode" class="form-check-input" value="1" <?php if ($_smarty_tpl->tpl_vars['settings']->value['maintenance_mode']) {?>checked<?php }?>>
                            <label class="form-check-label" for="maintenance_mode">Włącz tryb konserwacji</label>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Komunikat</label>
                            <textarea name="maintenance_message" class="form-control" rows="3"><?php echo $_smarty_tpl->tpl_vars['settings']->value['maintenance_message'];?>
</textarea>
                        </div>
                        <div class="alert alert-info mb-0">
                            <i class="bi bi-info-circle me-2"></i>
                            W trybie konserwacji tylko administratorzy mogą się logować.
                        </div>
                    </div>
                </div>

                <!-- Bezpieczeństwo -->
                <div class="card mb-4">
                    <div class="card-header">
                        <h5 class="card-title mb-0"><i class="bi bi-shield-check me-2"></i>Bezpieczeństwo</h5>
                    </div>
                    <div class="card-body">
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Limit prób logowania</label>
                                <input type="number" name="login_attempts_limit" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['login_attempts_limit'];?>
" min="3" max="20">
                            </div>
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Blokada (sekundy)</label>
                                <input type="number" name="login_lockout_time" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['login_lockout_time'];?>
" min="60" max="3600">
                            </div>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">Przechowuj logi (dni)</label>
                            <input type="number" name="log_retention_days" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['log_retention_days'];?>
" min="1" max="365">
                        </div>
                    </div>
                </div>

                <!-- SMTP -->
                <div class="card mb-4">
                    <div class="card-header">
                        <h5 class="card-title mb-0"><i class="bi bi-envelope me-2"></i>Email (SMTP)</h5>
                    </div>
                    <div class="card-body">
                        <div class="form-check form-switch mb-3">
                            <input type="checkbox" name="smtp_enabled" id="smtp_enabled" class="form-check-input" value="1" <?php if ($_smarty_tpl->tpl_vars['settings']->value['smtp_enabled']) {?>checked<?php }?>>
                            <label class="form-check-label" for="smtp_enabled">Włącz wysyłanie emaili</label>
                        </div>
                        <div class="row">
                            <div class="col-md-8 mb-3">
                                <label class="form-label">Serwer SMTP</label>
                                <input type="text" name="smtp_host" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['smtp_host'];?>
" placeholder="smtp.gmail.com">
                            </div>
                            <div class="col-md-4 mb-3">
                                <label class="form-label">Port</label>
                                <input type="number" name="smtp_port" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['smtp_port'];?>
">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Użytkownik</label>
                                <input type="text" name="smtp_user" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['smtp_user'];?>
">
                            </div>
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Hasło</label>
                                <input type="password" name="smtp_pass" class="form-control" placeholder="••••••••">
                                <small class="text-muted">Zostaw puste aby nie zmieniać</small>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Email nadawcy</label>
                                <input type="email" name="smtp_from" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['smtp_from'];?>
">
                            </div>
                            <div class="col-md-6 mb-3">
                                <label class="form-label">Nazwa nadawcy</label>
                                <input type="text" name="smtp_from_name" class="form-control" value="<?php echo $_smarty_tpl->tpl_vars['settings']->value['smtp_from_name'];?>
">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="card">
            <div class="card-body">
                <button type="submit" class="btn btn-primary btn-lg">
                    <i class="bi bi-check-lg me-2"></i>Zapisz ustawienia
                </button>
            </div>
        </div>
    </form>
</div>
<?php
}
}
/* {/block "content"} */
}
