0 Members and 2 Guests are viewing this topic.
<?php if ($handle = opendir($folder)) { echo "pics = new Array();"; $pics = array(); while (false !== ($entry = readdir($handle))) { if (preg_match("/[^\.].*\.(jpg|jpeg|png|gif)$/i", $entry)) { array_push($pics,$entry); } } closedir($handle); sort($pics); $j = 0; foreach ($pics as &$pic) { echo "function pic$j () { pics[$j] = new Image(); pics[$j].src = '$folder/$pic'; pics[$j].";$j++;echo"addEventListener('load',pic".$j.",false); }\n"; } echo "function pic".$j." () {};\n\n\n";}?>
<!DOCTYPE html><html><head><script type="text/javascript"> pics = new Array(); function pic0 () { pics[0] = new Image(); pics[0].src = '../../knex/ballmachines/crazy/pics/FCLAHGTGD2J1W43.LARGE.jpg'; pics[0].addEventListener('load',pic1,false); } function pic1 () { pics[1] = new Image(); pics[1].src = '../../knex/ballmachines/crazy/pics/FI0ABR4GD2JC4X3.LARGE.jpg'; pics[1].addEventListener('load',pic2,false); } function pic2 () { pics[2] = new Image(); pics[2].src = '../../knex/ballmachines/crazy/pics/FODHF3KGD2JJN69.LARGE.jpg'; pics[2].addEventListener('load',pic3,false); } function pic3 () { pics[3] = new Image(); pics[3].src = '../../knex/ballmachines/crazy/pics/FRG66RIGD2J1W44.LARGE.jpg'; pics[3].addEventListener('load',pic4,false); } function pic4 () { pics[4] = new Image(); pics[4].src = '../../knex/ballmachines/crazy/pics/FSRATY0GD0R0CV4.LARGE.jpg'; pics[4].addEventListener('load',pic5,false); } function pic5 () { pics[5] = new Image(); pics[5].src = '../../knex/ballmachines/crazy/pics/FTWRI1CGD2JC4X6.LARGE.jpg'; pics[5].addEventListener('load',pic6,false); } function pic6 () { pics[6] = new Image(); pics[6].src = '../../knex/ballmachines/crazy/pics/FYQYILGGD2JC4X5.LARGE.jpg'; pics[6].addEventListener('load',pic7,false); } function pic7 () { pics[7] = new Image(); pics[7].src = '../../knex/ballmachines/crazy/pics/FZMZ8OBGD0R0CVA.LARGE.jpg'; pics[7].addEventListener('load',pic8,false); } function pic8 () { pics[8] = new Image(); pics[8].src = '../../knex/ballmachines/crazy/pics/crazy_top.jpg'; pics[8].addEventListener('load',pic9,false); } function pic9 () {};
<?phperror_reporting(0);//ini_set('display_errors', '1'); session_start();$_SESSION['player']=1;$_SESSION['game']=1;$_SESSION['id']=1;$verbindung = mysql_connect("localhost","sorunome",<passwd>);mysql_select_db("risk"); if ($_GET['action']=="lines") { /* $num = mysql_real_escape_string($_GET['num']); $offset = mysql_real_escape_string($_GET['offset']); $loop = true; $counter = 0; $doSleep = true; if (max(mysql_fetch_array(mysql_query("SELECT MAX(id) FROM risk")))>=$num) $doSleep = false; $num = $num-$offset; if ($_SESSION['id']!==NULL) { while ($loop) { if ($doSleep) sleep(1); $result = mysql_fetch_array(mysql_query("SELECT * FROM risk WHERE id='1'",$verbindung));//".($num+$counter)." die(mysql_error()); if ($result) { if ($result["player"]==$_SESSION['player'] || $result["game"]==$_SESSION['game'] || $result["player"]=="0") { echo $result["content"]."\n"; $counter++; } else $counter++; if ($counter>$offset) $loop = false; } } echo "nextLine(\"".($num+$offset+1)."\",0);"; } else echo "lostConnection();"; */}if ($_GET['action']=="send") { $request = $_GET['request']; if ($request=="MAP") { mysql_query("INSERT INTO riskserver (player,game,content) VALUES ('".$_SESSION['player']."','".$_SESSION['game']."','MAP');",$verbindung)or die(mysql_error()); }}?>
EDIT: WUT?!?!?! somehow php files load infinity, without php it is working, but it worked earlier today * Sorunome needs to bug albertro