summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 84f9982)
raw | patch | inline | side by side (parent: 84f9982)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Feb 2007 09:25:43 +0000 (09:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Feb 2007 09:25:43 +0000 (09:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5691 594d385d-05f5-0310-b6e9-bd551577e9d8
index cad63a4dbd736233c957dd433c0e43310820c64d..b3e22780b4dadf3fc448f5efc466b86254b4aa41 100644 (file)
width:100%;
border-right: solid 2px #444444;
border-bottom: solid 2px #666666;
- float: left;
}
/* Header col */
div.setup_header {
- background-color: #D2F6C2;
+ background-color: #D2F6C2;
font-size: 2.0em;
font-weight: bold;
padding:7px;
/* Container 1 for content and header content */
div.setup_header_and_content_container_1 {
- clear: right
+ border-left: solid 1px #AAAAAA;
}
/* Container 2 for content and header content */
div.setup_header_and_content_container_2 {
- float: top;
- clear: top ;
padding:0px;
border-top: solid 1px #AAAAAA;
}
/* Header col */
div.setup_plug_header {
- background-color: #EEF6EE;
border-top: solid 1px #DDDDDD;
border-bottom: solid 1px #DDDDDD;
- height: 40px;
+ margin: 1px;
+ padding: 5px;
}
/* Content col */
div.setup_content {
- background-color: #F0F0F0;
border-top: solid 1px #AAAAAA;
+ padding: 5px;
}
-
+/* default.*/
+div.default {
+ padding: 2px;
+ vertical-align: middle;
+}
/* Navigation col */
div.setup_navigation {
- background-color: #D2F6C2;
- width: 200px;
- float: left;
- clear: left;
- padding:0px 5px 5px 5px;
border-right: solid 1px #DDDDDD;
+ width:180px;
}
/* The navigation container */
div.setup_navigation_border {
- background-color: #EEFFEE;
- padding: 5px;
- float: left;
- clear: left;
+ background-color: #FFF;
+ padding: 1px;
border-right: solid 1px #BBBBBB;
border-bottom: solid 1px #BBBBBB;
border-left: solid 1px #DDDDDD;
/* Navigation title */
div.setup_navigation_title {
font-size: 1.7em;
- background: #CCF6CC ;
+ background: #D2F6C2 ;
text-decoration:none;
width:100%;
margin-bottom: 7px;
/* The box used for each setup step */
a.navigation_element, div.navigation_element {
- float: left;
- clear: left;
- background: #E4E4E4 ;
+ background: #E8E8E8;
text-decoration:none;
width:100%;
+ float: left;
margin-bottom: 4px;
border-right: solid 1px #AAAAAA;
border-bottom: solid 1px #BBBBBB;
/* The box used for each setup step */
a.navigation_element_active, div.navigation_element_active {
- float: left;
- clear: left;
- position: relative;
- background: #E4E4E4 ;
+ background: #E8E8E8;
text-decoration:none;
width:100%;
+ float: left;
margin-bottom: 4px;
border-right: solid 1px #AAAAAA;
border-bottom: solid 1px #BBBBBB;
font-size: 1.2em;
font-weight: bold;
padding: 3px;
+ cursor: default;
+ text-decoration:none;
color: #AAAAAA;
}
div.navigation_title_inactive {
font-size: 1.2em;
font-weight: bold;
+ text-decoration:none;
cursor: pointer;
padding: 3px;
}
diff --git a/setup/class_setup.inc b/setup/class_setup.inc
index 5236619d1e4cd38baf68fdd932a2923b94a7ddbc..13b2c8e94a63f2438402119c27854101e8482e96 100644 (file)
--- a/setup/class_setup.inc
+++ b/setup/class_setup.inc
}
/* Check if step was selected */
- if(isset($_GET['step'])){
- $step = $_GET['step'];
+ if(isset($_GET['step']) || isset($_POST['next'])){
+
+ if(isset($_GET['step'])){
+ $step = $_GET['step'];
+ }else{
+ $step = $this->i_current + 1;
+ }
if($this->selectable_step($step)){
$this->i_last = $this->i_current;
- $this->i_current = $_GET['step'];
+ $this->i_current = $step;
}
}
}
index de6c1017ba43108a01a8c813514293123fe0c303..780c36c7bf227988cafb9cab4163465c8235db37 100644 (file)
function setup_step_1()
{
+ $this->lang = get_browser_language();
+
$this->is_enabled = TRUE;
$this->is_active = TRUE;
index e037f9c24fb1f85051a6d9c1eb7edeceec3482a7..6302833ecc174b397f1ce9b9a248869e83cfcd61 100644 (file)
class setup_step_2 extends setup_step
{
+ var $basic_checks = array();
+ var $config_checks= array();
function setup_step_2()
{
-
+ $this->s_title = _("Installation check");
+ $this->s_title_long = _("Basic installation checks");
+ $this->s_info = _("Some basic checks for PHP version, ldap extension...");
}
+
+ /* Execute and display template */
function execute()
{
- return("plug1");
+ $this->run_checks();
+ $smarty = get_smarty();
+ $smarty->assign("basic" ,$this->basic_checks);
+ $smarty->assign("config",$this->config_checks);
+ return($smarty->fetch(get_template_path("setup_step2.tpl",TRUE,dirname(__FILE__))));
}
+
+ /* Execute all checks */
+ function run_checks()
+ {
+ $i =0;
+ $this->basic_checks = array();
+ $this->config_checks = array();
+
+ /* PHP version check */
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking PHP version");
+ $this->basic_checks[$i]['DESC'] = sprintf(_("PHP must be of version %s or %s or above for some functions."),"4.3.10","5.2.0");
+ $this->basic_checks[$i]['RESULT']= $this->check_php_version();
+
+ /* Checking imap extension */
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for ldap module");
+ $this->basic_checks[$i]['DESC'] = _("This is the main module used by GOsa and therefore really required.");
+ $this->basic_checks[$i]['RESULT']= is_callable("ldap_bind");
+
+ /* Checking for XML functions */
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for XML functions");
+ $this->basic_checks[$i]['DESC'] = _("XML functions are required to parse the configuration file.");
+ $this->basic_checks[$i]['RESULT']= is_callable("xml_parser_create");
+
+ /* Check for gettext support */
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for gettext support");
+ $this->basic_checks[$i]['DESC'] = _("Gettext support is required for internationalized GOsa.");
+ $this->basic_checks[$i]['RESULT']= is_callable("bindtextdomain");
+
+ /* iconv */
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for iconv support");
+ $this->basic_checks[$i]['DESC'] = _("This module is used by GOsa to convert samba munged dial informations and is therefore required.");
+ $this->basic_checks[$i]['RESULT']= is_callable("iconv");
+
+ /**/
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for mhash module");
+ $this->basic_checks[$i]['DESC'] = _("To use SSHA encryption, you'll need this module. If you are just using crypt or md5 encryption, ignore this message. GOsa will run without it.");
+ $this->basic_checks[$i]['RESULT']= is_callable("mhash");
+
+ /**/
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for imap module");
+ $this->basic_checks[$i]['DESC'] = _("The IMAP module is needed to communicate with the IMAP server. It gets status informations, creates and deletes mail users. ");
+ $this->basic_checks[$i]['RESULT']= is_callable("imap_open");
+
+ /**/
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for getacl in imap");
+ $this->basic_checks[$i]['DESC'] = _("The getacl support is needed for shared folder permissions. The standard IMAP module is not capable of reading acl's. You need a recend PHP version for this feature.");
+ $this->basic_checks[$i]['RESULT']= is_callable("imap_getacl");
+
+ /**/
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for mysql module");
+ $this->basic_checks[$i]['DESC'] = _("MySQL support is needed for reading GOfax reports from databases.");
+ $this->basic_checks[$i]['RESULT']= is_callable("mysql_query");
+
+ /**/
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for kadm5 module");
+ $this->basic_checks[$i]['DESC'] = _("Managing users in kerberos requires the kadm5 module which is downloadable via PEAR network.");
+ $this->basic_checks[$i]['RESULT']= is_callable("kadm5_init_with_password");
+
+ /**/
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for snmp Module");
+ $this->basic_checks[$i]['DESC'] = _("Simple Network Management Protocol (SNMP) is required for client monitoring.");
+ $this->basic_checks[$i]['RESULT']= is_callable("snmpget");
+
+ /* Checking for Cups module */
+ $i ++;
+ $this->basic_checks[$i]['NAME'] = _("Checking for cups module");
+ $this->basic_checks[$i]['DESC'] = _("In order to read available printers from IPP protocol instead of printcap files, you've to install the CUPS module.");
+ $this->basic_checks[$i]['RESULT']= is_callable("cups_get_dest_list");
+
+ /* Checking for F ping utility */
+ $i ++;
+ $query= "LC_ALL=C LANG=C fping -v 2>&1";
+ $output= shell_exec ($query);
+ $this->basic_checks[$i]['NAME'] = _("Checking for fping utility");
+ $this->basic_checks[$i]['DESC'] = _("The fping utility is only used if you've got a thin client based terminal environment running.");
+ $this->basic_checks[$i]['RESULT']= preg_match("/^fping:/", $output);;
+
+ /* Checking generate LM/NT password hashes */
+ $i ++;
+ $query= "mkntpwd 2>&1";
+ $output= shell_exec ($query);
+ $have_mkntpwd= preg_match("/^Usage: mkntpwd /", $output);
+ if (!$have_mkntpwd){
+ $query= 'LC_ALL=C LANG=C perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen $ARGV[0]), $/;" &>/dev/null';
+ system ($query, $ret);
+ $have_mkntpwd |= ($ret == 0);
+ }
+
+ $this->basic_checks[$i]['NAME'] = _("Password hashes");
+ $this->basic_checks[$i]['DESC'] = _("In order to use SAMBA 2/3, you've to install some additional packages to generate password hashes.");
+ $this->basic_checks[$i]['RESULT']= $have_mkntpwd;
+
+
+
+ /* PHP Configuration checks
+ */
+
+ /* Register_globals off */
+ $i = 0;
+ $this->config_checks[$i]['NAME'] = _("register_globals"." "."<b>"._("Off")."</b>");
+ $this->config_checks[$i]['DESC'] = _("register_globals is a PHP mechanism to register all global varibales to be accessible from scripts without changing the scope. This may be a security risk. GOsa will run in both modes.");
+ $this->config_checks[$i]['RESULT']= ini_get("register_globals") == 0;
+
+ $i ++;
+ $this->config_checks[$i]['NAME'] = _("session.gc_maxlifetime"." "."<b> >= 86400</b>");
+ $this->config_checks[$i]['DESC'] = _("PHP uses this value for the garbage collector to delete old sessions, setting this value to one day will prevent loosing session and cookie before they really timeout.");
+ $this->config_checks[$i]['RESULT']= ini_get("session.gc_maxlifetime") >= 86400;
+
+ $i ++;
+ $session_auto_start = ini_get('session.auto_start');
+ $this->config_checks[$i]['NAME'] = _("session.auto_start"." "."<b>"._("Off")."</b>");
+ $this->config_checks[$i]['DESC'] = _("In Order to use GOsa without any trouble, the session.auto_register option in your php.ini must be set to 'Off'.");
+ $this->config_checks[$i]['RESULT']= !$session_auto_start['local_value'];
+
+ $i ++;
+ $this->config_checks[$i]['NAME'] = _("memory_limit")." "."<b> >= 32</b>";
+ $this->config_checks[$i]['DESC'] = _("GOsa needs at least 32MB of memory, less will cause unpredictable errors! Increase it for larger setups.");
+ $this->config_checks[$i]['RESULT']= ini_get('memory_limit') >= 32 ;
+
+
+ $i ++;
+ $this->config_checks[$i]['NAME'] = _("implicit_flush")." "."<b>"._("Off")."</b>";
+ $this->config_checks[$i]['DESC'] = _("This option influences the Output handling. Turn this Option off, to increase performance.");
+ $this->config_checks[$i]['RESULT']= !ini_get('implicit_flush');
+
+ $i ++;
+ $this->config_checks[$i]['NAME'] = _("max_execution_time")." "."<b> >= 30</b>";
+ $this->config_checks[$i]['DESC'] = _("The Execution time should be at least 30 seconds, because some actions may consume more time.");
+ $this->config_checks[$i]['RESULT']= ini_get("max_execution_time") >= 30 ;
+
+ $i ++;
+ $this->config_checks[$i]['NAME'] = _("expose_php")." <b>"._("Off")."</b>";
+ $this->config_checks[$i]['DESC'] = _("Increase the server security by setting expose_php to 'off'. PHP won't send any Information about the server you are running in this case.");
+ $this->config_checks[$i]['RESULT']= !ini_get("expose_php");
+
+
+ $i ++;
+ $this->config_checks[$i]['NAME'] = _("magic_quotes_gpc")." <b>"._("On")."</b>";
+ $this->config_checks[$i]['DESC'] = _("Increase your server security by setting magic_quotes_gpc to 'on'. PHP will escape all quotes in strings in this case.");
+ $this->config_checks[$i]['RESULT']= ini_get('magic_quotes_gpc');
+ }
+
+
+ /* Check if current PHP version is compatible
+ with the current version of GOsa */
+ function check_php_version()
+ {
+ if(preg_match("/^5/",phpversion())){
+ return(version_compare(phpversion(),"5.2.0",">="));
+ }else{
+ return(version_compare(phpversion(),"4.3.10",">="));
+ }
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/setup/setup_frame.tpl b/setup/setup_frame.tpl
index 5b2ffc6f89282a4fdc09259cf4613a3950da038a..747c641d4f4ca25652cfb531b8b07983f7856ff5 100644 (file)
--- a/setup/setup_frame.tpl
+++ b/setup/setup_frame.tpl
<form action='setup.php' name='mainform' method='post' enctype='multipart/form-data'>
<!-- All over div -->
-<div class='setup_dialog'>
+<div class='setup_dialog' style='float:left' >
<!-- Basic header -->
- <div class='setup_header'>
+ <div class='setup_header' style='float:bottom'>
{t}GOsa - GOnicus System Administrator Setup{/t}
</div>
<!-- Navigation div -->
- <div class='setup_navigation'>
- <div class='setup_navigation_border' >
- <div class='setup_navigation_title'>
- {t}Setup Steps{/t}
- </div>
- {$navigation}
+ <div class='setup_navigation' style='float:left;'>
+ <div class='setup_navigation_title'>
+ {t}Setup Steps{/t}
</div>
+ {$navigation}
+ </div>
+ <div class='setup_plug_header'>
+ {$header}
</div>
- <!-- Setup step div -->
- <div class='setup_header_and_content_container_1'>
-
- <!-- Div to skip horizontal scrolling -->
- <div class='setup_header_and_content_container_2'>
-
- <!-- Step header -->
- <div class='setup_plug_header' >
- {$header}
- </div>
-
- <!-- Step content -->
- <div class='setup_content'>
- {$contents}
- </div>
- </div>
+ <!-- Step content -->
+ <div class='setup_content' >
+ {$contents}
</div>
</div>
</form>
diff --git a/setup/setup_step1.tpl b/setup/setup_step1.tpl
index 7c8fc338f4c055456389a24bbe444760d8fc1c0a..89a2f9088c09ddb59007e020a89979dcf06dbfc6 100644 (file)
--- a/setup/setup_step1.tpl
+++ b/setup/setup_step1.tpl
-{t}Language{/t}
-
-<select name='lang' title='{t}Please your prefered language here{/t}'>
-{html_options options=$languages selected=$lang}
-</select>
-<input type='submit'>
+<div>
+ <div class='default'>
+ <b>{t}Please select the language that should be used in GOsa setup.{/t}</b>
+ </div>
+ <br>
+ <div class='default' style='float:left;width:120px;'>
+ {t}Language{/t}
+ </div>
+ <div class='default' style='float:left;'>
+ <select name='lang' title='{t}Please your prefered language here{/t}' size=5 style='width:300px;'>
+ {html_options options=$languages selected=$lang}
+ </select>
+ </div>
+ <div class='default' style='float:left;'>
+ <input type='submit' name='next' value='{t}Next{/t}'>
+ </div>
+</div>