-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopyright.1.php
63 lines (57 loc) · 2.46 KB
/
copyright.1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
//include 'http://www.web.cil.org.ua/lk.html';
?>
<html>
<header>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
</header>
<body>
<div id="sales"><div id="LK"><input type="button" value="Powered by Liubomyr Kokor" onclick="buy()" /><div class="date">2016-<?php echo date('Y');?></div></div>
<script>
var sales_div = document.getElementById("sales");
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
window.onload = function (){
var bought=getCookie("bought");
if (bought!=null && bought!=""){
if(bought == 'true'){
sales.innerHTML = 'Дякую за довіру! <input type="button" value="Розробник" onclick="cancel()" />';
}
else{
sales.innerHTML = ' <input type="button" value="Powered by Liubomyr Kokor" onclick="buy()" />';
}
}
}
function buy(){
sales.innerHTML = 'Дякую за довіру! <input type="button" value="Розробник" onclick="cancel()" />';
setCookie('bought', 'true', 5); //Тут ставите скільки днів у Вас йде (тут - 5 дн)
}
function cancel(){
sales.innerHTML = ' <input type="button" value="Powered by Liubomyr Kokor" onclick="buy()" />';
setCookie('bought', 'true', -5); // -5 видаляє cookie
}
</script>
<script src="//code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>