v-wordpress-plugin-updater/v-update-api/app/Views/home.php
Nikolai X. Shadeauxs 8fc3bc20ad
Some checks failed
CI & Security / CI Scan (push) Failing after 9s
CI & Security / CodeQL (JavaScript) (push) Failing after 6s
CI & Security / Semgrep (PHP) (push) Failing after 8s
modified: .github/copilot-instructions.md
modified:   CHANGELOG.md
	modified:   README.md
2026-04-06 14:39:21 -04:00

43 lines
1.4 KiB
PHP

<?php
// phpcs:ignoreFile PSR1.Files.SideEffects.FoundWithSymbols
/**
* Project: UpdateAPI
* Author: Vontainment <services@vontainment.com>
* License: https://opensource.org/licenses/MIT MIT License
* Link: https://vontainment.com
* Version: 4.5.0
*
* File: home.php
* Description: WordPress Update API
*/
require_once __DIR__ . '/layouts/header.php';
/** @var string $hostsTableHtml */
$hostsTableHtml = $hostsTableHtml ?? '';
?>
<div class="content-box">
<h2>Allowed Hosts</h2>
<p>Keys are masked by default. Use <strong>Reveal</strong> for a temporary 30-second display, then <strong>Copy</strong>.</p>
<div id="hosts_table">
<?php echo $hostsTableHtml; ?>
</div>
<div class="home section">
<h2>Add Entry</h2>
<form class="entry-form" method="post" action="/home">
<input type="hidden" name="csrf_token"
value="<?php echo htmlspecialchars(\App\Helpers\SessionHelper::get('csrf_token') ?? '', ENT_QUOTES, 'UTF-8'); ?>">
<div class="form-group">
<label for="domain">Domain:</label>
<input type="text" name="domain" id="domain" required>
</div>
<div class="form-group">
<input type="submit" name="add_entry" value="Add Entry">
</div>
</form>
</div>
</div>
<?php require_once __DIR__ . '/layouts/footer.php'; ?>