50 lines
1.7 KiB
Go Template
Executable file
50 lines
1.7 KiB
Go Template
Executable file
<?php $status = isset($_GET['stat']) ? $_GET['stat'] : ''; ?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Zap ZapMachine <?php echo $ver; ?></title>
|
|
<link rel="stylesheet" media="screen" href="css/style.css">
|
|
<script src="js/main.js"></script>
|
|
</head>
|
|
<body>
|
|
<h1>Zap Machine <?php echo $ver; ?></h1>
|
|
<!--input modus: words-->
|
|
<div id="inpWords" class="inpSection">
|
|
<h2>Input words</h2>
|
|
<?php if (empty($_SESSION['csrf_token'])) {
|
|
$_SESSION['csrf_token'] = bin2hex(random_bytes(16));
|
|
} ?>
|
|
<form id="form1" action="index.php?mode=display" method="post">
|
|
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
|
<?php for ($i = 1; $i <= MAX_WORDS; $i++) : ?>
|
|
<?php $nr = sprintf("%02d", $i); ?>
|
|
<div class="inp">
|
|
word <?php echo $nr; ?><input type="text" name="word<?php echo $nr; ?>" id="word<?php echo $nr; ?>" size="30" maxlength="30" value="">
|
|
</div>
|
|
<?php endfor; ?>
|
|
<div class="inp">
|
|
# Zaps
|
|
<select name="collages">
|
|
<?php for ($j = 1; $j <= MAX_ZAPS; $j++) : ?>
|
|
<option <?php echo $j == 4 ? 'selected' : ''; ?>><?php echo $j; ?></option>
|
|
<?php endfor; ?>
|
|
</select>
|
|
</div>
|
|
<div class="inp">
|
|
width <input type="text" name="width" id="width" size="5" maxlength="4" value="<?= ZAP_DEFAULT_WIDTH ?>"> px
|
|
</div>
|
|
<div class="inp">
|
|
height <input type="text" name="height" id="height" size="5" maxlength="4" value="<?= ZAP_DEFAULT_HEIGHT ?>"> px
|
|
</div>
|
|
<div class="inp">
|
|
<input type="button" class="btn" onclick="form1Submit()" value="Go & Generate Some Zaps">
|
|
<input type="hidden" name="modus" value="words">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<!--End input modus words-->
|
|
<div id="status"><?php echo $status; ?></div>
|
|
<div id="loading"></div>
|
|
</body>
|
|
</html>
|