<!DOCTYPE HTML>
<html xmlns=
"http://www.w3.org/1999/xhtml"
xml:lang=
"en"
lang=
"en"
>
<head>
<title>我们的爱</title>
<meta http-equiv=
"content-type"
content=
"text/html; charset=UTF-8"
>
<style type=
"text/css"
>
@font-face {
font-family: digit;
src: url('digital-7_mono.ttf') format(
"truetype"
);
}
</style>
<link href=
"style/default.css"
type=
"text/css"
rel=
"stylesheet"
>
<script type=
"text/javascript"
src=
"style/jquery.js"
></script>
<script type=
"text/javascript"
src=
"style/garden.js"
></script>
<script type=
"text/javascript"
src=
"style/functions.js"
></script>
</head>
<body>
<?php
if
(!isset(
$_GET
['g']) && !isset(
$_GET
['b'])) {
?>
<form action='#' method='get' style=
"margin:0 auto;width:520px;"
>
<fieldset width=
"700px"
height=
"700px"
>
<legend> 我们的爱 </legend>
<br />
男生姓名:<input id=
"boy"
name='b' value=''>
<br />
<br />
女生姓名:<input id=
"girl"
name='g' value=''>
<br />
<br />
<input type='button' name='submit' onclick=
"javascript:reg();"
value='提交'>
</fieldset>
</form>
<script type=
"text/javascript"
>
function
reg(){
var
b = document.getElementById(
"boy"
).value;
var
g = document.getElementById(
"girl"
).value;
if
(b=='') {
alert(
"请填写男生姓名!"
);
return
;
}
if
(g==''){
alert(
"请填写女生姓名!"
);
return
;
}
window.location.href=
"http://love.yearnfar.com/?b="
+b+
"&g="
+g;
}
</script>
<?php
}
else
{
$girl
= isset(
$_GET
['g']) ?
$_GET
['g'] : 'girlName';
$boy
= isset(
$_GET
['b']) ?
$_GET
['b'] : 'boyName';
?>
<p id=
"mainp"
>
<a style=
"text-decoration:none;font-size:16px;margin-left:16px;"
href=
"http://love.yearnfar.com"
>填写信息</a>
<p id=
"content"
>
<p id=
"code"
>
<span
class
=
"comments"
>
</span><br />
Boy i = <span
class
=
"keyword"
>
new
</span> Boy(<span
class
=
"string"
>
"<?php echo $boy;?>"
</span>);<br />
Girl u = <span
class
=
"keyword"
>
new
</span> Girl(<span
class
=
"string"
>
"<?php echo $girl;?>"
</span>);<br />
<span
class
=
"comments"
>
i.love(u);<br />
<span
class
=
"comments"
>
u.sayOtherthing();<br />
<span
class
=
"comments"
>
<span
class
=
"keyword"
>
var
</span> reason=i.ask(u);<br />
<span
class
=
"comments"
>
$(
"body"
).append(reason);<br />
<span
class
=
"comments"
>
<span
class
=
"comments"
>
i.takeCareOf(u);<br />
<span
class
=
"comments"
>
<span
class
=
"keyword"
>boolean</span> isAccept = <span
class
=
"keyword"
>false</span>;<br />
<span
class
=
"keyword"
>
while
</span> (isAccept) {<br />
<span
class
=
"placeholder"
/>i.waitFor(u);<br />
<span
class
=
"placeholder"
/><span
class
=
"comments"
>
<span
class
=
"placeholder"
/><span
class
=
"comments"
>
<span
class
=
"placeholder"
/>isAccept = u.thinkOver();<br />
}<br />
<span
class
=
"comments"
>
u.accept(i);<br />
i.liveHappilyWith(u);<br />
</p>
<p id=
"loveHeart"
>
<canvas id=
"garden"
></canvas>
<p id=
"words"
>
<p id=
"messages"
>
<center></center>
<?php
echo
$girl
;?>,我爱你!520!
<p id=
"elapseClock"
style=
"display:none"
></p>
<a href='#' id=
"accept"
>如果接受我,点击我!</a>
</p>
<p id=
"loveu"
>
爱你,直到永远。<br/>
<p
class
=
"signature"
>- <?php
echo
$boy
;?></p>
</p>
</p>
</p>
</p>
</p>
<script type=
"text/javascript"
>
var
offsetX = $(
"#loveHeart"
).width() / 2;
var
offsetY = $(
"#loveHeart"
).height() / 2 - 55;
if
(!document.createElement('canvas').getContext) {
var
msg = document.createElement(
"p"
);
msg.id =
"errorMsg"
;
msg.innerHTML =
"Your browser doesn't support HTML5!<br/>Recommend use Chrome 14+/IE 9+/Firefox 7+/Safari 4+"
;
document.body.appendChild(msg);
$(
"#code"
).css(
"display"
,
"none"
)
$(
"#copyright"
).css(
"position"
,
"absolute"
);
$(
"#copyright"
).css(
"bottom"
,
"10px"
);
document.execCommand(
"stop"
);
}
else
{
setTimeout(
function
() {
adjustWordsPosition();
startHeartAnimation();
}, 10000);
$(
"#accept"
).click(
function
(){
$(this).hide();
$(
"#elapseClock"
).show();
var
together =
new
Date
();
timeElapse(together);
setInterval(
function
() {
timeElapse(together);
}, 500);
})
adjustCodePosition();
$(
"#code"
).typewriter();
}
</script>
<?php } ?>
<script>
var
_hmt = _hmt || [];
(
function
() {
var
hm = document.createElement(
"script"
);
hm.src =
"//hm.baidu.com/hm.js?873bd66e0c366c25266bac9623c4ab1b"
;
var
s = document.getElementsByTagName(
"script"
)[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>