urlshortener/expand_warnpage.php

87 lines
3.0 KiB
PHP
Raw Normal View History

2013-09-26 16:03:50 +00:00
<?php
include_once(dirname(__FILE__).'/./lib/functions.inc.php');
include_once(dirname(__FILE__).'/./lib/config.inc.php');
include_once(dirname(__FILE__).'/./lib/UrlShortener.class.php');
echo "<" . "?xml version=\"1.0\"?".">\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>URL Shortener</title>
<link rel="stylesheet" href="website/reset.css" type="text/css" />
<link rel="stylesheet" href="website/style.1.css" type="text/css" />
<script src="website/jquery-1.4.3.min.js" type="text/javascript"></script>
<script src="website/jquery.cookie.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
var warningCookieEnabled = null;
$(document).ready(function() {
$('#warningcookie').show();
var warnCookieValue = $.cookie('warn');
if (warnCookieValue == null) {
warnCookieValue = "false";
}
warningCookieEnabled = warnCookieValue;
if (warnCookieValue == "true") {
$('#cookie_image').attr('src', 'website/16_accept.png');
$('#cookie_message').html('Warning enabled.');
$('#cookie_link').html('Click to disable warning.');
} else {
$('#cookie_image').attr('src', 'website/16_delete.png');
$('#cookie_message').html('Warning disabled.');
$('#cookie_link').html('Click to enable warning.');
}
});
function toggleWarning() {
if (warningCookieEnabled == "true") {
warningCookieEnabled = "false";
$.cookie('warn', 'false', { expires: 365, path: '/' });
$('#cookie_image').attr('src', 'website/16_delete.png');
$('#cookie_message').html('Warning disabled.');
$('#cookie_link').html('Click to enable warning.');
} else {
warningCookieEnabled = "true";
$.cookie('warn', 'true', { expires: 365, path: '/' });
$('#cookie_image').attr('src', 'website/16_accept.png');
$('#cookie_message').html('Warning enabled.');
$('#cookie_link').html('Click to disable warning.');
}
}
//-->
</script>
</head>
<body>
<div id="header" class="pagearea">
<div class="contentblock">
&nbsp;
</div>
</div>
<div id="caption" class="pagearea">
<div class="contentblock">
<div style="padding-top:170px;padding-right:30px;"><a href="index.php">URL Shortener</a></div>
</div>
</div>
<div id="main" class="pagearea">
<div class="contentblock">
<div style="padding:20px;">
<div style="margin-bottom:20px;">You have enabled URL previews.</div>
<div class="result contentwidth">
<div class="shorturl"><a href="<?php echo $resultUrl; ?>">Click here to continue...</a></div>
<div class="longurl"><strong>URL:</strong> <?php echo $resultUrl; ?></div>
</div>
</div>
</div>
</div>
<div id="footer" class="pagearea">
<div class="contentblock">
<div id="warningcookie" style="display:none;padding:20px;">
<img src="16_blank.png" id="cookie_image" alt="" /> <span id="cookie_message"></span> <a href="javascript:void(0);" id="cookie_link" onclick="toggleWarning();"></a>
</div>
</div>
</div>
</body>
</html>