39 lines
1.5 KiB
PHP
39 lines
1.5 KiB
PHP
<?php
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . '/inc/php/auth.php');
|
|
requireLogin();
|
|
require_once($_SERVER['DOCUMENT_ROOT'] . '/inc/php/resources.php'); // load languages
|
|
include($_SERVER['DOCUMENT_ROOT'] . '/inc/php/header.php');
|
|
?>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<h1>Generate an Email</h1>
|
|
<!-- adjust action depending on vhost/subfolder -->
|
|
<form action="/process.php" method="POST">
|
|
<label for="email_input">Your rough text:</label><br>
|
|
<textarea name="email_input" rows="6" cols="50" required></textarea><br><br>
|
|
|
|
<label for="tone">Select tone:</label>
|
|
<select name="tone" required>
|
|
<option value="formal">Formal</option>
|
|
<option value="casual">Casual</option>
|
|
<option value="persuasive">Persuasive</option>
|
|
<option value="angry">Angry</option>
|
|
</select><br><br>
|
|
|
|
<label for="language">Language:</label>
|
|
<select name="language" required>
|
|
<?php foreach (getLanguages() as $lang): ?>
|
|
<option value="<?= htmlspecialchars($lang) ?>"><?= htmlspecialchars($lang) ?></option>
|
|
<?php endforeach; ?>
|
|
</select><br><br>
|
|
|
|
<button type="submit">Generate Email</button>
|
|
</form>
|
|
|
|
<br>
|
|
<a href="/home.php"><button type="button">🏠 Back to Home</button></a>
|
|
</div>
|
|
|
|
<?php include($_SERVER['DOCUMENT_ROOT'] . '/inc/php/footer.php'); ?>
|