Debian Codegraph @

dojox/layout/tests/remote/getResponse.php

raw symbols SCIP
1 <?php
2 // this file is just a bouncer for ContentPane.html test
3 error_reporting(E_ALL ^ E_NOTICE);
4
5 if(isset($_GET['mode'])){
6 switch($_GET['mode']){
7 case 'htmlPaths':
8 echo "<img src='../images/testImage.gif' id='imgTest'/>
9 <div id='inlineStyleTest' style='width:188px;height:125px;background-image:url(../images/testImage.gif)'></div>
10 <style>@import 'getResponse.php?mode=importCss';</style>
11 <link type='text/css' rel='stylesheet' href='getResponse.php?mode=linkCss'>
12 <div id='importCssTest'></div>
13 <div id='linkCssTest'></div>
14 <div id='importMediaTest'></div>
15 <div id='linkMediaTest'></div>
16 <!-- these may download but not render -->
17 <style media='print'>@import 'getResponse.php?mode=importMediaPrint';</style>
18 <link media='print' type='text/css' rel='stylesheet' href='getResponse.php?mode=linkMediaPrint'>
19 ";
20 break;
21
22 case 'importCss':
23 header('Content-type: text/css; charset=utf-8');
24 echo "#importMediaTest {
25 margin: 4px;
26 border: 1px dashed red;
27 width: 200px;
28 height: 200px;
29 }
30 #importCssTest {
31 margin: 4px;
32 border: 1px solid blue;
33 width: 100px;
34 height: 100px;
35 }";
36 break;
37
38 case 'linkCss':
39 header('Content-type: text/css; charset=utf-8');
40 echo "#linkMediaTest {
41 margin: 4px;
42 border: 2px dashed red;
43 width: 200px;
44 height: 200px;
45 }
46 #linkCssTest {
47 margin: 4px;
48 border: 2px dashed red;
49 width: 100px;
50 height: 100px;
51 }";
52 break;
53
54 case 'importMediaPrint': // may download but not render
55 header('Content-type: text/css; charset=utf-8');
56 echo "#importMediaTest {
57 margin: 10px;
58 border: 5px dashed gray;
59 width: 100px;
60 height: 100px;
61 }";
62 break;
63
64 case 'linkMediaPrint': // may download but not render
65 header('Content-type: text/css; charset=utf-8');
66 echo "#linkMediaTest {
67 margin: 10px;
68 border: 5px dashed gray;
69 width: 100px;
70 height: 100px;
71 }";
72 break;
73
74 case 'remoteJsTrue':
75 header('Content-type: text/javascript; charset=utf-8');
76 echo "unTypedVarInDocScope = true;";
77 break;
78
79 case 'remoteJsFalse':
80 header('Content-type: text/javascript; charset=utf-8');
81 echo "unTypedVarInDocScope = false;";
82 break;
83
84 case 'bounceInput':
85 echo file_get_contents("php://input");
86 break;
87
88 case 'bounceHeaders';
89 if(function_exists("apache_request_headers")){
90 $headers = apache_request_headers();
91 foreach($headers as $header => $vlu){
92 echo "$header=$vlu\n<br/>";
93 }
94 }else{
95 // IIS, php as CGI etc gets here, messes formating, suboptimal
96 $headers = preg_grep('/HTTP_/i', array_keys($_SERVER));
97 foreach($headers as $header){
98 $vlu = preg_replace(array('/^HTTP_/', '/_/'), array('', '-'), $header);
99 echo "$vlu={$_SERVER[$header]}\n<br/>";
100 }
101 }
102 break;
103
104 default:
105 echo "unknown mode ".htmlspecialchars($_GET['mode']);
106 }
107 }
108 ?>