Changeset 78
- Timestamp:
- 11/23/05 15:19:58 (7 years ago)
- File:
-
- 1 edited
-
trollforge/lastmeasure/index.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trollforge/lastmeasure/index.php
r77 r78 12 12 $music = $_GET['music']; 13 13 14 function list_images() { 15 global $files; 16 $files = array(); 17 $dh = opendir('images/'); 18 while(($file = readdir($dh)) != false) { 19 $ext = substr($file, -3); 20 if($ext == 'jpg' || $ext == 'gif') { 21 $files[] = 'images/'.$file; 14 /* Print a random image name, with its 'image/' prefix. */ 15 function random_image() { 16 static $imagelist = null; 17 if(!$imagelist) { 18 $imagelist = array(); 19 $dh = opendir('images/'); 20 while(($file = readdir($dh)) != false) { 21 $ext = substr($file, -3); 22 if($ext == 'jpg' || $ext == 'gif') { 23 $imagelist[] = $file; 24 } 22 25 } 23 26 } 24 27 closedir($dh); 25 } 26 27 function random_image() { 28 global $files; 29 echo $files[rand(0,count($files)-1)]; 30 } 31 28 echo 'images/'.$imagelist[rand(0,count($imagelist)-1)]; 29 } 30 31 /* Output an <object> whose sole purpose is to play the "hey everybody, I'm 32 * watching gay porno!" sound. */ 32 33 function hey_everybody() { ?> 33 34 <object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" … … 125 126 <?php 126 127 } 127 128 /* Initialise shit */129 list_images();130 128 131 129 ?> … … 198 196 <input type="submit" value="CLICK ME" name="CLICK ME" 199 197 style="width: 2000px; height: 2000px; 200 background-image: url('<?php random_image( $files);?>');"198 background-image: url('<?php random_image();?>');" 201 199 src="<?php random_image();?>" height="300" width="300" 202 200 onMouseOver="if(is_ie) {showModelessDialog('index.php?procreate=1'); … … 208 206 return true; } else{procreate();} 209 207 playBall();return true;"> 210 <img src="<?php random_image( $files);?>"208 <img src="<?php random_image();?>" 211 209 onMouseOver="if(is_ie) {showModelessDialog('index.php?procreate=1'); 212 210 return true; } procreate();playBall();return true;"
Note: See TracChangeset
for help on using the changeset viewer.
