2 $monLibrary= dirname(__FILE__) .
"/../library";
3 require_once(
"$monLibrary/cu_top.i");
4 require_once(
"$monLibrary/ck_hticket.i");
7 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
10 header(
"Location: /hcuadm/hcu_noperm.prg");
20 $sql =
"select cu, user_name from cuadmin order by cu";
22 $sth = db_query($sql, $dbh);
24 echo
"<html><head><title>Credit Union Color Settings</title></head>";
25 echo
"<body background='#FFFFFF'>";
26 echo
"<table border=1 cellpadding=1 cellspacing=1 align=center>";
27 echo
"<tr><td colspan=9 align=center>COLOR SHEET</td></tr>";
29 <th>CU</th><th>user</th><th>Body</th><th>Bar</th><th>Mat</th> 30 <th>Hdr</th><th>Dtl</th> 31 <th>Odd</th><th>Even</th> 33 for ($row=0; list($cu, $user_name) =
34 db_fetch_array($sth,$row); $row++) {
36 $user_name = trim($user_name);
37 print
"<tr><td bgcolor=white>$cu</td><td bgcolor=white>$user_name</td>";
39 # get the mindex.css file 40 if (is_readable(
"/home/$user_name/public_html/mindex.css")) {
41 $cssfile = file(
"/home/$user_name/public_html/mindex.css");
42 $cssfile = implode(
"",$cssfile);
45 # grep out the stuff we want to see ... 46 preg_match(
"/BODY[^}]*background: (#?......)/",$cssfile,$matches);
47 $bodytag = $matches[1];
48 preg_match(
"/BODY[^}]*color: (#?......)/",$cssfile,$matches);
49 $bodycolor = (
"${matches[1]}" ==
"" ?
"#000000" : $matches[1]);
50 preg_match(
"/\.bar[^}]*background: (#?......)/",$cssfile,$matches);
51 $bartag = $matches[1];
52 preg_match(
"/.bar[^}]*color: (#?......)/",$cssfile,$matches);
53 $barcolor = (
"${matches[1]}" ==
"" ?
"#000000" : $matches[1]);
54 preg_match(
"/\.matce[^}]*background: (#?......)/",$cssfile,$matches);
55 $mattag = $matches[1];
56 preg_match(
"/.mat[^}]*color: (#?......)/",$cssfile,$matches);
57 $matcolor = (
"${matches[1]}" ==
"" ?
"#000000" : $matches[1]);
58 preg_match(
"/\.odd[^}]*background: (#?......)/",$cssfile,$matches);
59 $oddtag = $matches[1];
60 preg_match(
"/.odd[^}]*color: (#?......)/",$cssfile,$matches);
61 $oddcolor = (
"${matches[1]}" ==
"" ?
"#000000" : $matches[1]);
62 preg_match(
"/\.even[^}]*background: (#?......)/",$cssfile,$matches);
63 $eventag = $matches[1];
64 preg_match(
"/.even[^}]*color: (#?......)/",$cssfile,$matches);
65 $evencolor = (
"${matches[1]}" ==
"" ?
"#000000" : $matches[1]);
66 preg_match(
"/\.hdrl[^}]*background: (#?......)/",$cssfile,$matches);
67 $hdrtag = $matches[1];
68 preg_match(
"/.hdr[^}]*color: (#?......)/",$cssfile,$matches);
69 $hdrcolor = (
"${matches[1]}" ==
"" ?
"#000000" : $matches[1]);
70 preg_match(
"/\.dtll[^}]*background: (#?......)/",$cssfile,$matches);
71 $dtltag = $matches[1];
72 preg_match(
"/.dtl[^}]*color: (#?......)/",$cssfile,$matches);
73 $dtlcolor = (
"${matches[1]}" ==
"" ?
"#000000" : $matches[1]);
77 print
"<td bgcolor=$bodytag>$bodytag</td> 78 <td bgcolor=$bartag><font color=$barcolor>$bartag</font></td> 79 <td bgcolor=$mattag><font color=$matcolor>$mattag</font></td> 80 <td bgcolor=$hdrtag><font color=$hdrcolor>$hdrtag</font></td> 81 <td bgcolor=$dtltag><font color=$dtlcolor>$dtltag</font></td> 82 <td bgcolor=$oddtag><font color=$oddcolor>$oddtag</font></td> 83 <td bgcolor=$eventag><font color=$evencolor>$eventag</font></td>";
88 echo
"</table></body></html>";