diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-02-10 11:16:07 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-02-10 11:16:07 +0800 |
commit | 9d3c8c0e6e1a7ba43bf3dc19350d1dca68b657a3 (patch) | |
tree | 339de0698c13e1763d3361d70fb1266621025c91 /leave-a-message | |
download | web-9d3c8c0e6e1a7ba43bf3dc19350d1dca68b657a3.tar.xz |
Initial commit.
Diffstat (limited to 'leave-a-message')
-rw-r--r-- | leave-a-message/archive.txt | 79 | ||||
-rw-r--r-- | leave-a-message/blossom.png | bin | 0 -> 140486 bytes | |||
-rw-r--r-- | leave-a-message/extras.css | 20 | ||||
-rw-r--r-- | leave-a-message/index.php | 91 | ||||
-rw-r--r-- | leave-a-message/messages.json | 7 | ||||
-rw-r--r-- | leave-a-message/messages.txt | 11 | ||||
-rw-r--r-- | leave-a-message/writemessage.php | 65 |
7 files changed, 273 insertions, 0 deletions
diff --git a/leave-a-message/archive.txt b/leave-a-message/archive.txt new file mode 100644 index 0000000..1d22c81 --- /dev/null +++ b/leave-a-message/archive.txt @@ -0,0 +1,79 @@ +comment: Awesome website!
+author: Nameless
+time: 2016-10-02 01:00:07
+IP: 121.250.213.63
+
+comment: Xiong is so awesome!
+author: PaXiongNaoCanFen
+time: 2016-11-29 17:00:30
+IP: 45.32.28.202
+
+comment: alsjnczxioucaoisudho2joij3oi1j23oij
+Any detecting?
+author: Comment spam
+time: 2016-11-29 17:01:38
+IP: 45.32.28.202
+
+comment: Cool website after update:)
+author: Chiikyu
+time: 2017-02-18 04:17:42
+IP: 60.210.211.24
+
+comment: ewqgewfewqf +author: 123123213 +time: 2017-04-08 22:15:33 +IP: 2001:da8:7001:71:6703:3e86:4bd0:cd77 + +comment: 我喜欢这粗野主义设计风格 +author: +time: 2017-05-26 09:26:59 +IP: 211.144.114.26 + +comment: 突然喜欢上了这种配色方案(当然是夜间的 +author: blblb +time: 2017-09-30 10:50:59 +IP: 123.161.208.16 + +comment: Nice website, keep up the good work :) +author: A friendly wanderer +time: 2018-03-09 08:01:06 +IP: <unknown due to a shit bug, referer is www.google.no> + +comment: Compression est comment poupe votre sang pousse contre les parois de vos arteres lorsque votre coeur sentiment pompe le sang. Arteres sont les tubes qui transportent prendre offre sang loin de votre coeur. Chaque culture votre moelle bat, il pompe le sang tout au long vos arteres a la reste de votre corps.
+https://www.cialispascherfr24.com/vente-cialis-france-retraite/ +author: ACatuectintece +time: 2018-06-28 10:47:02 +IP: 46.119.113.139 + +comment: roulette games - <a href="https://roulettecas.com/">play free roulette for fun</a>
+free roulette games <a href=" https://roulettecas.com/ ">online roulette free</a>
+https://roulettecas.com/ +author: kn7z2vdn +time: 2018-07-13 01:19:37 +IP: 62.210.103.20 + +comment: Chris爷爷太叼了 +author: 61 +time: 2018-09-26 18:02:45 +IP: 149.28.28.85 + +comment: viagra australia <a href="https://almeidacorp.com/">cheapest viagra online</a> buy viagra online <a href=https://almeidacorp.com/>generic name for viagra</a> +author: hsfRudge +time: 2018-10-25 21:53:32 +IP: 178.159.37.97 + +comment: generic viagra cheap <a href="https://obatpasutri-jogja.com/">buy viagra online usa</a> what happens if a girl takes viagra <a href=https://obatpasutri-jogja.com/>generic viagra canada</a> +author: hwrspEmn +time: 2018-10-26 21:08:55 +IP: 178.159.37.39 + +comment: freedom debt relief <a href="http://nocreditcheck-militaryloans.com/">fast miliatary loans</a> direct loans <a href="http://nocreditcheck-militaryloans.com/">military news</a> +author: badglype +time: 2018-10-27 04:54:58 +IP: 46.119.127.157 + +comment: buy tadalafil <a href="http://drcialonlinedkb.com/">cialis cheap</a> cialis generic <a href=http://drcialonlinedkb.com/>cialis buy</a> +author: vspspEmn +time: 2018-12-03 05:31:05 +IP: 178.159.37.39 + diff --git a/leave-a-message/blossom.png b/leave-a-message/blossom.png Binary files differnew file mode 100644 index 0000000..6f2c304 --- /dev/null +++ b/leave-a-message/blossom.png diff --git a/leave-a-message/extras.css b/leave-a-message/extras.css new file mode 100644 index 0000000..907e88c --- /dev/null +++ b/leave-a-message/extras.css @@ -0,0 +1,20 @@ +.CTitle { + color: #fff; +} +.TText { + color: #fff; +} +body { + background: #000; + background-image: url(blossom.png); +} +table { + background: rgba(0,0,0,0.8); +} +note, .note { + vertical-align: super; + font-size: 60%; +} +reduced, .reduced { + font-size: 75%; +} diff --git a/leave-a-message/index.php b/leave-a-message/index.php new file mode 100644 index 0000000..3589515 --- /dev/null +++ b/leave-a-message/index.php @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta http-equiv="expires" content="Friday 24 October 1997 09:30 GMT"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Chrisoft::Leave a message</title> + <link rel=stylesheet href='../common.css' type='text/css'> + <link rel=stylesheet href='extras.css' type='text/css'> + <style type="text/css"> + div.comment{ + border:1px solid #CCC; + } + div.author{ + text-align:right; + } + </style> + <script src='https://www.google.com/recaptcha/api.js'></script> + <script type="text/javascript"> + function verify() + { + if(document.getElementById("content").value.length+document.getElementById("name").value.length>16300)return; + try + { + if(grecaptcha.getResponse().length===0) + document.getElementById("ann").style.display="inline-block"; + else document.getElementById("msgform").submit(); + } + catch(e){return;} + } + function ol() + { + if( navigator.userAgent.match(/Android/i) + || navigator.userAgent.match(/webOS/i) + || navigator.userAgent.match(/iPhone/i) + || navigator.userAgent.match(/iPad/i) + || navigator.userAgent.match(/iPod/i) + || navigator.userAgent.match(/BlackBerry/i) + || navigator.userAgent.match(/Windows Phone/i) + ) + document.getElementById("tab").style.width="98%", + document.getElementById("msgform").style.width="96%"; + } + </script> + <?php + if(isset($_POST['name'])) + echo "<script> + window.onload=function() + { + document.getElementById(\"ann\").style.display=\"inline-block\"; + document.getElementById(\"name\").value=\"".$_POST['name']."\"; + document.getElementById(\"content\").value=\"".$_POST['content']."\"; + } + </script>"; + ?> +</head> +<body onload="ol()"> +<table id="tab" border="0" style="width:70%;margin:auto;"> + <tr> + <td class="CTitle" style="font-size:2em;"> + <a href="../">Chrisoft</a>::Messages + </td> + </tr> + <tr><td> + <h1 class="TText">Deprecated. Use Guestbook found in the homepage instead.</h1> + <div class="TText" style="margin:auto;width:80%"> + <?php + $file=fopen("/var/www/html/leave-a-message/messages.txt","r"); + $comms;$i=0; + while(($str=fgets($file,16384))!==false)$comms[$i++]=$str; + fclose($file); + while(--$i>=0)echo $comms[$i]; + ?> + <form action="writemessage.php" id="msgform" method="post" style="width:50%;margin:auto;padding:5px;border:1px solid #CCC;"> + <span style="width:90%;display:table;"> + <label for="name" style="display:table-cell;width:1px;white-space:nowrap;">Your honourable name:</label> + <input type="text" id="name" name="name" required style="margin-left:5px;display:table-cell;width:100%;"> + </span> + <p>Message:</p> + <textarea required id="content" name="content" rows="5" style="width:90%;margin-left:1px;"></textarea> + <p> + Something Annoying: <span id="ann" style="color:#F00;display:none;">Please complete the annoying challenge!</span></p> + <div class="g-recaptcha" data-sitekey="6Lf1lAcUAAAAAGep8SpTETdIrEiw6w8uVy8IXp9U"></div><br> + <div style="text-align:center;"> + <button onclick="verify();" type="button" style="border:none;color:white;padding:0.5em 2em;text-align:center;background-color:#44AA44;-webkit-transition-duration:0.4s;transition-duration:0.4s;">Leave the message!</button> + </div> + </form> + </div> + </td></tr> +</table> +</body> diff --git a/leave-a-message/messages.json b/leave-a-message/messages.json new file mode 100644 index 0000000..a88bc5e --- /dev/null +++ b/leave-a-message/messages.json @@ -0,0 +1,7 @@ +{"cont":"Awesome website!","author":"Nameless","time":"2016-10-02 01:00"} +{"cont":"Xiong is so awesome!","author":"PaXiongNaoCanFen","time":"2016-11-29 17:00"} +{"cont":"Cool website after update:)","author":"Chiikyu","time":"2017-02-18 04:17"} +{"cont":"我喜欢这粗野主义设计风格","author":"","time":"2017-05-26 09:26"} +{"cont":"突然喜欢上了这种配色方案(当然是夜间的","author":"blblb","time":"2017-09-30 10:50"} +{"cont":"Nice website, keep up the good work :)","author":"A friendly wanderer","time":"2018-03-09 08:01"} +{"cont":"Chris爷爷太叼了","author":"61","time":"2018-09-26 18:02"} diff --git a/leave-a-message/messages.txt b/leave-a-message/messages.txt new file mode 100644 index 0000000..f56e8df --- /dev/null +++ b/leave-a-message/messages.txt @@ -0,0 +1,11 @@ +<div class="comment"><p>Awesome website!</p><div class="author">Nameless at 2016-10-02 01:00</div></div><br> +<div class="comment"><p>Xiong is so awesome!</p><div class="author">PaXiongNaoCanFen at 2016-11-29 17:00</div></div><br> +<div class="comment"><p>Cool website after update:)</p><div class="author">Chiikyu at 2017-02-18 04:17</div></div><br> +<div class="comment"><p>我喜欢这粗野主义设计风格</p><div class="author"> at 2017-05-26 09:26</div></div><br> +<div class="comment"><p>突然喜欢上了这种配色方案(当然是夜间的</p><div class="author">blblb at 2017-09-30 10:50</div></div><br> +<div class="comment"><p>Nice website, keep up the good work :)</p><div class="author">A friendly wanderer at 2018-03-09 08:01</div></div><br> +<div class="comment"><p>Chris爷爷太叼了</p><div class="author">61 at 2018-09-26 18:02</div></div><br> +<div class="comment"><p>viagra australia <a href="https://almeidacorp.com/">cheapest viagra online</a> buy viagra online <a href=https://almeidacorp.com/>generic name for viagra</a></p><div class="author">hsfRudge at 2018-10-25 21:53</div></div><br> +<div class="comment"><p>generic viagra cheap <a href="https://obatpasutri-jogja.com/">buy viagra online usa</a> what happens if a girl takes viagra <a href=https://obatpasutri-jogja.com/>generic viagra canada</a></p><div class="author">hwrspEmn at 2018-10-26 21:08</div></div><br> +<div class="comment"><p>freedom debt relief <a href="http://nocreditcheck-militaryloans.com/">fast miliatary loans</a> direct loans <a href="http://nocreditcheck-militaryloans.com/">military news</a></p><div class="author">badglype at 2018-10-27 04:54</div></div><br> +<div class="comment"><p>buy tadalafil <a href="http://drcialonlinedkb.com/">cialis cheap</a> cialis generic <a href=http://drcialonlinedkb.com/>cialis buy</a></p><div class="author">vspspEmn at 2018-12-03 05:31</div></div><br> diff --git a/leave-a-message/writemessage.php b/leave-a-message/writemessage.php new file mode 100644 index 0000000..b4585fe --- /dev/null +++ b/leave-a-message/writemessage.php @@ -0,0 +1,65 @@ +<html> +<?php + function onerror($n,$m) + { + echo "<script> + window.onload=function() + { + var f = document.createElement('form'); + f.action='https://chrisoft.org/leave-a-message/'; + f.method='POST'; + f.style.display='none'; + + var i=document.createElement('input'); + i.type='hidden'; + i.name='name'; + i.value='".$n."'; + f.appendChild(i); + i=document.createElement('input'); + i.type='hidden'; + i.name='content'; + i.value='".$m."'; + f.appendChild(i); + + document.body.appendChild(f); + f.submit(); + } + </script>"; + } + $name;$mesg;$captcha; + if(isset($_POST['name'])) + $name=$_POST['name']; + if(isset($_POST['content'])) + $mesg=$_POST['content']; + if(isset($_POST['g-recaptcha-response'])) + $captcha=$_POST['g-recaptcha-response']; + if(!$captcha){ + onerror($name,$mesg); + exit; + } + $response=json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6Lf1lAcUAAAAABRj_EJ1OzhzGfiorpfYFbcGQE5r&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']), true); + if($response['success'] == false)onerror($name,$mesg); + else + { + if(strlen($mesg)+strlen($name)>16300)echo "Your message is too long!!!"; + $rmesg=htmlspecialchars($mesg); + $rmesg=nl2br($rmesg,false); + $rmesg=trim(preg_replace('/\s\s+/', ' ', $rmesg)); + $f=fopen("/var/www/html/leave-a-message/messages.txt","a"); + $str=sprintf("<div class=\"comment\"><p>%s</p><div class=\"author\">%s at %s</div></div><br>\n",$rmesg,htmlspecialchars($name),strftime("%Y-%m-%d %H:%M")); + fwrite($f,$str); + fclose($f); + $f=fopen("/var/www/html/leave-a-message/messages.json","a"); + $str=sprintf("{\"cont\":\"%s\",\"author\":\"%s\",\"time\":\"%s\"}\n",$rmesg,htmlspecialchars($name),strftime("%Y-%m-%d %H:%M")); + fwrite($f,$str); + fclose($f); + $f=fopen("/var/www/html/leave-a-message/archive.txt","a"); + $str=sprintf("comment: %s\nauthor: %s\ntime: %s\nIP: %s\n\n",$mesg,$name,strftime("%Y-%m-%d %H:%M:%S"),$_SERVER['HTTP_X_FORWARDED_FOR']?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']); + fwrite($f,$str); + fclose($f); + echo "<script>window.location='https://chrisoft.org/#guestbook'</script>"; + } +?> +</html> +<body> +</body> |