Warning message added (criterion grading with only one criterion)
[moodle.git] / install.php
CommitLineData
8b5b1028 1<?php /// $Id$
2 /// install.php - helps admin user to create a config.php file
3
4/// If config.php exists already then we are not needed.
5
51e3e0b9 6if (file_exists('./config.php')) {
8b5b1028 7 header('Location: index.php');
51e3e0b9 8 die;
8b5b1028 9} else {
10 $configfile = './config.php';
11}
12
13///==========================================================================//
14/// We are doing this in stages
8d783716 15/// 0. Welcome and language settings
16/// 1. Compatibility
8b5b1028 17/// 2. Database settings
18/// 3. Host settings
19/// 4. Administration directory name
20/// 5. Save or display the settings
21/// 6. Redirect to index.php
22///==========================================================================//
23
24
8d783716 25
8b5b1028 26/// Begin the session as we are holding all information in a session
27/// variable until the end.
28
29session_name('MoodleSession');
30@session_start();
31
32if (! isset($_SESSION['INSTALL'])) {
33 $_SESSION['INSTALL'] = array();
34}
35
36$INSTALL = &$_SESSION['INSTALL']; // Makes it easier to reference
37
8d783716 38
39/// If it's our first time through this script then we need to set some default values
40
41if ( empty($INSTALL['language']) and empty($_POST['language']) ) {
8b5b1028 42
43 /// set defaults
44 $INSTALL['language'] = 'en';
45
46 $INSTALL['dbhost'] = 'localhost';
47 $INSTALL['dbuser'] = '';
48 $INSTALL['dbpass'] = '';
49 $INSTALL['dbtype'] = 'mysql';
50 $INSTALL['dbname'] = 'moodle';
51 $INSTALL['prefix'] = 'mdl_';
52
53 $INSTALL['wwwroot'] = '';
54 $INSTALL['dirroot'] = dirname(__FILE__);
55 $INSTALL['dataroot'] = dirname(dirname(__FILE__)) . '/moodledata';
56
57 $INSTALL['admindirname'] = 'admin';
58
8d783716 59 $INSTALL['stage'] = 0;
8b5b1028 60}
61
62
63
64//==========================================================================//
65
66/// Fake some settings so that we can use selected functions from moodlelib.php and weblib.php
8d783716 67
8b5b1028 68$SESSION->lang = (!empty($_POST['language'])) ? $_POST['language'] : $INSTALL['language'];
69$CFG->dirroot = $INSTALL['dirroot'];
70$CFG->dataroot = $INSTALL['dataroot'];
71$CFG->directorypermissions = 0777;
72
73
8d783716 74/// Include some moodle libraries
75
8b5b1028 76require_once('./lib/moodlelib.php');
77require_once('./lib/weblib.php');
78require_once('./lib/adodb/adodb.inc.php');
79
80
81/// guess the www root
82if ($INSTALL['wwwroot'] == '') {
83 list($INSTALL['wwwroot'], $xtra) = explode('/install.php', qualified_me());
84}
85
8d783716 86$stagetext = array(0 => get_string('chooselanguage', 'install'),
87 get_string('compatibilitysettings', 'install'),
88 get_string('directorysettings', 'install'),
89 get_string('databasesettings', 'install'),
90 get_string('admindirsetting', 'install'),
91 get_string('configurationcomplete', 'install')
8b5b1028 92 );
93
94
8d783716 95
96
97//==========================================================================//
98
99/// Are we in help mode?
100
101if (isset($_GET['help'])) {
102 $nextstage = -1;
103}
104
105
51e3e0b9 106
edd3a5db 107//==========================================================================//
108
51e3e0b9 109/// Are we in config download mode?
edd3a5db 110
51e3e0b9 111if (isset($_GET['download'])) {
112 header("Content-Type: application/download\n");
113 header("Content-Disposition: attachment; filename=\"config.php\"");
114 echo $INSTALL['config'];
115 exit;
edd3a5db 116}
8d783716 117
51e3e0b9 118
119
8b5b1028 120//==========================================================================//
121
122/// Was data submitted?
8d783716 123
124if (isset($_POST['stage'])) {
8b5b1028 125
126 /// Get the stage for which the form was set and the next stage we are going to
127
128
129 if ( $goforward = (! empty( $_POST['next'] )) ) {
130 $nextstage = $_POST['stage'] + 1;
131 } else {
132 $nextstage = $_POST['stage'] - 1;
133 }
51e3e0b9 134
8d783716 135 if ($nextstage < 0) $nextstage = 0;
51e3e0b9 136
8b5b1028 137
138 /// Store any posted data
139 foreach ($_POST as $setting=>$value) {
140 $INSTALL[$setting] = $value;
141 }
51e3e0b9 142
8b5b1028 143} else {
144
145 $goforward = true;
8d783716 146 $nextstage = 0;
51e3e0b9 147
8b5b1028 148}
149
150
151
152//==========================================================================//
153
154/// Check the directory settings
8d783716 155
8b5b1028 156if ($INSTALL['stage'] == 2) {
157
158 error_reporting(0);
51e3e0b9 159
160
161 /// check dirroot
162 if (($fh = @fopen($INSTALL['dirroot'].'/install.php', 'r')) === false ) {
163 $CFG->dirroot = dirname(__FILE__);
164 $INSTALL['dirroot'] = dirname(__FILE__);
165 $errormsg = get_string('dirrooterror', 'install');
8b5b1028 166 } else {
167 fclose($fh);
51e3e0b9 168
169 $CFG->dirroot = $INSTALL['dirroot'];
cd0e958e 170
51e3e0b9 171 /// check wwwroot
172 if (($fh = @fopen($INSTALL['wwwroot'].'/install.php', 'r')) === false) {
173 $errormsg = get_string('wwwrooterror', 'install');
8b5b1028 174 } else {
175 fclose($fh);
cd0e958e 176
8b5b1028 177 /// check dataroot
178 $CFG->dataroot = $INSTALL['dataroot'];
179 if (make_upload_directory('sessions', false) === false ) {
180 $errormsg = get_string('datarooterror', 'install');
51e3e0b9 181 }
8b5b1028 182 }
183 }
51e3e0b9 184
8b5b1028 185
186 if (!empty($errormsg)) $nextstage = 2;
187
188 error_reporting(7);
189}
190
191
192
193//==========================================================================//
194
195/// Check database settings if stage 3 data submitted
196/// Try to connect to the database. If that fails then try to create the database
8d783716 197
8b5b1028 198if ($INSTALL['stage'] == 3) {
199
200 if (empty($INSTALL['dbname'])) {
201 $INSTALL['dbname'] = 'moodle';
202 }
51e3e0b9 203
8d783716 204 /// different format for postgres7 by socket
205 if ($INSTALL['dbtype'] == 'postgres7' and ($INSTALL['dbhost'] == 'localhost' || $INSTALL['dbhost'] == '127.0.0.1')) {
8b5b1028 206 $INSTALL['dbhost'] = "user='{$INSTALL['dbuser']}' password='{$INSTALL['dbpass']}' dbname='{$INSTALL['dbname']}'";
8d783716 207 $INSTALL['dbuser'] = '';
208 $INSTALL['dbpass'] = '';
209 $INSTALL['dbname'] = '';
210
8b5b1028 211 if ($INSTALL['prefix'] == '') { /// must have a prefix
212 $INSTALL['prefix'] = 'mdl_';
213 }
214 }
215
216 $db = &ADONewConnection($INSTALL['dbtype']);
217
51e3e0b9 218 error_reporting(0); // Hide errors
219
94ba66ce 220 if (! $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname'])) {
8b5b1028 221 /// The following doesn't seem to work but we're working on it
51e3e0b9 222 /// If you come up with a solution for creating a database in MySQL
8b5b1028 223 /// feel free to put it in and let us know
224 if ($dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'])) {
225 switch ($INSTALL['dbtype']) { /// Try to create a database
226 case 'mysql':
227 if ($db->Execute("CREATE DATABASE {$INSTALL['dbname']};")) {
228 $dbconnected = $db->Connect($INSTALL['dbhost'],$INSTALL['dbuser'],$INSTALL['dbpass'],$INSTALL['dbname']);
229 } else {
230 $errormsg = get_string('dbcreationerror', 'install');
231 $nextstage = 3;
232 }
233 break;
234 }
235 }
236 }
237
238 error_reporting(7);
239
240 if (($dbconnected === false) and (empty($errormsg)) ) {
241 $errormsg = get_string('dbconnectionerror', 'install');
242 $nextstage = 3;
243 }
244}
245
246
247
248//==========================================================================//
249
250/// If the next stage is admin directory settings OR we have just come from there then
251/// check the admin directory.
252/// If we can open a file then we know that the admin name is correct.
253
254if ($nextstage == 4 or $INSTALL['stage'] == 4) {
255 if (($fh = @fopen($INSTALL['wwwroot'].'/'.$INSTALL['admindirname'].'/site.html', 'r')) !== false) {
256 $nextstage = ($goforward) ? 5 : 3;
257 fclose($fh);
258 } else {
259 if ($nextstage != 4) {
260 $errormsg = get_string('admindirerror', 'install');
261 $nextstage = 4;
262 }
263 }
264}
265
266
267
268//==========================================================================//
269
270/// Display or print the data
271/// Put the data into a string
272/// Try to open config file for writing.
8d783716 273
8b5b1028 274if ($nextstage == 5) {
51e3e0b9 275
276 $str = '<?php /// Moodle Configuration File '."\r\n";
277 $str .= "\r\n";
278
279 $str .= 'unset($CFG);'."\r\n";
280 $str .= "\r\n";
281
282 $str .= '$CFG->dbtype = \''.$INSTALL['dbtype']."';\r\n";
283 $str .= '$CFG->dbhost = \''.$INSTALL['dbhost']."';\r\n";
284 if ($INSTALL['dbtype'] == 'mysql') {
285 $str .= '$CFG->dbname = \''.$INSTALL['dbname']."';\r\n";
286 $str .= '$CFG->dbuser = \''.$INSTALL['dbuser']."';\r\n";
287 $str .= '$CFG->dbpass = \''.$INSTALL['dbpass']."';\r\n";
288 }
289 $str .= '$CFG->dbpersist = false;'."\r\n";
290 $str .= '$CFG->prefix = \''.$INSTALL['prefix']."';\r\n";
291 $str .= "\r\n";
292
293 $str .= '$CFG->wwwroot = \''.$INSTALL['wwwroot']."';\r\n";
294 $str .= '$CFG->dirroot = \''.$INSTALL['dirroot']."';\r\n";
295 $str .= '$CFG->dataroot = \''.$INSTALL['dataroot']."';\r\n";
296 $str .= "\r\n";
297
298 $str .= '$CFG->directorypermissions = 0777;'."\r\n";
299 $str .= "\r\n";
300
301 $str .= 'require_once("$CFG->dirroot/lib/setup.php");'."\r\n";
302 $str .= '// MAKE SURE WHEN YOU EDIT THIS FILE THAT THERE ARE NO SPACES, BLANK LINES,'."\r\n";
303 $str .= '// RETURNS, OR ANYTHING ELSE AFTER THE TWO CHARACTERS ON THE NEXT LINE.'."\r\n";
304 $str .= '?>';
305
8b5b1028 306 if (( $configsuccess = ($fh = @fopen($configfile, 'w')) ) !== false) {
307 fwrite($fh, $str);
308 fclose($fh);
309 }
51e3e0b9 310
311 $INSTALL['config'] = $str;
8b5b1028 312}
313
314
315
316//==========================================================================//
317
318?>
319
320
321
322<html dir="<?php echo (get_string('this_direction') == 'rtl') ? 'rtl' : 'ltr' ?>">
323<head>
324<link rel="shortcut icon" href="http://moodle.dougiamas.net/theme/standard/favicon.ico" />
325<title>Moodle Install</title>
326<meta http-equiv="content-type" content="text/html; charset=<?php print_string('thischarset') ?>" />
327<?php css_styles() ?>
328
329</head>
330
331<body>
332
8d783716 333
334<?php
335if (isset($_GET['help'])) {
336 print_install_help($_GET['help']);
51e3e0b9 337 close_window_button();
8d783716 338} else {
339?>
340
8b5b1028 341
342<table class="main" align="center" cellpadding="3" cellspacing="0">
343 <tr>
8d783716 344 <td class="td_mainlogo">
345 <p class="p_mainlogo"><img src="pix/moodlelogo-med.gif" width="240" height="60"></p>
346 </td>
347 <td class="td_mainlogo" valign="bottom">
348 <p class="p_mainheader"><?php print_string('installation', 'install') ?></p>
349 </td>
350 </tr>
351
352 <tr>
353 <td class="td_mainheading" colspan="2">
354 <p class="p_mainheading"><?php echo $stagetext[$nextstage] ?></p>
355 </td>
8b5b1028 356 </tr>
357
358 <tr>
8d783716 359 <td class="td_main" colspan="2">
51e3e0b9 360
8b5b1028 361<?php
362
363if (!empty($errormsg)) echo "<p class=\"errormsg\" align=\"center\">$errormsg</p>\n";
364
365
366if ($nextstage == 5) {
51e3e0b9 367 $INSTALL['stage'] = 0;
368 $options = array();
369 $options['lang'] = $INSTALL['language'];
8b5b1028 370 if ($configsuccess) {
371 echo "<p>".get_string('configfilewritten', 'install')."</p>\n";
51e3e0b9 372
373 echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n";
374 echo "<tr>\n";
375 echo "<td width=\"33.3%\">&nbsp;</td>\n";
376 echo "<td width=\"33.3%\">&nbsp;</td>\n";
377 echo "<td width=\"33.3%\" align=\"right\">\n";
378 print_single_button("index.php", $options, get_string('continue')." &raquo;");
379 echo "</td>\n";
380 echo "</tr>\n";
381 echo "</table>\n";
382
8b5b1028 383 } else {
51e3e0b9 384 echo "<p class=\"errormsg\">".get_string('configfilenotwritten', 'install')."</p>";
385
386 echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n";
387 echo "<tr>\n";
388 echo "<td width=\"33.3%\">&nbsp;</td>\n";
389 echo "<td width=\"33.3%\" align=\"center\">\n";
390 $installoptions = array();
391 $installoptions['download'] = 1;
392 print_single_button("install.php", $installoptions, get_string('download', 'install'));
393 echo "</td>\n";
394 echo "<td width=\"33.3%\" align=\"right\">\n";
395 print_single_button("index.php", $options, get_string('continue')." &raquo;");
396 echo "</td>\n";
397 echo "</tr>\n";
398 echo "</table>\n";
399
8b5b1028 400 echo "<hr />\n";
51e3e0b9 401 echo "<div style=\"text-align: left\">\n";
402 print_object(htmlentities($str));
403 echo "</div>\n";
8b5b1028 404 }
8b5b1028 405} else {
406 $formaction = (isset($_GET['configfile'])) ? "install.php?configfile=".$_GET['configfile'] : "install.php";
407 form_table($nextstage, $formaction);
408}
409
410?>
411
412 </td>
413 </tr>
414</table>
415
8d783716 416<?php
417}
418?>
419
8b5b1028 420</body>
421</html>
422
423
424
425
426
427
428
429
430
431
51e3e0b9 432<?php
8b5b1028 433
434//==========================================================================//
435
436
437function print_object($object) {
438 echo "<pre>\n";
439 print_r($object);
440 echo "</pre>\n";
441}
442
443
444
445//==========================================================================//
446
8d783716 447function form_table($nextstage = 0, $formaction = "install.php") {
8b5b1028 448 global $INSTALL;
449
450 /// standard lines for all forms
451?>
452
453 <form name="installform" method="post" action="<?php echo $formaction ?>">
454 <input type="hidden" name="stage" value="<?php echo $nextstage ?>" />
455 <table class="install_table" cellspacing="3" cellpadding="3" align="center">
456
457<?php
458 /// what we do depends on the stage we're at
459 switch ($nextstage) {
8d783716 460 case 0: /// Language settings
8b5b1028 461?>
462 <tr>
463 <td class="td_left"><p><?php print_string('language') ?></p></td>
464 <td class="td_right">
465 <?php choose_from_menu (get_list_of_languages(), 'language', $INSTALL['language'], '') ?>
466 </td>
467 </tr>
468
469<?php
8d783716 470 break;
471 case 1: /// Compatibilty check
472 $compatsuccess = true;
51e3e0b9 473
8d783716 474 /// Check that PHP is of a sufficient version
51e3e0b9 475 print_compatibility_row(check_php_version("4.1.0"), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'), 'phpversionhelp');
8d783716 476 /// Check session auto start
477 print_compatibility_row(!ini_get_bool('session.auto_start'), get_string('sessionautostart', 'install'), get_string('sessionautostarterror', 'install'), 'sessionautostarthelp');
8d783716 478 /// Check magic quotes
479 print_compatibility_row(!ini_get_bool('magic_quotes_runtime'), get_string('magicquotesruntime', 'install'), get_string('magicquotesruntimeerror', 'install'), 'magicquotesruntimehelp');
51e3e0b9 480 /// Check safe mode
481 print_compatibility_row(!ini_get_bool('safe_mode'), get_string('safemode', 'install'), get_string('safemodeerror', 'install'), 'safemodehelp', true);
8d783716 482 /// Check file uploads
51e3e0b9 483 print_compatibility_row(ini_get_bool('file_uploads'), get_string('fileuploads', 'install'), get_string('fileuploadserror', 'install'), 'fileuploadshelp', true);
8d783716 484 /// Check GD version
51e3e0b9 485 print_compatibility_row(check_gd_version(), get_string('gdversion', 'install'), get_string('gdversionerror', 'install'), 'gdversionhelp', true);
8d783716 486 /// Check memory limit
51e3e0b9 487 print_compatibility_row(check_memory_limit(), get_string('memorylimit', 'install'), get_string('memorylimiterror', 'install'), 'memorylimithelp', true);
8d783716 488
489
8b5b1028 490 break;
491 case 2: /// Directory settings
492?>
493
494 <tr>
495 <td class="td_left"><p><?php print_string('wwwroot', 'install') ?></p></td>
496 <td class="td_right">
497 <input type="text" size="40"name="wwwroot" value="<?php echo $INSTALL['wwwroot'] ?>" />
498 </td>
499 </tr>
500 <tr>
501 <td class="td_left"><p><?php print_string('dirroot', 'install') ?></p></td>
502 <td class="td_right">
503 <input type="text" size="40" name="dirroot" value="<?php echo $INSTALL['dirroot'] ?>" />
504 </td>
505 </tr>
506 <tr>
507 <td class="td_left"><p><?php print_string('dataroot', 'install') ?></p></td>
508 <td class="td_right">
509 <input type="text" size="40" name="dataroot" value="<?php echo $INSTALL['dataroot'] ?>" />
510 </td>
511 </tr>
512
513<?php
514 break;
515 case 3: /// Database settings
516?>
517
518 <tr>
519 <td class="td_left"><p><?php print_string('dbtype', 'install') ?></p></td>
520 <td class="td_right">
521 <?php choose_from_menu (array("mysql" => "mysql", "postgres7" => "postgres7"), 'dbtype', $INSTALL['dbtype'], '') ?>
522 </td>
523 </tr>
524 <tr>
525 <td class="td_left"><p><?php print_string('dbhost', 'install') ?></p></td>
526 <td class="td_right">
527 <input type="text" size="40" name="dbhost" value="<?php echo $INSTALL['dbhost'] ?>" />
528 </td>
529 </tr>
530 <tr>
531 <td class="td_left"><p><?php print_string('database', 'install') ?></p></td>
532 <td class="td_right">
533 <input type="text" size="40" name="dbname" value="<?php echo $INSTALL['dbname'] ?>" />
534 </td>
535 </tr>
536 <tr>
537 <td class="td_left"><p><?php print_string('user') ?></p></td>
538 <td class="td_right">
539 <input type="text" size="40" name="dbuser" value="<?php echo $INSTALL['dbuser'] ?>" />
540 </td>
541 </tr>
542 <tr>
543 <td class="td_left"><p><?php print_string('password') ?></p></td>
544 <td class="td_right">
545 <input type="text" size="40" name="dbpass" value="<?php echo $INSTALL['dbpass'] ?>" />
546 </td>
547 </tr>
548 <tr>
549 <td class="td_left"><p><?php print_string('dbprefix', 'install') ?></p></td>
550 <td class="td_right">
551 <input type="text" size="40" name="prefix" value="<?php echo $INSTALL['prefix'] ?>" />
552 </td>
553 </tr>
554
555<?php
556 break;
557 case 4: /// Administration directory setting
558?>
559
560 <tr>
561 <td class="td_left"><p><?php print_string('admindirname', 'install') ?></p></td>
562 <td class="td_right">
563 <input type="text" size="40" name="admindirname" value="<?php echo $INSTALL['admindirname'] ?>" />
564 </td>
565 </tr>
566
567
568<?php
569 break;
570 default:
571 }
572?>
cd0e958e 573
51e3e0b9 574 <tr>
575 <td colspan="<?php echo ($nextstage == 1) ? '3' : '2'; ?>">
576
577 <?php echo ($nextstage < 5) ? "<input type=\"submit\" name=\"next\" value=\"".get_string('next')." &raquo;\" style=\"float: right\"/>\n" : "&nbsp;\n" ?>
578 <?php echo ($nextstage > 0) ? "<input type=\"submit\" name=\"prev\" value=\"&laquo; ".get_string('previous')."\" style=\"float: left\"/>\n" : "&nbsp;\n" ?>
cd0e958e 579
51e3e0b9 580 </td>
cd0e958e 581
51e3e0b9 582 </tr>
583
584 </table>
8b5b1028 585 </form>
586
587<?php
588}
589
590
591
8d783716 592//==========================================================================//
593
51e3e0b9 594function print_compatibility_row($success, $testtext, $errormessage, $helpfield='', $caution=false) {
8d783716 595 echo "<tr>\n";
51e3e0b9 596 echo "<td class=\"td_left\" valign=\"top\" nowrap width=\"160\"><p>$testtext</p></td>\n";
8d783716 597 if ($success) {
51e3e0b9 598 echo "<td valign=\"top\"><p class=\"p_pass\">".get_string('pass', 'install')."</p></td>\n";
599 echo "<td valign=\"top\">&nbsp;</td>\n";
8d783716 600 } else {
51e3e0b9 601 echo "<td valign=\"top\"";
602 echo ($caution) ? "<p class=\"p_caution\">".get_string('caution', 'install') : "<p class=\"p_fail\">".get_string('fail', 'install');
603 echo "</p></td>\n";
604 echo "<td valign=\"top\">";
605 echo "<p>$errormessage ";
606 install_helpbutton("install.php?help=$helpfield");
607 echo "</p></td>\n";
8d783716 608 }
609 echo "</tr>\n";
610 return $success;
611}
612
613
614//==========================================================================//
615
616function install_helpbutton($url, $title='') {
617 if ($title == '') {
618 $title = get_string('help');
619 }
620 echo "<a href=\"javascript: void(0)\">";
621 echo "<img src=\"./pix/help.gif\" height=\"17\" width=\"22\" alt=\"$title\"";
622 echo "border=\"0\" align=\"absmiddle\" title=\"$title\" ";
623 echo "onClick=\"return window.open('$url', 'Help', 'menubar=0,location=0,scrollbars,resizable,width=500,height=400')\">";
624 echo "</a>\n";
625}
51e3e0b9 626
8d783716 627
628
629//==========================================================================//
630
631function print_install_help($help) {
8d783716 632 switch ($help) {
633 case 'phpversionhelp':
634 print_string($help, 'install', phpversion());
635 break;
636 case 'memorylimithelp':
94ba66ce 637 print_string($help, 'install', get_memory_limit());
8d783716 638 break;
639 default:
640 print_string($help, 'install');
641 }
8d783716 642}
643
644
645//==========================================================================//
646
647function get_memory_limit() {
648 if ($limit = ini_get('memory_limit')) {
649 return $limit;
650 } else {
651 return get_cfg_var('memory_limit');
652 }
653}
654
655//==========================================================================//
656
657function check_memory_limit() {
658
659 /// if limit is already 16M or more then we don't care if we can change it or not
660 if ((int)str_replace('M', '', get_memory_limit()) >= 16) {
661 return true;
662 }
663
664 /// Otherwise, see if we can change it ourselves
665 @ini_set('memory_limit', '16M');
666 return ((int)str_replace('M', '', get_memory_limit()) >= 16);
667}
668
8b5b1028 669//==========================================================================//
670
671function css_styles() {
672?>
673
674<style type="text/css">
675
676 body { background-color: #ffeece; }
51e3e0b9 677 p, li {
8d783716 678 font-family: helvetica, arial, sans-serif;
679 font-size: 10pt;
680 }
8b5b1028 681 a { text-decoration: none; color: blue; }
682 .errormsg {
683 color: red;
684 font-weight: bold;
685 }
8d783716 686 blockquote {
51e3e0b9 687 font-family: courier, monospace;
8d783716 688 font-size: 10pt;
689 }
8b5b1028 690 .install_table {
691 width: 500px;
692 }
693 .td_left {
694 text-align: right;
695 font-weight: bold;
696 }
697 .td_right {
698 text-align: left;
699 }
700 .main {
701 width: 500px;
702 border-width: 1px;
703 border-style: solid;
704 border-color: #ffc85f;
705 -moz-border-radius-bottomleft: 15px;
706 -moz-border-radius-bottomright: 15px;
707 }
708 .td_mainheading {
709 background-color: #fee6b9;
8d783716 710 padding: 10px;
8b5b1028 711 }
712 .td_main {
713 text-align: center;
714 }
8d783716 715 .td_mainlogo {
716 }
717 .p_mainlogo {
718 }
8b5b1028 719 .p_mainheading {
8d783716 720 font-size: 11pt;
721 }
722 .p_mainheader{
723 text-align: right;
724 font-size: 20pt;
725 font-weight: bold;
726 }
727 .p_pass {
728 color: green;
729 font-weight: bold;
730 }
731 .p_fail {
732 color: red;
733 font-weight: bold;
734 }
51e3e0b9 735 .p_caution {
736 color: #ff6600;
737 font-weight: bold;
738 }
8d783716 739 .p_help {
740 text-align: center;
741 font-family: helvetica, arial, sans-serif;
742 font-size: 14pt;
743 font-weight: bold;
744 color: #333333;
8b5b1028 745 }
51e3e0b9 746
8b5b1028 747</style>
748
749<?php
750}
751?>