2004-10-19 20:58:50 +02:00
|
|
|
|
<?php
|
2005-09-13 11:28:43 +02:00
|
|
|
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2006-03-12 01:56:18 +01:00
|
|
|
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
2004-02-13 23:42:47 +01:00
|
|
|
|
*
|
|
|
|
|
|
* This program 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 2 of the License, or
|
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
|
*
|
|
|
|
|
|
* This program 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 this program; if not, write to the Free Software
|
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
*
|
|
|
|
|
|
* $Id$
|
|
|
|
|
|
* $Source$
|
|
|
|
|
|
*/
|
2004-08-29 14:01:58 +02:00
|
|
|
|
|
2005-01-01 20:48:22 +01:00
|
|
|
|
/**
|
2005-04-26 00:55:49 +02:00
|
|
|
|
\file htdocs/admin/ihm.php
|
2004-08-29 14:01:58 +02:00
|
|
|
|
\brief Page de configuration du de l'interface homme machine
|
2005-04-26 00:55:49 +02:00
|
|
|
|
\version $Revision$
|
2004-08-29 14:01:58 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
2004-02-13 23:42:47 +01:00
|
|
|
|
require("./pre.inc.php");
|
|
|
|
|
|
|
2004-08-14 00:10:58 +02:00
|
|
|
|
$langs->load("companies");
|
|
|
|
|
|
$langs->load("products");
|
2004-09-04 12:11:17 +02:00
|
|
|
|
$langs->load("admin");
|
2004-08-14 00:10:58 +02:00
|
|
|
|
|
2004-02-15 01:05:21 +01:00
|
|
|
|
if (!$user->admin)
|
2005-09-12 15:22:24 +02:00
|
|
|
|
accessforbidden();
|
2004-02-15 01:05:21 +01:00
|
|
|
|
|
2005-08-11 20:51:38 +02:00
|
|
|
|
if (! defined("MAIN_MOTD")) define("MAIN_MOTD","");
|
|
|
|
|
|
|
2005-04-26 00:55:49 +02:00
|
|
|
|
$dirtop = "../includes/menus/barre_top";
|
|
|
|
|
|
$dirleft = "../includes/menus/barre_left";
|
|
|
|
|
|
$dirtheme = "../theme";
|
|
|
|
|
|
|
2004-08-14 00:10:58 +02:00
|
|
|
|
// Liste des zone de recherche permanantes support<72>es
|
|
|
|
|
|
$searchform=array("main_searchform_societe","main_searchform_contact","main_searchform_produitservice");
|
2005-08-11 20:51:38 +02:00
|
|
|
|
$searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE);
|
2004-08-14 00:10:58 +02:00
|
|
|
|
$searchformtitle=array($langs->trans("Companies"),$langs->trans("Contacts"),$langs->trans("ProductsAndServices"));
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-08-11 20:51:38 +02:00
|
|
|
|
if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
2004-02-13 23:42:47 +01:00
|
|
|
|
{
|
2005-09-25 00:11:04 +02:00
|
|
|
|
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"]);
|
|
|
|
|
|
dolibarr_set_const($db, "SIZE_LISTE_LIMIT", $_POST["size_liste_limit"]);
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["disable_javascript"]);
|
2006-03-12 00:03:05 +01:00
|
|
|
|
dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["popup_calendar"]);
|
2005-09-12 15:22:24 +02:00
|
|
|
|
|
2005-09-25 00:11:04 +02:00
|
|
|
|
dolibarr_set_const($db, "MAIN_SHOW_BUGTRACK_LINK", $_POST["bugtrack"]);
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SHOW_WORKBOARD", $_POST["workboard"]);
|
|
|
|
|
|
|
2005-09-26 03:09:14 +02:00
|
|
|
|
dolibarr_set_const($db, "MAIN_MENU_BARRETOP", $_POST["main_menu_barretop"]);
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_MENU_BARRELEFT", $_POST["main_menu_barreleft"]);
|
|
|
|
|
|
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_MENUFRONT_BARRETOP", $_POST["main_menufront_barretop"]);
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_MENUFRONT_BARRELEFT", $_POST["main_menufront_barreleft"]);
|
|
|
|
|
|
|
2005-09-12 15:22:24 +02:00
|
|
|
|
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"]);
|
|
|
|
|
|
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT",$_POST["main_searchform_contact"]);
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE",$_POST["main_searchform_societe"]);
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE",$_POST["main_searchform_produitservice"]);
|
|
|
|
|
|
|
|
|
|
|
|
dolibarr_set_const($db, "MAIN_MOTD", trim($_POST["main_motd"]));
|
|
|
|
|
|
|
|
|
|
|
|
$_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer
|
|
|
|
|
|
|
|
|
|
|
|
Header("Location: ihm.php?mainmenu=home&leftmenu=setup");
|
2004-02-13 23:42:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
llxHeader();
|
|
|
|
|
|
|
2005-10-14 23:05:13 +02:00
|
|
|
|
print_fiche_titre($langs->trans("GUISetup"));
|
2004-02-13 23:42:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
2005-08-11 20:51:38 +02:00
|
|
|
|
if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
2004-02-13 23:42:47 +01:00
|
|
|
|
{
|
2005-09-26 03:09:14 +02:00
|
|
|
|
print '<form method="post" action="ihm.php">';
|
|
|
|
|
|
print '<input type="hidden" name="action" value="update">';
|
|
|
|
|
|
|
|
|
|
|
|
clearstatcache();
|
2005-04-26 00:55:49 +02:00
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
|
|
|
|
|
|
2005-09-26 03:09:14 +02:00
|
|
|
|
// Langue par defaut
|
2005-04-26 00:55:49 +02:00
|
|
|
|
$var=!$var;
|
2005-09-26 03:09:14 +02:00
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
|
|
|
|
|
$html=new Form($db);
|
2005-10-30 01:42:54 +02:00
|
|
|
|
$html->select_lang($conf->global->MAIN_LANG_DEFAULT,'main_lang_default',1);
|
2005-09-26 03:09:14 +02:00
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
2005-04-26 00:55:49 +02:00
|
|
|
|
|
2005-09-26 03:09:14 +02:00
|
|
|
|
// Taille max des listes
|
2005-04-26 00:55:49 +02:00
|
|
|
|
$var=!$var;
|
2005-09-26 03:09:14 +02:00
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="size_liste_limit" size="4" value="' . SIZE_LISTE_LIMIT . '"></td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
|
|
|
|
|
$html->selectyesnonum('bugtrack',$conf->global->MAIN_SHOW_BUGTRACK_LINK);
|
2005-04-26 00:55:49 +02:00
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
2005-09-26 03:09:14 +02:00
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowWorkBoard").'</td><td>';
|
|
|
|
|
|
$html->selectyesnonum('workboard',$conf->global->MAIN_SHOW_WORKBOARD);
|
2005-04-26 00:55:49 +02:00
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
|
2005-09-26 03:09:14 +02:00
|
|
|
|
// D<>sactiver javascript
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
|
|
|
|
|
$html->selectyesnonum('disable_javascript',$conf->global->MAIN_DISABLE_JAVASCRIPT);
|
|
|
|
|
|
print '</td></tr>';
|
2006-03-10 15:26:17 +01:00
|
|
|
|
|
|
|
|
|
|
// D<>sactiver le calendrier popup
|
|
|
|
|
|
$var=!$var;
|
2006-03-12 00:03:05 +01:00
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("UsePopupCalendar").'</td><td>';
|
|
|
|
|
|
$liste_popup_calendar=array('0'=>$langs->trans("No"),'eldy'=>$langs->trans("Yes").' (style eldy)','andre'=>$langs->trans("Yes").' (style andre)');
|
|
|
|
|
|
$html->select_array('popup_calendar',$liste_popup_calendar,$conf->global->MAIN_POPUP_CALENDAR);
|
|
|
|
|
|
print ' ('.$langs->trans("AvailableOnlyIfJavascriptNotDisabled").')';
|
2006-03-10 15:26:17 +01:00
|
|
|
|
print '</td></tr>';
|
2005-09-26 03:09:14 +02:00
|
|
|
|
|
|
|
|
|
|
print '</table><br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Gestionnaires de menu
|
|
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
|
|
|
|
|
print '<td>'.$langs->trans("InternalUsers").'</td>';
|
|
|
|
|
|
print '<td>'.$langs->trans("ExternalUsers").'</td>';
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
|
|
// Menu top
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuTopManager").'</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
print $html->select_menu($conf->global->MAIN_MENU_BARRETOP,'main_menu_barretop',$dirtop);
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
print $html->select_menu($conf->global->MAIN_MENUFRONT_BARRETOP,'main_menufront_barretop',$dirtop);
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
|
|
// Menu left
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuLeftManager").'</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
print $html->select_menu($conf->global->MAIN_MENU_BARRELEFT,'main_menu_barreleft',$dirleft);
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
print $html->select_menu($conf->global->MAIN_MENUFRONT_BARRELEFT,'main_menufront_barreleft',$dirleft);
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
|
|
print '</table><br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Themes
|
|
|
|
|
|
show_theme(1);
|
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Liste des zone de recherche permanantes support<72>es
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
2005-10-30 02:07:00 +01:00
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td></tr>';
|
2005-09-26 03:09:14 +02:00
|
|
|
|
$var=True;
|
|
|
|
|
|
foreach ($searchform as $key => $value)
|
|
|
|
|
|
{
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$searchformtitle[$key].'</td><td>';
|
|
|
|
|
|
$html->selectyesnonum($searchform[$key],$searchformconst[$key]);
|
|
|
|
|
|
print '</td></tr>';
|
|
|
|
|
|
}
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Message of the day
|
|
|
|
|
|
$var=true;
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td><textarea cols="60" rows="3" name="main_motd" size="20">' . stripslashes($conf->global->MAIN_MOTD) . '</textarea></td></tr>';
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
|
|
|
|
|
|
print '<br><center>';
|
|
|
|
|
|
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
|
|
|
|
|
print '</center>';
|
|
|
|
|
|
|
|
|
|
|
|
print '</form>';
|
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
2005-10-30 01:42:54 +02:00
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>' . ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$conf->global->MAIN_LANG_DEFAULT) . '</td></tr>';
|
2005-09-26 03:09:14 +02:00
|
|
|
|
|
2005-04-26 00:55:49 +02:00
|
|
|
|
$var=!$var;
|
2005-08-11 20:51:38 +02:00
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->SIZE_LISTE_LIMIT . '</td></tr>';
|
2004-07-26 14:31:16 +02:00
|
|
|
|
|
2005-09-13 11:28:43 +02:00
|
|
|
|
$var=!$var;
|
2005-09-20 22:33:26 +02:00
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
|
2006-03-12 00:03:05 +01:00
|
|
|
|
print yn($conf->global->MAIN_SHOW_BUGTRACK_LINK)."</td></tr>";
|
2005-09-12 15:22:24 +02:00
|
|
|
|
|
2005-09-13 11:28:43 +02:00
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowWorkBoard").'</td><td>';
|
2006-03-12 00:03:05 +01:00
|
|
|
|
print yn($conf->global->MAIN_SHOW_WORKBOARD)."</td></tr>";
|
2005-04-26 00:55:49 +02:00
|
|
|
|
|
2005-09-25 00:11:04 +02:00
|
|
|
|
// Disable javascript
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("DisableJavascript").'</td><td>';
|
2006-03-12 00:03:05 +01:00
|
|
|
|
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td></tr>";
|
2006-03-10 15:26:17 +01:00
|
|
|
|
|
2006-03-12 00:03:05 +01:00
|
|
|
|
// Calendrier en popup
|
2006-03-10 15:26:17 +01:00
|
|
|
|
$var=!$var;
|
2006-03-12 00:03:05 +01:00
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("UsePopupCalendar").'</td><td>';
|
|
|
|
|
|
if ($conf->global->MAIN_DISABLE_JAVASCRIPT) print $langs->trans("No").' ('.$langs->trans("JavascriptDisabled").')';
|
|
|
|
|
|
else print ($conf->global->MAIN_POPUP_CALENDAR?$langs->trans("Yes").' (style '.$conf->global->MAIN_POPUP_CALENDAR.')':$langs->trans("No"));
|
|
|
|
|
|
print "</td></tr>";
|
2005-09-25 00:11:04 +02:00
|
|
|
|
|
|
|
|
|
|
print '</table><br>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
|
2005-09-26 03:09:14 +02:00
|
|
|
|
|
|
|
|
|
|
// Gestionnaires de menu
|
|
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
|
|
|
|
|
print '<td>'.$langs->trans("InternalUsers").'</td>';
|
|
|
|
|
|
print '<td>'.$langs->trans("ExternalUsers").'</td>';
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuTopManager").'</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENU_BARRETOP);
|
|
|
|
|
|
print $filelib;
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENUFRONT_BARRETOP);
|
|
|
|
|
|
print $filelib;
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'>';
|
|
|
|
|
|
print '<td>'.$langs->trans("DefaultMenuLeftManager").'</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENU_BARRELEFT);
|
|
|
|
|
|
print $filelib;
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '<td>';
|
|
|
|
|
|
$filelib=eregi_replace('\.php$','',$conf->global->MAIN_MENUFRONT_BARRELEFT);
|
|
|
|
|
|
print $filelib;
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
|
|
|
|
|
|
print '</table><br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Themes
|
2005-04-26 00:55:49 +02:00
|
|
|
|
show_theme(0);
|
|
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
2005-09-26 03:09:14 +02:00
|
|
|
|
|
2005-04-26 00:55:49 +02:00
|
|
|
|
// Liste des zone de recherche permanantes support<72>es
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
2005-10-30 02:07:00 +01:00
|
|
|
|
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td>'.$langs->trans("Activated").'</td></tr>';
|
2005-08-11 20:51:38 +02:00
|
|
|
|
$var=true;
|
2005-04-26 00:55:49 +02:00
|
|
|
|
foreach ($searchform as $key => $value) {
|
|
|
|
|
|
$var=!$var;
|
2005-08-11 20:51:38 +02:00
|
|
|
|
print '<tr '.$bc[$var].'"><td width="35%">'.$searchformtitle[$key].'</td><td>' . ($searchformconst[$key]?$langs->trans("yes"):$langs->trans("no")) . '</td></tr>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
}
|
|
|
|
|
|
print '</table>';
|
2005-08-11 20:51:38 +02:00
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
|
|
|
|
|
$var=true;
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("MessageOfDay").'</td><td>' . stripslashes(nl2br($conf->global->MAIN_MOTD)) . '</td></tr>';
|
2005-10-30 01:42:54 +02:00
|
|
|
|
print '</table>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
|
|
|
|
|
|
print '<div class="tabsAction">';
|
|
|
|
|
|
print '<a class="tabAction" href="ihm.php?action=edit">'.$langs->trans("Edit").'</a>';
|
|
|
|
|
|
print '</div>';
|
2004-02-13 23:42:47 +01:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-26 00:55:49 +02:00
|
|
|
|
function show_theme($edit=0)
|
|
|
|
|
|
{
|
2005-08-11 20:51:38 +02:00
|
|
|
|
global $conf,$langs,$dirtheme,$bc;
|
2005-04-26 00:55:49 +02:00
|
|
|
|
|
2005-08-20 16:42:15 +02:00
|
|
|
|
$thumbsbyrow=6;
|
2005-04-26 00:55:49 +02:00
|
|
|
|
print '<table class="noborder" width="100%">';
|
2005-08-20 16:42:15 +02:00
|
|
|
|
print '<tr class="liste_titre"><td colspan="'.$thumbsbyrow.'">'.$langs->trans("DefaultSkin").'</td></tr>';
|
|
|
|
|
|
$var=true;
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
|
2005-08-20 16:42:15 +02:00
|
|
|
|
print '<table class="notopnoleftnoright" width="100%">';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
$handle=opendir($dirtheme);
|
|
|
|
|
|
$i=0;
|
|
|
|
|
|
while (($subdir = readdir($handle))!==false)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (is_dir($dirtheme."/".$subdir) && substr($subdir, 0, 1) <> '.' && substr($subdir, 0, 3) <> 'CVS')
|
|
|
|
|
|
{
|
2005-08-20 16:42:15 +02:00
|
|
|
|
if ($i % $thumbsbyrow == 0)
|
|
|
|
|
|
{
|
2005-04-26 01:08:19 +02:00
|
|
|
|
print '<tr '.$bc[$var].'>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print '<td align="center">';
|
|
|
|
|
|
$file=$dirtheme."/".$subdir."/thumb.png";
|
|
|
|
|
|
if (! file_exists($file)) $file=$dirtheme."/nophoto.jpg";
|
|
|
|
|
|
print '<table><tr><td><img src="'.$file.'" width="80" height="60"></td></tr><tr><td align="center">';
|
2005-08-11 20:51:38 +02:00
|
|
|
|
if ($subdir == $conf->global->MAIN_THEME)
|
2005-04-26 00:55:49 +02:00
|
|
|
|
{
|
2005-04-26 01:08:19 +02:00
|
|
|
|
print '<input '.($edit?'':'disabled').' type="radio" '.$bc[$var].' style="border: 0px;" checked name="main_theme" value="'.$subdir.'"> <b>'.$subdir.'</b>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2005-04-26 01:08:19 +02:00
|
|
|
|
print '<input '.($edit?'':'disabled').' type="radio" '.$bc[$var].' style="border: 0px;" name="main_theme" value="'.$subdir.'"> '.$subdir;
|
2005-04-26 00:55:49 +02:00
|
|
|
|
}
|
|
|
|
|
|
print '</td></tr></table></td>';
|
|
|
|
|
|
|
|
|
|
|
|
$i++;
|
|
|
|
|
|
|
2005-08-20 16:42:15 +02:00
|
|
|
|
if ($i % $thumbsbyrow == 0) print '</tr>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2005-08-20 16:42:15 +02:00
|
|
|
|
if ($i % $thumbsbyrow != 0) {
|
|
|
|
|
|
while ($i % $thumbsbyrow != 0) {
|
2005-04-26 00:55:49 +02:00
|
|
|
|
print '<td> </td>';
|
|
|
|
|
|
$i++;
|
|
|
|
|
|
}
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
}
|
2005-08-20 16:42:15 +02:00
|
|
|
|
print '</table>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
|
2005-08-20 16:42:15 +02:00
|
|
|
|
print '</td></tr>';
|
2005-04-26 00:55:49 +02:00
|
|
|
|
print '</table>';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
llxFooter('$Date$ - $Revision$');
|
2004-02-13 23:42:47 +01:00
|
|
|
|
?>
|