php-tools/index.php

49 lines
1.2 KiB
PHP
Raw Normal View History

2012-05-04 14:07:53 +00:00
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
2012-05-30 20:03:20 +00:00
<title>PHP Tools</title>
<link rel="stylesheet" type="text/css" href="style.css">
2012-05-04 14:07:53 +00:00
</head>
<body>
<?php
require_once 'dBug.php';
2012-05-23 15:18:49 +00:00
require_once 'classes.php';
require_once 'functions.php';
2012-05-04 14:07:53 +00:00
?>
<h1>PHP Tools</h1>
2012-05-23 15:18:49 +00:00
<?php
$action = null;
if( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
$class = "Action" . $_POST['action'];
$action = new $class( $_POST['data'] );
}
?>
2012-05-04 14:07:53 +00:00
<div class="cols">
<div class="col">
<form method="post">
2012-05-23 15:18:49 +00:00
<textarea class="data" name="data"><?php if( $action ) echo $action->esc_raw(); ?></textarea><br>
<select name="action">
<option value="QuotedPrintableDecode" <?php echo selected($_POST['action'], 'QuotedPrintableDecode'); ?>>quoted_printable_decode()</option>
<option value="Urlencode" <?php echo selected($_POST['action'], 'Urlencode'); ?>>urlencode()</option>
<option value="Urldecode"<?php echo selected($_POST['action'], 'Urldecode'); ?>>urldecode()</option>
<option value="Unserialize"<?php echo selected($_POST['action'], 'Unserialize'); ?>>unserialize()</option>
<select>
<input type="submit">
2012-05-04 14:07:53 +00:00
</form>
</div>
2012-05-23 15:18:49 +00:00
<?php if( $action ) echo $action; ?>
2012-05-04 14:07:53 +00:00
</div>
</body>
</html>