]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/alphatest.php
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / themes / alphatest.php
1 <html>
2 <head><title>Alpha Channel Test</title>
3     <script type="text/javascript"><!--
4     var backgroundcolor = new Array();
5     backgroundcolor[0] = '#ffffff';
6     backgroundcolor[1] = '#cccccc';
7     backgroundcolor[2] = '#888888';
8     backgroundcolor[3] = '#444444';
9     backgroundcolor[4] = '#000000';
10     backgroundcolor[5] = '#aa8888';
11     backgroundcolor[6] = '#88aa88';
12     backgroundcolor[7] = '#8888aa';
13     function changebg(color) {
14         document.bgColor = backgroundcolor[color];
15     }
16     //--></script>
17 </head>
18 <body bgcolor="#8888aa">
19 <hr>
20 bgcolor:
21 <script type="text/javascript"><!--
22 for (var n = 0; n < backgroundcolor.length; n++) {
23     document.write(
24             ' <a href="#" onmouseover="javascript:changebg(' + n + ')">' + backgroundcolor[n] + '</a>'
25     );
26 }
27 //--></script>
28 <?php
29
30 function find_pngs($dir)
31 {
32     $stack[] = $dir;
33     while ($stack) {
34         $current_dir = array_pop($stack);
35         $pngs = false;
36         if ($dh = opendir($current_dir)) {
37             while (($file = readdir($dh)) !== false) {
38                 if ($file !== '.' AND $file !== '..') {
39                     $current_file = "{$current_dir}/{$file}";
40                     if (is_file($current_file)) {
41                         if (!(strcmp(substr($file, -4), ".png"))) {
42                             if (!$pngs) {
43                                 print "<hr /><h4>\n{$current_dir}</h4>\n";
44                                 $pngs = true;
45                             }
46                             print "<img src=\"{$current_dir}/" . urlencode($file) . "\" alt=\"{$file}\" />\n";
47                         }
48                     } elseif (is_dir($current_file)) {
49                         $stack[] = $current_file;
50                     }
51                 }
52             }
53         }
54     }
55 }
56
57 find_pngs(".");
58 ?>
59 <hr>
60 bgcolor:
61 <script type="text/javascript"><!--
62 for (var n = 0; n < backgroundcolor.length; n++) {
63     document.write(
64             ' <a href="#" onmouseover="javascript:changebg(' + n + ')">' + backgroundcolor[n] + '</a>'
65     );
66 }
67 //--></script>
68 <hr>
69 </body>
70 </html>