00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: index.php 4817 2005-09-20 09:22:59Z yeupou $
00006 #
00007 # Copyright 1999-2000 (c) The SourceForge Crew
00008 #
00009 # Copyright 2002-2005 (c) Mathieu Roy <yeupou--gnu.org>
00010 # Sylvain Beucler <beuc--beuc.net>
00011 #
00012 # The Savane project is free software; you can redistribute it and/or
00013 # modify it under the terms of the GNU General Public License
00014 # as published by the Free Software Foundation; either version 2
00015 # of the License, or (at your option) any later version.
00016 #
00017 # The Savane project is distributed in the hope that it will be useful,
00018 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 # GNU General Public License for more details.
00021 #
00022 # You should have received a copy of the GNU General Public License
00023 # along with the Savane project; if not, write to the Free Software
00024 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00025
00026 require "include/pre.php";
00027 require_directory("people");
00028 require_directory("news");
00029 require_directory("stats");
00030 require "include/features_boxes.php";
00031
00032
00033 # Check if the PHP Frontend is acceptably configured.
00034 # Do progressive little checks, to avoid creating to much extra load.
00035 # Not gettextized for now, already lot of more important strings to
00036 # translate.
00037 if (!$GLOBALS['sys_unix_group_name'])
00038 {
00039 fb(_("Configuration serious problem: sys_unix_group_name is not set"), 1);
00040 if (!$GLOBALS['sys_name'])
00041 {
00042 fb(_("Configuration problem: sys_name is not set"), 1);
00043 }
00044 }
00045
00046 # Check whether the local admin group exists. This is useful only during
00047 # installation process.
00048 if ($conn && !$sys_group_id)
00049 {
00050 if (!user_isloggedin())
00051 {
00052 # If there is no database, we will first found that no user is logged in
00053 # Check if there is a database.
00054 $result = db_query("SHOW TABLES LIKE 'groups'");
00055 if (!db_numrows($result))
00056 {
00057 # No valid database
00058 fb(sprintf(_("Installation incomplete: while the connection to the SQL server is ok, the database '%s' was not found. Please, create it according to the documentation shipped with your Savane package"), $GLOBALS['sys_dbname']), 1);
00059 }
00060 else
00061 {
00062 # Not logged-in, probably no user account
00063 fb(_("Installation incomplete: you must now create for yourself a user account. Once it is done, you will have to login and register the local administration project"), 1);
00064 }
00065 }
00066 else
00067 {
00068 # No admin groups
00069 fb(_("Installation incomplete: you must now register the local administration project, select \"Register New Project\" in the left menu"), 1);
00070 }
00071 # I18N
00072 # The string is a URL on localhost, e.g. http://127.0.0.1/testconfig.php
00073 fb(sprintf(_("By the way, have you checked the setup of your web server at %s?"), 'http:
00074 }
00075
00076 $HTML->header(array('title'=>_("Welcome")));
00077 html_feedback_top();
00078
00079 print '
00080 <div class="indexright">
00081 ';
00082 print show_features_boxes();
00083 print '
00084 </div><!-- end indexright -->
00085 ';
00086
00087 # yeupou--gnu.org 2004-09-01:
00088 # Dirty hack to get rid of serious issue in MSIE handling of
00089 # CSS.
00090 # Please, do never add such an hack in savane somewhere else without
00091 # talking about it on savane-dev.
00092 unset($style);
00093 if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE"))
00094 { $style = ' style="width: 100%;"'; }
00095
00096 print ' <div class="indexcenter"'.$style.'>';
00097
00098 utils_get_content("homepage");
00099
00100 print "\n<p> </p>\n";
00101
00102 print $HTML->box_top('<a href="'.$GLOBALS['sys_home'].'news/" class="sortbutton">'._("Latest News").'</a>');
00103 print news_show_latest($GLOBALS['sys_group_id'],9, "true");
00104 print $HTML->box_bottom();
00105
00106 print '
00107 </div><!-- end indexcenter -->
00108 ';
00109
00110 $HTML->footer(array());
00111
00112 ?>