<?
/*
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/>.
*/
// page centrale
session_start();
//require 'program/html/lightgrey.css';
// get preferred article type from user file
if(!$Pref_Art_Type)
{
if($user)
{
$PrefFile="users/$user/PrefArt.txt";
if(!file_exists("$PrefFile"))
{
$open_file=fopen("$PrefFile", "w+");
fclose($open_file);
}
$PrefFileInfos=@file($PrefFile);
$Pref_Art_Cat=trim($PrefFileInfos[0]) ;
$Pref_Art_Cat_TXT=trim($PrefFileInfos[1]) ;
$Pref_Art_Type=trim($PrefFileInfos[2]) ;
}
else if(!$user)
{
$Pref_Art_Type='none';
}
setcookie("Pref_Art_Type", $Pref_Art_Type);
setcookie("Pref_Art_Cat", $Pref_Art_Cat);
setcookie("Pref_Art_Cat_TXT", $Pref_Art_Cat_TXT);
}
require 'program/common/constantes.php' ;
require LANG_PATH . $lang ."/msg.php";
require PROG_COM_PATH .'functions_mysql.php';
require PROG_COM_PATH . 'functions_common.php';
require 'program/html/default.css';
if($utool=='')
{
$no_caps_prog=strtolower($program);
if(file_exists("program/$no_caps_prog/".$no_caps_prog ."_main.php"))
{
require "program/$no_caps_prog/".$no_caps_prog ."_main.php";
}
else
{
$utool=='main_view';
// à modifier plus tard, quand il n'y aura plus lien ne menant nulle part
//tmp
print '<red>PhPress</red> version <blue>[<em>'.VERSION_PHPRESS.'</em>]</blue> - ©2004-2007 Matthieu Perez - Copyleft! under the <A href="gpl.txt">GNU General Public License</A>.<hr>';
}
}
else
{
//on charge le fichier contenant les instructions
//print TXT_MENU_PROGRAM . "=$program --" ;
//print TOOLS . " $utool <br><br>" ;
$CapsToolPath="program/$program/$utool";
$tool_path = strtolower($CapsToolPath);
require "$tool_path.php";
}
?>