Skip to content
Newer
Older
100644 196 lines (145 sloc) 5.47 KB
3549785 @thomascube First steps to implement an installer
thomascube authored
1 <form action="index.php" method="post">
2 <input type="hidden" name="_step" value="2" />
3 <?php
4
5 ini_set('display_errors', 1);
6 require_once '../program/include/rcube_html.inc';
7
8 ?>
9 <fieldset>
10 <legend>General configuration</legend>
11 <dl>
12 <!--
13 <dt class="propname">debug_level</dt>
14 <dd>
15 <?php
16 /*
17 $value = $RCI->getprop('debug_level');
18 $check_debug = new checkbox(array('name' => '_debug_level[]'));
19 echo $check_debug->show(($value & 1) ? 1 : 0 , array('value' => 1, 'id' => 'cfgdebug1'));
20 echo '<label for="cfgdebug1">Log errors</label><br />';
21
22 echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4'));
23 echo '<label for="cfgdebug4">Display errors</label><br />';
24
25 echo $check_debug->show(($value & 8) ? 8 : 0, array('value' => 8, 'id' => 'cfgdebug8'));
26 echo '<label for="cfgdebug8">Verbose display</label><br />';
27 */
28 ?>
29 </dd>
30 -->
31
32 <dt class="propname">product_name</dt>
33 <dd>
34 <?php
35
36 $input_prodname = new textfield(array('name' => '_product_name', 'size' => 30, 'id' => "cfgprodname"));
37 echo $input_prodname->show($RCI->getprop('product_name'));
38
39 ?>
40 <div>The name of your service (used to compose page titles)</div>
41 </dd>
42
43 <dt class="propname">skin_path</dt>
44 <dd>
45 <?php
46
47 $input_skinpath = new textfield(array('name' => '_skin_path', 'size' => 30, 'id' => "cfgskinpath"));
48 echo $input_skinpath->show($RCI->getprop('skin_path'));
49
50 ?>
51 <div>Relative path to the skin folder</div>
52 </dd>
53
54 <dt class="propname">temp_dir</dt>
55 <dd>
56 <?php
57
58 $input_tempdir = new textfield(array('name' => '_temp_dir', 'size' => 30, 'id' => "cfgtempdir"));
59 echo $input_tempdir->show($RCI->getprop('temp_dir'));
60
61 ?>
62 <div>Use this folder to store temp files (must be writebale for webserver)</div>
63 </dd>
64
65 <dt class="propname">log_dir</dt>
66 <dd>
67 <?php
68
69 $input_logdir = new textfield(array('name' => '_log_dir', 'size' => 30, 'id' => "cfglogdir"));
70 echo $input_logdir->show($RCI->getprop('log_dir'));
71
72 ?>
73 <div>Use this folder to store log files (must be writebale for webserver)</div>
74 </dd>
75
76 <dt class="propname">ip_check</dt>
77 <dd>
78 <?php
79
80 $check_ipcheck = new checkbox(array('name' => '_ip_check', 'id' => "cfgipcheck"));
81 echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1));
82
83 ?>
84 <label for="cfgipcheck">Check client IP in session athorization</label><br />
85
86 <p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changeing IPs.</p>
87 </dd>
88
89 <dt class="propname">des_key</dt>
90 <dd>
91 <?php
92
93 $input_deskey = new textfield(array('name' => '_des_key', 'size' => 30, 'id' => "cfgdeskey"));
94 echo $input_deskey->show($RCI->getprop('des_key'));
95
96 ?>
97 <div>This key is used to encrypt the users imap password before storing in the session record</div>
98 <p class="hint">It's a random generated string to ensure that every installation has it's own key.
99 If you enter it manually please provide a string of exactly 24 chars.</p>
100 </dd>
101
102 <dt class="propname">enable_caching</dt>
103 <dd>
104 <?php
105
106 $check_caching = new checkbox(array('name' => '_enable_caching', 'id' => "cfgcache"));
107 echo $check_caching->show(intval($RCI->getprop('enable_caching')), array('value' => 1));
108
109 ?>
110 <label for="cfgcache">Cache messages in local database</label><br />
111 </dd>
112
113 </dl>
114 </fieldset>
115
116 <fieldset>
6557d30 @thomascube Added environment checks from check.php-dist
thomascube authored
117 <legend>Database setup</legend>
118 <dl>
119 <dd>TBD.</dd>
120 </dl>
121 </fieldset>
122
123 <fieldset>
3549785 @thomascube First steps to implement an installer
thomascube authored
124 <legend>IMAP Settings</legend>
125 <dl>
126 <dt class="propname">auto_create_user</dt>
127 <dd>
128 <?php
129
130 $check_autocreate = new checkbox(array('name' => '_auto_create_user', 'id' => "cfgautocreate"));
131 echo $check_autocreate->show(intval($RCI->getprop('auto_create_user')), array('value' => 1));
132
133 ?>
134 <label for="cfgautocreate">Automatically create a new RoundCube user when log-in the first time</label><br />
135
136 <p class="hint">A user is authenticated by the IMAP server but it requires a local record to store settings
137 and contacts. With this option enabled a new user record will automatically be created once the IMAP login succeeds.</p>
138
139 <p class="hint">If this option is disabled, the login only succeeds if there's a matching user-record in the local RoundCube database
140 what means that you have to create those records manually or disable this option after the first login.</p>
141 </dd>
142
143 </dl>
144 </fieldset>
145
146 <fieldset>
147 <legend>SMTP Settings</legend>
148 <dl>
149 <dd>TBD.</dd>
150 </dl>
151 </fieldset>
152
153 <fieldset>
154 <legend>Display settings</legend>
155 <dl>
156
157 <dt class="propname">locale_string</dt>
158 <dd>
159 <?php
160
161 $input_locale = new textfield(array('name' => '_locale_string', 'size' => 6, 'id' => "cfglocale"));
162 echo $input_locale->show($RCI->getprop('locale_string'));
163
164 ?>
165 <div>The default locale setting. This also defines the language of the login screen.</div>
166 <p class="hint">Enter a <a href="http://www.faqs.org/rfcs/rfc1766">RFC1766</a> formatted locale name. Examples: en_US, de, de_CH, fr, pt_BR</p>
167 </dd>
168
169 </dl>
170 </fieldset>
171
172 <?php
173
174 echo '<p><input type="submit" name="submit" value="UPDATE" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>';
175
176
177 if (!empty($_POST['submit'])) {
178 echo "<hr />\n";
179
180 echo '<p class="notice">Copy the following configurations and save them in two files (names above the text box)';
181 echo ' within the <tt>config/</tt> directory of your RoundCube installation.</p>';
182
183 $textbox = new textarea(array('rows' => 20, 'cols' => 60, 'class' => "configfile"));
184
185 echo '<div><em>main.inc.php</em></div>';
186 echo $textbox->show($RCI->create_config('main'));
187
188 echo '<div style="margin-top:1em"><em>db.inc.php</em></div>';
189 echo $textbox->show($RCI->create_config('db'));
190
191 echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
192 }
193
194 ?>
195 </form>
Something went wrong with that request. Please try again.