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];
18 <body bgcolor="#8888aa">
21 <script type="text/javascript"><!--
22 for (var n = 0; n < backgroundcolor.length; n++) {
24 ' <a href="#" onmouseover="javascript:changebg(' + n + ')">' + backgroundcolor[n] + '</a>'
30 function find_pngs($dir)
34 $current_dir = array_pop($stack);
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"))) {
43 print "<hr /><h4>\n{$current_dir}</h4>\n";
46 print "<img src=\"{$current_dir}/" . urlencode($file) . "\" alt=\"{$file}\" />\n";
48 } elseif (is_dir($current_file)) {
49 $stack[] = $current_file;
61 <script type="text/javascript"><!--
62 for (var n = 0; n < backgroundcolor.length; n++) {
64 ' <a href="#" onmouseover="javascript:changebg(' + n + ')">' + backgroundcolor[n] + '</a>'