diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 50d13c91c17..bfe6dd11ddd 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -53,18 +53,18 @@ if (!empty($id)) $object->getCanvas($id); $canvas = (!empty($object->canvas)?$object->canvas:GETPOST("canvas")); if (! empty($canvas)) { - require_once(DOL_DOCUMENT_ROOT."/core/class/canvas.class.php"); - $objcanvas = new Canvas($db); + require_once(DOL_DOCUMENT_ROOT."/core/class/canvas.class.php"); + $objcanvas = new Canvas($db); - $objcanvas->getCanvas('contact','contactcard',$canvas); + $objcanvas->getCanvas('contact','contactcard',$canvas); - // Security check - $result = $objcanvas->restrictedArea($user, 'contact', $id, 'socpeople'); + // Security check + $result = $objcanvas->restrictedArea($user, 'contact', $id, 'socpeople'); } else { - // Security check - $result = restrictedArea($user, 'contact', $id, 'socpeople'); // If we create a contact with no company (shared contacts), no check on write permission + // Security check + $result = restrictedArea($user, 'contact', $id, 'socpeople'); // If we create a contact with no company (shared contacts), no check on write permission } @@ -77,195 +77,195 @@ else // If canvas is not defined, we use standard feature. if (! empty($canvas)) { - // ----------------------------------------- - // When used with CANVAS - // ----------------------------------------- + // ----------------------------------------- + // When used with CANVAS + // ----------------------------------------- - // Load data control - $objcanvas->doActions($id); + // Load data control + $objcanvas->doActions($id); } else { - // Creation utilisateur depuis contact - if ($_POST["action"] == 'confirm_create_user' && $_POST["confirm"] == 'yes' && $user->rights->user->user->creer) - { - // Recuperation contact actuel - $result = $object->fetch($_GET["id"]); + // Creation utilisateur depuis contact + if ($_POST["action"] == 'confirm_create_user' && $_POST["confirm"] == 'yes' && $user->rights->user->user->creer) + { + // Recuperation contact actuel + $result = $object->fetch($_GET["id"]); - if ($result > 0) - { - $db->begin(); + if ($result > 0) + { + $db->begin(); - // Creation user - $nuser = new User($db); - $result=$nuser->create_from_contact($object,$_POST["login"]); + // Creation user + $nuser = new User($db); + $result=$nuser->create_from_contact($object,$_POST["login"]); - if ($result > 0) - { - $result2=$nuser->setPassword($user,$_POST["password"],0,1,1); + if ($result > 0) + { + $result2=$nuser->setPassword($user,$_POST["password"],0,1,1); if ($result2) { - $db->commit(); + $db->commit(); } else { $db->rollback(); } - } - else - { - $msg=$nuser->error; + } + else + { + $msg=$nuser->error; $db->rollback(); - } - } - else - { - $msg=$object->error; - } - } + } + } + else + { + $msg=$object->error; + } + } - // Cancel - if (GETPOST("cancel") && GETPOST('backtopage')) - { - header("Location: ".GETPOST('backtopage')); - exit; - } - - // Add contact - if (GETPOST("action") == 'add' && $user->rights->societe->contact->creer) - { - $error=0; + // Cancel + if (GETPOST("cancel") && GETPOST('backtopage')) + { + header("Location: ".GETPOST('backtopage')); + exit; + } - $db->begin(); + // Add contact + if (GETPOST("action") == 'add' && $user->rights->societe->contact->creer) + { + $error=0; - $object->socid = $_POST["socid"]; + $db->begin(); - $object->name = $_POST["name"]; - $object->firstname = $_POST["firstname"]; - $object->civilite_id = $_POST["civilite_id"]; - $object->poste = $_POST["poste"]; - $object->address = $_POST["address"]; - $object->zip = $_POST["zipcode"]; - $object->town = $_POST["town"]; - $object->fk_pays = $_POST["pays_id"]; - $object->fk_departement = $_POST["departement_id"]; - $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->priv = $_POST["priv"]; - $object->note = $_POST["note"]; + $object->socid = $_POST["socid"]; + + $object->name = $_POST["name"]; + $object->firstname = $_POST["firstname"]; + $object->civilite_id = $_POST["civilite_id"]; + $object->poste = $_POST["poste"]; + $object->address = $_POST["address"]; + $object->zip = $_POST["zipcode"]; + $object->town = $_POST["town"]; + $object->fk_pays = $_POST["pays_id"]; + $object->fk_departement = $_POST["departement_id"]; + $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->priv = $_POST["priv"]; + $object->note = $_POST["note"]; // Note: Correct date should be completed with location to have exact GM time of birth. $object->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); $object->birthday_alert = $_POST["birthday_alert"]; - if (! $_POST["name"]) - { - $error++; - array_push($errors,$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"))); - $_GET["action"] = $_POST["action"] = 'create'; - } + if (! $_POST["name"]) + { + $error++; + array_push($errors,$langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label"))); + $_GET["action"] = $_POST["action"] = 'create'; + } - if ($_POST["name"]) - { - $id = $object->create($user); - if ($id <= 0) - { + if ($_POST["name"]) + { + $id = $object->create($user); + if ($id <= 0) + { $error++; - $errors=($object->error?array($object->error):$object->errors); - $_GET["action"] = $_POST["action"] = 'create'; - } - } + $errors=($object->error?array($object->error):$object->errors); + $_GET["action"] = $_POST["action"] = 'create'; + } + } - if (! $error && $id > 0) - { - $db->commit(); - if (GETPOST('backtopage')) $url=GETPOST('backtopage'); - else $url='fiche.php?id='.$id; - Header("Location: ".$url); - exit; - } - else - { - $db->rollback(); - } - } + if (! $error && $id > 0) + { + $db->commit(); + if (GETPOST('backtopage')) $url=GETPOST('backtopage'); + else $url='fiche.php?id='.$id; + Header("Location: ".$url); + exit; + } + else + { + $db->rollback(); + } + } - if (GETPOST("action") == 'confirm_delete' && GETPOST("confirm") == 'yes' && $user->rights->societe->contact->supprimer) - { - $result=$object->fetch($_GET["id"]); + if (GETPOST("action") == 'confirm_delete' && GETPOST("confirm") == 'yes' && $user->rights->societe->contact->supprimer) + { + $result=$object->fetch($_GET["id"]); - $object->old_name = $_POST["old_name"]; - $object->old_firstname = $_POST["old_firstname"]; + $object->old_name = $_POST["old_name"]; + $object->old_firstname = $_POST["old_firstname"]; - $result = $object->delete(); - if ($result > 0) - { - Header("Location: index.php"); - exit; - } - else - { - $mesg=$object->error; - } - } + $result = $object->delete(); + if ($result > 0) + { + Header("Location: index.php"); + exit; + } + else + { + $mesg=$object->error; + } + } - if ($_POST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact->creer) - { - if (empty($_POST["name"])) - { - $errors=array($langs->trans("ErrorFieldRequired",$langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); - $error++; - $_GET["action"] = $_POST["action"] = 'edit'; - } + if ($_POST["action"] == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact->creer) + { + if (empty($_POST["name"])) + { + $errors=array($langs->trans("ErrorFieldRequired",$langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); + $error++; + $_GET["action"] = $_POST["action"] = 'edit'; + } - if (! sizeof($errors)) - { - $object->fetch($_POST["contactid"]); + if (! sizeof($errors)) + { + $object->fetch($_POST["contactid"]); - $object->oldcopy=dol_clone($object); + $object->oldcopy=dol_clone($object); - $object->old_name = $_POST["old_name"]; - $object->old_firstname = $_POST["old_firstname"]; + $object->old_name = $_POST["old_name"]; + $object->old_firstname = $_POST["old_firstname"]; - $object->socid = $_POST["socid"]; - $object->name = $_POST["name"]; - $object->firstname = $_POST["firstname"]; - $object->civilite_id = $_POST["civilite_id"]; - $object->poste = $_POST["poste"]; + $object->socid = $_POST["socid"]; + $object->name = $_POST["name"]; + $object->firstname = $_POST["firstname"]; + $object->civilite_id = $_POST["civilite_id"]; + $object->poste = $_POST["poste"]; - $object->address = $_POST["address"]; - $object->zip = $_POST["zipcode"]; - $object->town = $_POST["town"]; - $object->fk_departement = $_POST["departement_id"]; - $object->fk_pays = $_POST["pays_id"]; + $object->address = $_POST["address"]; + $object->zip = $_POST["zipcode"]; + $object->town = $_POST["town"]; + $object->fk_departement = $_POST["departement_id"]; + $object->fk_pays = $_POST["pays_id"]; - $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->priv = $_POST["priv"]; - $object->note = $_POST["note"]; + $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->priv = $_POST["priv"]; + $object->note = $_POST["note"]; - $result = $object->update($_POST["contactid"], $user); + $result = $object->update($_POST["contactid"], $user); - if ($result > 0) - { - $object->old_name=''; - $object->old_firstname=''; - } - else - { - $mesg=$object->error; - } - } - } + if ($result > 0) + { + $object->old_name=''; + $object->old_firstname=''; + } + else + { + $mesg=$object->error; + } + } + } } @@ -288,282 +288,285 @@ if ($socid > 0) if (! empty($canvas)) { - // ----------------------------------------- - // When used with CANVAS - // ----------------------------------------- + // ----------------------------------------- + // When used with CANVAS + // ----------------------------------------- - if (GETPOST("action") == 'create') - { - // Set action type to objcanvas->action - $objcanvas->setAction(GETPOST("action")); + if (GETPOST("action") == 'create') + { + // Set action type to objcanvas->action + $objcanvas->setAction(GETPOST("action")); - // Assign _POST data to objcanvas->object->xxx - $objcanvas->assign_post(); + // Assign _POST data to objcanvas->object->xxx + $objcanvas->assign_post(); - // Assign template values into objcanvas->control->tpl - $objcanvas->assign_values(); + // Assign template values into objcanvas->control->tpl + $objcanvas->assign_values(); - // Card header TODO This should be done into canvas_display - $title = $objcanvas->getTitle(); - print_fiche_titre($title); + // Card header TODO This should be done into canvas_display + $title = $objcanvas->getTitle(); + print_fiche_titre($title); - // Show errors TODO This should be done into assign_values() - // that should get string of dol_htmloutput_errors and - // assigne it into objcanvas->control->tpl like other strings to show - // by templates, then output of string should be done into display_canvas - dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); + // Show errors TODO This should be done into assign_values() + // that should get string of dol_htmloutput_errors and + // assigne it into objcanvas->control->tpl like other strings to show + // by templates, then output of string should be done into display_canvas + dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); - // Display canvas - $objcanvas->display_canvas(); - } - else if (GETPOST("id") && GETPOST("action") == 'edit') - { - /* - * Mode edition - */ + // Display canvas + $objcanvas->display_canvas(); + } + else if (GETPOST("id") && GETPOST("action") == 'edit') + { + /* + * Mode edition + */ - // Set action type - $objcanvas->setAction(GETPOST("action")); + // Set action type + $objcanvas->setAction(GETPOST("action")); - // Fetch object - $result=$objcanvas->fetch($id); - if ($result > 0) - { - // Card header - $objcanvas->showHead(); + // Fetch object + $result=$objcanvas->fetch($id); + if ($result > 0) + { + // Card header + $objcanvas->showHead(); - if ($_POST["name"]) - { - // Assign _POST data - $objcanvas->assign_post(); - } + if ($_POST["name"]) + { + // Assign _POST data + $objcanvas->assign_post(); + } - // Assign values - $objcanvas->assign_values(); + // Assign values + $objcanvas->assign_values(); - // Display canvas - $objcanvas->display_canvas(); - } - else - { - dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); - } - } + // Display canvas + $objcanvas->display_canvas(); + } + else + { + dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); + } + } - if (GETPOST("id") && GETPOST("action") != 'edit') - { - // Set action type - $objcanvas->setAction('view'); + if (GETPOST("id") && GETPOST("action") != 'edit') + { + // Set action type + $objcanvas->setAction('view'); - // Fetch object - $result=$objcanvas->fetch($id); - if ($result > 0) - { - // Assign values - $objcanvas->assign_values(); + // Fetch object + $result=$objcanvas->fetch($id); + if ($result > 0) + { + // Assign values + $objcanvas->assign_values(); - // FIXME div of tab is shown by showHead but /div is closed by - // display_canvas. All output should be processed by template so - // showHead and dol_htmloutput_errors should be moved into - // display_canvas. + // FIXME div of tab is shown by showHead but /div is closed by + // display_canvas. All output should be processed by template so + // showHead and dol_htmloutput_errors should be moved into + // display_canvas. - // Card header - $objcanvas->showHead(); + // Card header + $objcanvas->showHead(); - // Show errors TODO This output string should be set by - // assign_values and output by template into display_canvas - dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); + // Show errors TODO This output string should be set by + // assign_values and output by template into display_canvas + dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); - // Display canvas - $objcanvas->display_canvas(); + // Display canvas + $objcanvas->display_canvas(); - print show_actions_todo($conf,$langs,$db,$objsoc,$objcanvas->control->object); + print show_actions_todo($conf,$langs,$db,$objsoc,$objcanvas->control->object); - print show_actions_done($conf,$langs,$db,$objsoc,$objcanvas->control->object); - } - else - { - dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); - } - } + print show_actions_done($conf,$langs,$db,$objsoc,$objcanvas->control->object); + } + else + { + dol_htmloutput_errors($objcanvas->error,$objcanvas->errors); + } + } } else { - // ----------------------------------------- - // When used in standard mode - // ----------------------------------------- + // ----------------------------------------- + // When used in standard mode + // ----------------------------------------- - // Confirm deleting contact - if ($user->rights->societe->contact->supprimer) - { - if ($_GET["action"] == 'delete') - { - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); - if ($ret == 'html') print '
'; - } - } + // Confirm deleting contact + if ($user->rights->societe->contact->supprimer) + { + if ($_GET["action"] == 'delete') + { + $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$_GET["id"],$langs->trans("DeleteContact"),$langs->trans("ConfirmDeleteContact"),"confirm_delete",'',0,1); + if ($ret == 'html') print '
'; + } + } - /* - * Onglets - */ - if (GETPOST("id") > 0) - { - // Si edition contact deja existant - $object = new Contact($db); - $return=$object->fetch(GETPOST("id"), $user); - if ($return <= 0) - { - dol_print_error('',$object->error); - $_GET["id"]=0; - } + /* + * Onglets + */ + if (GETPOST("id") > 0) + { + // Si edition contact deja existant + $object = new Contact($db); + $return=$object->fetch(GETPOST("id"), $user); + if ($return <= 0) + { + dol_print_error('',$object->error); + $_GET["id"]=0; + } - // Show tabs - $head = contact_prepare_head($object); + // Show tabs + $head = contact_prepare_head($object); - dol_fiche_head($head, 'card', $langs->trans("ContactsAddresses"), 0, 'contact'); - } + dol_fiche_head($head, 'card', $langs->trans("ContactsAddresses"), 0, 'contact'); + } - if ($user->rights->societe->contact->creer) - { - if (GETPOST("action") == 'create') - { - /* - * Fiche en mode creation - */ - $object->fk_departement = $_POST["departement_id"]; + if ($user->rights->societe->contact->creer) + { + if (GETPOST("action") == 'create') + { + /* + * Fiche en mode creation + */ + $object->fk_departement = $_POST["departement_id"]; - // We set pays_id, pays_code and label for the selected country - $object->fk_pays=$_POST["pays_id"]?$_POST["pays_id"]:$mysoc->pays_id; - if ($object->fk_pays) - { - $sql = "SELECT code, libelle"; - $sql.= " FROM ".MAIN_DB_PREFIX."c_pays"; - $sql.= " WHERE rowid = ".$object->fk_pays; - $resql=$db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - } - else - { - dol_print_error($db); - } - $object->pays_code=$obj->code; - $object->pays=$obj->libelle; - } + // We set pays_id, pays_code and label for the selected country + $object->fk_pays=$_POST["pays_id"]?$_POST["pays_id"]:$mysoc->pays_id; + if ($object->fk_pays) + { + $sql = "SELECT code, libelle"; + $sql.= " FROM ".MAIN_DB_PREFIX."c_pays"; + $sql.= " WHERE rowid = ".$object->fk_pays; + $resql=$db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + } + else + { + dol_print_error($db); + } + $object->pays_code=$obj->code; + $object->pays=$obj->libelle; + } - print_fiche_titre($langs->trans("AddContact")); + print_fiche_titre($langs->trans("AddContact")); - // Affiche les erreurs - dol_htmloutput_errors($mesg,$errors); + // Affiche les erreurs + dol_htmloutput_errors($mesg,$errors); - if ($conf->use_javascript_ajax) - { - print "\n".''."\n"; - } - - print '
'; - print '
'; - print ''; - print ''; - print ''; - print ''; - - // Name - print ''; - print ''; - - // Company - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - if ($socid > 0) - { - print ''; - print ''; - print ''; - print ''; - } - else { - print ''; - } + print ''."\n"; } - // Civility - print ''; + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'name).'">'.$langs->trans("Firstname").'firstname).'">
'.$langs->trans("Company").''; - print $objsoc->getNomUrl(1); - print '
'.$langs->trans("Company").''; - print $form->select_societes(isset($_POST["socid"])?$_POST["socid"]:'','socid','',1); - //print $form->select_societes('','socid',''); - //print $langs->trans("ContactNotLinkedToCompany"); - print '
'.$langs->trans("UserTitle").''; - print $formcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id); - print '
'; - print ''; + // Name + print ''; + print ''; - // Address - if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party - print ''; + // Company + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + if ($socid > 0) + { + print ''; + print ''; + print ''; + print ''; + } + else { + print ''; + } + } - // Zip / Town - if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party - if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party - print ''; + // Civility + print ''; - // Country - if (dol_strlen(trim($object->fk_pays)) == 0) $object->fk_pays = $objsoc->pays_id; // Predefined with third party - print ''; + print ''; - // State - print ''; + // Address + if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party + print ''; - // Phone / Fax - if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->tel; // Predefined with third party - print ''; - print ''; + // Zip / Town + if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party + if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party + print ''; - if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - print ''; - print ''; + // Country + if (dol_strlen(trim($object->fk_pays)) == 0) $object->fk_pays = $objsoc->pays_id; // Predefined with third party + print ''; - // EMail - if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - print ''; + // State + if (empty($conf->global->SOCIETE_DISABLE_STATE)) + { + print ''; + } - // Jabberid - print ''; + // Phone / Fax + if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->tel; // Predefined with third party + print ''; + print ''; - // Visibility - print ''; + if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party + print ''; + print ''; - // Note - print ''; + // EMail + if (($objsoc->typent_code == 'TE_PRIVATE' || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party + print ''; + + // Jabberid + print ''; + + // Visibility + print ''; + + // Note + print ''; print "
'.$langs->trans("PostOrFunction").'poste).'">
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'name).'">'.$langs->trans("Firstname").'firstname).'">
'.$langs->trans("Address").'
'.$langs->trans("Company").''; + print $objsoc->getNomUrl(1); + print '
'.$langs->trans("Company").''; + print $form->select_societes(isset($_POST["socid"])?$_POST["socid"]:'','socid','',1); + //print $form->select_societes('','socid',''); + //print $langs->trans("ContactNotLinkedToCompany"); + print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectpays_id','departement_id'),6).' '; - print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectpays_id','departement_id')); - print '
'.$langs->trans("UserTitle").''; + print $formcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id); + print '
'.$langs->trans("Country").''; - $form->select_pays((isset($_POST["pays_id"])?$_POST["pays_id"]:$object->fk_pays),'pays_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); - print '
'.$langs->trans("PostOrFunction").'poste).'">
'.$langs->trans('State').''; - if ($object->fk_pays) - { - $formcompany->select_departement(isset($_POST["departement_id"])?$_POST["departement_id"]:$object->fk_departement,$object->pays_code); - } - else - { - print $countrynotdefined; - } - print '
'.$langs->trans("Address").'
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectpays_id','departement_id'),6).' '; + print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectpays_id','departement_id')); + print '
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
'.$langs->trans("Country").''; + $form->select_pays((isset($_POST["pays_id"])?$_POST["pays_id"]:$object->fk_pays),'pays_id'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); + print '
'.$langs->trans("Email").'email).'">
'.$langs->trans('State').''; + if ($object->fk_pays) + { + $formcompany->select_departement(isset($_POST["departement_id"])?$_POST["departement_id"]:$object->fk_departement,$object->pays_code); + } + else + { + print $countrynotdefined; + } + print '
Jabberidjabberid).'">
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
'.$langs->trans("ContactVisibility").''; - $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('priv',$selectarray,(isset($_POST["priv"])?$_POST["priv"]:$object->priv),0); - print '
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
'.$langs->trans("Note").'
'.$langs->trans("Email").'email).'">
Jabberidjabberid).'">
'.$langs->trans("ContactVisibility").''; + $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('priv',$selectarray,(isset($_POST["priv"])?$_POST["priv"]:$object->priv),0); + print '
'.$langs->trans("Note").'

"; @@ -604,212 +607,215 @@ else print ''; if (GETPOST('backtopage')) { - print '     '; - print ''; + print '     '; + print ''; } print ''; - print "
"; - } - elseif (GETPOST("action") == 'edit' && GETPOST("id")) - { - /* - * Fiche en mode edition - */ + print ""; + } + elseif (GETPOST("action") == 'edit' && GETPOST("id")) + { + /* + * Fiche en mode edition + */ - // We set pays_id, and pays_code label of the chosen country - if (isset($_POST["pays_id"]) || $object->fk_pays) - { - $sql = "SELECT code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["pays_id"])?$_POST["pays_id"]:$object->fk_pays); - $resql=$db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - } - else - { - dol_print_error($db); - } - $object->pays_code=$obj->code; - $object->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; - } + // We set pays_id, and pays_code label of the chosen country + if (isset($_POST["pays_id"]) || $object->fk_pays) + { + $sql = "SELECT code, libelle from ".MAIN_DB_PREFIX."c_pays where rowid = ".(isset($_POST["pays_id"])?$_POST["pays_id"]:$object->fk_pays); + $resql=$db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + } + else + { + dol_print_error($db); + } + $object->pays_code=$obj->code; + $object->pays=$langs->trans("Country".$obj->code)?$langs->trans("Country".$obj->code):$obj->libelle; + } - // Affiche les erreurs - dol_htmloutput_errors($mesg,$errors); + // Affiche les erreurs + dol_htmloutput_errors($mesg,$errors); - if ($conf->use_javascript_ajax) - { - print ''; - } - - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - // Ref - print ''; - - // Name - print ''; - print ''; - - // Company - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - print ''; - print ''; - print ''; + print ''; } - // Civility - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("Ref").''; - print $object->ref; - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'name).'">'.$langs->trans("Firstname").'firstname).'">
'.$langs->trans("Company").''; - print $form->select_societes(isset($_POST["socid"])?$_POST["socid"]:($object->socid?$object->socid:-1),'socid','',1); - print '
'.$langs->trans("UserTitle").''; - print $formcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id); - print '
'; - print ''; + // Ref + print ''; - // Address - print ''; + // Name + print ''; + print ''; - // Zip / Town - print ''; + // Company + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + print ''; + print ''; + print ''; + } - // Country - print ''; + // Civility + print ''; - // Department - print ''; + print ''; - // Phone - print ''; - print ''; + // Address + print ''; - print ''; - print ''; + // Zip / Town + print ''; - // EMail - print ''; - if ($conf->mailing->enabled) - { - $langs->load("mails"); - print ''; - print ''; - } - else - { - print ''; - } - print ''; + // Country + print ''; - // Jabberid - print ''; + // State + if (empty($conf->global->SOCIETE_DISABLE_STATE)) + { + print ''; + } - // Visibility - print ''; + // Phone + print ''; + print ''; - print ''; + print ''; + print ''; - $object->load_ref_elements(); + // EMail + print ''; + if ($conf->mailing->enabled) + { + $langs->load("mails"); + print ''; + print ''; + } + else + { + print ''; + } + print ''; - if ($conf->commande->enabled) - { - print ''; - } + // Jabberid + print ''; - if ($conf->propal->enabled) - { - print ''; - } + // Visibility + print ''; - if ($conf->contrat->enabled) - { - print ''; - } + print ''; - if ($conf->facture->enabled) - { - print ''; - } + $object->load_ref_elements(); - // Login Dolibarr - print ''; + if ($conf->commande->enabled) + { + print ''; + } + + if ($conf->propal->enabled) + { + print ''; + } + + if ($conf->contrat->enabled) + { + print ''; + } + + if ($conf->facture->enabled) + { + print ''; + } + + // Login Dolibarr + print ''; print '
'.$langs->trans("PostOrFunction" ).'poste).'">
'.$langs->trans("Ref").''; + print $object->ref; + print '
'.$langs->trans("Address").'
'.$langs->trans("Lastname").' / '.$langs->trans("Label").'name).'">'.$langs->trans("Firstname").'firstname).'">
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectpays_id','departement_id'),6).' '; - print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectpays_id','departement_id')); - print '
'.$langs->trans("Company").''; + print $form->select_societes(isset($_POST["socid"])?$_POST["socid"]:($object->socid?$object->socid:-1),'socid','',1); + print '
'.$langs->trans("Country").''; - $form->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$object->fk_pays,'pays_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); - print '
'.$langs->trans("UserTitle").''; + print $formcompany->select_civilite(isset($_POST["civilite_id"])?$_POST["civilite_id"]:$object->civilite_id); + print '
'.$langs->trans('State').''; - $formcompany->select_departement($object->fk_departement,$object->pays_code); - print '
'.$langs->trans("PostOrFunction" ).'poste).'">
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
'.$langs->trans("Address").'
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print $formcompany->select_ziptown((isset($_POST["zipcode"])?$_POST["zipcode"]:$object->zip),'zipcode',array('town','selectpays_id','departement_id'),6).' '; + print $formcompany->select_ziptown((isset($_POST["town"])?$_POST["town"]:$object->town),'town',array('zipcode','selectpays_id','departement_id')); + print '
'.$langs->trans("EMail").'email).'">'.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().' 
'.$langs->trans("Country").''; + $form->select_pays(isset($_POST["pays_id"])?$_POST["pays_id"]:$object->fk_pays,'pays_id'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); + print '
Jabberidjabberid).'">
'.$langs->trans('State').''; + $formcompany->select_departement($object->fk_departement,$object->pays_code); + print '
'.$langs->trans("ContactVisibility").''; - $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('priv',$selectarray,$object->priv,0); - print '
'.$langs->trans("PhonePro").'phone_pro).'">'.$langs->trans("PhonePerso").'phone_perso).'">
'.$langs->trans("Note").''; - print '
'.$langs->trans("PhoneMobile").'phone_mobile).'">'.$langs->trans("Fax").'fax).'">
'.$langs->trans("EMail").'email).'">'.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().' 
'.$langs->trans("ContactForOrders").''; - print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder"); - print '
Jabberidjabberid).'">
'.$langs->trans("ContactForProposals").''; - print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal"); - print '
'.$langs->trans("ContactVisibility").''; + $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('priv',$selectarray,$object->priv,0); + print '
'.$langs->trans("ContactForContracts").''; - print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract"); - print '
'.$langs->trans("Note").''; + print '
'.$langs->trans("ContactForInvoices").''; - print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice"); - print '
'.$langs->trans("DolibarrLogin").''; - if ($object->user_id) - { - $dolibarr_user=new User($db); - $result=$dolibarr_user->fetch($object->user_id); - print $dolibarr_user->getLoginUrl(1); - } - else print $langs->trans("NoDolibarrAccess"); - print '
'.$langs->trans("ContactForOrders").''; + print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder"); + print '
'.$langs->trans("ContactForProposals").''; + print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal"); + print '
'.$langs->trans("ContactForContracts").''; + print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract"); + print '
'.$langs->trans("ContactForInvoices").''; + print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice"); + print '
'.$langs->trans("DolibarrLogin").''; + if ($object->user_id) + { + $dolibarr_user=new User($db); + $result=$dolibarr_user->fetch($object->user_id); + print $dolibarr_user->getLoginUrl(1); + } + else print $langs->trans("NoDolibarrAccess"); + print '

'; print '
'; - print ''; - print '   '; - print ''; - print '
'; + print ''; + print '   '; + print ''; + print ''; - print "
"; - } - } + print ""; + } + } - if (GETPOST("id") && GETPOST("action") != 'edit') - { - $objsoc = new Societe($db); + if (GETPOST("id") && GETPOST("action") != 'edit') + { + $objsoc = new Societe($db); - /* - * Fiche en mode visualisation - */ - if ($msg) - { - $langs->load("errors"); - print '
'.$langs->trans($msg).'
'; - } + /* + * Fiche en mode visualisation + */ + if ($msg) + { + $langs->load("errors"); + print '
'.$langs->trans($msg).'
'; + } - if ($_GET["action"] == 'create_user') - { - // Full firstname and name separated with a dot : firstname.name - include_once(DOL_DOCUMENT_ROOT.'/lib/functions2.lib.php'); - $login=dol_buildlogin($object->nom,$object->prenom); + if ($_GET["action"] == 'create_user') + { + // Full firstname and name separated with a dot : firstname.name + include_once(DOL_DOCUMENT_ROOT.'/lib/functions2.lib.php'); + $login=dol_buildlogin($object->nom,$object->prenom); $generated_password=''; if (! $ldap_sid) // TODO ldap_sid ? @@ -826,171 +832,174 @@ else } $password=$generated_password; - // Create a form array - $formquestion=array( - array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), - array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); + // Create a form array + $formquestion=array( + array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), + array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password)); - $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); - if ($ret == 'html') print '
'; - } + $ret=$form->form_confirm($_SERVER["PHP_SELF"]."?id=".$object->id,$langs->trans("CreateDolibarrLogin"),$langs->trans("ConfirmCreateContact"),"confirm_create_user",$formquestion,'no'); + if ($ret == 'html') print '
'; + } - print ''; + print '
'; - // Ref - print ''; + // Ref + print ''; - // Name - print ''; - print ''; + // Name + print ''; + print ''; - // Company + // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { print ''; + if ($object->socid > 0) + { + $objsoc->fetch($object->socid); + print $objsoc->getNomUrl(1); + } + else + { + print $langs->trans("ContactNotLinkedToCompany"); + } + print ''; } - // Civility - print ''; + // Civility + print ''; - print ''; + print ''; - // Address - print ''; + // Address + print ''; - // Zip Town - print ''; + // Zip Town + print ''; - // Country - print ''; + // Country + print ''; - // Department - print ''; + // State + if (empty($conf->global->SOCIETE_DISABLE_STATE)) + { + print ''; + } - // Phone - print ''; - print ''; + // Phone + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - // Email - print ''; - if ($conf->mailing->enabled) - { - $langs->load("mails"); - print ''; - print ''; - } - else - { - print ''; - } - print ''; + // Email + print ''; + if ($conf->mailing->enabled) + { + $langs->load("mails"); + print ''; + print ''; + } + else + { + print ''; + } + print ''; - // Jabberid - print ''; + // Jabberid + print ''; - print ''; + print ''; - print ''; + print ''; - $object->load_ref_elements(); + $object->load_ref_elements(); - if ($conf->commande->enabled) - { - print ''; - } + if ($conf->commande->enabled) + { + print ''; + } - if ($conf->propal->enabled) - { - print ''; - } + if ($conf->propal->enabled) + { + print ''; + } - if ($conf->contrat->enabled) - { - print ''; - } + if ($conf->contrat->enabled) + { + print ''; + } - if ($conf->facture->enabled) - { - print ''; - } + if ($conf->facture->enabled) + { + print ''; + } - print ''; + print ''; - print "
'.$langs->trans("Ref").''; - print $form->showrefnav($object,'id'); - print '
'.$langs->trans("Ref").''; + print $form->showrefnav($object,'id'); + print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->name.''.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->name.''.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("Company").''; - if ($object->socid > 0) - { - $objsoc->fetch($object->socid); - print $objsoc->getNomUrl(1); - } - else - { - print $langs->trans("ContactNotLinkedToCompany"); - } - print '
'.$langs->trans("UserTitle").''; - print $object->getCivilityLabel(); - print '
'.$langs->trans("UserTitle").''; + print $object->getCivilityLabel(); + print '
'.$langs->trans("PostOrFunction" ).''.$object->poste.'
'.$langs->trans("PostOrFunction" ).''.$object->poste.'
'.$langs->trans("Address").''.nl2br($object->address).'
'.$langs->trans("Address").''.nl2br($object->address).'
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $object->cp; - if ($object->cp) print ' '; - print $object->ville.'
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; + print $object->cp; + if ($object->cp) print ' '; + print $object->ville.'
'.$langs->trans("Country").''; - $img=picto_from_langcode($object->pays_code); - if ($img) print $img.' '; - print $object->pays; - print '
'.$langs->trans("Country").''; + $img=picto_from_langcode($object->pays_code); + if ($img) print $img.' '; + print $object->pays; + print '
'.$langs->trans('State').''.$object->departement.'
'.$langs->trans('State').''.$object->departement.'
'.$langs->trans("PhonePro").''.dol_print_phone($object->phone_pro,$object->pays_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("PhonePerso").''.dol_print_phone($object->phone_perso,$object->pays_code,$object->id,$object->socid,'AC_TEL').'
'.$langs->trans("PhonePro").''.dol_print_phone($object->phone_pro,$object->pays_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("PhonePerso").''.dol_print_phone($object->phone_perso,$object->pays_code,$object->id,$object->socid,'AC_TEL').'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->pays_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("Fax").''.dol_print_phone($object->fax,$object->pays_code,$object->id,$object->socid,'AC_FAX').'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->pays_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("Fax").''.dol_print_phone($object->fax,$object->pays_code,$object->id,$object->socid,'AC_FAX').'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').''.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().' 
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').''.$langs->trans("NbOfEMailingsReceived").''.$object->getNbOfEMailings().' 
Jabberid'.$object->jabberid.'
Jabberid'.$object->jabberid.'
'.$langs->trans("ContactVisibility").''; - print $object->LibPubPriv($object->priv); - print '
'.$langs->trans("ContactVisibility").''; + print $object->LibPubPriv($object->priv); + print '
'.$langs->trans("Note").''; - print nl2br($object->note); - print '
'.$langs->trans("Note").''; + print nl2br($object->note); + print '
'.$langs->trans("ContactForOrders").''; - print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder"); - print '
'.$langs->trans("ContactForOrders").''; + print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder"); + print '
'.$langs->trans("ContactForProposals").''; - print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal"); - print '
'.$langs->trans("ContactForProposals").''; + print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal"); + print '
'.$langs->trans("ContactForContracts").''; - print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract"); - print '
'.$langs->trans("ContactForContracts").''; + print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract"); + print '
'.$langs->trans("ContactForInvoices").''; - print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice"); - print '
'.$langs->trans("ContactForInvoices").''; + print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice"); + print '
'.$langs->trans("DolibarrLogin").''; - if ($object->user_id) - { - $dolibarr_user=new User($db); - $result=$dolibarr_user->fetch($object->user_id); - print $dolibarr_user->getLoginUrl(1); - } - else print $langs->trans("NoDolibarrAccess"); - print '
'.$langs->trans("DolibarrLogin").''; + if ($object->user_id) + { + $dolibarr_user=new User($db); + $result=$dolibarr_user->fetch($object->user_id); + print $dolibarr_user->getLoginUrl(1); + } + else print $langs->trans("NoDolibarrAccess"); + print '
"; + print ""; - print ""; + print ""; - // Barre d'actions - if (! $user->societe_id) - { - print '
'; + // Barre d'actions + if (! $user->societe_id) + { + print '
'; - if ($user->rights->societe->contact->creer) - { - print ''.$langs->trans('Modify').''; - } + if ($user->rights->societe->contact->creer) + { + print ''.$langs->trans('Modify').''; + } - if (! $object->user_id && $user->rights->user->user->creer) - { - print ''.$langs->trans("CreateDolibarrLogin").''; - } + if (! $object->user_id && $user->rights->user->user->creer) + { + print ''.$langs->trans("CreateDolibarrLogin").''; + } - if ($user->rights->societe->contact->supprimer) - { - print ''.$langs->trans('Delete').''; - } + if ($user->rights->societe->contact->supprimer) + { + print ''.$langs->trans('Delete').''; + } - print "

"; - } + print "

"; + } - print show_actions_todo($conf,$langs,$db,$objsoc,$object); + print show_actions_todo($conf,$langs,$db,$objsoc,$object); - print show_actions_done($conf,$langs,$db,$objsoc,$object); - } + print show_actions_done($conf,$langs,$db,$objsoc,$object); + } } $db->close();