Added support for .before(), .after(), and .replaceWith() on disconnected DOM nodes...
[jquery.git] / test / polluted.php
1 <?php\r
2         if( count($_POST) ){ // second call\r
3                 $includes = array();\r
4                 foreach( $_POST as $lib=>$ver ){\r
5                         if( !$ver )\r
6                                 continue;\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
10                         else\r
11                                 array_push( $includes, $include );\r
12                 }\r
13 \r
14                 $includes = implode( "\n", $includes );\r
15                 $suite = file_get_contents('index.html');\r
16                 echo str_replace( '<!-- Includes -->', $includes, $suite );\r
17                 exit;\r
18         }       \r
19 ?>\r
20 \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
23 <head>\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="qunit/testsuite.css" />\r
27         <link rel="Stylesheet" media="screen" href="data/otherlibs.css" />\r
28         <style type="text/css">\r
29                 form.otherlibs{\r
30                         margin: 20px 0 0 30px;\r
31                 }\r
32                 form.otherlibs label{\r
33                         display:block;\r
34                         margin: 5px 0 5px 30px;\r
35                 }\r
36                 form.otherlibs input.submit{\r
37                         margin:30px 0 0 0;\r
38                 }\r
39         </style>\r
40 </head>\r
41 \r
42 <body id="body">\r
43         <h1 id="header">jQuery Test Suite</h1>\r
44         <h2 id="banner" class="fail"></h2>\r
45         <h2 id="userAgent">Choose other libraries to include</h2>\r
46         \r
47         <form class="otherlibs" action="" method="post">\r
48                 <?php\r
49                         $libs = scandir('otherlibs');\r
50                         foreach( $libs as $lib ){\r
51                                 if( $lib[0] == '.' )\r
52                                         continue;\r
53                                 echo "<h3>$lib</h3>";\r
54                                 $vers = scandir( "otherlibs/$lib");\r
55                                 foreach( $vers as $ver ){\r
56                                         if( $ver[0] != '.' )\r
57                                                 echo "<label><input type='checkbox' name='$lib' value='$ver'>$ver</label>";\r
58                                 }\r
59                         }\r
60                 ?>\r
61                 <input type="submit" value="Run" class="submit" />\r
62         </form>\r
63 </body>\r
64 </html>\r