dolibarr/htdocs/support/online.php

115 lines
3.8 KiB
PHP
Raw Normal View History

2009-05-08 23:41:54 +02:00
<?php
/* Copyright (C) 2008-2009 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
* \version $Id$
*/
include_once("./inc.php");
2009-05-09 20:00:14 +02:00
$uri=eregi_replace('^http(s?)://','',$dolibarr_main_url_root);
$pos = strstr ($uri, '/'); // $pos contient alors url sans nom domaine
if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a ''
define('DOL_URL_ROOT', $pos); // URL racine relative
2009-05-08 23:41:54 +02:00
$langs->load("other");
$langs->load("help");
2009-05-09 20:00:14 +02:00
pHeader($langs->trans("DolibarrHelpCenter"),$_SERVER["PHP_SELF"]);
2009-05-08 23:41:54 +02:00
2009-05-10 17:53:54 +02:00
$urlsparkengels='http://www.spark-angels.com';
$titlesparkangels='Spark-Angels';
2009-05-08 23:41:54 +02:00
//print '<br>';
2009-05-08 23:41:54 +02:00
print $langs->trans("ToGetHelpGoOnSparkAngels1",$titlesparkangels).'<br>';
2009-05-10 17:53:54 +02:00
print '<br>';
print '<table class="noborder"><tr valign="middle"><td>';
2009-05-12 22:08:10 +02:00
print '* '.$langs->trans("ToGetHelpGoOnSparkAngels3",$urlsparkengels);
print '</td><td>';
2009-05-12 22:08:10 +02:00
//print '<a href="'.$urlsparkengels.'" target="_blank">';
//print '<img border="0" src="sparkangels.png" alt="SparkAngels web site" title="SparkAngels web site">';
2009-05-10 17:53:54 +02:00
//print $titlesparkangels;
2009-05-12 22:08:10 +02:00
//print '</a>';
print '</td></tr></table><br>';
print $langs->trans("ToGetHelpGoOnSparkAngels2",$titlesparkangels).'<br>';
$arrayofwidgets=array(
// Widget for Laurent Destailleur
2009-05-12 14:28:29 +02:00
array('name'=>'Laurent Destailleur',
2009-05-12 22:44:36 +02:00
'id'=>'4256,4255', // Put of list of sparkangels widget id (for each language)
'lang'=>'fr,en'), // Put list of language code of widgets (always english at end)
2009-05-12 02:04:20 +02:00
// Widget for Regis Houssin
2009-05-12 14:28:29 +02:00
array('name'=>'R&eacute;gis Houssin',
'id'=>'4611',
2009-05-12 02:04:20 +02:00
'lang'=>'fr')
);
2009-05-10 17:53:54 +02:00
// Preselected widgets
2009-05-12 22:08:10 +02:00
$found=0;
print '<br><br>';
2009-05-12 22:08:10 +02:00
print '* '.$langs->trans("LinkToGoldMember",$langs->defaultlang).'<br><br>';
print '<table><tr>';
2009-05-12 22:08:10 +02:00
foreach ($arrayofwidgets as $arraywidget) // Loop on each user
{
2009-05-12 22:44:36 +02:00
$listofwidgets=split(',',$arraywidget['id']);
2009-05-12 22:08:10 +02:00
$listoflangs=split(',',$arraywidget['lang']);
2009-05-12 22:44:36 +02:00
$pos=0;
foreach($listoflangs as $langcode) // Loop on each lang of user
2009-05-12 22:08:10 +02:00
{
2009-05-12 22:44:36 +02:00
$pos++;
if (eregi($langcode,$langs->defaultlang) || $langcode == 'en') // If lang qualified
2009-05-12 22:08:10 +02:00
{
print '<td align="center">';
print $arraywidget['name'].'<br>';
print $langs->trans("PossibleLanguages").': ';
2009-05-12 22:44:36 +02:00
// All languages of user are shown
2009-05-12 22:08:10 +02:00
foreach ($listoflangs as $langcode2)
{
2009-05-12 22:44:36 +02:00
if (empty($widgetid)) $widgetid=$listoflangs[$pos-1];
2009-05-12 22:08:10 +02:00
if (! eregi($langcode,$langs->defaultlang) && $langcode2 != 'en') continue; // Show only english
print $langcode2.' ';
}
print '<br>';
2009-05-12 22:44:36 +02:00
// But only first language found is used for widget
$widgetid=$listofwidgets[$pos-1];
//print 'xx lang qualified='.$langcode.' id='.$widgetid;
print '<iframe src="http://dnld0.sparkom.com/static/widget/widgetpro-iframe.html?accountId='.$widgetid.'" width="172px" height="123px" frameborder="0" scrolling="no" marginheight="0" > </iframe>';
2009-05-12 22:08:10 +02:00
print '</td>';
$found=1;
break;
}
}
}
2009-05-12 22:08:10 +02:00
if (! $found) print '<td>'.$langs->trans("SorryNoHelpForYourLanguage").'</td>';
print '</tr></table>';
print '<br><br>';
print '* '.$langs->trans("BackToHelpCenter",DOL_URL_ROOT.'/support/');
2009-05-10 17:53:54 +02:00
print '<br><br>';
2009-05-08 23:41:54 +02:00
pFooter();
?>