2 if( count($_POST) ){ // second call
\r
4 foreach( $_POST as $lib=>$ver ){
\r
7 $include = "<script type='text/javascript' src='otherlibs/$lib/$ver/$lib.js'></script>\n";
\r
8 if( $lib == 'prototype' ) // prototype must be included first
\r
9 array_unshift( $includes, $include );
\r
11 array_push( $includes, $include );
\r
14 $includes = implode( "\n", $includes );
\r
15 $suite = file_get_contents('index.html');
\r
16 echo str_replace( '<!-- Includes -->', $includes, $suite );
\r
21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
\r
22 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
\r
24 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
25 <title>jQuery Test Suite</title>
\r
26 <link rel="Stylesheet" media="screen" href="data/testsuite.css" />
\r
30 <h1 id="header">jQuery Test Suite</h1>
\r
31 <h2 id="banner" class="fail"></h2>
\r
32 <h2 id="userAgent">Choose other libraries to include</h2>
\r
34 <form class="otherlibs" action="" method="post">
\r
36 $libs = scandir('otherlibs');
\r
37 foreach( $libs as $lib ){
\r
38 if( $lib[0] == '.' )
\r
40 echo "<h3>$lib</h3>";
\r
41 $vers = scandir( "otherlibs/$lib");
\r
42 foreach( $vers as $ver ){
\r
43 if( $ver[0] != '.' )
\r
44 echo "<label><input type='checkbox' name='$lib' value='$ver'>$ver</label>";
\r
48 <input type="submit" value="Run" class="submit" />
\r