2018-04-06 23:05:59 -05:00
|
|
|
<?php
|
2018-04-07 18:19:14 -05:00
|
|
|
$page_title = "The Conjuring";
|
2018-04-06 23:05:59 -05:00
|
|
|
|
2018-10-07 00:11:41 -05:00
|
|
|
include("../resources/config.php");
|
2018-10-07 03:36:19 -05:00
|
|
|
include("../resources/library/main.php");
|
2018-04-06 23:05:59 -05:00
|
|
|
|
2018-10-07 00:11:41 -05:00
|
|
|
include("../resources/templates/header.php");
|
2018-04-07 18:19:14 -05:00
|
|
|
echo("\n<main>\n");
|
2018-04-06 23:05:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
if (!empty($_POST["url_target"]) && !empty($_POST["url_alias"]))
|
|
|
|
{
|
|
|
|
$url_target = $_POST["url_target"];
|
|
|
|
$url_alias = $_POST["url_alias"];
|
2018-04-07 18:19:14 -05:00
|
|
|
$url_alias = sanitize_filename($url_alias);
|
|
|
|
|
2018-10-07 01:41:08 -05:00
|
|
|
$visible_dest = $url_aliasize_dir . $url_alias . $url_aliasize_visible_suffix;
|
2018-04-07 18:19:14 -05:00
|
|
|
$dest_file = $url_aliasize_dir . $url_alias . $url_aliasize_suffix;
|
|
|
|
|
|
|
|
$beaming_permitted = 0;
|
2018-04-06 23:05:59 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-04-07 18:19:14 -05:00
|
|
|
$beaming_permitted = 1;
|
2018-04-06 23:05:59 -05:00
|
|
|
}
|
|
|
|
|
2018-04-07 18:19:14 -05:00
|
|
|
if (!filter_var($url_target, FILTER_VALIDATE_URL))
|
2018-04-06 23:05:59 -05:00
|
|
|
{
|
2018-04-07 18:19:14 -05:00
|
|
|
$beaming_permitted = 3;
|
2018-04-06 23:05:59 -05:00
|
|
|
}
|
2018-04-07 18:19:14 -05:00
|
|
|
else if (file_exists($dest_file))
|
2018-04-06 23:05:59 -05:00
|
|
|
{
|
2018-04-07 18:19:14 -05:00
|
|
|
$beaming_permitted = 2;
|
2018-04-06 23:05:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-04-07 18:19:14 -05:00
|
|
|
switch ($beaming_permitted)
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
celebrate_death($dest_file, $url_aliasize_item,
|
|
|
|
$url_aliasize_die_img, $url_aliasize_die_alt,
|
|
|
|
"<p>... you didn't pick a URL/target.</p>
|
|
|
|
<p>Do it next time >;c</p>");
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
celebrate_death($dest_file, $url_aliasize_item,
|
|
|
|
$url_aliasize_die_img, $url_aliasize_die_alt,
|
|
|
|
"<p>Oh, sorry. Some-one just took that mask before you got here!</p>
|
|
|
|
<p>Try a different target name, doggo</p>");
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
celebrate_death($dest_file, $url_aliasize_item,
|
|
|
|
$url_aliasize_die_img, $url_aliasize_die_alt,
|
|
|
|
"<p>Are you screwing with me? That's not a URL</p>
|
|
|
|
<p>Nice try, buck-o</p>");
|
|
|
|
break;
|
|
|
|
case 0:
|
|
|
|
write_alias($dest_file, $url_target);
|
2018-10-07 01:41:08 -05:00
|
|
|
celebrate($visible_dest, $url_aliasize_item,
|
2018-04-07 18:19:14 -05:00
|
|
|
$url_aliasize_win_img, $url_aliasize_win_alt);
|
|
|
|
break;
|
2018-04-06 23:05:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<?php
|
2018-10-07 00:11:41 -05:00
|
|
|
include("../resources/templates/footer.html");
|
2018-04-06 23:05:59 -05:00
|
|
|
?>
|