~ubuntu-branches/ubuntu/maverick/ilohamail/maverick

« back to all changes in this revision

Viewing changes to IlohaMail/source/pref_colors.php

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Jaspert
  • Date: 2004-02-04 13:44:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040204134437-kz8j3ui2qa7oq8z2
Tags: upstream-0.8.12
ImportĀ upstreamĀ versionĀ 0.8.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/////////////////////////////////////////////////////////
 
3
//      
 
4
//      source/pref_colors.php
 
5
//
 
6
//      (C)Copyright 2000-2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
 
7
//
 
8
//              This file is part of IlohaMail.
 
9
//              IlohaMail is free software released under the GPL 
 
10
//              license.  See enclosed file COPYING for details,
 
11
//              or see http://www.fsf.org/copyleft/gpl.html
 
12
//
 
13
/////////////////////////////////////////////////////////
 
14
 
 
15
/********************************************************
 
16
 
 
17
        AUTHOR: Ryo Chijiiwa <ryo@ilohamail.org>
 
18
        FILE: source/pref_colors.php
 
19
        PURPOSE:
 
20
                Provide interface for customizing display colors.
 
21
        PRE-CONDITIONS:
 
22
                $user - Session ID
 
23
        COMMENTS:
 
24
                File include "include/write_sinc.inc" for storing preferences to back-end, and update
 
25
                per-session settings.
 
26
                
 
27
********************************************************/
 
28
 
 
29
function pc_ShowField($label, $field){
 
30
        global $my_colors, $THEME_OVERRIDES;
 
31
        
 
32
        $value = $my_prefs[$field];
 
33
        if ($THEME_OVERRIDES[$field]){
 
34
                echo $label."&nbsp;".$my_colors[$field]."<br>\n";
 
35
        }else{
 
36
                echo $label.'<input type="text" name="'.$field.'" value="'.$my_colors[$field].'" size=7>';
 
37
                echo "<br>\n";
 
38
        }
 
39
}
 
40
 
 
41
        include("../include/super2global.inc");
 
42
        include("../include/header_main.inc");
 
43
        include("../include/icl.inc");
 
44
        include("../lang/".$my_prefs["lang"]."prefs.inc");
 
45
        include("../lang/".$my_prefs["lang"]."pref_colors.inc");
 
46
        include("../conf/defaults.inc");
 
47
        include("themes/".$my_prefs["theme"]."/info.inc");
 
48
        
 
49
        //check for SID
 
50
        if (!isset($user)){
 
51
                echo "Session ID not specified";
 
52
                exit;
 
53
        }
 
54
        
 
55
        include("../include/pref_header.inc");
 
56
        
 
57
        //authenticate
 
58
        $conn=iil_Connect($host, $loginID, $password, $AUTH_MODE);
 
59
        if ($conn){
 
60
                iil_Close($conn);
 
61
        }else{
 
62
                echo "Authentication failed.";
 
63
                echo "</body></html>\n";
 
64
                exit;
 
65
        }
 
66
 
 
67
        ?>
 
68
                <span class="mainLight">
 
69
        <?php echo $pcStrings["0"]."  ".$pcStrings["0.1"]?>
 
70
        <a href="cp.php?user=<?php echo $user?>" class="mainLight" target=_blank>
 
71
        <?php echo $pcStrings["0.2"]?></a><?php echo $pcStrings["0.3"]?><br>
 
72
                <?php echo $pcStrings["0.4"]?>
 
73
                </span>
 
74
                
 
75
                <form method="post" action="index.php" target="_top">
 
76
                <input type="hidden" name="do_pref_colors" value="1">
 
77
                <input type="hidden" name="user" value="<?php echo $user?>">
 
78
                <input type="hidden" name="session" value="<?php echo $user?>">
 
79
                <table width="100%">
 
80
                        <tr valign=top>
 
81
                        <td width="50%">
 
82
                <table border="0" cellspacing="1" cellpadding="1" bgcolor="<?php echo $my_colors["main_hilite"]?>" width="95%">
 
83
                <tr bgcolor="<?php echo $my_colors["main_head_bg"]?>"><td><b class="tblheader"><?php echo $pcStrings["1.0"]?></b></td></tr>
 
84
                <tr bgcolor="<?php echo $my_colors["main_bg"]?>"><td>
 
85
                                        <?php
 
86
                                        pc_ShowField($pcPortions[0], "tool_bg");
 
87
                                        pc_ShowField($pcPortions[1], "tool_link");
 
88
                                        ?>
 
89
                                        <!--
 
90
                                        <?php echo $pcPortions[0]?><input type="text" name="tool_bg" value="<?php echo $my_colors["tool_bg"]; ?>" size=7>
 
91
                                        <br><?php echo $pcPortions[1]?><input type="text" name="tool_link" value="<?php echo $my_colors["tool_link"]; ?>" size=7>
 
92
                                        //-->
 
93
                                </td></tr></table>
 
94
                        </td>
 
95
                        <td width="50%">
 
96
                                <?php
 
97
                                if ($ICL_CAPABILITY["folders"]){
 
98
                                ?>
 
99
                <table border="0" cellspacing="1" cellpadding="1" bgcolor="<?php echo $my_colors["main_hilite"]?>" width="95%">
 
100
                <tr bgcolor="<?php echo $my_colors["main_head_bg"]?>"><td><b class="tblheader"><?php echo $pcStrings["2.0"]?></b></td></tr>
 
101
                <tr bgcolor="<?php echo $my_colors["main_bg"]?>"><td>
 
102
                                        <?php
 
103
                                        pc_ShowField($pcPortions[0], "folder_bg");
 
104
                                        pc_ShowField($pcPortions[1], "folder_link");
 
105
                                        ?>
 
106
                                        <!--
 
107
                                        <?php echo $pcPortions[0]?><input type="text" name="folder_bg" value="<?php echo $my_colors["folder_bg"]; ?>" size=7>
 
108
                                        <br><?php echo $pcPortions[1]?><input type="text" name="folder_link" value="<?php echo $my_colors["folder_link"]; ?>" size=7>
 
109
                                        //-->
 
110
                                </td></tr></table>
 
111
                                <?php
 
112
                                }
 
113
                                ?>
 
114
                        </td>
 
115
                        </tr>
 
116
 
 
117
                        <tr valign=top>
 
118
                        <td width="50%">
 
119
                <table border="0" cellspacing="1" cellpadding="1" bgcolor="<?php echo $my_colors["main_hilite"]?>" width="95%">
 
120
                <tr bgcolor="<?php echo $my_colors["main_head_bg"]?>"><td><b class="tblheader"><?php echo $pcStrings["3.0"]?></b></td></tr>
 
121
                <tr bgcolor="<?php echo $my_colors["main_bg"]?>"><td>
 
122
                                        <?php
 
123
                                        pc_ShowField($pcPortions[0], "main_bg");
 
124
                                        pc_ShowField($pcPortions[1], "main_link");
 
125
                                        pc_ShowField($pcPortions[2], "main_text");
 
126
                                        pc_ShowField($pcPortions[3], "main_hilite");
 
127
                                        pc_ShowField($pcStrings["3.1"], "main_head_bg");
 
128
                                        pc_ShowField($pcStrings["3.2"], "main_head_txt");
 
129
                                        pc_ShowField($pcStrings["3.3"], "main_darkbg");
 
130
                                        pc_ShowField($pcStrings["3.4"], "main_light_txt");
 
131
                                        ?>
 
132
                                        <!--
 
133
                                        <?php echo $pcPortions[0]?><input type="text" name="main_bg" value="<?php echo $my_colors["main_bg"]; ?>" size=7>
 
134
                                        <br><?php echo $pcPortions[1]?><input type="text" name="main_link" value="<?php echo $my_colors["main_link"]; ?>" size=7>
 
135
                                        <br><?php echo $pcPortions[2]?><input type="text" name="main_text" value="<?php echo $my_colors["main_text"]; ?>" size=7>
 
136
                                        <br><?php echo $pcPortions[3]?><input type="text" name="main_hilite" value="<?php echo $my_colors["main_hilite"]; ?>" size=7>
 
137
                                        <br><?php echo $pcStrings["3.1"]?>:<input type="text" name="main_head_bg" value="<?php echo $my_colors["main_head_bg"]; ?>" size=7>
 
138
                                        <br><?php echo $pcStrings["3.2"]?>:<input type="text" name="main_head_txt" value="<?php echo $my_colors["main_head_txt"]; ?>" size=7>
 
139
                                        <br>main_darkbg:<input type="text" name="main_darkbg" value="<?php echo $my_colors["main_darkbg"]; ?>" size=7>
 
140
                                        <br>main_light_txt:<input type="text" name="main_light_txt" value="<?php echo $my_colors["main_light_txt"]; ?>" size=7>
 
141
                                        //-->
 
142
                                </td></tr></table>
 
143
                        </td>
 
144
                        <td width="50%">
 
145
                <table border="0" cellspacing="1" cellpadding="1" bgcolor="<?php echo $my_colors["main_hilite"]?>" width="95%">
 
146
                <tr bgcolor="<?php echo $my_colors["main_head_bg"]?>"><td><b class="tblheader"><?php echo $pcStrings["4.0"]?></b></td></tr>
 
147
                <tr bgcolor="<?php echo $my_colors["main_bg"]?>"><td>
 
148
                                        <?php
 
149
                                        pc_ShowField($pcStrings["4.1"], "quotes");
 
150
                                        ?>
 
151
                                        <!--
 
152
                                        <?php echo $pcStrings["4.1"]?>: <input type="text" name="quotes" value="<?php echo $my_colors["quotes"]; ?>" size=7>
 
153
                                        //-->
 
154
                                </td></tr></table>
 
155
                        </td>
 
156
                        </tr>
 
157
 
 
158
                        <tr valign=top>
 
159
                        <td width="50%">
 
160
                <table border="0" cellspacing="1" cellpadding="1" bgcolor="<?php echo $my_colors["main_hilite"]?>" width="95%">
 
161
                <tr bgcolor="<?php echo $my_colors["main_head_bg"]?>"><td><b class="tblheader"><?php echo $pcStrings["5.0"]?></b></td></tr>
 
162
                <tr bgcolor="<?php echo $my_colors["main_bg"]?>"><td>
 
163
                                        <?php echo $pcStrings["5.1"]?>: 
 
164
                                        <select name="font_family">
 
165
                                        <option></option>
 
166
                                        <option value="other"><?php echo $prefsStrings["3.8"] ?>
 
167
                                        <?php
 
168
                                        $fonts = array("Arial, Helvetica, sans-serif","Times New Roman, Times, serif","Courier New, Courier, mono",
 
169
                                                        "Georgia, Times New Roman, Times, serif","Verdana, Arial, Helvetica, sans-serif",
 
170
                                                        "Geneva, Arial, Helvetica, sans-serif", "Bitstream Vera Sans");
 
171
                                        while ( list($k, $font) = each($fonts) ){
 
172
                                                echo "<option ".($font==$my_colors["font_family"]?"SELECTED":"").">$font\n";
 
173
                                        }
 
174
                                        ?>
 
175
                                        </select><br>
 
176
                                        <?php
 
177
                                        echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
 
178
                                        if (!in_array($my_colors["font_family"], $fonts)) $show_other_font = $my_colors["font_family"];
 
179
                                        else $show_other_font="";
 
180
                                        echo $prefsStrings["3.8"].": <input type=\"text\" name=\"font_family_other\" value=\"$show_other_font\" size=20><p>\n";
 
181
                                        pc_ShowField($pcStrings["5.2"], "font_size");
 
182
                                        pc_ShowField($pcStrings["5.3"], "small_font_size");
 
183
                                        pc_ShowField($pcStrings["5.4"], "menu_font_size");
 
184
                                        pc_ShowField($pcStrings["5.5"], "folderlist_font_size");
 
185
                                        ?>
 
186
                                        <!--
 
187
                                        <br><?php echo $pcStrings["5.2"]?>: <input type="text" name="font_size" value="<?php echo $my_colors["font_size"]?>" size=7>
 
188
                                        <br><?php echo $pcStrings["5.3"]?>: <input type="text" name="small_font_size" value="<?php echo $my_colors["small_font_size"]?>" size=7>
 
189
                                        <br><?php echo $pcStrings["5.4"]?>: <input type="text" name="menu_font_size" value="<?php echo $my_colors["menu_font_size"]?>" size=7>
 
190
                                        //-->
 
191
                                </td></tr></table>
 
192
                        </td>
 
193
                        <td width="50%">
 
194
                                <!--
 
195
                <table border="0" cellspacing="1" cellpadding="1" bgcolor="<?php echo $my_colors["main_hilite"]?>" width="95%">
 
196
                <tr bgcolor="<?php echo $my_colors["main_head_bg"]?>"><td><b class="tblheader"><?php echo $pcStrings["4.0"]?></b></td></tr>
 
197
                <tr bgcolor="<?php echo $my_colors["main_bg"]?>"><td>
 
198
                                        <?php echo $pcStrings["4.1"]?>: <input type="text" name="quotes" value="<?php echo $my_colors["quotes"]; ?>" size=7>
 
199
                                </td></tr></table>
 
200
                                //-->
 
201
                        </td>
 
202
                        </tr>
 
203
 
 
204
                </table>
 
205
                        <!--
 
206
                        <input type="submit" name="update" value="<?php echo $prefsButtonStrings[0]?>">
 
207
                        //-->
 
208
                        <input type="submit" name="apply" value="<?php echo $prefsButtonStrings[1]?>">
 
209
                        <input type="submit" name="cancel" value="<?php echo $prefsButtonStrings[2]?>">
 
210
                        <input type="submit" name="revert" value="<?php echo $prefsButtonStrings[3]?>">
 
211
                </form>
 
212
                
 
213
</BODY></HTML>