]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - install/installHelp.php
Release 6.4.0
[Github/sugarcrm.git] / install / installHelp.php
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38
39
40 class HelpItem {
41    var $associated_field = '';
42    var $title = '';
43    var $text = '';
44 }
45
46 function &help_menu_html() {
47    $str =<<<HEREDOC_END
48                 <div>SugarCRM Install Help</div>
49                 <ul>
50                 <li><a href="$_SERVER[PHP_SELF]?step=1">Step 1: Prerequisite checks</a></li>
51                 <li><a href="$_SERVER[PHP_SELF]?step=2">Step 2: Database configuration</a></li>
52                 <li><a href="$_SERVER[PHP_SELF]?step=3">Step 3: Site configuration</a></li>
53                 <li><a href="$_SERVER[PHP_SELF]?step=4">Step 4: Saving config file and setting up the database</a></li>
54                 <li><a href="$_SERVER[PHP_SELF]?step=5">Step 5: Registration</a></li>
55                 </ul>
56 HEREDOC_END;
57    return $str;
58 }
59
60 function &format_help_items(&$help_items)
61 {
62    $str = '<table>';
63
64    foreach($help_items as $help_item)
65    {
66       $str .= <<< HEREDOC_END
67 <tr><td><b>$help_item->title</b></td></tr>
68 <tr><td>$help_item->text</td></tr>
69 HEREDOC_END;
70    }
71
72    $str .= '</table>';
73
74    return $str;
75 }
76
77 function &help_step_1_html()
78 {
79    $help_items = array();
80
81    $help_item = new HelpItem();
82    $help_item->title = 'PHP Version';
83    $help_item->text = <<< HEREDOC_END
84 The version of PHP installed must be 4.3.x or 5.x.
85 HEREDOC_END;
86
87    $help_items[] = $help_item;
88
89    $help_item = new HelpItem();
90    $help_item->title = 'MySQL Database';
91    $help_item->text = <<< HEREDOC_END
92 Checking that the MySQL API is accessible.
93 HEREDOC_END;
94
95    $help_items[] = $help_item;
96
97    $help_item = new HelpItem();
98    $help_item->title = 'SugarCRM Configuration File';
99    $help_item->text = <<< HEREDOC_END
100 The configuration file (config.php) must be writable.
101 HEREDOC_END;
102
103    $help_items[] = $help_item;
104
105    $help_item = new HelpItem();
106    $help_item->title = 'Cache Sub-Directories';
107    $help_item->text = <<< HEREDOC_END
108 All the sub-directories beneath the cache directory (cache) must be
109 writable.
110 HEREDOC_END;
111
112    $help_items[] = $help_item;
113
114    $help_item = new HelpItem();
115    $help_item->title = 'Session Save Path';
116    $help_item->text = <<< HEREDOC_END
117 The session save path specified in the PHP initialization file (php.ini)
118 as session_save_path must exist and be writable.
119 HEREDOC_END;
120
121    $help_items[] = $help_item;
122
123    $str =format_help_items($help_items);
124    return $str;
125 }
126
127 function &help_step_2_html()
128 {
129    $help_items = array();
130
131    $help_item = new HelpItem();
132    $help_item->title = 'Host Name';
133    $help_item->text = <<< HEREDOC_END
134 TODO
135 HEREDOC_END;
136
137    $help_items[] = $help_item;
138
139    $help_item = new HelpItem();
140    $help_item->title = 'Database Name';
141    $help_item->text = <<< HEREDOC_END
142 TODO
143 HEREDOC_END;
144
145    $help_items[] = $help_item;
146
147    $help_item = new HelpItem();
148    $help_item->title = 'Create Database';
149    $help_item->text = <<< HEREDOC_END
150 TODO
151 HEREDOC_END;
152
153    $help_items[] = $help_item;
154
155    $help_item = new HelpItem();
156    $help_item->title = 'User Name for SugarCRM';
157    $help_item->text = <<< HEREDOC_END
158 TODO
159 HEREDOC_END;
160
161    $help_items[] = $help_item;
162
163    $help_item = new HelpItem();
164    $help_item->title = 'Create User';
165    $help_item->text = <<< HEREDOC_END
166 TODO
167 HEREDOC_END;
168
169    $help_items[] = $help_item;
170
171    $help_item = new HelpItem();
172    $help_item->title = 'Password for SugarCRM';
173    $help_item->text = <<< HEREDOC_END
174 TODO
175 HEREDOC_END;
176
177    $help_items[] = $help_item;
178
179    $help_item = new HelpItem();
180    $help_item->title = 'Re-Type Password for SugarCRM';
181    $help_item->text = <<< HEREDOC_END
182 TODO
183 HEREDOC_END;
184
185    $help_items[] = $help_item;
186
187    $help_item = new HelpItem();
188    $help_item->title = 'Drop and recreate existing SugarCRM tables?';
189    $help_item->text = <<< HEREDOC_END
190 TODO
191 HEREDOC_END;
192
193    $help_items[] = $help_item;
194
195    $help_item = new HelpItem();
196    $help_item->title = 'Populate database with demo data?';
197    $help_item->text = <<< HEREDOC_END
198 TODO
199 HEREDOC_END;
200
201    $help_items[] = $help_item;
202
203    $help_item = new HelpItem();
204    $help_item->title = 'Database Admin User Name';
205    $help_item->text = <<< HEREDOC_END
206 TODO
207 HEREDOC_END;
208
209    $help_items[] = $help_item;
210
211    $help_item = new HelpItem();
212    $help_item->title = 'Database Admin Password';
213    $help_item->text = <<< HEREDOC_END
214 TODO
215 HEREDOC_END;
216
217    $help_items[] = $help_item;
218
219    $str =format_help_items($help_items);
220    return $str;
221 }
222
223 function &help_step_3_html()
224 {
225    $help_items = array();
226
227    $help_item = new HelpItem();
228    $help_item->title = 'URL';
229    $help_item->text = <<< HEREDOC_END
230 TODO
231 HEREDOC_END;
232
233    $help_items[] = $help_item;
234
235    $help_item = new HelpItem();
236    $help_item->title = 'SugarCRM Admin Password';
237    $help_item->text = <<< HEREDOC_END
238 TODO
239 HEREDOC_END;
240
241    $help_items[] = $help_item;
242
243    $help_item = new HelpItem();
244    $help_item->title = 'Re-type SugarCRM Admin Password';
245    $help_item->text = <<< HEREDOC_END
246 TODO
247 HEREDOC_END;
248
249    $help_items[] = $help_item;
250
251    $help_item = new HelpItem();
252    $help_item->title = 'Allow SugarCRM to collect anonymous usage information?';
253    $help_item->text = <<< HEREDOC_END
254 TODO
255 HEREDOC_END;
256
257    $help_items[] = $help_item;
258
259    $help_item = new HelpItem();
260    $help_item->title = 'Use a Custom Session Directory for SugarCRM';
261    $help_item->text = <<< HEREDOC_END
262 TODO
263 HEREDOC_END;
264
265    $help_items[] = $help_item;
266
267    $help_item = new HelpItem();
268    $help_item->title = 'Path to Session Directory';
269    $help_item->text = <<< HEREDOC_END
270 TODO
271 HEREDOC_END;
272
273    $help_items[] = $help_item;
274
275    $help_item = new HelpItem();
276    $help_item->title = 'Provide Your Own Application ID';
277    $help_item->text = <<< HEREDOC_END
278 TODO
279 HEREDOC_END;
280
281    $help_items[] = $help_item;
282
283    $help_item = new HelpItem();
284    $help_item->title = 'Application ID';
285    $help_item->text = <<< HEREDOC_END
286 TODO
287 HEREDOC_END;
288
289    $help_items[] = $help_item;
290
291    $str =format_help_items($help_items);
292    return $str;
293 }
294
295 function &help_step_4_html()
296 {
297    $help_items = array();
298
299    $help_item = new HelpItem();
300    $help_item->title = 'Perform Install';
301    $help_item->text = <<< HEREDOC_END
302 TODO
303 HEREDOC_END;
304
305    $help_items[] = $help_item;
306
307    $str =format_help_items($help_items);
308    return $str;
309 }
310
311 function &help_step_5_html()
312 {
313    $help_items = array();
314
315    $help_item = new HelpItem();
316    $help_item->title = 'Registration';
317    $help_item->text = <<< HEREDOC_END
318 TODO
319 HEREDOC_END;
320
321    $help_items[] = $help_item;
322
323    $str =format_help_items($help_items);
324    return $str;
325 }
326
327 ?>
328
329 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
330 <html <?php get_language_header(); ?>>
331 <head>
332    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
333    <meta http-equiv="Content-Style-Type" content="text/css">
334    <title>SugarCRM Install Help</title>
335    <link rel="stylesheet" href="install/install.css" type="text/css" />
336 </head>
337 <body>
338 <?php
339 if(isset($_GET['step']))
340 {
341    switch($_GET['step'])
342    {
343       case 1:
344          echo help_step_1_html();
345       break;
346       case 2:
347          echo help_step_2_html();
348       break;
349       case 3:
350          echo help_step_3_html();
351       break;
352       case 4:
353          echo help_step_4_html();
354       break;
355       case 5:
356          echo help_step_5_html();
357       break;
358       default:
359          echo help_menu_html();
360       break;
361    }
362 }
363 else
364 {
365    echo help_menu_html();
366 }
367 ?>
368
369 <form>
370    <input type="button" value="Close" onclick="javascript:window.close();" />
371 </form>
372 </body>
373 </html>