New: le module clicktodial est opérationnel. Passer en version stable.
This commit is contained in:
parent
1ea33f2bc2
commit
434c4e149f
@ -34,11 +34,8 @@ htdocs/includes/treemenu/docs
|
||||
htdocs/includes/treemenu/images
|
||||
htdocs/includes/treemenu/imagesAlt
|
||||
htdocs/includes/treemenu/imagesAlt2
|
||||
htdocs/includes/modules/modBarcode.class.php
|
||||
htdocs/includes/modules/modBookmark4u.class.php
|
||||
htdocs/includes/modules/modClickToDial.class.php
|
||||
htdocs/includes/modules/modDocument.class.php
|
||||
htdocs/includes/modules/modDomain.class.php
|
||||
htdocs/includes/modules/modDroitPret.class.php
|
||||
htdocs/includes/modules/modEditeur.class.php
|
||||
htdocs/includes/modules/modPostnuke.class.php
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.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
|
||||
@ -15,15 +15,12 @@
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/** \file htdocs/admin/clicktodial.php
|
||||
\ingroup clicktodial
|
||||
\brief Page d'administration/configuration du module clicktodial
|
||||
\version $Revision$
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -68,14 +65,14 @@ $var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("NewValue").'</td><td>'.$langs->trans("CurrentValue").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td><td>'.$langs->trans("Desc").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("URL").'</td><td>';
|
||||
print '<input size="25" type="text" name="url" value="'.$conf->global->CLICKTODIAL_URL.'">';
|
||||
print '<input size="32" type="text" name="url" value="'.$conf->global->CLICKTODIAL_URL.'">';
|
||||
print '</td><td>';
|
||||
print $conf->global->CLICKTODIAL_URL;
|
||||
print $langs->trans("ClickToDialUrlDesc");
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||
@ -84,5 +81,4 @@ print '</table></form>';
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
?>
|
||||
|
||||
@ -54,18 +54,30 @@ if (isset($_GET["error"])) $error=$_GET["error"];
|
||||
*/
|
||||
if ($_POST["action"] == 'add_action')
|
||||
{
|
||||
if ($_POST["contactid"])
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$result=$contact->fetch($_POST["contactid"]);
|
||||
}
|
||||
|
||||
if ($_POST['cancel'])
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Nettoyage parametres
|
||||
if ($_POST["aphour"] == -1) $_POST["aphour"]='0';
|
||||
if ($_POST["apmin"] == -1) $_POST["apmin"]='0';
|
||||
if ($_POST["adhour"] == -1) $_POST["adhour"]='0';
|
||||
if ($_POST["admin"] == -1) $_POST["admin"]='0';
|
||||
$datep=@mktime($_POST["aphour"],
|
||||
$datep=dolibarr_mktime($_POST["aphour"],
|
||||
$_POST["apmin"],
|
||||
0,
|
||||
$_POST["apmonth"],
|
||||
$_POST["apday"],
|
||||
$_POST["apyear"]);
|
||||
$datea=@mktime($_POST["adhour"],
|
||||
$datea=dolibarr_mktime($_POST["adhour"],
|
||||
$_POST["admin"],
|
||||
0,
|
||||
$_POST["admonth"],
|
||||
@ -75,12 +87,6 @@ if ($_POST["action"] == 'add_action')
|
||||
if (! ($datep > 0)) $datep='';
|
||||
if (! ($datea > 0)) $datea='';
|
||||
|
||||
if ($_POST["contactid"])
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($_POST["contactid"]);
|
||||
}
|
||||
|
||||
if (! $_POST["actioncode"])
|
||||
{
|
||||
$error=1;
|
||||
@ -286,7 +292,7 @@ $html = new Form($db);
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Affichage fiche en mode cr<EFBFBD>ation */
|
||||
/* Affichage fiche en mode creation */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -402,7 +408,11 @@ if ($_GET["action"] == 'create')
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
|
||||
print '<tr><td colspan="2" align="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
@ -412,27 +422,6 @@ if ($_GET["action"] == 'create')
|
||||
*/
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Click to dial
|
||||
*
|
||||
*/
|
||||
if ($conf->clicktodial->enabled)
|
||||
{
|
||||
$user->fetch_clicktodial();
|
||||
|
||||
if ($_GET["call"] && $user->clicktodial_enabled == 1)
|
||||
{
|
||||
|
||||
print '<Script language=javascript>'."\n";
|
||||
|
||||
$url = CLICKTODIAL_URL ."?login=".$user->clicktodial_login."&password=".$user->clicktodial_password."&caller=".$user->clicktodial_poste ."&called=".$_GET["call"];
|
||||
|
||||
print 'window.open("'.$url.'","clicktodial", "toolbar=no,location=0,directories=0,status=0,menubar=no,scrollbars=1,resizable=1,copyhistory=0,width=400,height=300,top=10,left=10");';
|
||||
print "\n</script>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print_titre ($langs->trans("AddAnAction"));
|
||||
print "<br>";
|
||||
|
||||
@ -471,7 +460,7 @@ if ($_GET["action"] == 'create')
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Si la societe est impos<EFBFBD>e, on propose ces contacts
|
||||
// Si la societe est imposee, on propose ces contacts
|
||||
if ($_REQUEST["socid"])
|
||||
{
|
||||
print '<tr><td nowrap>'.$langs->trans("ActionOnContact").'</td><td>';
|
||||
@ -546,7 +535,11 @@ if ($_GET["action"] == 'create')
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
@ -18,15 +18,13 @@
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/comm/fiche.php
|
||||
\ingroup commercial
|
||||
\brief Onglet client de la fiche societe
|
||||
\version $Revision$
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require_once("./pre.inc.php");
|
||||
@ -184,12 +182,15 @@ if ($socid > 0)
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$objsoc->pays.'</td></tr>';
|
||||
}
|
||||
|
||||
// Phone
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dolibarr_print_phone($objsoc->tel,$objsoc->pays_code).'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($objsoc->fax,$objsoc->pays_code).'</td></tr>';
|
||||
|
||||
// Fax
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dolibarr_print_phone($objsoc->fax,$objsoc->pays_code).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$objsoc->url\" target=\"_blank\">".$objsoc->url."</a> </td></tr>";
|
||||
|
||||
// Assujeti <EFBFBD> TVA ou pas
|
||||
// Assujeti TVA ou pas
|
||||
print '<tr>';
|
||||
print '<td nowrap="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
|
||||
print yn($objsoc->tva_assuj);
|
||||
@ -633,7 +634,7 @@ if ($socid > 0)
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td colspan="2">'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td> </td>";
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
@ -666,27 +667,17 @@ if ($socid > 0)
|
||||
print $contactstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$obj->poste.' </td>';
|
||||
print '<td>'.$obj->poste.'</td>';
|
||||
|
||||
// Lien click to dial
|
||||
if (strlen($obj->phone) && $user->clicktodial_enabled == 1)
|
||||
{
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$objsoc->id.'&call='.$obj->phone.'">';
|
||||
print img_phone_out("Appel emis") ;
|
||||
print '</td><td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">';
|
||||
}
|
||||
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
print dolibarr_print_phone($obj->phone);
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
if ($obj->phone) print ' '.dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$objsoc->id.'">';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-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
|
||||
@ -113,8 +113,8 @@ if ($socid > 0)
|
||||
print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td colspan="3">'.$societe->cp." ".$societe->ville.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$societe->pays.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.$societe->tel.' </td><td>Fax</td><td>'.$societe->fax.' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a> </td></tr>";
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code).'</td><td>Fax</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a></td></tr>";
|
||||
|
||||
if ($societe->rubrique)
|
||||
{
|
||||
@ -282,23 +282,21 @@ if ($socid > 0)
|
||||
print '</td>';
|
||||
print '<td>'.$obj->poste.' </td>';
|
||||
|
||||
print '<td>';
|
||||
// Phone
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print $obj->phone;
|
||||
if (strlen($obj->phone) && $user->clicktodial_enabled == 1)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$societe->id.'&call='.$obj->phone.'">';
|
||||
print img_phone_out("Appel émis") ;
|
||||
}
|
||||
print dolibarr_print_phone($obj->phone,'');
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
if ($obj->phone) print ' '.dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
|
||||
// Fax
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print $obj->fax;
|
||||
print dolibarr_print_phone($obj->fax);
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
|
||||
@ -15,15 +15,13 @@
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/fiche.php
|
||||
\ingroup compta
|
||||
\brief Page de fiche compta
|
||||
\version $Revision$
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -425,14 +423,15 @@ if ($socid > 0)
|
||||
print $obj->phone;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
if ($obj->phone) print ' '.dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
print $obj->fax;
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '</a>';
|
||||
print ' </td>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
print '<a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$societe->id.'">';
|
||||
|
||||
@ -111,7 +111,7 @@ if ( $societe->fetch($socid) )
|
||||
print '<tr><td>'.$langs->trans("Zip").'</td><td>'.$societe->cp.'</td>';
|
||||
print '<td>'.$langs->trans("Town").'</td><td>'.$societe->ville.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">'.$societe->pays.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel).' </td><td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($societe->fax).' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code).' </td><td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code).' </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a> </td></tr>";
|
||||
|
||||
// Assujeti <20> TVA ou pas
|
||||
@ -344,9 +344,11 @@ if ( $societe->fetch($socid) )
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>$obj->poste </td>";
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->phone.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->fax.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->email.'</a> </td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_TEL&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->phone.'</a>';
|
||||
if ($obj->phone) print ' '.dol_phone_link($obj->phone);
|
||||
print '</td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_FAX&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->fax.'</a></td>';
|
||||
print '<td><a href="../comm/action/fiche.php?action=create&actioncode=AC_EMAIL&contactid='.$obj->rowid.'&socid='.$societe->id.'">'.$obj->email.'</a></td>';
|
||||
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
*
|
||||
@ -17,12 +17,11 @@
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/** \defgroup oscommerce Module OSCommerce
|
||||
\brief Module pour g<EFBFBD>rer une boutique et interface avec OSCommerce
|
||||
\brief Module pour gerer une boutique et interface avec OSCommerce
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.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
|
||||
@ -15,8 +15,6 @@
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,6 +26,7 @@
|
||||
\file htdocs/includes/modules/modClickToDial.class.php
|
||||
\ingroup clicktodial
|
||||
\brief Fichier de description et activation du module de click to Dial
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
|
||||
@ -54,7 +53,7 @@ class modClickToDial extends DolibarrModules
|
||||
$this->name = "ClickToDial";
|
||||
$this->description = "Gestion du Click To Dial";
|
||||
|
||||
$this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version
|
||||
$this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_CLICKTODIAL';
|
||||
$this->special = 1;
|
||||
@ -63,17 +62,17 @@ class modClickToDial extends DolibarrModules
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
|
||||
// D<EFBFBD>pendances
|
||||
// Dependencies
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("clicktodial.php");
|
||||
|
||||
// Constantes
|
||||
// Constants
|
||||
$this->const = array();
|
||||
|
||||
// Boites
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -583,6 +583,7 @@ FicheinterNumberingModules=Intervention numbering modules
|
||||
TemplatePDFInterventions=Intervention card documents models
|
||||
##### Clicktodial #####
|
||||
ClickToDialSetup=Click To Dial module setup
|
||||
ClickToDialUrlDesc=Url called when a click on phone picto is done.<br>Complete url will be: URL?login=...&password=...&caller=...&called=phonecalled
|
||||
##### Bookmark4u #####
|
||||
Bookmark4uSetup=Bookmark4u module setup
|
||||
##### Interventions #####
|
||||
|
||||
@ -84,3 +84,4 @@ Reactivate=Reactivate
|
||||
CreateInternalUserDesc=This form allows you to creat an user internal to your company/fundation. To creat an external user (customer, supplier, ...), use button 'Create Dolibarr user' from third party's contact card.
|
||||
InternalExternalDesc=An <b>internal</b> user is a user that is part of your company/fundation.<br>An <b>external</b> user is a customer, supplier or other.<br><br>In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display)
|
||||
PermissionInheritedFromAGroup=Permission granted because ineherited from one of a user's group.
|
||||
IdPhoneCaller=Id phone caller
|
||||
@ -582,6 +582,7 @@ FicheinterNumberingModules=Modules de num
|
||||
TemplatePDFInterventions=Modèle de documents des fiches d'interventions
|
||||
##### Clicktodial #####
|
||||
ClickToDialSetup=Configuration du module Click To Dial
|
||||
ClickToDialUrlDesc=Url appelée lors dun clic sur le picto téléphone.<br>L'url complète appelée sera: URL?login=...&password=...&caller=...&called=telappelé
|
||||
##### Bookmark4u #####
|
||||
Bookmark4uSetup=Configuration du module Bookmark4u
|
||||
##### Interventions #####
|
||||
|
||||
@ -84,3 +84,4 @@ Reactivate=R
|
||||
CreateInternalUserDesc=Cet écran permet de créer un utilisateur interne à votre société/institution. Pour créer un utilisateur externe (client, fournisseur, ...), utiliser le bouton 'Créer utilisateur Dolibarr' qui se trouve sur la fiche contact du tiers en question.
|
||||
InternalExternalDesc=Un utilisateur <b>interne</b> est un utilisateur appartenant à votre société/institution.<br>Un utilisateur <b>externe</b> est un utilisateur client, fournisseur ou autre.<br><br>Dans les 2 cas, les permissions utilisateurs définissent les droits d'accès mais l'utilisateur externe peut en plus avoir un gestionnaire de menu différent de l'utilisateur interne (Voir Accueil - Configuration - Affichage)
|
||||
PermissionInheritedFromAGroup=La permission est accordée car héritée d'un groupe auquel appartient l'utilisateur.
|
||||
IdPhoneCaller=Id appelant (téléphone)
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2000-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
@ -778,9 +778,11 @@ function dolibarr_print_object_info($object)
|
||||
*/
|
||||
function dolibarr_print_phone($phone,$country="FR")
|
||||
{
|
||||
$phone=trim($phone);
|
||||
if (strstr($phone, ' ')) { return $phone; }
|
||||
if (strtoupper($country) == "FR") {
|
||||
$phone=trim($phone);
|
||||
if (! $phone) { return $phone; }
|
||||
|
||||
if (strtoupper($country) == "FR")
|
||||
{
|
||||
// France
|
||||
if (strlen($phone) == 10) {
|
||||
return substr($phone,0,2)." ".substr($phone,2,2)." ".substr($phone,4,2)." ".substr($phone,6,2)." ".substr($phone,8,2);
|
||||
@ -803,9 +805,30 @@ function dolibarr_print_phone($phone,$country="FR")
|
||||
return substr($phone,0,4)." ".substr($phone,4,2)." ".substr($phone,6,2)." ".substr($phone,8,2)." ".substr($phone,10,2);
|
||||
}
|
||||
}
|
||||
|
||||
return $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Show click to dial link
|
||||
* \param phone Phone to call
|
||||
* \param option Type of picto
|
||||
* \return string Link
|
||||
*/
|
||||
function dol_phone_link($phone,$option=0)
|
||||
{
|
||||
global $conf,$user;
|
||||
|
||||
$link='';
|
||||
$phone=trim($phone);
|
||||
|
||||
$url = $conf->global->CLICKTODIAL_URL;
|
||||
$url.= "?login=".urlencode($user->clicktodial_login)."&password=".urlencode($user->clicktodial_password);
|
||||
$url.= "&caller=".urlencode($user->clicktodial_poste)."&called=".urlencode(trim($phone));
|
||||
$link.='<a href="#" onclick="newpopup(\''.$url.'\',\'\');">'.img_phone("default",0).'</a>';
|
||||
return $link;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Tronque une chaine a une taille donnée en ajoutant les points de suspension si cela dépasse
|
||||
\param string String to truncate
|
||||
@ -1148,28 +1171,21 @@ function img_alerte($alt = "default")
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Affiche logo téléphone in
|
||||
\brief Affiche logo téléphone
|
||||
\param alt Texte sur le alt de l'image
|
||||
\param option Choose of logo
|
||||
\return string Retourne tag img
|
||||
*/
|
||||
function img_phone_in($alt = "default")
|
||||
function img_phone($alt = "default",$option=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Modify");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/call.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
if ($alt=="default") $alt=$langs->trans("Call");
|
||||
$img='call_out';
|
||||
if ($option == 1) $img='call';
|
||||
$img='object_commercial';
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/'.$img.'.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Affiche logo téléphone out
|
||||
\param alt Texte sur le alt de l'image
|
||||
\return string Retourne tag img
|
||||
*/
|
||||
function img_phone_out($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Modify");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/call.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Affiche logo suivant
|
||||
|
||||
@ -699,28 +699,34 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0)
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/scriptaculous.js"></script>'."\n";
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/effects.js"></script>'."\n";
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/controls.js"></script>'."\n";
|
||||
// TODO As-ton besoin des ces 2 js ?
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/window/window.js"></script>'."\n";
|
||||
print '<script language="javascript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/scriptaculous/src/window/tooltip.js"></script>'."\n";
|
||||
|
||||
}
|
||||
|
||||
// TODO Voir si on peut pas virer ca
|
||||
if (! $disablejs && $conf->use_javascript_ajax)
|
||||
{
|
||||
// Define tradMonths javascript array
|
||||
$tradTemp=Array($langs->trans("January"),
|
||||
$langs->trans("February"),
|
||||
$langs->trans("March"),
|
||||
$langs->trans("April"),
|
||||
$langs->trans("May"),
|
||||
$langs->trans("June"),
|
||||
$langs->trans("July"),
|
||||
$langs->trans("August"),
|
||||
$langs->trans("September"),
|
||||
$langs->trans("October"),
|
||||
$langs->trans("November"),
|
||||
$langs->trans("December")
|
||||
);
|
||||
print '<script language="javascript" type="text/javascript">';
|
||||
print 'var tradMonths = '.php2js($tradTemp).';';
|
||||
print '</script>'."\n";
|
||||
}
|
||||
// Define tradMonths javascript array
|
||||
$tradTemp=Array($langs->trans("January"),
|
||||
$langs->trans("February"),
|
||||
$langs->trans("March"),
|
||||
$langs->trans("April"),
|
||||
$langs->trans("May"),
|
||||
$langs->trans("June"),
|
||||
$langs->trans("July"),
|
||||
$langs->trans("August"),
|
||||
$langs->trans("September"),
|
||||
$langs->trans("October"),
|
||||
$langs->trans("November"),
|
||||
$langs->trans("December")
|
||||
);
|
||||
print '<script language="javascript" type="text/javascript">';
|
||||
print 'var tradMonths = '.php2js($tradTemp).';';
|
||||
print '</script>'."\n";
|
||||
|
||||
|
||||
print "</head>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (c) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (c) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (c) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
@ -1338,8 +1338,9 @@ class User extends CommonObject
|
||||
function fetch_clicktodial()
|
||||
{
|
||||
|
||||
$sql = "SELECT login, pass, poste FROM ".MAIN_DB_PREFIX."user_clicktodial as u";
|
||||
$sql .= " WHERE u.fk_user = ".$this->id;
|
||||
$sql = "SELECT login, pass, poste ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_clicktodial as u";
|
||||
$sql.= " WHERE u.fk_user = ".$this->id;
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-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
|
||||
@ -15,15 +15,12 @@
|
||||
* 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$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/user/clicktodial.php
|
||||
\brief Gestion des infos de click to dial
|
||||
\version $Revision$
|
||||
\brief Page for Click to dial datas
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -38,18 +35,15 @@ $form = new Form($db);
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($_POST["action"] == 'update')
|
||||
if ($_POST["action"] == 'update' && ! $_POST['cancel'])
|
||||
{
|
||||
$edituser = new User($db, $_GET["id"]);
|
||||
|
||||
$edituser->clicktodial_login = $_POST["login"];
|
||||
$edituser->clicktodial_password = $_POST["password"];
|
||||
$edituser->clicktodial_poste = $_POST["poste"];
|
||||
|
||||
$edituser->update_clicktodial();
|
||||
|
||||
Header("Location: clicktodial.php?id=".$_GET["id"]);
|
||||
exit;
|
||||
$edituser = new User($db, $_GET["id"]);
|
||||
|
||||
$edituser->clicktodial_login = $_POST["login"];
|
||||
$edituser->clicktodial_password = $_POST["password"];
|
||||
$edituser->clicktodial_poste = $_POST["poste"];
|
||||
|
||||
$result=$edituser->update_clicktodial();
|
||||
}
|
||||
|
||||
|
||||
@ -78,43 +72,60 @@ if ($_GET["id"])
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
|
||||
print '<td width="25%" class="valeur">'.$fuser->nom.'</td>';
|
||||
print '<td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
|
||||
print '<td width="25%" class="valeur">'.$fuser->prenom.'</td>';
|
||||
// Ref
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nom
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
|
||||
print '<td colspan="2">'.$fuser->nom.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
||||
print '<td width="25%" class="valeur">'.$fuser->login.'</td>';
|
||||
print '<td width="25%" valign="top">'.$langs->trans("EMail").'</td>';
|
||||
print '<td width="25%" class="valeur"><a href="mailto:'.$fuser->email.'">'.$fuser->email.'</a></td>';
|
||||
// Prenom
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
|
||||
print '<td colspan="2">'.$fuser->prenom.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
print "<br>\n";
|
||||
|
||||
print info_admin($langs->trans("ClickToDialUrlDesc"));
|
||||
|
||||
if ($_GET["action"] == 'edit')
|
||||
{
|
||||
print '<form action="clicktodial.php?id='.$_GET["id"].'" method="post">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<table class="border" width="100%">';
|
||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
||||
print '<td width="25%" class="valeur">';
|
||||
|
||||
if ($user->admin)
|
||||
{
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial URL</td>';
|
||||
print '<td class="valeur">'.$conf->global->CLICKTODIAL_URL.'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print '<input name="login" value="'.$fuser->clicktodial_login.'"></td>';
|
||||
|
||||
print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>';
|
||||
print '<td width="25%" class="valeur">';
|
||||
print '</tr>';
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print '<input name="password" value="'.$fuser->clicktodial_password.'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">Poste</td>';
|
||||
print '<td width="25%" class="valeur">';
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
|
||||
print '<td class="valeur">';
|
||||
print '<input name="poste" value="'.$fuser->clicktodial_poste.'"></td>';
|
||||
print '<td width="25%" valign="top"> </td>';
|
||||
print '<td width="25%" valign="top"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr><td colspan="4" align="center"><input class="button" type="submit"></td></tr>';
|
||||
print '<tr><td colspan="2" align="center"><input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table></form>';
|
||||
}
|
||||
@ -123,17 +134,20 @@ if ($_GET["id"])
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">'.$langs->trans("Login").'</td>';
|
||||
print '<td width="25%" class="valeur">'.$fuser->clicktodial_login.'</td>';
|
||||
print '<td width="25%" valign="top">'.$langs->trans("Password").'</td>';
|
||||
print '<td width="25%" class="valeur">XXXXXX</a></td>';
|
||||
if ($user->admin)
|
||||
{
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial URL</td>';
|
||||
print '<td class="valeur">'.$conf->global->CLICKTODIAL_URL.'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Login").'</td>';
|
||||
print '<td class="valeur">'.$fuser->clicktodial_login.'</td>';
|
||||
print '</tr>';
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("Password").'</td>';
|
||||
print '<td class="valeur">'.$fuser->clicktodial_password.'</a></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">Poste</td>';
|
||||
print '<td width="25%" class="valeur">'.$fuser->clicktodial_poste.'</td>';
|
||||
print '<td width="25%" valign="top"> </td>';
|
||||
print '<td width="25%" valign="top"> </td>';
|
||||
|
||||
print "<tr>".'<td width="25%" valign="top">ClickToDial '.$langs->trans("IdPhoneCaller").'</td>';
|
||||
print '<td class="valeur">'.$fuser->clicktodial_poste.'</td>';
|
||||
print "</tr></table>\n";
|
||||
}
|
||||
|
||||
@ -149,11 +163,6 @@ if ($_GET["id"])
|
||||
print '<a class="butAction" href="clicktodial.php?id='.$fuser->id.'&action=edit">'.$langs->trans("Modify").'</a>';
|
||||
}
|
||||
|
||||
if ($user->admin && $_GET["action"] == 'edit')
|
||||
{
|
||||
print '<a class="butAction" href="clicktodial.php?id='.$fuser->id.'">'.$langs->trans("Cancel").'</a>';
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005 Lionel COUSTEIX <etm_ltd@tiscali.co.uk>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user