} if ($errors != '') { redirectMsg('./categos.php', __('Errors ocurred while trying to save category', 'works') . $errors, 1); die; } else { redirectMsg('./categos.php', __('Database updated successfully!', 'works'), 0); die; } } $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; switch ($op) { case 'new': formCategory(); break; case 'edit': formCategory(1); break; case 'save': saveCategory(); break; case 'saveedit': saveCategory(1); break; case 'delete': deleteCategory(); break; case 'update': updateCategory(); break; case 'active': activeCategory(1);
// Email print '<tr><td>' . $langs->trans("EMail") . '</td><td>' . dol_print_email($contact->email, $contact->id, $contact->socid, 'AC_EMAIL') . '</td>'; if ($conf->mailing->enabled) { $langs->load("mails"); print '<td nowrap>' . $langs->trans("NbOfEMailingsReceived") . '</td>'; print '<td><a href="' . DOL_URL_ROOT . '/comm/mailing/liste.php?filteremail=' . urlencode($contact->email) . '">' . $contact->getNbOfEMailings() . '</a></td>'; } else { print '<td colspan="2"> </td>'; } print '</tr>'; print '</table>'; print '</div>'; if ($mesg) { print $mesg; } formCategory($db, $contact, 5); } } } /** * Function to output a HTML select for a category * * @param DoliDb $db Database handler * @param Object $object Object we want to see categories it can be classified into * @param int $typeid Type of category (0, 1, 2, 3) * @param int $socid Id thirdparty * @return int 0 */ function formCategory($db, $object, $typeid, $socid = 0) { global $user, $langs, $form, $bc;
print nl2br($object->note_public); print '</td></tr>'; // Note Private print '<tr><td valign="top">' . $langs->trans("NotePrivate") . '</td><td colspan="3">'; print nl2br($object->note_private); print '</td></tr>'; // Other attributes $parameters = array('socid' => $socid, 'colspan' => ' colspan="3"'); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook) && !empty($extrafields->attribute_label)) { print $object->showOptionals($extrafields); } print '</table>'; dol_fiche_end(); formCategory($db, $object, 4, $socid, $user->rights->societe->creer); } } } /** * Function to output a form to add object into a category * * @param DoliDb $db Database handler * @param Object $object Object we want to see categories it can be classified into * @param int $typeid Type of category (0, 1, 2, 3) * @param int $socid Id thirdparty * @param int $showclassifyform 1=Add form to 'Classify', 0=Do not show form to 'Classify' * @return int 0 */ function formCategory($db, $object, $typeid, $socid = 0, $showclassifyform = 1) {
print '</tr>'; // Prenom print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->prenom.' </td>'; print '</tr>'; // Status print '<tr><td>'.$langs->trans("Status").'</td><td class="valeur">'.$member->getLibStatut(4).'</td></tr>'; print '</table>'; print '</div>'; if ($mesg) print($mesg); formCategory($db,$member,3); } } /** * Fonction Barre d'actions */ function formCategory($db,$object,$typeid) { global $user,$langs,$html,$bc; if ($typeid == 0) $title = $langs->trans("ProductsCategoriesShort"); if ($typeid == 1) $title = $langs->trans("SuppliersCategoriesShort"); if ($typeid == 2) $title = $langs->trans("CustomersProspectsCategoriesShort"); if ($typeid == 3) $title = $langs->trans("MembersCategoriesShort");