<?
/*
Copyright (C)2004-2007 Matthieu Perez - hide@address.com
This file is part of PhPress.
PhPress is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PhPress is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PhPress. If not, see <http://www.gnu.org/licenses/>.
*/
// index
session_start();
// on charge les constantes
include 'program/common/constantes.php' ;
// verify that the version file exists
$test_file_version=file_exists("version.txt");
if(!$test_file_version)
{
include INST_PROG_PATH . 'installer.php';
}
else
{
// on récupère le n° de version et la date d'installation
//$version=@file("version.txt");
$noversion = VERSION_PHPRESS ;
// $noversion=trim($version[0]) ;
// $dateinstall=trim($version[1]) ;
// si aucune langue n'est définie, on choisit le français par défaut
if(!$lang)
{
SetCookie("lang", FR);
}
// si aucun cookie n'est défini pour l'utilisation on en met un par défaut
if(!$program)
{
SetCookie("program", "View");
}
if(!$utool)
{
SetCookie("utool", "main_view");
}
if(!$view_datas_id_deposit)
{
SetCookie("view_datas_id_deposit", "ALL");
}
if(!$view_current_display_mode)
{
SetCookie('view_current_display_mode', 'A');
}
// on affiche le nom du programme et la version dans le titre de la page
print "<TITLE>PhPress - $noversion [".$SERVER_NAME."]</TITLE>";
// on charge les infos de config mysql pour la db principale :
//$db="phpress";
include PROG_COM_PATH . 'get_pswd_mysql.php';
// affichage des frames
require PROG_HTM_PATH . 'mainframe.htm';
}
// image
print '<HEAD><LINK REL="SHORTCUT ICON" type="image/png" href="'.$SERVER_NAME.'/phpress/program/icones/favicon.png" /></HEAD>';
?>