Task 157 : Add a skype button
This commit is contained in:
parent
a9dd9d6dfc
commit
d79ba9695a
@ -65,6 +65,7 @@ class Adherent extends CommonObject
|
||||
var $country;
|
||||
|
||||
var $email;
|
||||
var $skype;
|
||||
var $phone;
|
||||
var $phone_perso;
|
||||
var $phone_mobile;
|
||||
@ -430,6 +431,7 @@ class Adherent extends CommonObject
|
||||
$sql.= ", country=".($this->country_id>0?"'".$this->country_id."'":"null");
|
||||
$sql.= ", state_id=".($this->state_id>0?"'".$this->state_id."'":"null");
|
||||
$sql.= ", email='".$this->email."'";
|
||||
$sql.= ", skype='".$this->skype."'";
|
||||
$sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null");
|
||||
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
|
||||
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
|
||||
@ -526,6 +528,7 @@ class Adherent extends CommonObject
|
||||
$luser->societe_id=$this->societe;
|
||||
|
||||
$luser->email=$this->email;
|
||||
$luser->skype=$this->skype;
|
||||
$luser->office_phone=$this->phone;
|
||||
$luser->user_mobile=$this->phone_mobile;
|
||||
|
||||
@ -564,6 +567,7 @@ class Adherent extends CommonObject
|
||||
$lthirdparty->zip=$this->zip;
|
||||
$lthirdparty->town=$this->town;
|
||||
$lthirdparty->email=$this->email;
|
||||
$lthirdparty->skype=$this->skype;
|
||||
$lthirdparty->phone=$this->phone;
|
||||
$lthirdparty->state_id=$this->state_id;
|
||||
$lthirdparty->country_id=$this->country_id;
|
||||
@ -1047,7 +1051,7 @@ class Adherent extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$sql = "SELECT d.rowid, d.ref_ext, d.civilite, d.firstname, d.lastname, d.societe as company, d.fk_soc, d.statut, d.public, d.address, d.zip, d.town, d.note,";
|
||||
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
||||
$sql.= " d.email, d.skype, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
|
||||
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
|
||||
$sql.= " d.datec as datec,";
|
||||
$sql.= " d.tms as datem,";
|
||||
@ -1115,6 +1119,7 @@ class Adherent extends CommonObject
|
||||
$this->phone_perso = $obj->phone_perso;
|
||||
$this->phone_mobile = $obj->phone_mobile;
|
||||
$this->email = $obj->email;
|
||||
$this->skype = $obj->skype;
|
||||
|
||||
$this->photo = $obj->photo;
|
||||
$this->statut = $obj->statut;
|
||||
@ -1782,6 +1787,7 @@ class Adherent extends CommonObject
|
||||
$this->country = 'France';
|
||||
$this->morphy = 1;
|
||||
$this->email = 'specimen@specimen.com';
|
||||
$this->skype = 'tom.hanson';
|
||||
$this->phone = '0999999999';
|
||||
$this->phone_perso = '0999999998';
|
||||
$this->phone_mobile = '0999999997';
|
||||
@ -1853,6 +1859,7 @@ class Adherent extends CommonObject
|
||||
if ($this->town && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->town;
|
||||
if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
|
||||
if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
|
||||
if ($this->skype && ! empty($conf->global->LDAP_MEMBER_FIELD_SKYPE)) $info[$conf->global->LDAP_MEMBER_FIELD_SKYPE] = $this->skype;
|
||||
if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
|
||||
if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
|
||||
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
||||
|
||||
@ -285,6 +285,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
$object->phone_perso = trim($_POST["phone_perso"]);
|
||||
$object->phone_mobile= trim($_POST["phone_mobile"]);
|
||||
$object->email = trim($_POST["email"]);
|
||||
$object->skype = trim($_POST["skype"]);
|
||||
$object->birth = $birthdate;
|
||||
|
||||
$object->typeid = $_POST["typeid"];
|
||||
@ -413,6 +414,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$phone=$_POST["phone"];
|
||||
$phone_perso=$_POST["phone_perso"];
|
||||
$phone_mobile=$_POST["phone_mobile"];
|
||||
$skype=$_POST["member_skype"];
|
||||
$email=$_POST["member_email"];
|
||||
$login=$_POST["member_login"];
|
||||
$pass=$_POST["password"];
|
||||
@ -437,6 +439,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
|
||||
$object->phone = $phone;
|
||||
$object->phone_perso = $phone_perso;
|
||||
$object->phone_mobile= $phone_mobile;
|
||||
$object->skype = $skype;
|
||||
$object->email = $email;
|
||||
$object->login = $login;
|
||||
$object->pass = $pass;
|
||||
@ -844,6 +847,12 @@ else
|
||||
// Tel mobile
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(GETPOST('phone_mobile','alpha')?GETPOST('phone_mobile','alpha'):$object->phone_mobile).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="member_skype" size="40" value="'.(GETPOST('member_skype','alpha')?GETPOST('member_skype','alpha'):$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
$form->select_date(($object->naiss ? $object->naiss : -1),'naiss','','',1,'formsoc');
|
||||
@ -1080,6 +1089,11 @@ else
|
||||
// Tel mobile
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td><input type="text" name="phone_mobile" size="20" value="'.(isset($_POST["phone_mobile"])?$_POST["phone_mobile"]:$object->phone_mobile).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled)) {
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input type="text" name="skype" size="40" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Birthday
|
||||
print "<tr><td>".$langs->trans("Birthday")."</td><td>\n";
|
||||
$form->select_date(($object->birth ? $object->birth : -1),'birth','','',1,'formsoc');
|
||||
@ -1398,6 +1412,9 @@ else
|
||||
// Tel mobile
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td class="valeur">'.dol_print_phone($object->phone_mobile,$object->country_code,0,$object->fk_soc,1).'</td></tr>';
|
||||
|
||||
// Skype
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td class="valeur">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
|
||||
// Birthday
|
||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||
|
||||
|
||||
@ -61,6 +61,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_PHONE',GETPOST("fieldphone"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_HOMEPHONE',GETPOST("fieldhomephone"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_MOBILE',GETPOST("fieldmobile"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_SKYPE',GETPOST("fieldskype"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_FAX',GETPOST("fieldfax"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ADDRESS',GETPOST("fieldaddress"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_CONTACT_FIELD_ZIP',GETPOST("fieldzip"),'chaine',0,'',$conf->entity)) $error++;
|
||||
@ -214,6 +215,14 @@ print '</td><td>'.$langs->trans("LDAPFieldMobileExample").'</td>';
|
||||
print '<td align="right"><input type="radio" name="key" value="LDAP_CONTACT_FIELD_MOBILE"'.($conf->global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_MOBILE?' checked="checked"':'')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldSkype").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldskype" value="'.$conf->global->LDAP_CONTACT_FIELD_SKYPE.'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldSkypeExample").'</td>';
|
||||
print '<td align="right"><input type="radio" name="key" value="LDAP_CONTACT_FIELD_SKYPE"'.($conf->global->LDAP_KEY_CONTACTS && $conf->global->LDAP_KEY_CONTACTS==$conf->global->LDAP_CONTACT_FIELD_SKYPE?' checked="checked"':'')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Fax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
||||
|
||||
@ -65,6 +65,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE',GETPOST("fieldphone"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE_PERSO',GETPOST("fieldphoneperso"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MOBILE',GETPOST("fieldmobile"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_SKYPE',GETPOST("fieldskype"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FAX',GETPOST("fieldfax"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ADDRESS',GETPOST("fieldaddress"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ZIP',GETPOST("fieldzip"),'chaine',0,'',$conf->entity)) $error++;
|
||||
@ -255,6 +256,14 @@ print '</td><td>'.$langs->trans("LDAPFieldMobileExample").'</td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldSkype").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldskype" value="'.$conf->global->LDAP_MEMBER_FIELD_SKYPE.'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldSkypeExample").'</td>';
|
||||
print '<td align="right"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Fax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
||||
|
||||
@ -63,6 +63,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_MAIL',GETPOST("fieldmail"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_PHONE',GETPOST("fieldphone"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_MOBILE',GETPOST("fieldmobile"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_SKYPE',GETPOST("fieldskype"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_FAX',GETPOST("fieldfax"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_DESCRIPTION',GETPOST("fielddescription"),'chaine',0,'',$conf->entity)) $error++;
|
||||
if (! dolibarr_set_const($db, 'LDAP_FIELD_SID',GETPOST("fieldsid"),'chaine',0,'',$conf->entity)) $error++;
|
||||
@ -240,6 +241,14 @@ print '</td><td>'.$langs->trans("LDAPFieldMobileExample").'</td>';
|
||||
print '<td align="right"><input type="radio" name="key" value="LDAP_FIELD_MOBILE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_MOBILE)?' checked="checked"':'')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldSkype").'</td><td>';
|
||||
print '<input size="25" type="text" name="fieldskype" value="'.$conf->global->LDAP_FIELD_SKYPE.'">';
|
||||
print '</td><td>'.$langs->trans("LDAPFieldSkypeExample").'</td>';
|
||||
print '<td align="right"><input type="radio" name="key" value="LDAP_FIELD_SKYPE"'.(($conf->global->LDAP_KEY_USERS && $conf->global->LDAP_KEY_USERS==$conf->global->LDAP_FIELD_SKYPE)?' checked="checked"':'')."></td>";
|
||||
print '</tr>';
|
||||
|
||||
// Fax
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldFax").'</td><td>';
|
||||
@ -383,6 +392,7 @@ if (function_exists("ldap_connect"))
|
||||
$conf->global->LDAP_FIELD_PASSWORD_CRYPTED,
|
||||
$conf->global->LDAP_FIELD_PHONE,
|
||||
$conf->global->LDAP_FIELD_FAX,
|
||||
$conf->global->LDAP_FIELD_SKYPE,
|
||||
$conf->global->LDAP_FIELD_MOBILE,
|
||||
$conf->global->LDAP_FIELD_MAIL,
|
||||
$conf->global->LDAP_FIELD_TITLE,
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -267,6 +268,12 @@ if ($id > 0)
|
||||
// Fax
|
||||
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans('Skype').'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->id,'AC_SKYPE').'</td></tr>';
|
||||
}
|
||||
|
||||
// Assujeti a TVA ou pas
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -62,6 +63,7 @@ class Contact extends CommonObject
|
||||
|
||||
var $code;
|
||||
var $email;
|
||||
var $skype;
|
||||
var $phone_pro;
|
||||
var $phone_perso;
|
||||
var $phone_mobile;
|
||||
@ -226,6 +228,7 @@ class Contact extends CommonObject
|
||||
$this->phone_perso=trim($this->phone_perso);
|
||||
$this->phone_mobile=trim($this->phone_mobile);
|
||||
$this->jabberid=trim($this->jabberid);
|
||||
$this->skype=trim($this->skype);
|
||||
$this->fax=trim($this->fax);
|
||||
$this->zip=(empty($this->zip)?'':$this->zip);
|
||||
$this->town=(empty($this->town)?'':$this->town);
|
||||
@ -249,6 +252,7 @@ class Contact extends CommonObject
|
||||
$sql .= ", poste='".$this->db->escape($this->poste)."'";
|
||||
$sql .= ", fax='".$this->db->escape($this->fax)."'";
|
||||
$sql .= ", email='".$this->db->escape($this->email)."'";
|
||||
$sql .= ", skype='".$this->db->escape($this->skype)."'";
|
||||
$sql .= ", note_private = ".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null");
|
||||
$sql .= ", note_public = ".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null");
|
||||
$sql .= ", phone = ".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null");
|
||||
@ -379,6 +383,7 @@ class Contact extends CommonObject
|
||||
if ($this->phone_perso && ! empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso;
|
||||
if ($this->phone_mobile && ! empty($conf->global->LDAP_CONTACT_FIELD_MOBILE)) $info[$conf->global->LDAP_CONTACT_FIELD_MOBILE] = $this->phone_mobile;
|
||||
if ($this->fax && ! empty($conf->global->LDAP_CONTACT_FIELD_FAX)) $info[$conf->global->LDAP_CONTACT_FIELD_FAX] = $this->fax;
|
||||
if ($this->skype && ! empty($conf->global->LDAP_CONTACT_FIELD_SKYPE)) $info[$conf->global->LDAP_CONTACT_FIELD_SKYPE] = $this->skype;
|
||||
if ($this->note_private && ! empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = $this->note_private;
|
||||
if ($this->email && ! empty($conf->global->LDAP_CONTACT_FIELD_MAIL)) $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email;
|
||||
|
||||
@ -494,7 +499,7 @@ class Contact extends CommonObject
|
||||
$sql.= " c.fk_pays as country_id,";
|
||||
$sql.= " c.fk_departement,";
|
||||
$sql.= " c.birthday,";
|
||||
$sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid,";
|
||||
$sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.skype,";
|
||||
$sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.no_email, c.canvas,";
|
||||
$sql.= " c.import_key,";
|
||||
$sql.= " p.libelle as country, p.code as country_code,";
|
||||
@ -549,6 +554,7 @@ class Contact extends CommonObject
|
||||
|
||||
$this->email = $obj->email;
|
||||
$this->jabberid = $obj->jabberid;
|
||||
$this->skype = $obj->skype;
|
||||
$this->priv = $obj->priv;
|
||||
$this->mail = $obj->email;
|
||||
|
||||
@ -1025,6 +1031,7 @@ class Contact extends CommonObject
|
||||
$this->country_code = 'FR';
|
||||
$this->country = 'France';
|
||||
$this->email = 'specimen@specimen.com';
|
||||
$this->skype = 'tom.hanson';
|
||||
|
||||
$this->phone_pro = '0909090901';
|
||||
$this->phone_perso = '0909090902';
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -168,13 +169,14 @@ if (empty($reshook))
|
||||
$object->town = $_POST["town"];
|
||||
$object->country_id = $_POST["country_id"];
|
||||
$object->state_id = $_POST["state_id"];
|
||||
$object->skype = $_POST["skype"];
|
||||
$object->email = $_POST["email"];
|
||||
$object->phone_pro = $_POST["phone_pro"];
|
||||
$object->phone_perso = $_POST["phone_perso"];
|
||||
$object->phone_mobile = $_POST["phone_mobile"];
|
||||
$object->fax = $_POST["fax"];
|
||||
$object->jabberid = $_POST["jabberid"];
|
||||
$object->no_email = $_POST["no_email"];
|
||||
$object->no_email = $_POST["no_email"];
|
||||
$object->priv = $_POST["priv"];
|
||||
$object->note_public = GETPOST("note_public");
|
||||
$object->note_private = GETPOST("note_private");
|
||||
@ -268,6 +270,7 @@ if (empty($reshook))
|
||||
$object->country_id = $_POST["country_id"];
|
||||
|
||||
$object->email = $_POST["email"];
|
||||
$object->skype = $_POST["skype"];
|
||||
$object->phone_pro = $_POST["phone_pro"];
|
||||
$object->phone_perso = $_POST["phone_perso"];
|
||||
$object->phone_mobile = $_POST["phone_mobile"];
|
||||
@ -514,7 +517,7 @@ else
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
print '<td colspan="2"> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
@ -522,6 +525,12 @@ else
|
||||
// Instant message and no email
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3"><input name="skype" type="text" size="50" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||
@ -712,7 +721,7 @@ else
|
||||
print '</tr>';
|
||||
|
||||
// Jabberid
|
||||
print '<tr><td>Jabberid</td><td><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||
print '<tr><td>'.$langs->trans("Jabberid").'</td><td><input name="jabberid" type="text" size="40" maxlength="80" value="'.(isset($_POST["jabberid"])?$_POST["jabberid"]:$object->jabberid).'"></td>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.$form->selectyesno('no_email',(isset($_POST["no_email"])?$_POST["no_email"]:$object->no_email), 1).'</td>';
|
||||
@ -722,7 +731,13 @@ else
|
||||
print '<td colspan="2"> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td><input name="skype" type="text" size="40" maxlength="80" value="'.(isset($_POST["skype"])?$_POST["skype"]:$object->skype).'"></td></tr>';
|
||||
}
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||
@ -935,6 +950,12 @@ else
|
||||
print '<td colspan="2"> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
if (!empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
print $object->LibPubPriv($object->priv);
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -48,6 +49,7 @@ $search_phonepro=GETPOST("search_phonepro");
|
||||
$search_phonemob=GETPOST("search_phonemob");
|
||||
$search_fax=GETPOST("search_fax");
|
||||
$search_email=GETPOST("search_email");
|
||||
$search_skype=GETPOST("search_skype");
|
||||
$search_priv=GETPOST("search_priv");
|
||||
$search_categ = GETPOST("search_categ",'int');
|
||||
$search_statut=GETPOST("search_statut");
|
||||
@ -99,6 +101,7 @@ if (GETPOST('button_removefilter'))
|
||||
$search_phonemob="";
|
||||
$search_fax="";
|
||||
$search_email="";
|
||||
$search_skype="";
|
||||
$search_priv="";
|
||||
$sall="";
|
||||
}
|
||||
@ -117,7 +120,7 @@ $form=new Form($db);
|
||||
$formother=new FormOther($db);
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom as name,";
|
||||
$sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.poste, p.email,";
|
||||
$sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.poste, p.email, p.skype,";
|
||||
$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv, p.tms,";
|
||||
$sql.= " cp.code as country_code";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
@ -185,6 +188,10 @@ if (strlen($search_email)) // filtre sur l'email
|
||||
{
|
||||
$sql .= " AND p.email LIKE '%".$db->escape($search_email)."%'";
|
||||
}
|
||||
if (strlen($search_skype)) // filtre sur skype
|
||||
{
|
||||
$sql .= " AND p.skype LIKE '%".$db->escape($search_skype)."%'";
|
||||
}
|
||||
if ($type == "o") // filtre sur type
|
||||
{
|
||||
$sql .= " AND p.fk_soc IS NULL";
|
||||
@ -281,6 +288,7 @@ if ($result)
|
||||
print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mob", $begin, $param, '', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder);
|
||||
if (! empty($conf->skype->enabled)) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); }
|
||||
print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder);
|
||||
@ -316,6 +324,12 @@ if ($result)
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="search_email" size="8" value="'.$search_email.'">';
|
||||
print '</td>';
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="search_skype" size="8" value="'.$search_skype.'">';
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
$selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate"));
|
||||
@ -376,7 +390,9 @@ if ($result)
|
||||
print '<td>'.dol_print_phone($obj->fax,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').'</td>';
|
||||
// EMail
|
||||
print '<td>'.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).'</td>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled)) { print '<td>'.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).'</td>'; }
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->tms),"day").'</td>';
|
||||
|
||||
|
||||
@ -1,14 +1,11 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
<<<<<<< HEAD
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
=======
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
>>>>>>> refs/remotes/origin/3.4
|
||||
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@ -78,7 +78,8 @@ class Ldap
|
||||
var $name;
|
||||
var $firstname;
|
||||
var $login;
|
||||
var $phone;
|
||||
var $phone;
|
||||
var $skype;
|
||||
var $fax;
|
||||
var $mail;
|
||||
var $mobile;
|
||||
@ -127,6 +128,7 @@ class Ldap
|
||||
$this->attr_firstname = $conf->global->LDAP_FIELD_FIRSTNAME;
|
||||
$this->attr_mail = $conf->global->LDAP_FIELD_MAIL;
|
||||
$this->attr_phone = $conf->global->LDAP_FIELD_PHONE;
|
||||
$this->attr_skype = $conf->global->LDAP_FIELD_SKYPE;
|
||||
$this->attr_fax = $conf->global->LDAP_FIELD_FAX;
|
||||
$this->attr_mobile = $conf->global->LDAP_FIELD_MOBILE;
|
||||
}
|
||||
@ -1172,6 +1174,7 @@ class Ldap
|
||||
$this->firstname = $this->convToOutputCharset($result[0][$this->attr_firstname][0],$this->ldapcharset);
|
||||
$this->login = $this->convToOutputCharset($result[0][$this->attr_login][0],$this->ldapcharset);
|
||||
$this->phone = $this->convToOutputCharset($result[0][$this->attr_phone][0],$this->ldapcharset);
|
||||
$this->skype = $this->convToOutputCharset($result[0][$this->attr_skype][0],$this->ldapcharset);
|
||||
$this->fax = $this->convToOutputCharset($result[0][$this->attr_fax][0],$this->ldapcharset);
|
||||
$this->mail = $this->convToOutputCharset($result[0][$this->attr_mail][0],$this->ldapcharset);
|
||||
$this->mobile = $this->convToOutputCharset($result[0][$this->attr_mobile][0],$this->ldapcharset);
|
||||
|
||||
@ -555,6 +555,11 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td>'.$langs->trans("PhoneMobile").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td>';
|
||||
print '<td>'.$langs->trans("EMail").'</td>';
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
$colspan++;
|
||||
print '<td>'.$langs->trans("Skype").'</td>';
|
||||
}
|
||||
print '<td>'.$langs->trans("Status").'</td>';
|
||||
print "<td> </td>";
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
@ -570,7 +575,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print "</tr>";
|
||||
|
||||
|
||||
$sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.statut ";
|
||||
$sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays, p.poste, p.phone, p.phone_mobile, p.fax, p.email, p.skype, p.statut ";
|
||||
$sql .= ", p.civilite, p.address, p.zip, p.town";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||
@ -614,6 +619,12 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td>';
|
||||
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
||||
print '</td>';
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<td>';
|
||||
print dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
if ($obj->statut==0) print '<td>'.$langs->trans('Disabled').' </span>'.img_picto($langs->trans('StatusContactDraftShort'),'statut0').'</td>';
|
||||
elseif ($obj->statut==1) print '<td>'.$langs->trans('Enabled').' </span>'.img_picto($langs->trans('StatusContactValidatedShort'),'statut1').'</td>';
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -1185,6 +1186,48 @@ function dol_print_email($email,$cid=0,$socid=0,$addlink=0,$max=64,$showinvalid=
|
||||
return $newemail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show Skype link
|
||||
*
|
||||
* @param string $skype Skype to show (only skype, without 'Name of recipient' before)
|
||||
* @param int $cid Id of contact if known
|
||||
* @param int $socid Id of third party if known
|
||||
* @param int $addlink 0=no link to create action
|
||||
* @param int $max Max number of characters to show
|
||||
* @return string HTML Link
|
||||
*/
|
||||
function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
$newskype=$skype;
|
||||
|
||||
if (empty($skype)) return ' ';
|
||||
|
||||
if (! empty($addlink))
|
||||
{
|
||||
$newskype='<a href="skype:';
|
||||
$newskype.=dol_trunc($skype,$max);
|
||||
$newskype.='" alt="'.$langs->trans("Call").' '.$skype.'" title="'.$langs->trans("Call").' '.$skype.'">';
|
||||
$newskype.='<img src="../theme/'.$conf->theme.'/img/object_skype.png" border="0"> ';
|
||||
$newskype.=dol_trunc($skype,$max);
|
||||
$newskype.='</a>';
|
||||
|
||||
if (($cid || $socid) && ! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
$type='AC_SKYPE'; $link='';
|
||||
if (! empty($conf->global->AGENDA_ADDACTIONFORSKYPE)) $link='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&backtopage=1&actioncode='.$type.'&contactid='.$cid.'&socid='.$socid.'">'.img_object($langs->trans("AddAction"),"calendar").'</a>';
|
||||
$newskype='<table class="nobordernopadding"><tr><td>'.$newskype.' </td><td> '.$link.'</td></tr></table>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
$newskype.=img_warning($langs->trans("ErrorBadSkype",$skype));
|
||||
}
|
||||
return $newskype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format phone numbers according to country
|
||||
*
|
||||
|
||||
136
htdocs/core/modules/modSkype.class.php
Normal file
136
htdocs/core/modules/modSkype.class.php
Normal file
@ -0,0 +1,136 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup Skype Module Skype
|
||||
* \brief Add a skype button.
|
||||
* \file htdocs/core/modules/modSkype.class.php
|
||||
* \ingroup Skype
|
||||
* \brief Description and activation file for module Skype
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
/**
|
||||
* Class to describe a Cron module
|
||||
*/
|
||||
class modSkype extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
$this->db = $db;
|
||||
$this->numero = 3100;
|
||||
|
||||
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
|
||||
// It is used to group modules in module setup page
|
||||
$this->family = "crm";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Enable Skype button into contact";
|
||||
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
|
||||
$this->special = 2;
|
||||
// Name of image file used for this module.
|
||||
$this->picto='skype';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
|
||||
// Config pages
|
||||
//-------------
|
||||
$this->config_page_url = array();
|
||||
|
||||
// Dependancies
|
||||
//-------------
|
||||
$this->hidden = ! empty($conf->global->SKYPE_MODULE_DISABLED); // A condition to disable module
|
||||
$this->depends = array(modSociete); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
||||
$this->langfiles = array();
|
||||
|
||||
// Constantes
|
||||
//-----------
|
||||
|
||||
|
||||
// New pages on tabs
|
||||
// -----------------
|
||||
$this->tabs = array();
|
||||
|
||||
// Boxes
|
||||
//------
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
//------------
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
$this->rights_class = 'skype';
|
||||
$r=0;
|
||||
|
||||
$this->rights[$r][0] = 3101;
|
||||
$this->rights[$r][1] = 'View skype link';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'view';
|
||||
$r++;
|
||||
|
||||
// Main menu entries
|
||||
//------------------
|
||||
$this->menu = array();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
function init($options='')
|
||||
{
|
||||
// Prevent pb of modules not correctly disabled
|
||||
//$this->remove($options);
|
||||
|
||||
return $this->_init($sql,$options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called when module is disabled.
|
||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||
* Data directories are not deleted
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
function remove($options='')
|
||||
{
|
||||
$sql = array();
|
||||
|
||||
return $this->_remove($sql,$options);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@ -329,3 +329,9 @@ create table llx_actioncomm_resources
|
||||
) ENGINE=innodb;
|
||||
ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element);
|
||||
ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element);
|
||||
|
||||
-- Task 157
|
||||
ALTER TABLE llx_user ADD skype VARCHAR(255) AFTER job;
|
||||
ALTER TABLE llx_socpeople ADD skype VARCHAR(255) AFTER jabberid;
|
||||
ALTER TABLE llx_societe ADD skype VARCHAR(255) AFTER email;
|
||||
ALTER TABLE llx_adherent ADD skype VARCHAR(255) AFTER email;
|
||||
@ -45,6 +45,7 @@ create table llx_adherent
|
||||
state_id integer,
|
||||
country integer,
|
||||
email varchar(255),
|
||||
skype varchar(255),
|
||||
phone varchar(30),
|
||||
phone_perso varchar(30),
|
||||
phone_mobile varchar(30),
|
||||
|
||||
@ -49,6 +49,7 @@ create table llx_societe
|
||||
fax varchar(20), -- fax number
|
||||
url varchar(255), --
|
||||
email varchar(128), --
|
||||
skype varchar(255), --
|
||||
fk_effectif integer DEFAULT 0, --
|
||||
fk_typent integer DEFAULT 0, --
|
||||
fk_forme_juridique integer DEFAULT 0, -- juridical status
|
||||
|
||||
@ -42,6 +42,7 @@ create table llx_socpeople
|
||||
fax varchar(30),
|
||||
email varchar(255),
|
||||
jabberid varchar(255),
|
||||
skype varchar(255),
|
||||
no_email smallint NOT NULL DEFAULT 0,
|
||||
priv smallint NOT NULL DEFAULT 0,
|
||||
fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement
|
||||
|
||||
@ -41,6 +41,7 @@ create table llx_user
|
||||
fk_state integer DEFAULT 0, --
|
||||
fk_country integer DEFAULT 0, --
|
||||
job varchar(128),
|
||||
skype varchar(255),
|
||||
office_phone varchar(20),
|
||||
office_fax varchar(20),
|
||||
user_mobile varchar(20),
|
||||
|
||||
@ -66,6 +66,8 @@ Country=Country
|
||||
CountryCode=Country code
|
||||
CountryId=Country id
|
||||
Phone=Phone
|
||||
Skype=Skype
|
||||
Call=Call
|
||||
PhonePro=Prof. phone
|
||||
PhonePerso=Pers. phone
|
||||
PhoneMobile=Mobile
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -68,6 +69,7 @@ class Societe extends CommonObject
|
||||
var $phone;
|
||||
var $fax;
|
||||
var $email;
|
||||
var $skype;
|
||||
var $url;
|
||||
|
||||
//! barcode
|
||||
@ -410,6 +412,7 @@ class Societe extends CommonObject
|
||||
$this->fax = preg_replace("/\s/","",$this->fax);
|
||||
$this->fax = preg_replace("/\./","",$this->fax);
|
||||
$this->email = trim($this->email);
|
||||
$this->skype = trim($this->skype);
|
||||
$this->url = $this->url?clean_url($this->url,0):'';
|
||||
$this->idprof1 = trim($this->idprof1);
|
||||
$this->idprof2 = trim($this->idprof2);
|
||||
@ -508,6 +511,7 @@ class Societe extends CommonObject
|
||||
$sql .= ",phone = ".(! empty($this->phone)?"'".$this->db->escape($this->phone)."'":"null");
|
||||
$sql .= ",fax = ".(! empty($this->fax)?"'".$this->db->escape($this->fax)."'":"null");
|
||||
$sql .= ",email = ".(! empty($this->email)?"'".$this->db->escape($this->email)."'":"null");
|
||||
$sql .= ",skype = ".(! empty($this->skype)?"'".$this->db->escape($this->skype)."'":"null");
|
||||
$sql .= ",url = ".(! empty($this->url)?"'".$this->db->escape($this->url)."'":"null");
|
||||
|
||||
$sql .= ",siren = '". $this->db->escape($this->idprof1) ."'";
|
||||
@ -590,6 +594,7 @@ class Societe extends CommonObject
|
||||
//$lmember->lastname=$this->lastname?$this->lastname:$lmember->lastname; // We keep firstname and lastname of member unchanged
|
||||
$lmember->address=$this->address;
|
||||
$lmember->email=$this->email;
|
||||
$lmember->skype=$this->skype;
|
||||
$lmember->phone=$this->phone;
|
||||
|
||||
$result=$lmember->update($user,0,1,1,1); // Use nosync to 1 to avoid cyclic updates
|
||||
@ -699,7 +704,7 @@ class Societe extends CommonObject
|
||||
$sql .= ', s.status';
|
||||
$sql .= ', s.price_level';
|
||||
$sql .= ', s.tms as date_update';
|
||||
$sql .= ', s.phone, s.fax, s.email, s.url, s.zip, s.town, s.note_private, s.note_public, s.client, s.fournisseur';
|
||||
$sql .= ', s.phone, s.fax, s.email, s.skype, s.url, s.zip, s.town, s.note_private, s.note_public, s.client, s.fournisseur';
|
||||
$sql .= ', s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6';
|
||||
$sql .= ', s.capital, s.tva_intra';
|
||||
$sql .= ', s.fk_typent as typent_id';
|
||||
@ -777,6 +782,7 @@ class Societe extends CommonObject
|
||||
$this->statut_commercial = $libelle; // libelle statut commercial
|
||||
|
||||
$this->email = $obj->email;
|
||||
$this->skype = $obj->skype;
|
||||
$this->url = $obj->url;
|
||||
$this->phone = $obj->phone;
|
||||
$this->fax = $obj->fax;
|
||||
@ -2409,6 +2415,7 @@ class Societe extends CommonObject
|
||||
$this->country_id=$member->country_id;
|
||||
$this->phone=$member->phone; // Prof phone
|
||||
$this->email=$member->email;
|
||||
$this->skype=$member->skype;
|
||||
|
||||
$this->client = 1; // A member is a customer by default
|
||||
$this->code_client = -1;
|
||||
@ -2548,6 +2555,7 @@ class Societe extends CommonObject
|
||||
$this->country_id=1;
|
||||
$this->country_code='FR';
|
||||
$this->email='specimen@specimen.com';
|
||||
$this->skype='tom.hanson';
|
||||
$this->url='http://www.specimen.com';
|
||||
|
||||
$this->phone='0909090901';
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
*
|
||||
* 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
|
||||
@ -130,6 +132,7 @@ if (empty($reshook))
|
||||
$object->town = GETPOST('town');
|
||||
$object->country_id = GETPOST('country_id');
|
||||
$object->state_id = GETPOST('state_id');
|
||||
$object->skype = GETPOST('skype');
|
||||
$object->phone = GETPOST('phone');
|
||||
$object->fax = GETPOST('fax');
|
||||
$object->email = GETPOST('email');
|
||||
@ -254,7 +257,7 @@ if (empty($reshook))
|
||||
dol_syslog("This thirdparty is a personal people",LOG_DEBUG);
|
||||
$contact=new Contact($db);
|
||||
|
||||
$contact->civilite_id = $object->civilite_id;
|
||||
$contact->civilite_id = $object->civilite_id;
|
||||
$contact->name = $object->name_bis;
|
||||
$contact->firstname = $object->firstname;
|
||||
$contact->address = $object->address;
|
||||
@ -265,8 +268,9 @@ if (empty($reshook))
|
||||
$contact->socid = $object->id; // fk_soc
|
||||
$contact->status = 1;
|
||||
$contact->email = $object->email;
|
||||
$contact->phone_pro = $object->phone;
|
||||
$contact->fax = $object->fax;
|
||||
$contact->skype = $object->skype;
|
||||
$contact->phone_pro = $object->phone;
|
||||
$contact->fax = $object->fax;
|
||||
$contact->priv = 0;
|
||||
|
||||
$result=$contact->create($user);
|
||||
@ -598,6 +602,7 @@ else
|
||||
$object->zip = GETPOST('zipcode');
|
||||
$object->town = GETPOST('town');
|
||||
$object->state_id = GETPOST('state_id');
|
||||
$object->skype = GETPOST('skype');
|
||||
$object->phone = GETPOST('phone');
|
||||
$object->fax = GETPOST('fax');
|
||||
$object->email = GETPOST('email');
|
||||
@ -845,6 +850,12 @@ else
|
||||
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||
}
|
||||
|
||||
// Phone / Fax
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
||||
@ -1079,6 +1090,7 @@ else
|
||||
$object->town = GETPOST('town');
|
||||
$object->country_id = GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id;
|
||||
$object->state_id = GETPOST('state_id');
|
||||
$object->skype = GETPOST('skype');
|
||||
$object->phone = GETPOST('phone');
|
||||
$object->fax = GETPOST('fax');
|
||||
$object->email = GETPOST('email');
|
||||
@ -1088,8 +1100,8 @@ else
|
||||
$object->idprof2 = GETPOST('idprof2');
|
||||
$object->idprof3 = GETPOST('idprof3');
|
||||
$object->idprof4 = GETPOST('idprof4');
|
||||
$object->idprof5 = GETPOST('idprof5');
|
||||
$object->idprof6 = GETPOST('idprof6');
|
||||
$object->idprof5 = GETPOST('idprof5');
|
||||
$object->idprof6 = GETPOST('idprof6');
|
||||
$object->typent_id = GETPOST('typent_id');
|
||||
$object->effectif_id = GETPOST('effectif_id');
|
||||
$object->barcode = GETPOST('barcode');
|
||||
@ -1261,7 +1273,13 @@ else
|
||||
// EMail / Web
|
||||
print '<tr><td>'.$langs->trans('EMail').(! empty($conf->global->SOCIETE_MAIL_REQUIRED)?'*':'').'</td><td colspan="3"><input type="text" name="email" size="32" value="'.$object->email.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3"><input type="text" name="url" size="32" value="'.$object->url.'"></td></tr>';
|
||||
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3"><input type="text" name="skype" size="32" value="'.$object->skype.'"></td></tr>';
|
||||
}
|
||||
|
||||
// Phone / Fax
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td><input type="text" name="phone" value="'.$object->phone.'"></td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td><input type="text" name="fax" value="'.$object->fax.'"></td></tr>';
|
||||
@ -1569,6 +1587,14 @@ else
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||
print dol_print_url($object->url);
|
||||
print '</td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Skype').'</td><td colspan="3">';
|
||||
print dol_print_skype($object->skype,0,$object->id,'AC_SKYPE');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Phone / Fax
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
|
||||
|
||||
BIN
htdocs/theme/amarok/img/object_skype.png
Normal file
BIN
htdocs/theme/amarok/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/auguria/img/object_skype.png
Normal file
BIN
htdocs/theme/auguria/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/bureau2crea/img/object_skype.png
Normal file
BIN
htdocs/theme/bureau2crea/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/cameleo/img/object_skype.png
Normal file
BIN
htdocs/theme/cameleo/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
htdocs/theme/eldy/img/object_skype.png
Normal file
BIN
htdocs/theme/eldy/img/object_skype.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in New Issue
Block a user