Source of /checkpoint/index.php


<?
if ($_SERVER['SCRIPT_FILENAME'] == __FILE__)
    
$allowviewsource = 1;

require_once(
"../common.php");
require_once(
"checkpoint.php");

function
extra_head_info()
{
?>
<script type="text/javascript" src="checkpoint.js"></script>
<link rel="stylesheet" type="text/css" href="checkpoint.css">
<?
}

page_header("Checkpoint Generator");

// Pull values from request parameters so the page still works without JS
$params = GetParams();
$message = $params[0];
$size = $params[1];
$angle = $params[2];
?>
<form action="<?=htmlspecialchars($_SERVER['PHP_SELF'])?>" method="POST" id="checkpointform">
<div class="formfield"><label for="message">Message: </label><textarea name="message" id="message" rows="5" cols="50"><?=htmlspecialchars($message)?></textarea></div>
<div class="formfield"><label for="size">Size: </label><select name="size" id="size">
    <option value="8"<?if($size == 8)print(" selected")?>>Tiny</option>
    <option value="12"<?if($size == 12)print(" selected")?>>Small</option>
    <option value="16"<?if($size == 16)print(" selected")?>>Medium</option>
    <option value="20"<?if($size == 20)print(" selected")?>>Large</option>
</select></div>
<div class="formfield" id="submitfield"><label for="submit">&nbsp;</label><input id="submit" type="submit" value="Create"></div>
<?
$imgurl
= "gen.php?message=" . rawurlencode($message) . "&size=" . rawurlencode($size);
if (
$angle !== FALSE)
    
$imgurl .= "&angle=" . rawurlencode($angle);
?>
<img id="checkpointimage" src="<?=htmlspecialchars($imgurl)?>" alt="<?=htmlspecialchars($message)?>">
<?
$dostore
= isset($_REQUEST['store']);
if (
$dostore)
{
    require_once(
"db.php");
    
$id = SaveDetails();
    
$url = htmlspecialchars("http://mrphlip.com/CPt/" . urlencode($id));
}
else
    
$url = "#";
?>
<div class="formfield"><label for="store">&nbsp;</label><input id="store" type="submit" value="Share" name="store"></div>
<div id="storedata" style="display: <?=$dostore?"block":"none"?>">
<div class="formfield"><label>Image URL:</label><a id="imageurl" href="<?=$url?>"><?=$url?></a></div>
<div class="formfield"><label>BBCode:</label><span id="bbcode">[img]<?=$url?>[/img]</span></div>
</div>
</form>
<?
page_footer
();
?>

Valid HTML 4.01 StrictValid CSSLevel Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0
Retrieved from https://​www.mrphlip.com/​checkpoint/​index.php?​viewsource=yep.
Copyright © 2006–13 Phillip Bradbury. Some rights reserved.
This page is best viewed in a web browser at a screen resolution. Attempts to do otherwise may fail miserably.
Contact me