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;
|
2012-08-22 01:37:36 +00:00
|
|
|
$action_str = isset($_POST['action']) ? $_POST['action'] : null;
|
2012-05-23 15:18:49 +00:00
|
|
|
|
|
|
|
if( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
2012-08-22 01:37:36 +00:00
|
|
|
$class = "Action" . $action_str;
|
2012-05-23 15:18:49 +00:00
|
|
|
$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">
|
2012-08-22 01:37:36 +00:00
|
|
|
<option value="DoubleEntityDecode" <?php echo selected($action_str, 'DoubleEntityDecode'); ?>>html_entity_decode(html_entity_decode())</option>
|
|
|
|
<option value="QuotedPrintableDecode" <?php echo selected($action_str, 'QuotedPrintableDecode'); ?>>quoted_printable_decode()</option>
|
2012-09-17 18:18:32 +00:00
|
|
|
<option value="QuotedPrintableEncode" <?php echo selected($action_str, 'QuotedPrintableEncode'); ?>>quoted_printable_encode()</option>
|
2012-08-22 01:37:36 +00:00
|
|
|
<option value="Urlencode" <?php echo selected($action_str, 'Urlencode'); ?>>urlencode()</option>
|
|
|
|
<option value="Urldecode"<?php echo selected($action_str, 'Urldecode'); ?>>urldecode()</option>
|
|
|
|
<option value="Unserialize"<?php echo selected($action_str, 'Unserialize'); ?>>unserialize()</option>
|
|
|
|
<option value="Base64Decode"<?php echo selected($action_str, 'Base64Decode'); ?>>base64_decode()</option>
|
|
|
|
<option value="Base64Encode"<?php echo selected($action_str, 'Base64Encode'); ?>>base64_encode()</option>
|
2012-05-23 15:18:49 +00:00
|
|
|
<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>
|
|
|
|
|
2012-07-10 14:25:18 +00:00
|
|
|
<h2>Randomness</h2>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>MD5: <input class="randomness-box" value="<?php echo md5(uniqid(mt_rand(), true)); ?>"></li>
|
|
|
|
<li>SHA1: <input class="randomness-box" value="<?php echo sha1(uniqid(mt_rand(), true)); ?>"></li>
|
|
|
|
</ul>
|
|
|
|
|
2012-05-04 14:07:53 +00:00
|
|
|
</body>
|
|
|
|
</html>
|