tail/index.php

<?php include '../config.php' ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Tail Sample</title>

	<?php include DOCROOT.'header.php' ?>
	<script src="script.js"></script>
	<style>
		input
		{
			display: inline-block;
			margin-right: 1.5em;
			text-align: center;
		}
		textarea
		{
			width: 100%;
		}
		pre
		{
			border-top:1px solid #ccc;
			padding-top: 5px;
			width: 100%;
			overflow: auto;
		}
	</style>

</head>
<body>
	<h1>Tail Sample</h1>

	<form action="tail.php" method="post" id="form">
		<p>
			<label>Lines: <input name="lines" type="number" size="6" min="1" value="3" required></label>
			<label>Buffer: <input name="buffer" type="number" size="6" min="1" value="5" required></label>
			<label>Show newlines: <input name="nl" type="checkbox"></label>
		</p>
		<p><textarea name="text" rows="10" cols="80" required autofocus></textarea></p>
		<p><input type="submit" value="Tail it" /></p>
	</form>

	<output id="output"></output>

	<?php $article = 1654; include DOCROOT.'footer.php'; ?>

</body>
</html>