Add directory to provide an online help service support.

This commit is contained in:
Laurent Destailleur 2008-11-12 00:26:54 +00:00
parent ab9b598254
commit 2fbc141dbc
3 changed files with 497 additions and 0 deletions

184
htdocs/support/default.css Normal file
View File

@ -0,0 +1,184 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* 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$
*/
body {
font-size:13px;
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
background-color: #F4F4F4;
margin-left: 20px;
margin-right: 20px;
margin-top: 20px;
margin-bottom: 20px;
}
div.titre {
padding: 5px 5px 5px 5px;
margin: 0em 0em 0em 0em;
}
span.titre {
font-size:1.1em;
font-weight: bold;
background: #dcdcd3;
color: #4965B3;
padding: 5px 5px 5px 5px;
margin: 0em 0em 0em 0em;
border: 1px solid #8CACBB;
}
div.soustitre {
font-size: 15px;
font-weight: bold;
color: #4965B3;
padding: 0em 1.2em 0.5em 2em;
margin: 1.2em 1.2em 1.2em 1.2em;
border-bottom: 1px solid #8CACBB;
border-right: 1px solid #8CACBB;
text-align: right;
}
inputdisabled
{
background: #FDFDFD;
border: 1px solid #ACBCBB;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
table.main {
background: #dcdcd3;
text-align: left;
border: 1px solid #8CACBB;
}
table.main-inside {
padding-left: 10px;
padding-right: 10px;
margin-bottom: 20px;
margin-top: 10px;
}
div.ok {
color: #114466;
}
div.warning {
color: #777711;
}
div.error {
color: #550000; font-weight: bold;
padding: 0.2em 0.2em 0.2em 0.2em;
margin: 0.5em 0em 0.5em 0em;
border: 1px solid #6C7C8B;
}
font.error {
color: #550000;
}
div.barrebottom {
text-align: right;
margin-top: 10px;
padding-top: 10px;
padding-bottom: 10px;
padding-right: 10px;
}
div.footer {
background-color: #dcdff4;
font-size: 10px;
border-top: solid black 1px;
padding-left: 5px;
text-align: center;
}
div.header {
background-color: #dcdff4;
border-bottom: solid black 1px;
padding-left: 5px;
text-align: center;
}
div.footer p {
margin: 0px;
}
a:link,a:visited,a:active {
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
a.titre {
text-decoration:none;
}
div.comment {
text-decoration:none;
color:black;
font-size: 13px;
}
div.main-inside h2 {
font-size:18px;
font-weight: bold;
color: #4965B3;
}
tr.bg1 {
background-color: #E5E5E5;
}
tr.bg2 {
background-color: #B5C5C5;
}
td.label {
background: #dcdcd3;
color: #5945A3;
padding: 5px 5px 5px 5px;
margin: 0em 0em 0em 0em;
border-bottom: 1px solid #8CACBB;
}
td.comment {
background: #dcdcd3;
color: black;
padding: 5px 5px 5px 5px;
margin: 0em 0em 0em 0em;
text-decoration:none;
font-size: 13px;
border-bottom: 1px solid #8CACBB;
}
table {
font-size: 12px;
}
.install
{
border: 1px solid #8CACBB;
padding: 4px 4px 4px 4px;
}

238
htdocs/support/inc.php Normal file
View File

@ -0,0 +1,238 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien DiCintio <sdicintio@ressource-toi.org>
* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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.
*/
/** \file htdocs/support/inc.php
\brief File that define environment for support pages
\version $Id$
*/
define('DOL_VERSION','2.5-dev'); // Also defined in htdocs/master.inc.php
require_once('../translate.class.php');
require_once('../lib/functions.lib.php');
require_once('../lib/admin.lib.php');
// DOL_DOCUMENT_ROOT has been defined in function.inc.php to '..'
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
// et non path absolu.
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
{
$_SERVER["PHP_SELF"]=$_SERVER["DOCUMENT_URI"];
}
// Definition des constantes syslog
if (function_exists("define_syslog_variables"))
{
define_syslog_variables();
}
else
{
// Pour PHP sans syslog (comme sous Windows)
define('LOG_EMERG',0);
define('LOG_ALERT',1);
define('LOG_CRIT',2);
define('LOG_ERR',3);
define('LOG_WARNING',4);
define('LOG_NOTICE',5);
define('LOG_INFO',6);
define('LOG_DEBUG',7);
}
$includeconferror='';
$conffile = "../conf/conf.php";
$charset="UTF-8"; // If not output format found in any conf file
if (! defined('DONOTLOADCONF') && file_exists($conffile))
{
$result=include_once($conffile); // Load conf file
if ($result)
{
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // For backward compatibility
// Remove last / or \ on directories or url value
if (! empty($dolibarr_main_document_root) && ! ereg('^[\\\/]+$',$dolibarr_main_document_root)) $dolibarr_main_document_root=ereg_replace('[\\\/]+$','',$dolibarr_main_document_root);
if (! empty($dolibarr_main_url_root) && ! ereg('^[\\\/]+$',$dolibarr_main_url_root)) $dolibarr_main_url_root=ereg_replace('[\\\/]+$','',$dolibarr_main_url_root);
if (! empty($dolibarr_main_data_root) && ! ereg('^[\\\/]+$',$dolibarr_main_data_root)) $dolibarr_main_data_root=ereg_replace('[\\\/]+$','',$dolibarr_main_data_root);
// Create conf object
if (! empty($dolibarr_main_document_root))
{
$result=conf($dolibarr_main_document_root);
}
// Load database driver
if ($result)
{
if (! empty($dolibarr_main_document_root) && ! empty($dolibarr_main_db_type))
{
$result=include_once($dolibarr_main_document_root . "/lib/databases/".$dolibarr_main_db_type.".lib.php");
if ($result)
{
// OK
}
else
{
$includeconferror='ErrorBadValueForDolibarrMainDBType';
}
}
}
else
{
$includeconferror='ErrorBadValueForDolibarrMainDocumentRoot';
}
}
else
{
$includeconferror='ErrorBadFormatForConfFile';
}
}
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
define('MAIN_DB_PREFIX',(isset($dolibarr_main_db_prefix)?$dolibarr_main_db_prefix:''));
define('DOL_DATA_ROOT',(isset($dolibarr_main_data_root)?$dolibarr_main_data_root:''));
if (empty($conf->character_set_client)) $conf->character_set_client=$charset;
if (empty($conf->db->dolibarr_main_db_collation)) $conf->db->dolibarr_main_db_collation='latin1_swedish_ci';
if (empty($conf->db->user)) $conf->db->user='';
// Forcage du parametrage PHP magic_quotes_gpc et nettoyage des parametres
// (Sinon il faudrait a chaque POST, conditionner
// la lecture de variable par stripslashes selon etat de get_magic_quotes).
// En mode off (recommande il faut juste faire addslashes au moment d'un insert/update.
function stripslashes_deep($value)
{
return (is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value));
}
//if (! eregi('PHP/6', $_SERVER['SERVER_SOFTWARE']))
if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* plus pris en compte dans PHP6
{
if (get_magic_quotes_gpc())
{
$_GET = array_map('stripslashes_deep', $_GET);
$_POST = array_map('stripslashes_deep', $_POST);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
$_REQUEST = array_map('stripslashes_deep', $_REQUEST);
}
@set_magic_quotes_runtime(0);
}
// Defini objet langs
$langs = new Translate('../langs',$conf);
$langs->setDefaultLang('auto');
$langs->setPhpLang();
$bc[false]=' class="bg1"';
$bc[true]=' class="bg2"';
/*
* \brief Load conf file (file must exists)
* \param dolibarr_main_document_root Root directory of Dolibarr bin files
* \return int <0 if KO, >0 if OK
*/
function conf($dolibarr_main_document_root)
{
global $conf;
global $dolibarr_main_db_type;
global $dolibarr_main_db_host;
global $dolibarr_main_db_port;
global $dolibarr_main_db_name;
global $dolibarr_main_db_user;
global $dolibarr_main_db_pass;
global $character_set_client;
$return=include_once($dolibarr_main_document_root."/conf/conf.class.php");
if (! $return) return -1;
$conf=new Conf();
$conf->db->type = trim($dolibarr_main_db_type);
$conf->db->host = trim($dolibarr_main_db_host);
$conf->db->port = trim($dolibarr_main_db_port);
$conf->db->name = trim($dolibarr_main_db_name);
$conf->db->user = trim($dolibarr_main_db_user);
$conf->db->pass = trim($dolibarr_main_db_pass);
if (empty($character_set_client)) $character_set_client=$charset;
$conf->character_set_client=strtoupper($character_set_client);
if (empty($dolibarr_main_db_charset)) $dolibarr_main_db_charset='latin1';
$conf->db->character_set=$dolibarr_main_db_charset;
if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation='latin1_swedish_ci';
$conf->db->dolibarr_main_db_collation=$dolibarr_main_db_collation;
return 1;
}
/*
* \brief Affiche entete HTML
*/
function pHeader($soutitre,$next,$action='none')
{
global $conf;
global $langs;
$langs->load("main");
$langs->load("admin");
// On force contenu dans format sortie
header("Content-type: text/html; charset=".$conf->character_set_client);
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'."\n";
print '<html>'."\n";
print '<head>'."\n";
print '<meta http-equiv="content-type" content="text/html; charset='.$conf->character_set_client.'">'."\n";
print '<link rel="stylesheet" type="text/css" href="default.css">'."\n";
print '<title>'.$langs->trans("Help").'</title>'."\n";
print '</head>'."\n";
print '<body>'."\n";
print '<span class="titre">'.$soutitre.'</span>'."\n";
print '<form action="'.$next.'" method="POST">'."\n";
print '<input type="hidden" name="action" value="'.$action.'">'."\n";
print '<table class="main" width="100%"><tr><td>'."\n";
print '<table class="main-inside" width="100%"><tr><td>'."\n";
}
function pFooter($nonext=0,$setuplang='')
{
global $langs;
$langs->load("main");
$langs->load("admin");
print '</td></tr></table>'."\n";
print '</td></tr></table>'."\n";
print '</form>'."\n";
print '</body>'."\n";
print '</html>'."\n";
}
function dolibarr_support_syslog($message, $level=LOG_DEBUG)
{
if (! defined('LOG_DEBUG')) define('LOG_DEBUG',6);
dolibarr_syslog($message,$level);
}
?>

View File

@ -0,0 +1,75 @@
<?php
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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.
*/
/**
* \file htdocs/install/phpinfo.php
* \ingroup install
* \brief Provide an Online Help support
* This page must not
* \version $Id$
*/
include_once("./inc.php");
$langs->load("other");
pHeader("Online Help",$_SERVER["PHP_SELF"]);
print "This area can be used to get an Online Help service support.<br>\n";
print "This service is available in <b>english only</b>.<br><br>";
print '<br><br>';
print '<table border="1">';
// Line of possible services
print '<tr>';
print '<td align="center">';
print '<b>Community support</b>';
print '</td>';
print '<td align="center">';
print '<b>EMailing support</b>';
print '</td>';
print '<td align="center">';
print '<b>Remote control support</b>';
print '</td>';
print '</tr>';
// Logo of possible services
print '<tr>';
print '<td>';
print $langs->trans("FeatureNotYetAvailable").'.';
print '</td>';
print '<td>';
print $langs->trans("FeatureNotYetAvailable").'.';
print '</td>';
print '<td>';
print $langs->trans("FeatureNotYetAvailable").'.';
print '</td>';
print '</tr>';
print '</table>';
pFooter();
?>