print '<input type="hidden" name="action" value="add">';
 $param = "&socid=" . $socid;
 // Line with titles
 print '<table width="100%" class="noborder">';
 print '<tr class="liste_titre">';
 print_liste_field_titre($langs->trans("Contact"), "fiche.php", "c.lastname", '', $param, '"width="45%"', $sortfield, $sortorder);
 print_liste_field_titre($langs->trans("Action"), "fiche.php", "a.titre", '', $param, '"width="35%"', $sortfield, $sortorder);
 print_liste_field_titre($langs->trans("Type"), "fiche.php", "", '', $param, '"width="10%"', $sortfield, $sortorder);
 print_liste_field_titre('');
 print '</tr>';
 $var = false;
 $listofemails = $object->thirdparty_and_contact_email_array();
 if (count($listofemails) > 0) {
     $actions = array();
     // Load array of available notifications
     $notificationtrigger = new InterfaceNotification($db);
     $listofnotifiedevents = $notificationtrigger->getListOfManagedEvents();
     foreach ($listofnotifiedevents as $notifiedevent) {
         $label = $langs->trans("Notify_" . $notifiedevent['code']) != "Notify_" . $notifiedevent['code'] ? $langs->trans("Notify_" . $notifiedevent['code']) : $notifiedevent['label'];
         $actions[$notifiedevent['rowid']] = $label;
     }
     print '<tr ' . $bc[$var] . '><td>';
     print $form->selectarray("contactid", $listofemails);
     print '</td>';
     print '<td>';
     print $form->selectarray("actionid", $actions, '', 1);
     print '</td>';
     print '<td>';
     $type = array('email' => $langs->trans("EMail"));
     print $form->selectarray("typeid", $type);
     print '</td>';
Esempio n. 2
0
 print '<input type="hidden" name="action" value="add">';
 $param = "&socid=" . $socid;
 // Line with titles
 print '<table width="100%" class="noborder">';
 print '<tr class="liste_titre">';
 print_liste_field_titre($langs->trans("Target"), $_SERVER["PHP_SELF"], "c.lastname", '', $param, '"width="45%"', $sortfield, $sortorder);
 print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "a.titre", '', $param, '"width="35%"', $sortfield, $sortorder);
 print_liste_field_titre($langs->trans("Type"), $_SERVER["PHP_SELF"], "", '', $param, '"width="10%"', $sortfield, $sortorder);
 print_liste_field_titre('');
 print "</tr>\n";
 $var = false;
 $listofemails = $object->thirdparty_and_contact_email_array();
 if (count($listofemails) > 0) {
     $actions = array();
     // Load array of available notifications
     $notificationtrigger = new InterfaceNotification($db);
     $listofmanagedeventfornotification = $notificationtrigger->getListOfManagedEvents();
     foreach ($listofmanagedeventfornotification as $managedeventfornotification) {
         $label = $langs->trans("Notify_" . $managedeventfornotification['code']) != "Notify_" . $managedeventfornotification['code'] ? $langs->trans("Notify_" . $managedeventfornotification['code']) : $managedeventfornotification['label'];
         $actions[$managedeventfornotification['rowid']] = $label;
     }
     print '<tr ' . $bc[$var] . '><td>';
     print $form->selectarray("contactid", $listofemails);
     print '</td>';
     print '<td>';
     print $form->selectarray("actionid", $actions, '', 1);
     print '</td>';
     print '<td>';
     $type = array('email' => $langs->trans("EMail"));
     print $form->selectarray("typeid", $type);
     print '</td>';