$contacts = $dao->getContacts($entreprise_id);\r
\r
$res = '<table class="liste light">';\r
- $res .= '<tr class="light"><th colspan="4"><a href="" class="popup" rel="formContact/new/' . $entreprise_id . '">' . $core->typo->Contact('Ajouter un contact') . '</a></th></tr>';\r
+ $res .= '<tr class="light"><th colspan="5"><a href="" class="popup" rel="formContact/new/' . $entreprise_id . '">' . $core->typo->Contact('Ajouter un contact') . '</a></th></tr>';\r
$i = 0;\r
foreach($contacts as $contact) {\r
$odd = cubeMath::isOdd($i)?' class="odd"':'';\r
$res .= '<tr' . $odd . '><td>' . trim($contact->prenom . ' ' . $contact->nom) . '</td>';\r
$res .= '<td><a href="mailto:' . trim($contact->prenom . ' ' . $contact->nom) . '<' . $contact->email . '>">' . $contact->email . '</a></td>';\r
$res .= '<td class="min"><a href="' . SITE_PATH . 'fichiers/' . $contact->utilisateur_id . '">FTP</a></td>';\r
+ $res .= '<td class="min"><a class="ajax" href="#" rel="' . SITE_PATH . 'connectAS/' . $contact->utilisateur_id . '">Se connecter comme ...</a></td>';\r
$res .= '<td class="right"><a href="#" rel="formContact/' . $contact->utilisateur_id . '" class="popup">' . cubeMedia::image(IMG . '/edit.png') . '</a></td></tr>';\r
$i++;\r
}\r
if ($client_id != 'new') {\r
$res .= '<tr><td colspan="2">' . cubeMedia::spacer(10, 10) . '</td></tr>';\r
$res .= '<tr><td></td><td><a href="' . SITE_PATH . 'fichiers/' . $client->utilisateur_id . '">' . __('FTP') . '</a></td></tr>';\r
+ $res .= '<tr><td></td><td><a class="ajax" href="#" rel="' . SITE_PATH . 'connectAs/' . $client->utilisateur_id . '">' . __('Se connecter comme ...') . '</a></td></tr>';\r
$res .= '<tr><td>' . __("Paramètres de connexion à l'extranet") . '</td><td>' . __('Adresse') . ' : http://extranet.cubedesigners.com/<br />' . __("Nom d'utilisateur") . ' : ' . $client->email . '<br />' . __('Mot de passe') . ' : ' . $client->password . '</td></tr>';\r
$res .= '<tr><td colspan="2">' . cubeMedia::spacer(10, 10) . '</td></tr>';\r
// $res .= '<tr><td>' . __("Paramètres de connexion au FTP") . '</td><td>' . __('Serveur FTP') . ' : extranet.cubedesigners.com (ftp://extranet.cubedesigners.com)<br />' . __("Nom d'utilisateur") . ' : ' . $client->email . '<br />' . __('Mot de passe') . ' : ' . $client->password . '</td></tr>';\r
$dao = new extranetDAOProjet($core->con);\r
$projet = $dao->selectById($projet_id);\r
\r
+ $hasFacture = $dao->projectHasFacture($projet_id);\r
+\r
$droits = extranetDroits::projet($projet, false);\r
\r
$projet->progression = !$projet->progression?'-':$projet->progression . '%';\r
$res .= '<td>' . $projet->progression . '</td>';\r
if ($droits) {\r
$res .= '<td class="action"><a href="#" class="popup" rel="formProjet/' . $projet->projet_id . '">' . cubeMedia::image(IMG . '/edit.png') . '</a></td>';\r
- if (!count($projet->taches)) {\r
+ if (!count($projet->taches) && !$hasFacture) {\r
$res .= '<td class="action"><a href="#" class="ajax" rel="supprimeProjet/' . $projet->projet_id . '" title="' . __('Êtes vous certain de vouloir supprimer ce projet ?') . '">' . cubeMedia::image(IMG . '/delete.png') . '</a></td>';\r
} else {\r
$res .= '<td></td>';\r
$body = 'Tous les fichiers de ' . $core->user->prenom . ' ' . $core->user->nom . ' : http://extranet.cubedesigners.com/fichiers/' . $core->user->utilisateur_id . "\n\n";\r
$body .= 'Fichiers chargés : ' . "\n";\r
foreach($_SESSION['files_uploaded'] as $f) {\r
- $body .= ' - http://extranet.cubedesigners.com/telecharger/' . $f . "\n";\r
+ $body .= ' - http://' . $_SERVER['HTTP_HOST'] . '/telecharger/' . $f . "\n";\r
}\r
} else {\r
$dao = new commonDAOClient($core->con);\r
$body .= ' - http://extranet.cubedesigners.com/telecharger/' . $f . "\n";\r
}\r
$body .= "\n" . 'Rappel des identifiants de connexion à l\'extranet Cubedesigners : ' . "\n";\r
- $body .= ' - Adresse : http://extranet.cubedesigners.com/' . "\n";\r
+ $body .= ' - Adresse : http://' . $_SERVER['HTTP_HOST'] . '/' . "\n";\r
$body .= ' - Login : ' . $client->email . "\n";\r
$body .= ' - Mot de passe : ' . $client->password . "\n";\r
}\r