* Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2005-2007 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * \file htdocs/comm/action/fiche.php * \ingroup agenda * \brief Page for action card * \version $Id$ */ require_once("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/user.class.php"); require_once(DOL_DOCUMENT_ROOT."/cactioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); require_once(DOL_DOCUMENT_ROOT."/html.formactions.class.php"); $langs->load("companies"); $langs->load("commercial"); $langs->load("other"); $langs->load("bills"); $langs->load("orders"); $langs->load("agenda"); // Security check if ($user->societe_id > 0) { $action = ''; $socid = $user->societe_id; } if (isset($_GET["error"])) $error=$_GET["error"]; $cactioncomm = new CActionComm($db); $actioncomm = new ActionComm($db); $contact = new Contact($db); /* * Action creation de l'action * */ if ($_POST["action"] == 'add_action') { if ($_POST["contactid"]) { $result=$contact->fetch($_POST["contactid"]); } if ($_POST['cancel']) { $backtopage=''; if (! empty($_POST["backtopage"])) $backtopage=$_POST["backtopage"]; if (! $backtopage) { if ($_POST['socid'] > 0) $backtopage=DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']; else $backtopage=DOL_URL_ROOT.'/comm/action/index.php'; } header("Location: ".$backtopage); exit; } // Clean parameters if ($_POST["aphour"] == -1) $_POST["aphour"]='0'; if ($_POST["apmin"] == -1) $_POST["apmin"]='0'; if ($_POST["p2hour"] == -1) $_POST["p2hour"]='0'; if ($_POST["p2min"] == -1) $_POST["p2min"]='0'; //if ($_POST["adhour"] == -1) $_POST["adhour"]='0'; //if ($_POST["admin"] == -1) $_POST["admin"]='0'; //if ($_POST["a2hour"] == -1) $_POST["a2hour"]='0'; //if ($_POST["a2min"] == -1) $_POST["a2min"]='0'; $datep=dolibarr_mktime($_POST["aphour"], $_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); $datep2=dolibarr_mktime($_POST["p2hour"], $_POST["p2min"], 0, $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); /*$datea=dolibarr_mktime($_POST["adhour"], // deprecated $_POST["admin"], 0, $_POST["admonth"], $_POST["adday"], $_POST["adyear"]); $datea2=dolibarr_mktime($_POST["a2hour"], // deprecated $_POST["a2min"], 0, $_POST["a2month"], $_POST["a2day"], $_POST["a2year"]); */ if (! $datep2 && $_POST["percentage"] == 100) { $error=1; $_GET["action"] = 'create'; $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd")).'
'; } // Initialisation objet cactioncomm if (! $_POST["actioncode"]) { $error=1; $_GET["action"] = 'create'; $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->trans("Type")).'
'; } else { $result=$cactioncomm->fetch($_POST["actioncode"]); } // Initialisation objet actioncomm $actioncomm->type_id = $cactioncomm->id; $actioncomm->type_code = $cactioncomm->code; $actioncomm->priority = isset($_POST["priority"])?$_POST["priority"]:0; $actioncomm->location = isset($_POST["location"])?$_POST["location"]:''; $actioncomm->label = trim($_POST["label"]); if (! $_POST["label"]) { if ($_POST["actioncode"] == 'AC_RDV' && $contact->getFullName($langs)) { $actioncomm->label = $langs->transnoentities("TaskRDVWith",$contact->getFullName($langs)); } else { if ($langs->trans("Action".$actioncomm->type_code) != "Action".$actioncomm->type_code) { $actioncomm->label = $langs->transnoentities("Action".$actioncomm->type_code)."\n"; } else $actioncomm->label = $cactioncomm->libelle; } } $actioncomm->datep = $datep; //$actioncomm->date = $datea; $actioncomm->datef = $datep2; //$actioncomm->dateend = $datea2; //if ($_POST["percentage"] < 100 && strval($actioncomm->datep) != '') $actioncomm->datep=$actioncomm->date; if ($actioncomm->type_code == 'AC_RDV') { // RDV if ($actioncomm->datef) { $actioncomm->percentage = 100; } else { $actioncomm->percentage = 0; } } else { $actioncomm->percentage = isset($_POST["percentage"])?$_POST["percentage"]:0; } $actioncomm->duree=(($_POST["dureehour"] * 60) + $_POST["dureemin"]) * 60; $usertodo=new User($db,$_POST["affectedto"]); if ($_POST["affectedto"] > 0) { $usertodo->fetch(); } $actioncomm->usertodo = $usertodo; $userdone=new User($db,$_POST["doneby"]); if ($_POST["doneby"] > 0) { $userdone->fetch(); } $actioncomm->userdone = $userdone; $actioncomm->note = trim($_POST["note"]); if (isset($_POST["contactid"])) $actioncomm->contact = $contact; if (isset($_REQUEST["socid"]) && $_REQUEST["socid"] > 0) { $societe = new Societe($db); $societe->fetch($_REQUEST["socid"]); $actioncomm->societe = $societe; } // Special for module webcal and phenix if ($_POST["add_webcal"] == 'on' && $conf->webcal->enabled) $actioncomm->use_webcal=1; if ($_POST["add_phenix"] == 'on' && $conf->phenix->enabled) $actioncomm->use_phenix=1; // Check parameters if ($actioncomm->type_code == 'AC_RDV' && ($datep == '' || $datep2 == '')) { $error=1; $_GET["action"] = 'create'; $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DateEnd")).'
'; } if ($datea && $_POST["percentage"] == 0) { $error=1; $_GET["action"] = 'create'; $mesg='
'.$langs->trans("ErrorStatusCantBeZeroIfStarted").'
'; } if (! $_POST["apyear"] && ! $_POST["adyear"]) { $error=1; $_GET["action"] = 'create'; $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->trans("Date")).'
'; } if (! $error) { $db->begin(); // On cree l'action $idaction=$actioncomm->add($user); if ($idaction > 0) { if (! $actioncomm->error) { $db->commit(); if ($_POST["from"]) { dolibarr_syslog("Back to ".$_POST["from"]); Header("Location: ".$_POST["from"]); } elseif($idaction) { Header("Location: ".DOL_URL_ROOT.'/comm/action/fiche.php?id='.$idaction); } else { Header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'); } exit; } else { // Si erreur $db->rollback(); $_GET["id"]=$idaction; $langs->load("errors"); $error=$langs->trans($actioncomm->error); } } else { $db->rollback(); $_GET["id"]=$idaction; $langs->load("errors"); $error=$langs->trans($actioncomm->error); } } // print $_REQUEST["from"]."rr"; } /* * Action suppression de l'action * */ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes') { $actioncomm = new ActionComm($db); $actioncomm->fetch($_GET["id"]); $result=$actioncomm->delete(); if ($result >= 0) { Header("Location: index.php"); exit; } else { $mesg=$actioncomm->error; } } /* * Action mise a jour de l'action * */ if ($_POST["action"] == 'update') { if (! $_POST["cancel"]) { // Clean parameters if ($_POST["aphour"] == -1) $_POST["aphour"]='0'; if ($_POST["apmin"] == -1) $_POST["apmin"]='0'; if ($_POST["p2hour"] == -1) $_POST["p2hour"]='0'; if ($_POST["p2min"] == -1) $_POST["p2min"]='0'; //if ($_POST["adhour"] == -1) $_POST["adhour"]='0'; //if ($_POST["admin"] == -1) $_POST["admin"]='0'; $actioncomm = new Actioncomm($db); $actioncomm->fetch($_POST["id"]); $datep=dolibarr_mktime($_POST["aphour"], $_POST["apmin"], 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); $datep2=dolibarr_mktime($_POST["p2hour"], $_POST["p2min"], 0, $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); /*$datea=dolibarr_mktime($_POST["adhour"], $_POST["admin"], 0, $_POST["admonth"], $_POST["adday"], $_POST["adyear"]); $datea2=dolibarr_mktime($_POST["a2hour"], $_POST["a2min"], 0, $_POST["a2month"], $_POST["a2day"], $_POST["a2year"]); */ //print $_POST["apmonth"].",".$_POST["apday"].",".$_POST["apyear"].",".$_POST["aphour"].",".$_POST["apmin"]."
\n"; //print $actioncomm->datep; //print 'dddd'.$datep; $actioncomm->label = $_POST["label"]; $actioncomm->datep = $datep; $actioncomm->datef = $datep2; //$actioncomm->date = $datea; //$actioncomm->dateend = $datea2; $actioncomm->percentage = $_POST["percentage"]; $actioncomm->priority = $_POST["priority"]; $actioncomm->location = isset($_POST["location"])?$_POST["location"]:''; $actioncomm->societe->id = $_POST["socid"]; $actioncomm->contact->id = $_POST["contactid"]; $actioncomm->note = $_POST["note"]; if (! $datep2 && $_POST["percentage"] == 100) { $error=$langs->trans("ErrorFieldRequired",$langs->trans("DateEnd")); $_REQUEST["action"] = 'edit'; } // Users $usertodo=new User($db,$_POST["affectedto"]); if ($_POST["affectedto"]) { $usertodo->fetch(); } $actioncomm->usertodo = $usertodo; $userdone=new User($db,$_POST["doneby"]); if ($_POST["doneby"]) { $userdone->fetch(); } $actioncomm->userdone = $userdone; if (! $error) { $db->begin(); $result=$actioncomm->update($user); if ($result > 0) { $db->commit(); } else { $db->rollback(); } } } if ($result < 0) { $langs->load("errors"); $mesg='
'.$langs->trans($actioncomm->error).'
'; $_GET["id"]=$_POST["id"]; } else { if (! empty($_POST["from"])) { header("Location: ".$_POST["from"]); exit; } else { $_GET["id"]=$_REQUEST["id"]; } } } /* * View */ llxHeader(); $html = new Form($db); $htmlactions = new FormActions($db); /* ************************************************************************** */ /* */ /* Affichage fiche en mode creation */ /* */ /* ************************************************************************** */ if ($_GET["action"] == 'create') { if ($_GET["contactid"]) { $contact = new Contact($db); $result=$contact->fetch($_GET["contactid"]); } print '
'; print ''; if (! empty($_REQUEST["backtopage"])) print ''; if ($_GET["actioncode"] == 'AC_RDV') print_titre ($langs->trans("AddActionRendezVous")); else print_titre ($langs->trans("AddAnAction")); if ($mesg) print $mesg.'
'; else print "
"; print ''; // Type d'action actifs print ''; // Title print ''; // Location print ''; // Societe, contact print ''; // Si la societe est imposee, on propose ces contacts // If company is forced propose contacts if ($_REQUEST["socid"] > 0 && !($_REQUEST['contactid'] > 0)) { print ''; } print '
'.$langs->trans("Type").'*'; if ($_GET["actioncode"]) { print ''."\n"; $cactioncomm->fetch($_GET["actioncode"]); print $cactioncomm->getNomUrl(); } else { $htmlactions->select_type_actions($actioncomm->type_code, "actioncode"); } print '
'.$langs->trans("Title").'
'.$langs->trans("Location").'
'.$langs->trans("ActionOnCompany").''; if ($_REQUEST["socid"] > 0) { $societe = new Societe($db); $societe->fetch($_REQUEST["socid"]); print $societe->getNomUrl(1); print ''; } else { print $html->select_societes('','socid',1,1); } print '
'.$langs->trans("ActionOnContact").''; $html->select_contacts($_REQUEST["socid"],$_REQUEST['contactid'],'contactid',1,1); print '
'; print '
'; print ''; // Affecte a print ''; // Realise par print ''; print '
'.$langs->trans("ActionAffectedTo").''; // $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:$actioncomm->usertodo,'affectedto',1); $html->select_users($_REQUEST["affectedto"]?$_REQUEST["affectedto"]:($actioncomm->usertodo->id > 0 ? $actioncomm->usertodo : $user),'affectedto',1); print '
'.$langs->trans("ActionDoneBy").''; $html->select_users($_REQUEST["doneby"]?$_REQUEST["doneby"]:$actioncomm->userdone,'doneby',1); print '
'; print '
'; print ''; if (! empty($_GET["datep"]) && eregi('^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])$',$_GET["datep"],$reg)) { $actioncomm->datep=dolibarr_mktime(0,0,0,$reg[2],$reg[3],$reg[1]); } // Date start print ''; // Date end print ''; // Avancement print ''; print ''; // Priority print ''; add_row_for_calendar_link(); // Note print ''; print ''; print '
'.$langs->trans("DateActionStart").''; if ($_REQUEST["afaire"] == 1) $html->select_date($actioncomm->datep,'ap',1,1,0,"action",1,1); else if ($_REQUEST["afaire"] == 2) $html->select_date($actioncomm->datep,'ap',1,1,1,"action",1,1); else $html->select_date($actioncomm->datep,'ap',1,1,1,"action",1,1); print '
'.$langs->trans("DateActionEnd").''; if ($_REQUEST["afaire"] == 1) $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1); else if ($_REQUEST["afaire"] == 2) $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1); else $html->select_date($actioncomm->datef,'p2',1,1,1,"action",1,1); print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; $percent=0; if (isset($_POST['percentage'])) { $percent=$_POST['percentage']; } else { if ($_REQUEST["afaire"] == 1) $percent=0; if ($_REQUEST["afaire"] == 2) $percent=100; } print $htmlactions->form_select_status_action('formaction',$percent,1); print '
'.$langs->trans("Priority").''; print ''; print '
'.$langs->trans("Note").''; if ($conf->fckeditor->enabled) { // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $doleditor=new DolEditor('note','',280,'dolibarr_notes','In',true); $doleditor->Create(); } else { print ''; } print '
'; print ''; print '     '; print ''; print '
'; print "
"; } /* * Affichage action en mode edition ou visu * */ if ($_GET["id"]) { if ($error) { print '
'.$error.'

'; } if ($mesg) { print $mesg.'
'; } $act = new ActionComm($db); $result=$act->fetch($_GET["id"]); if ($result < 0) dolibarr_print_error($db,$act->error); $societe = new Societe($db); if ($act->societe->id) { $result=$societe->fetch($act->societe->id); } $act->societe = $societe; if ($act->author->id > 0) { $tmpuser=new User($db); $tmpuser->id=$act->author->id; $res=$tmpuser->fetch(); $act->author=$tmpuser; } if ($act->usermod->id > 0) { $tmpuser=new User($db); $tmpuser->id=$act->usermod->id; $res=$tmpuser->fetch(); $act->usermod=$tmpuser; } if ($act->usertodo->id > 0) { $tmpuser=new User($db); $tmpuser->id=$act->usertodo->id; $res=$tmpuser->fetch(); $act->usertodo=$tmpuser; } if ($act->userdone->id > 0) { $tmpuser=new User($db); $tmpuser->id=$act->userdone->id; $res=$tmpuser->fetch(); $act->userdone=$tmpuser; } $contact = new Contact($db); if ($act->contact->id) { $result=$contact->fetch($act->contact->id,$user); } $act->contact = $contact; /* * Affichage onglets */ $h = 0; $head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$_GET["id"]; $head[$h][1] = $langs->trans("CardAction"); $hselected=$h; $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$_GET["id"]; $head[$h][1] = $langs->trans('Documents'); $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$_GET["id"]; $head[$h][1] = $langs->trans('Info'); $h++; dolibarr_fiche_head($head, $hselected, $langs->trans("Action")); $now=gmmktime(); $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; // Confirmation suppression action if ($_GET["action"] == 'delete') { $html->form_confirm("fiche.php?id=".$_GET["id"],$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete"); print '
'; } if ($_REQUEST["action"] == 'edit') { // Fiche action en mode edition print '
'; print ''; print ''; if (! empty($_REQUEST["backtopage"])) print ''; print ''; // Ref print ''; // Type print ''; // Title print ''; // Location print ''; // Company print ''; print ''; print ''; print '
'.$langs->trans("Ref").''.$act->id.'
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").'
'.$langs->trans("Location").'
'.$langs->trans("Company").''; print $html->select_societes($act->societe->id,'socid',1,1); print ''.$langs->trans("Contact").''; $html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1); print '

'; // Input by print ''; // Affecte a print ''; // Realise par print ''; print '
'.$langs->trans("ActionAskedBy").''; print $act->author->getNomUrl(1); print '
'.$langs->trans("ActionAffectedTo").''; $html->select_users($act->usertodo->id,'affectedto',1); print '
'.$langs->trans("ActionDoneBy").''; $html->select_users($act->userdone->id,'doneby',1); print '

'; // Date start print ''; // Date end print ''; // Status print ''; // Priority print ''; // Object linked if ($act->objet_url) { print ''; print ''; } // Note print ''; print ''; print '
'.$langs->trans("DateActionStart").''; if ($_REQUEST["afaire"] == 1) $html->select_date($act->datep,'ap',1,1,0,"action",1,1); else if ($_REQUEST["afaire"] == 2) $html->select_date($act->datep,'ap',1,1,1,"action",1,1); else $html->select_date($act->datep,'ap',1,1,1,"action",1,1); print '
'.$langs->trans("DateActionEnd").''; if ($_REQUEST["afaire"] == 1) $html->select_date($act->datef,'p2',1,1,1,"action",1,1); else if ($_REQUEST["afaire"] == 2) $html->select_date($act->datef,'p2',1,1,1,"action",1,1); else $html->select_date($act->datef,'p2',1,1,1,"action",1,1); print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; $percent=isset($_REQUEST["percentage"])?$_REQUEST["percentage"]:$act->percentage; print $htmlactions->form_select_status_action('formaction',$percent,1); print '
'.$langs->trans("Priority").''; print ''; print '
'.$langs->trans("LinkedObject").''.$act->objet_url.'
'.$langs->trans("Note").''; if ($conf->fckeditor->enabled) { // Editeur wysiwyg require_once(DOL_DOCUMENT_ROOT."/lib/doleditor.class.php"); $doleditor=new DolEditor('note',$act->note,240,'dolibarr_notes','In',true); $doleditor->Create(); } else { print ''; } print '
'; print '     '; print '
'; } else { // Affichage fiche action en mode visu print ''; // Ref print ''; // Type print ''; // Title print ''; // Location print ''; // Societe - contact print ''; print ''; print ''; print '
'.$langs->trans("Ref").''.$act->id.'
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("Location").''.$act->location.'
'.$langs->trans("Company").''.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None")); if ($act->societe->id && $act->type_code == 'AC_TEL') { if ($act->societe->fetch($act->societe->id)) { print "
".dol_print_phone($act->societe->tel); } } print '
'.$langs->trans("Contact").''; if ($act->contact->id > 0) { print $act->contact->getNomUrl(1); if ($act->contact->id && $act->type_code == 'AC_TEL') { if ($act->contact->fetch($act->contact->id)) { print "
".dol_print_phone($act->contact->phone_pro); } } } else { print $langs->trans("None"); } print '

'; // Input by print ''; // Affecte a print ''; // Realise par print ''; print '
'.$langs->trans("ActionAskedBy").''; if ($act->author->id > 0) print $act->author->getNomUrl(1); else print ' '; print '
'.$langs->trans("ActionAffectedTo").''; if ($act->usertodo->id > 0) print $act->usertodo->getNomUrl(1); print '
'.$langs->trans("ActionDoneBy").''; if ($act->userdone->id > 0) print $act->userdone->getNomUrl(1); print '

'; // Date debut print ''; // Date fin print ''; // Statut print ''; // Priority print ''; // Objet lie if ($act->objet_url) { print ''; print ''; } // Note print ''; print '
'.$langs->trans("DateActionStart").''; print dolibarr_print_date($act->datep,'dayhour'); if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); print '
'.$langs->trans("DateActionEnd").''; print dolibarr_print_date($act->datef,'dayhour'); if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late")); print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; print $act->getLibStatut(4); print '
'.$langs->trans("Priority").''; print $act->priority; print '
'.$langs->trans("LinkedObject").''.$act->objet_url.'
'.$langs->trans("Note").''; print dol_htmlentitiesbr($act->note); print '
'; } print "\n"; /** * Barre d'actions * */ print '
'; if ($_GET["action"] != 'edit' && $_GET["action"] != 'delete') { print ''.$langs->trans("Modify").''; print ''.$langs->trans("Delete").''; } print '
'; } $db->close(); llxFooter('$Date$ - $Revision$'); /** \brief Ajoute une ligne de tableau a 2 colonnes pour avoir l'option synchro calendrier \return int Retourne le nombre de lignes ajoutees */ function add_row_for_calendar_link() { global $conf,$langs,$user; $nbtr=0; // Lien avec calendrier si module active if ($conf->webcal->enabled) { if ($conf->global->PHPWEBCALENDAR_SYNCRO != 'never') { $langs->load("other"); print ''.$langs->trans("AddCalendarEntry","Webcalendar").''; if (! $user->webcal_login) { print ''; print ' '.$langs->transnoentities("ErrorWebcalLoginNotDefined","id."\">".$user->login.""); print ''; print ''; $nbtr++; } else { if ($conf->global->PHPWEBCALENDAR_SYNCRO == 'always') { print ''; } else { print 'global->PHPWEBCALENDAR_SYNCRO=='always' || $conf->global->PHPWEBCALENDAR_SYNCRO=='yesbydefault')?' checked':'').'>'; print ''; $nbtr++; } } } } if ($conf->phenix->enabled) { if ($conf->global->PHPPHENIX_SYNCRO != 'never') { $langs->load("other"); print ''.$langs->trans("AddCalendarEntry","Phenix").''; if (! $user->phenix_login) { print ''; print ' '.$langs->transnoentities("ErrorPhenixLoginNotDefined","id."\">".$user->login.""); print ''; print ''; $nbtr++; } else { if ($conf->global->PHPPHENIX_SYNCRO == 'always') { print ''; } else { print 'global->PHPPHENIX_SYNCRO=='always' || $conf->global->PHPPHENIX_SYNCRO=='yesbydefault')?' checked':'').'>'; print ''; $nbtr++; } } } } return $nbtr; } ?>