/**     \brief      Renvoi la description du modele de numerotation
  *      \return     string      Texte descripif
  */
 function info()
 {
     global $conf, $langs;
     $langs->load("pos@pos");
     $form = new Form($db);
     $texte = $langs->trans('GenericNumRefModelDesc') . "<br>\n";
     $texte .= '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
     $texte .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     $texte .= '<input type="hidden" name="action" value="updateMask">';
     $texte .= '<input type="hidden" name="maskconstfacsim" value="FACSIM_MURO_MASK">';
     $texte .= '<input type="hidden" name="maskconstfacsimcredit" value="FACSIM_MURO_MASK_CREDIT">';
     $texte .= '<table class="nobordernopadding" width="100%">';
     $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Facsim"));
     $tooltip .= $langs->trans("GenericMaskCodes2");
     $tooltip .= $langs->trans("POSMaskCodes");
     $tooltip .= $langs->trans("GenericMaskCodes3");
     $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Facsim"), $langs->transnoentities("facsim"));
     $tooltip .= $langs->trans("GenericMaskCodes5");
     // Parametrage du prefix
     $texte .= '<tr><td>' . $langs->trans("Mask") . ' (' . $langs->trans("Facsim") . '):</td>';
     $texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskfacsim" value="' . $conf->global->FACSIM_MURO_MASK . '">', $tooltip, 1, 1) . '</td>';
     $texte .= '<td align="left" rowspan="2">&nbsp; <input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button"></td>';
     $texte .= '</tr>';
     // Parametrage du prefix des avoirs
     $texte .= '<tr><td>' . $langs->trans("Mask") . ' (' . $langs->trans("FacsimAvoir") . '):</td>';
     $texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskfacsimcredit" value="' . $conf->global->FACSIM_MURO_MASK_CREDIT . '">', $tooltip, 1, 1) . '</td>';
     $texte .= '</tr>';
     $texte .= '</table>';
     $texte .= '</form>';
     return $texte;
 }
 /**
  *	Output a combo list with projects qualified for a third party
  *
  *	@param	int		$socid      	Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
  *	@param  int		$selected   	Id project preselected
  *	@param  string	$htmlname   	Nom de la zone html
  *	@param	int		$maxlength		Maximum length of label
  *	@param	int		$option_only	Return only html options lines without the select tag
  *	@param	int		$show_empty		Add an empty line
  *  @param	int		$discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
  *  @param	int		$forcefocus		Force focus on field (works with javascript only)
  *  @param	int		$disabled		Disabled
  *  @param  int     $mode           0 for HTML mode and 1 for JSON mode
  *  @param  string  $filterkey      Key to filter
  *	@return int         			Nber of project if OK, <0 if KO
  */
 function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '')
 {
     global $langs, $conf, $form;
     if (!empty($conf->use_javascript_ajax) && !empty($conf->global->PROJECT_USE_SEARCH_TO_SELECT)) {
         $placeholder = '';
         if ($selected && empty($selected_input_value)) {
             require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
             $project = new Project($this->db);
             $project->fetch($selected);
             $selected_input_value = $project->ref;
         }
         $urloption = 'socid=' . $socid . '&htmlname=' . $htmlname;
         print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT . '/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array());
         print '<input type="text" size="20" name="search_' . $htmlname . '" id="search_' . $htmlname . '" value="' . $selected_input_value . '"' . $placeholder . ' />';
     } else {
         print $this->select_projects_list($socid, $selected, $htmlname, $maxlength, $option_only, $show_empty, $discard_closed, $forcefocus, $disabled, 0, $filterkey);
         if ($discard_closed) {
             if (class_exists('Form')) {
                 if (empty($form)) {
                     $form = new Form($this->db);
                 }
                 print $form->textwithpicto('', $langs->trans("ClosedProjectsAreHidden"));
             }
         }
     }
 }
 /**
  *  Return description of module
  *
  *  @return     string      Texte descripif
  */
 function info()
 {
     global $conf, $langs;
     $langs->load("bills");
     $form = new Form($this->db);
     $texte = $langs->trans('GenericNumRefModelDesc') . "<br>\n";
     $texte .= '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
     $texte .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     $texte .= '<input type="hidden" name="action" value="updateMask">';
     $texte .= '<input type="hidden" name="maskconstpropal" value="PROPALE_SAPHIR_MASK">';
     $texte .= '<table class="nobordernopadding" width="100%">';
     $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Proposal"), $langs->transnoentities("Proposal"));
     $tooltip .= $langs->trans("GenericMaskCodes2");
     $tooltip .= $langs->trans("GenericMaskCodes3");
     $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Proposal"), $langs->transnoentities("Proposal"));
     $tooltip .= $langs->trans("GenericMaskCodes5");
     // Parametrage du prefix
     $texte .= '<tr><td>' . $langs->trans("Mask") . ':</td>';
     $texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskpropal" value="' . $conf->global->PROPALE_SAPHIR_MASK . '">', $tooltip, 1, 1) . '</td>';
     $texte .= '<td align="left" rowspan="2">&nbsp; <input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button"></td>';
     $texte .= '</tr>';
     $texte .= '</table>';
     $texte .= '</form>';
     return $texte;
 }
 /**
  * Return description of module
  *
  * @param	Translate	$langs		Object langs
  * @return	string   		   		Description of module
  */
 function info($langs)
 {
     global $conf;
     $langs->load("companies");
     $form = new Form($this->db);
     $tooltip = '';
     $texte = '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
     $texte .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     $texte .= '<input type="hidden" name="action" value="setModuleOptions">';
     $texte .= '<input type="hidden" name="param1" value="COMPANY_AQUARIUM_MASK_SUPPLIER">';
     $texte .= '<input type="hidden" name="param2" value="COMPANY_AQUARIUM_MASK_CUSTOMER">';
     $texte .= '<table class="nobordernopadding" width="100%">';
     $s1 = $form->textwithpicto('<input type="text" class="flat" size="4" name="value1" value="' . $conf->global->COMPANY_AQUARIUM_MASK_SUPPLIER . '">', $tooltip, 1, 1);
     $s2 = $form->textwithpicto('<input type="text" class="flat" size="4" name="value2" value="' . $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER . '">', $tooltip, 1, 1);
     $texte .= '<tr><td>' . $langs->trans("ModuleCompanyCode" . $this->nom, $s1, $s2) . "<br>\n";
     $texte .= '</td>';
     $texte .= '<td align="left">&nbsp; <input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button"></td>';
     $texte .= '</tr></table>';
     $texte .= '</form>';
     return $texte;
 }
 /**
  *  Renvoi la description du modele de numerotation
  *
  *  @return     string      Texte descripif
  */
 function info()
 {
     global $conf, $langs;
     $langs->load("bills");
     $form = new Form($this->db);
     $texte = $langs->trans('GenericNumRefModelDesc') . "<br>\n";
     $texte .= '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
     $texte .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     $texte .= '<input type="hidden" name="action" value="updateMask">';
     $texte .= '<input type="hidden" name="maskconstinvoice" value="FACTURE_MERCURE_MASK_INVOICE">';
     $texte .= '<input type="hidden" name="maskconstreplacement" value="FACTURE_MERCURE_MASK_REPLACEMENT">';
     $texte .= '<input type="hidden" name="maskconstcredit" value="FACTURE_MERCURE_MASK_CREDIT">';
     $texte .= '<input type="hidden" name="maskconstdeposit" value="FACTURE_MERCURE_MASK_DEPOSIT">';
     $texte .= '<table class="nobordernopadding" width="100%">';
     $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice"));
     $tooltip .= $langs->trans("GenericMaskCodes2");
     $tooltip .= $langs->trans("GenericMaskCodes3");
     $tooltip .= $langs->trans("GenericMaskCodes4a", $langs->transnoentities("Invoice"), $langs->transnoentities("Invoice"));
     $tooltip .= $langs->trans("GenericMaskCodes5");
     // Parametrage du prefix
     $texte .= '<tr><td>' . $langs->trans("Mask") . ' (' . $langs->trans("InvoiceStandard") . '):</td>';
     $texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskinvoice" value="' . $conf->global->FACTURE_MERCURE_MASK_INVOICE . '">', $tooltip, 1, 1) . '</td>';
     $texte .= '<td align="left" rowspan="3">&nbsp; <input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button"></td>';
     $texte .= '</tr>';
     // Parametrage du prefix des replacement
     $texte .= '<tr><td>' . $langs->trans("Mask") . ' (' . $langs->trans("InvoiceReplacement") . '):</td>';
     $texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="' . $conf->global->FACTURE_MERCURE_MASK_REPLACEMENT . '">', $tooltip, 1, 1) . '</td>';
     $texte .= '</tr>';
     // Parametrage du prefix des avoirs
     $texte .= '<tr><td>' . $langs->trans("Mask") . ' (' . $langs->trans("InvoiceAvoir") . '):</td>';
     $texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="' . $conf->global->FACTURE_MERCURE_MASK_CREDIT . '">', $tooltip, 1, 1) . '</td>';
     $texte .= '</tr>';
     // Parametrage du prefix des acomptes
     $texte .= '<tr><td>' . $langs->trans("Mask") . ' (' . $langs->trans("InvoiceDeposit") . '):</td>';
     $texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskdeposit" value="' . $conf->global->FACTURE_MERCURE_MASK_DEPOSIT . '">', $tooltip, 1, 1) . '</td>';
     $texte .= '</tr>';
     $texte .= '</table>';
     $texte .= '</form>';
     return $texte;
 }
Example #6
0
         if ($fieldlist[$field] == 'region_id') {
             $valuetoshow = '&nbsp;';
             $showfield = 1;
         }
         if ($fieldlist[$field] == 'region') {
             $valuetoshow = $langs->trans("Country") . '/' . $langs->trans("Region");
             $showfield = 1;
         }
     }
     if ($valuetoshow != '') {
         print '<td align="' . $align . '">';
         if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) {
             print '<a href="' . $tabhelp[$id][$value] . '" target="_blank">' . $valuetoshow . ' ' . img_help(1, $valuetoshow) . '</a>';
         } else {
             if (!empty($tabhelp[$id][$value])) {
                 print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
             } else {
                 print $valuetoshow;
             }
         }
         print '</td>';
     }
     if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
         $alabelisused = 1;
     }
 }
 if ($id == 4) {
     print '<td></td>';
 }
 print '<td colspan="4">';
 print '<input type="hidden" name="id" value="' . $id . '">';
Example #7
0
     print $form->editfieldval("CustomerAccountancyCode", 'customeraccountancycode', $objsoc->code_compta, 'socid', $objsoc->id, $user->rights->societe->creer);
     print '</td>';
     print '</tr>';
 }
 // Address
 print '<tr><td valign="top">' . $langs->trans('Address') . '</td><td colspan="3">';
 dol_print_address($objsoc->address, 'gmap', 'thirdparty', $objsoc->id);
 print "</td></tr>";
 // Zip / Town
 print '<tr><td nowrap="nowrap">' . $langs->trans('Zip') . ' / ' . $langs->trans('Town') . '</td><td colspan="3">' . $objsoc->cp . ($objsoc->cp && $objsoc->ville ? ' / ' : '') . $objsoc->ville . "</td>";
 print '</tr>';
 // Country
 print '<tr><td>' . $langs->trans("Country") . '</td><td colspan="3">';
 $img = picto_from_langcode($objsoc->pays_code);
 if ($objsoc->isInEEC()) {
     print $form->textwithpicto(($img ? $img . ' ' : '') . $objsoc->pays, $langs->trans("CountryIsInEEC"), 1, 0);
 } else {
     print ($img ? $img . ' ' : '') . $objsoc->pays;
 }
 print '</td></tr>';
 // Phone
 print '<tr><td>' . $langs->trans('Phone') . '</td><td style="min-width: 25%;">' . dol_print_phone($objsoc->tel, $objsoc->pays_code, 0, $objsoc->id, 'AC_TEL') . '</td>';
 // Fax
 print '<td>' . $langs->trans('Fax') . '</td><td style="min-width: 25%;">' . dol_print_phone($objsoc->fax, $objsoc->pays_code, 0, $objsoc->id, 'AC_FAX') . '</td></tr>';
 // EMail
 print '<td>' . $langs->trans('EMail') . '</td><td colspan="3">' . dol_print_email($objsoc->email, 0, $objsoc->id, 'AC_EMAIL') . '</td></tr>';
 // Web
 print '<tr><td>' . $langs->trans("Web") . '</td><td colspan="3">' . dol_print_url($objsoc->url, '_blank') . '</td></tr>';
 // Assujeti a TVA ou pas
 print '<tr>';
 print '<td nowrap="nowrap">' . $langs->trans('VATIsUsed') . '</td><td colspan="3">';
Example #8
0
     $param = 'NOTIFICATION_FIXEDEMAIL_' . $notifiedevent['code'] . '_THRESHOLD_HIGHER_' . $reg[1];
     $value = GETPOST('NOTIF_' . $notifiedevent['code'] . '_old_' . $reg[1] . '_key') ? GETPOST('NOTIF_' . $notifiedevent['code'] . '_old_' . $reg[1] . '_key', 'alpha') : $conf->global->{$param};
     $s = '<input type="text" size="32" name="NOTIF_' . $notifiedevent['code'] . '_old_' . $reg[1] . '_key" value="' . dol_escape_htmltag($value) . '">';
     // Do not use type="email" here, we must be able to enter a list of email with , separator.
     $arrayemail = explode(',', $value);
     $showwarning = 0;
     foreach ($arrayemail as $key => $valuedet) {
         $valuedet = trim($valuedet);
         if (!empty($valuedet) && !isValidEmail($valuedet, 1)) {
             $showwarning++;
         }
     }
     if (!empty($conf->global->{$param}) && $showwarning) {
         $s .= ' ' . img_warning($langs->trans("ErrorBadEMail"));
     }
     print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients") . '<br>' . $langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
     print '<br>';
 }
 // New entry input fields
 $s = '<input type="text" size="32" name="NOTIF_' . $notifiedevent['code'] . '_new_key" value="">';
 // Do not use type="email" here, we must be able to enter a list of email with , separator.
 print $form->textwithpicto($s, $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients") . '<br>' . $langs->trans("YouCanAlsoUseSupervisorKeyword"), 1, 'help', '', 0, 2);
 print '</td>';
 print '<td>';
 // Notification with threshold
 foreach ($conf->global as $key => $val) {
     if ($val == '' || !preg_match('/^NOTIFICATION_FIXEDEMAIL_' . $notifiedevent['code'] . '_THRESHOLD_HIGHER_(.*)/', $key, $reg)) {
         continue;
     }
     print $langs->trans("AmountHT") . ' >= <input type="text" size="4" name="NOTIF_' . $notifiedevent['code'] . '_old_' . $reg[1] . '_amount" value="' . dol_escape_htmltag($reg[1]) . '">';
     print '<br>';
                        $commande->initAsSpecimen();
                        // Info
                        $htmltooltip = '';
                        $htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>';
                        $commande->type = 0;
                        $nextval = $module->getNextValue($mysoc, $commande);
                        if ("{$nextval}" != $langs->trans("NotAvailable")) {
                            $htmltooltip .= '' . $langs->trans("NextValue") . ': ';
                            if ($nextval) {
                                $htmltooltip .= $nextval . '<br>';
                            } else {
                                $htmltooltip .= $langs->trans($module->error) . '<br>';
                            }
                        }
                        print '<td align="center">';
                        print $form->textwithpicto('', $htmltooltip, 1, 0);
                        print '</td>';
                        print "</tr>\n";
                    }
                }
            }
            closedir($handle);
        }
    }
}
print "</table><br>\n";
/*
 * Document templates generators
 */
print_titre($langs->trans("OrdersModelModule"));
// Load array def with activated templates
Example #10
0
 print '<td class="liste_titre" align="left" colspan="6">';
 print '&nbsp;' . $langs->trans("ECMSections");
 print '</td></tr>';
 $showonrightsize = '';
 // Auto section
 if (count($sectionauto)) {
     $htmltooltip = $langs->trans("ECMAreaDesc2");
     // Root title line (Automatic section)
     print '<tr>';
     print '<td>';
     print '<table class="nobordernopadding"><tr class="nobordernopadding">';
     print '<td align="left" width="24">';
     print img_picto_common('', 'treemenu/base.gif');
     print '</td><td align="left">';
     $txt = $langs->trans("ECMRoot") . ' (' . $langs->trans("ECMSectionsAuto") . ')';
     print $form->textwithpicto($txt, $htmltooltip, 1, 0);
     print '</td>';
     print '</tr></table>';
     print '</td>';
     print '<td align="right">&nbsp;</td>';
     print '<td align="right">&nbsp;</td>';
     print '<td align="right">&nbsp;</td>';
     print '<td align="right">&nbsp;</td>';
     print '<td align="center">';
     print '</td>';
     print '</tr>';
     $sectionauto = dol_sort_array($sectionauto, 'label', 'ASC', true, false);
     print '<tr>';
     print '<td colspan="6" style="padding-left: 20px">';
     print '<div id="filetreeauto" class="ecmfiletree"><ul class="ecmjqft">';
     $nbofentries = 0;
 // VAT
 print '<tr><td>' . $langs->trans("VATRate") . '</td><td>';
 print $form->load_tva("tva_tx", $object->tva_tx, $mysoc, '', $object->id, $object->tva_npr);
 print '</td></tr>';
 // Price base
 print '<tr><td width="15%">';
 print $langs->trans('PriceBase');
 print '</td>';
 print '<td>';
 print $form->select_PriceBaseType($object->price_base_type, "price_base_type");
 print '</td>';
 print '</tr>';
 // Price
 print '<tr><td width="20%">';
 $text = $langs->trans('SellingPrice');
 print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
 print '</td><td>';
 if ($object->price_base_type == 'TTC') {
     print '<input name="price" size="10" value="' . price($object->price_ttc) . '">';
 } else {
     print '<input name="price" size="10" value="' . price($object->price) . '">';
 }
 print '</td></tr>';
 // Price minimum
 print '<tr><td>';
 $text = $langs->trans('MinPrice');
 print $form->textwithpicto($text, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1);
 if ($object->price_base_type == 'TTC') {
     print '<td><input name="price_min" size="10" value="' . price($object->price_min_ttc) . '">';
 } else {
     print '<td><input name="price_min" size="10" value="' . price($object->price_min) . '">';
Example #12
0
            if (empty($conf->global->MAIN_DISABLEVATCHECK))
            {
                $s.=' &nbsp; ';

                if ($conf->use_javascript_ajax)
                {
                    print "\n";
                    print '<script language="JavaScript" type="text/javascript">';
                    print "function CheckVAT(a) {\n";
                    print "newpopup('".DOL_URL_ROOT."/societe/checkvat/checkVatPopup.php?vatNumber='+a,'".dol_escape_js($langs->trans("VATIntraCheckableOnEUSite"))."',500,285);\n";
                    print "}\n";
                    print '</script>';
                    print "\n";
                    $s.='<a href="#" onclick="javascript: CheckVAT( $(\'#tva_intra\').val() );">'.$langs->trans("VATIntraCheck").'</a>';
                    $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
                }
                else
                {
                    $s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$object->id_pays).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
                }
            }
            print $s;
        }
        else
        {
            print '&nbsp;';
        }
        print '</td>';
        print '</tr>';
 /**
  * Return description of a module
  *
  * @param	Translate	$langs		Object language
  * @return	string      			Description
  */
 function info($langs)
 {
     global $conf, $langs;
     $langs->load("companies");
     $langs->load("errors");
     $form = new Form($db);
     $texte = $this->description . ".<br>\n";
     $texte .= '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
     $texte .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     $texte .= '<input type="hidden" name="action" value="setModuleOptions">';
     $texte .= '<input type="hidden" name="param1" value="COMPANY_ADDON_PDF_ODT_PATH">';
     $texte .= '<table class="nobordernopadding" width="100%">';
     // List of directories area
     $texte .= '<tr><td>';
     $texttitle = $langs->trans("ListOfDirectories");
     $listofdir = explode(',', preg_replace('/[\\r\\n]+/', ',', trim($conf->global->COMPANY_ADDON_PDF_ODT_PATH)));
     $listoffiles = array();
     foreach ($listofdir as $key => $tmpdir) {
         $tmpdir = trim($tmpdir);
         $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir);
         if (!$tmpdir) {
             unset($listofdir[$key]);
             continue;
         }
         if (!is_dir($tmpdir)) {
             $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0);
         } else {
             $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\\.odt');
             if (count($tmpfiles)) {
                 $listoffiles = array_merge($listoffiles, $tmpfiles);
             }
         }
     }
     $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT");
     // Add list of substitution keys
     $texthelp .= '<br>' . $langs->trans("FollowingSubstitutionKeysCanBeUsed") . '<br>';
     $texthelp .= $langs->transnoentitiesnoconv("FullListOnOnlineDocumentation");
     // This contains an url, we don't modify it
     $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1);
     $texte .= '<table><tr><td>';
     $texte .= '<textarea class="flat" cols="60" name="value1">';
     $texte .= $conf->global->COMPANY_ADDON_PDF_ODT_PATH;
     $texte .= '</textarea>';
     $texte .= '</td>';
     $texte .= '<td align="center">&nbsp; ';
     $texte .= '<input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button">';
     $texte .= '</td>';
     $texte .= '</tr>';
     $texte .= '</table>';
     // Scan directories
     if (count($listofdir)) {
         $texte .= $langs->trans("NumberOfModelFilesFound") . ': <b>' . count($listoffiles) . '</b>';
     }
     $texte .= '</td>';
     $texte .= '<td valign="top" rowspan="2">';
     $texte .= $langs->trans("ExampleOfDirectoriesForModelGen");
     $texte .= '</td>';
     $texte .= '</tr>';
     /*$texte.= '<tr><td align="center">';
     		$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
     		$texte.= '</td>';
     		$texte.= '</tr>';*/
     $texte .= '</table>';
     $texte .= '</form>';
     return $texte;
 }
Example #14
0
 print '<td colspan="2">';
 $product_fourn = new ProductFournisseur($db);
 if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0) {
     if ($product_fourn->product_fourn_price_id > 0) {
         print $product_fourn->display_price_product_fournisseur();
     } else {
         print $langs->trans("NotDefined");
     }
 }
 print '</td></tr>';
 // Cost price. Can be used for margin module for option "calculate margin on explicit cost price
 // Accountancy sell code
 print '<tr><td>';
 $textdesc = $langs->trans("CostPriceDescription");
 $textdesc .= "<br>" . $langs->trans("CostPriceUsage");
 $text = $form->textwithpicto($langs->trans("CostPrice"), $textdesc, 1, 'help', '');
 print $form->editfieldkey($text, 'cost_price', $object->cost_price, $object, $user->rights->produit->creer || $user->rights->service->creer, 'amount:6');
 print '</td><td colspan="2">';
 print $form->editfieldval($text, 'cost_price', $object->cost_price, $object, $user->rights->produit->creer || $user->rights->service->creer, 'amount:6');
 print '</td></tr>';
 print '</table>';
 print '</div>';
 print '<div style="clear:both"></div>';
 dol_fiche_end();
 // Form to add or update a price
 if (($action == 'add_price' || $action == 'updateprice') && ($user->rights->produit->creer || $user->rights->service->creer)) {
     $langs->load("suppliers");
     if ($rowid) {
         $object->fetch_product_fournisseur_price($rowid, 1);
         //Ignore the math expression when getting the price
         print load_fiche_titre($langs->trans("ChangeSupplierPrice"));
         print price($objp->price_ttc) . ' ' . $langs->trans("TTC");
     } else {
         print price($objp->price) . ' ' . $langs->trans("HT");
     }
     print '</td>';
 }
 // Better buy price
 if ($user->rights->fournisseur->lire) {
     print '<td align="right">';
     if ($objp->minsellprice != '') {
         //print price($objp->minsellprice).' '.$langs->trans("HT");
         if ($product_fourn->find_min_price_product_fournisseur($objp->rowid) > 0) {
             if ($product_fourn->product_fourn_price_id > 0) {
                 $htmltext = $product_fourn->display_price_product_fournisseur();
                 if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) {
                     print $form->textwithpicto(price($product_fourn->fourn_unitprice) . ' ' . $langs->trans("HT"), $htmltext);
                 } else {
                     print price($product_fourn->fourn_unitprice) . ' ' . $langs->trans("HT");
                 }
             }
         }
     }
     print '</td>';
 }
 // Show stock
 if (!empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) {
     if ($objp->fk_product_type != 1) {
         $product_static->id = $objp->rowid;
         $product_static->load_stock();
         print '<td align="right">';
         print $objp->desiredstock;
Example #16
0
            print '<td>';
            print $param;
            print '</td>';
            print '<td>';
            $show = 0;
            $text = '';
            foreach ($arraytest as $key => $val) {
                if ($key != $param) {
                    continue;
                }
                $val2 = ${$val['var']};
                $text = 'Should be in line with value of param <b>' . $val['var'] . '</b> thas is <b>' . ($val2 ? $val2 : "'' (=" . $val['valifempty'] . ")") . '</b>';
                $show = 1;
            }
            if ($show == 0) {
                print $paramval;
            }
            if ($show == 1) {
                print $form->textwithpicto($paramval, $text);
            }
            if ($show == 2) {
                print $form->textwithpicto($paramval, $text, 1, 'warning');
            }
            print '</td>';
            print '</tr>' . "\n";
        }
        print '</table>' . "\n";
    }
}
llxFooter();
$db->close();
Example #17
0
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td colspan="3">' . $langs->trans("UseCaptchaCode") . '</td>';
print '<td align="right">';
if (function_exists("imagecreatefrompng")) {
    if (!empty($conf->use_javascript_ajax)) {
        print ajax_constantonoff('MAIN_SECURITY_ENABLECAPTCHA');
    } else {
        if (empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
            print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_MAIN_SECURITY_ENABLECAPTCHA">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
        } else {
            print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_MAIN_SECURITY_ENABLECAPTCHA">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
        }
    }
} else {
    $desc = $form->textwithpicto('', $langs->transnoentities("EnableGDLibraryDesc"), 1, 'warning');
    print $desc;
}
print '</td></tr>';
// Enable advanced perms
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td colspan="3">' . $langs->trans("UseAdvancedPerms") . '</td>';
print '<td align="right">';
if (!empty($conf->use_javascript_ajax)) {
    print ajax_constantonoff('MAIN_USE_ADVANCED_PERMS');
} else {
    if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
        print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_MAIN_USE_ADVANCED_PERMS">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
    } else {
        print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_MAIN_USE_ADVANCED_PERMS">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
Example #18
0
     print $societe->getNomUrl(1);
     print '<input type="hidden" name="socid" value="' . GETPOST('socid', 'int') . '">';
 } else {
     print $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur = 1', 1);
 }
 print '</td></tr>';
 // Ref supplier
 print '<tr><td class="fieldrequired">' . $langs->trans('RefSupplier') . '</td><td><input name="ref_supplier" value="' . (isset($_POST['ref_supplier']) ? $_POST['ref_supplier'] : '') . '" type="text"></td>';
 print '</tr>';
 print '<tr><td valign="top" class="fieldrequired">' . $langs->trans('Type') . '</td><td colspan="2">';
 print '<table class="nobordernopadding">' . "\n";
 // Standard invoice
 print '<tr height="18"><td width="16px" valign="middle">';
 print '<input type="radio" name="type" value="0"' . ($_POST['type'] == 0 ? ' checked' : '') . '>';
 print '</td><td valign="middle">';
 $desc = $form->textwithpicto($langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1);
 print $desc;
 print '</td></tr>' . "\n";
 /*
  // Deposit
 print '<tr height="18"><td width="16px" valign="middle">';
 print '<input type="radio" name="type" value="3"'.($_POST['type']==3?' checked':'').'>';
 print '</td><td valign="middle">';
 $desc=$form->textwithpicto($langs->trans("InvoiceDeposit"),$langs->transnoentities("InvoiceDepositDesc"),1);
 print $desc;
 print '</td></tr>'."\n";
 
 // Proforma
 if (! empty($conf->global->FACTURE_USE_PROFORMAT))
 {
 print '<tr height="18"><td width="16px" valign="middle">';
Example #19
0
 print '<tr><td>' . $langs->trans("Type") . '</td><td class="valeur">' . $adht->getNomUrl(1) . "</td></tr>\n";
 // Morphy
 print '<tr><td>' . $langs->trans("Nature") . '</td><td class="valeur" >' . $object->getmorphylib() . '</td>';
 print '</tr>';
 // Company
 print '<tr><td>' . $langs->trans("Company") . '</td><td class="valeur">' . $object->societe . '</td></tr>';
 // Civility
 print '<tr><td>' . $langs->trans("UserTitle") . '</td><td class="valeur">' . $object->getCivilityLabel() . '&nbsp;</td>';
 print '</tr>';
 // Password
 if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
     print '<tr><td>' . $langs->trans("Password") . '</td><td>' . preg_replace('/./i', '*', $object->pass);
     if ((!empty($object->pass) || !empty($object->pass_crypted)) && empty($object->user_id)) {
         $langs->load("errors");
         $htmltext = $langs->trans("WarningPasswordSetWithNoAccount");
         print ' ' . $form->textwithpicto('', $htmltext, 1, 'warning');
     }
     print '</td></tr>';
 }
 print '</table>';
 print '</div>';
 print '<div class="fichehalfright"><div class="ficheaddleft">';
 print '<div class="underbanner clearboth"></div>';
 print '<table class="border tableforfield" width="100%">';
 // Birthday
 print '<tr><td>' . $langs->trans("Birthday") . '</td><td class="valeur">' . dol_print_date($object->birth, 'day') . '</td></tr>';
 // Public
 print '<tr><td>' . $langs->trans("Public") . '</td><td class="valeur">' . yn($object->public) . '</td></tr>';
 // Categories
 if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
     print '<tr><td>' . $langs->trans("Categories") . '</td>';
Example #20
0
 print $form->selectarray('type', $type_list, $type);
 // This code submits form when type is changed
 print '<script type="text/javascript">
     jQuery(document).ready(run);
     function run() {
         jQuery("#type").change(on_change);
     }
     function on_change() {
         jQuery("#updaterform").submit();
     }
 </script>';
 print '</td></tr>';
 //Parameters
 print '<tr>';
 $help = $langs->trans("GlobalVariableUpdaterHelp" . $type) . '<br><b>' . $langs->trans("GlobalVariableUpdaterHelpFormat" . $type) . '</b>';
 print '<td class="fieldrequired">' . $form->textwithpicto($langs->trans("Parameters"), $help, 1) . '</td><td>';
 require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
 $doleditor = new DolEditor('parameters', empty($price_updaters->parameters) ? '' : $price_updaters->parameters, '', 300, '', '', false, false, false, 10, 80);
 $doleditor->Create();
 print '</td></tr>';
 print '</tr>';
 //Interval
 print '<tr>';
 print '<td class="fieldrequired">' . $langs->trans("UpdateInterval") . '</td>';
 print '<td class="valeur"><input type="text" name="update_interval" size="10" value="' . (empty($price_updaters->update_interval) ? '' : $price_updaters->update_interval) . '"></td>';
 print '</tr>';
 print '</table>';
 //Form Buttons
 print '<br><div align="center">';
 print '<input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '"> &nbsp;';
 print '<input type="submit" class="button" name="cancel" id="cancel" value="' . $langs->trans("Cancel") . '">';
Example #21
0
        $newinvoice_static->paye = $valarray['paye'];
        $optionsav .= '<option value="' . $key . '"';
        if ($key == GETPOST('fac_avoir')) {
            $optionsav .= ' selected';
        }
        $optionsav .= '>';
        $optionsav .= $newinvoice_static->ref;
        $optionsav .= ' (' . $newinvoice_static->getLibStatut(1, $valarray['paymentornot']) . ')';
        $optionsav .= '</option>';
    }
    print '<tr><td valign="top" class="fieldrequired">' . $langs->trans('Type') . '</td><td colspan="2">';
    print '<div class="tagtable">' . "\n";
    // Standard invoice
    print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
    $tmp = '<input type="radio" id="radio_standard" name="type" value="0"' . (GETPOST('type') == 0 ? ' checked' : '') . '> ';
    $desc = $form->textwithpicto($tmp . $langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3);
    print $desc;
    print '</div></div>';
    if (empty($origin) || ($origin == 'propal' || $origin == 'commande') && !empty($originid)) {
        // Deposit
        print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
        $tmp = '<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
        print '<script type="text/javascript" language="javascript">
		jQuery(document).ready(function() {
			jQuery("#typedeposit, #valuedeposit").click(function() {
				jQuery("#radio_deposit").prop("checked", true);
			});
		});
		</script>';
        $desc = $form->textwithpicto($tmp . $langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
        print '<table class="nobordernopadding"><tr><td>';
    $head[$h][2] = 'interfaces';
    $h++;
}
$categidx = 'functional';
// Not used
if (!empty($categ[$categidx])) {
    $head[$h][0] = DOL_URL_ROOT . "/admin/modules.php?mode=" . $categidx;
    $head[$h][1] = $langs->trans("ModulesSpecial");
    $head[$h][2] = 'functional';
    $h++;
}
$categidx = 'expdev';
if (!empty($categ[$categidx])) {
    $categidx = 'expdev';
    $head[$h][0] = DOL_URL_ROOT . "/admin/modules.php?mode=" . $categidx;
    $head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
    $head[$h][2] = 'expdev';
    $h++;
}
$categidx = 'marketplace';
$head[$h][0] = DOL_URL_ROOT . "/admin/modules.php?mode=" . $categidx;
$head[$h][1] = $langs->trans("ModulesMarketPlaces");
$head[$h][2] = 'marketplace';
$h++;
print "<br>\n";
dol_fiche_head($head, $mode, $langs->trans("Modules"));
$var = true;
if ($mode != 'marketplace') {
    print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
    /*
        print '<tr class="liste_titre">'."\n";
Example #23
0
         print '&nbsp;';
     }
     print '</td>';
     // Description
     print '<td>';
     $text = $langs->trans($obj->description);
     if (preg_match('/\\((.*)\\)/i', $obj->description, $reg)) {
         $val = explode(',', $reg[1]);
         $text = $langs->trans($val[0], isset($val[1]) ? $val[1] : '', isset($val[2]) ? $val[2] : '', isset($val[3]) ? $val[3] : '', isset($val[4]) ? $val[4] : '');
     }
     print $text;
     print '</td>';
     // More informations
     print '<td align="right">';
     $htmltext = '<b>' . $langs->trans("UserAgent") . '</b>: ' . ($obj->user_agent ? $obj->user_agent : $langs->trans("Unknown"));
     print $form->textwithpicto('', $htmltext);
     print '</td>';
     print "</tr>\n";
     $i++;
 }
 if ($num == 0) {
     if ($usefilter) {
         print '<tr><td colspan="6">' . $langs->trans("NoEventFoundWithCriteria") . '</td></tr>';
     } else {
         print '<tr><td colspan="6">' . $langs->trans("NoEventOrNoAuditSetup") . '</td></tr>';
     }
 }
 print "</table>";
 $db->free($result);
 if ($num) {
     print '<div class="tabsAction">';
Example #24
0
 // Tracking number
 print "<tr><td>" . $langs->trans("TrackingNumber") . "</td>";
 print '<td colspan="3">';
 print '<input name="tracking_number" size="20" value="' . GETPOST('tracking_number', 'alpha') . '">';
 print "</td></tr>\n";
 // Other attributes
 $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'socid' => $socid);
 $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $expe, $action);
 // Note that $action and $object may have been modified by hook
 if (empty($reshook) && !empty($extrafields->attribute_label)) {
     print $expe->showOptionals($extrafields, 'edit');
 }
 // Incoterms
 if (!empty($conf->incoterm->enabled)) {
     print '<tr>';
     print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $object->libelle_incoterms, 1) . '</label></td>';
     print '<td colspan="3" class="maxwidthonsmartphone">';
     print $form->select_incoterms(!empty($object->fk_incoterms) ? $object->fk_incoterms : '', !empty($object->location_incoterms) ? $object->location_incoterms : '');
     print '</td></tr>';
 }
 // Document model
 print "<tr><td>" . $langs->trans("Model") . "</td>";
 print '<td colspan="3">';
 include_once DOL_DOCUMENT_ROOT . '/core/modules/expedition/modules_expedition.php';
 $liste = ModelePdfExpedition::liste_modeles($db);
 print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF);
 print "</td></tr>\n";
 print "</table>";
 dol_fiche_end();
 // Shipment lines
 $numAsked = count($object->lines);
 print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "datec", "", "", 'align="left"', $sortfield, $sortorder);
 print_liste_field_titre($langs->trans("DateModification"), $_SERVER["PHP_SELF"], "datem", "", "", 'align="left"', $sortfield, $sortorder);
 print_liste_field_titre($langs->trans("Age"), $_SERVER["PHP_SELF"], "age", "", "", 'align="left"', $sortfield, $sortorder);
 print_liste_field_titre($langs->trans("Raw"), $_SERVER["PHP_SELF"], "raw", "", "", 'align="left"', $sortfield, $sortorder);
 print_liste_field_titre('', '', '');
 print "</tr>\n";
 $var = True;
 foreach ($listofsessions as $key => $sessionentry) {
     $var = !$var;
     print "<tr " . $bc[$var] . ">";
     // Login
     print '<td>' . $sessionentry['login'] . '</td>';
     // ID
     print '<td align="left" class="nowrap">';
     if ("{$key}" == session_id()) {
         print $form->textwithpicto($key, $langs->trans("YourSession"));
     } else {
         print $key;
     }
     print '</td>';
     // Date creation
     print '<td align="left" class="nowrap">' . dol_print_date($sessionentry['creation'], '%Y-%m-%d %H:%M:%S') . '</td>';
     // Date modification
     print '<td align="left" class="nowrap">' . dol_print_date($sessionentry['modification'], '%Y-%m-%d %H:%M:%S') . '</td>';
     // Age
     print '<td>' . $sessionentry['age'] . '</td>';
     // Raw
     print '<td>' . dol_trunc($sessionentry['raw'], 40, 'middle') . '</td>';
     print '<td>&nbsp;</td>';
     print "</tr>\n";
     $i++;
 /**
  *	Get the form to input an email
  *  this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
  *
  *	@param	string	$addfileaction		Name of action when posting file attachments
  *	@param	string	$removefileaction	Name of action when removing file attachments
  *	@return string						Form to show
  */
 function get_form($addfileaction = 'addfile', $removefileaction = 'removefile')
 {
     global $conf, $langs, $user, $hookmanager, $form;
     if (!is_object($form)) {
         $form = new Form($this->db);
     }
     $langs->load("other");
     $langs->load("mails");
     $hookmanager->initHooks(array('formmail'));
     $parameters = array('addfileaction' => $addfileaction, 'removefileaction' => $removefileaction);
     $reshook = $hookmanager->executeHooks('getFormMail', $parameters, $this);
     if (!empty($reshook)) {
         return $hookmanager->resPrint;
     } else {
         $out = '';
         // Define list of attached files
         $listofpaths = array();
         $listofnames = array();
         $listofmimes = array();
         if (!empty($_SESSION["listofpaths"])) {
             $listofpaths = explode(';', $_SESSION["listofpaths"]);
         }
         if (!empty($_SESSION["listofnames"])) {
             $listofnames = explode(';', $_SESSION["listofnames"]);
         }
         if (!empty($_SESSION["listofmimes"])) {
             $listofmimes = explode(';', $_SESSION["listofmimes"]);
         }
         $out .= "\n<!-- Debut form mail -->\n";
         if ($this->withform == 1) {
             $out .= '<form method="POST" name="mailform" enctype="multipart/form-data" action="' . $this->param["returnurl"] . '">' . "\n";
             $out .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
         }
         foreach ($this->param as $key => $value) {
             $out .= '<input type="hidden" id="' . $key . '" name="' . $key . '" value="' . $value . '" />' . "\n";
         }
         $out .= '<table class="border" width="100%">' . "\n";
         // Substitution array
         if (!empty($this->withsubstit)) {
             $out .= '<tr><td colspan="2">';
             $help = "";
             foreach ($this->substit as $key => $val) {
                 $help .= $key . ' -> ' . $langs->trans($val) . '<br>';
             }
             $out .= $form->textwithpicto($langs->trans("EMailTestSubstitutionReplacedByGenericValues"), $help);
             $out .= "</td></tr>\n";
         }
         // From
         if (!empty($this->withfrom)) {
             if (!empty($this->withfromreadonly)) {
                 $out .= '<input type="hidden" id="fromname" name="fromname" value="' . $this->fromname . '" />';
                 $out .= '<input type="hidden" id="frommail" name="frommail" value="' . $this->frommail . '" />';
                 $out .= '<tr><td width="180">' . $langs->trans("MailFrom") . '</td><td>';
                 if ($this->fromtype == 'user' && $this->fromid > 0) {
                     $langs->load("users");
                     $fuser = new User($this->db);
                     $fuser->fetch($this->fromid);
                     $out .= $fuser->getNomUrl(1);
                 } else {
                     $out .= $this->fromname;
                 }
                 if ($this->frommail) {
                     $out .= " &lt;" . $this->frommail . "&gt;";
                 } else {
                     if ($this->fromtype) {
                         $langs->load("errors");
                         $out .= '<font class="warning"> &lt;' . $langs->trans("ErrorNoMailDefinedForThisUser") . '&gt; </font>';
                     }
                 }
                 $out .= "</td></tr>\n";
                 $out .= "</td></tr>\n";
             } else {
                 $out .= "<tr><td>" . $langs->trans("MailFrom") . "</td><td>";
                 $out .= $langs->trans("Name") . ':<input type="text" id="fromname" name="fromname" size="32" value="' . $this->fromname . '" />';
                 $out .= '&nbsp; &nbsp; ';
                 $out .= $langs->trans("EMail") . ':&lt;<input type="text" id="frommail" name="frommail" size="32" value="' . $this->frommail . '" />&gt;';
                 $out .= "</td></tr>\n";
             }
         }
         // Replyto
         if (!empty($this->withreplyto)) {
             if ($this->withreplytoreadonly) {
                 $out .= '<input type="hidden" id="replyname" name="replyname" value="' . $this->replytoname . '" />';
                 $out .= '<input type="hidden" id="replymail" name="replymail" value="' . $this->replytomail . '" />';
                 $out .= "<tr><td>" . $langs->trans("MailReply") . "</td><td>" . $this->replytoname . ($this->replytomail ? " &lt;" . $this->replytomail . "&gt;" : "");
                 $out .= "</td></tr>\n";
             }
         }
         // Errorsto
         if (!empty($this->witherrorsto)) {
             //if (! $this->errorstomail) $this->errorstomail=$this->frommail;
             $errorstomail = !empty($conf->global->MAIN_MAIL_ERRORS_TO) ? $conf->global->MAIN_MAIL_ERRORS_TO : $this->errorstomail;
             if ($this->witherrorstoreadonly) {
                 $out .= '<input type="hidden" id="errorstomail" name="errorstomail" value="' . $errorstomail . '" />';
                 $out .= '<tr><td>' . $langs->trans("MailErrorsTo") . '</td><td>';
                 $out .= $errorstomail;
                 $out .= "</td></tr>\n";
             } else {
                 $out .= '<tr><td>' . $langs->trans("MailErrorsTo") . '</td><td>';
                 $out .= '<input size="30" id="errorstomail" name="errorstomail" value="' . $errorstomail . '" />';
                 $out .= "</td></tr>\n";
             }
         }
         // To
         if (!empty($this->withto) || is_array($this->withto)) {
             $out .= '<tr><td width="180">';
             if ($this->withtofree) {
                 $out .= $form->textwithpicto($langs->trans("MailTo"), $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
             } else {
                 $out .= $langs->trans("MailTo");
             }
             $out .= '</td><td>';
             if ($this->withtoreadonly) {
                 if (!empty($this->toname) && !empty($this->tomail)) {
                     $out .= '<input type="hidden" id="toname" name="toname" value="' . $this->toname . '" />';
                     $out .= '<input type="hidden" id="tomail" name="tomail" value="' . $this->tomail . '" />';
                     if ($this->totype == 'thirdparty') {
                         $soc = new Societe($this->db);
                         $soc->fetch($this->toid);
                         $out .= $soc->getNomUrl(1);
                     } else {
                         if ($this->totype == 'contact') {
                             $contact = new Contact($this->db);
                             $contact->fetch($this->toid);
                             $out .= $contact->getNomUrl(1);
                         } else {
                             $out .= $this->toname;
                         }
                     }
                     $out .= ' &lt;' . $this->tomail . '&gt;';
                     if ($this->withtofree) {
                         $out .= '<br>' . $langs->trans("or") . ' <input size="' . (is_array($this->withto) ? "30" : "60") . '" id="sendto" name="sendto" value="' . (!is_array($this->withto) && !is_numeric($this->withto) ? isset($_REQUEST["sendto"]) ? $_REQUEST["sendto"] : $this->withto : "") . '" />';
                     }
                 } else {
                     $out .= !is_array($this->withto) && !is_numeric($this->withto) ? $this->withto : "";
                 }
             } else {
                 if (!empty($this->withtofree)) {
                     $out .= '<input size="' . (is_array($this->withto) ? "30" : "60") . '" id="sendto" name="sendto" value="' . (!is_array($this->withto) && !is_numeric($this->withto) ? isset($_REQUEST["sendto"]) ? $_REQUEST["sendto"] : $this->withto : "") . '" />';
                 }
                 if (!empty($this->withto) && is_array($this->withto)) {
                     if (!empty($this->withtofree)) {
                         $out .= " " . $langs->trans("or") . " ";
                     }
                     $out .= $form->selectarray("receiver", $this->withto, GETPOST("receiver"), 1);
                 }
                 if (isset($this->withtosocid) && $this->withtosocid > 0) {
                     $liste = array();
                     $soc = new Societe($this->db);
                     $soc->fetch($this->withtosocid);
                     foreach ($soc->thirdparty_and_contact_email_array(1) as $key => $value) {
                         $liste[$key] = $value;
                     }
                     if ($this->withtofree) {
                         $out .= " " . $langs->trans("or") . " ";
                     }
                     $out .= $form->selectarray("receiver", $liste, GETPOST("receiver"), 1);
                 }
             }
             $out .= "</td></tr>\n";
         }
         // CC
         if (!empty($this->withtocc) || is_array($this->withtocc)) {
             $out .= '<tr><td width="180">';
             $out .= $form->textwithpicto($langs->trans("MailCC"), $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
             $out .= '</td><td>';
             if ($this->withtoccreadonly) {
                 $out .= !is_array($this->withtocc) && !is_numeric($this->withtocc) ? $this->withtocc : "";
             } else {
                 $out .= '<input size="' . (is_array($this->withtocc) ? "30" : "60") . '" id="sendtocc" name="sendtocc" value="' . (!is_array($this->withtocc) && !is_numeric($this->withtocc) ? isset($_POST["sendtocc"]) ? $_POST["sendtocc"] : $this->withtocc : (isset($_POST["sendtocc"]) ? $_POST["sendtocc"] : "")) . '" />';
                 if (!empty($this->withtocc) && is_array($this->withtocc)) {
                     $out .= " " . $langs->trans("or") . " ";
                     $out .= $form->selectarray("receivercc", $this->withtocc, GETPOST("receivercc"), 1);
                 }
             }
             $out .= "</td></tr>\n";
         }
         // CCC
         if (!empty($this->withtoccc) || is_array($this->withtoccc)) {
             $out .= '<tr><td width="180">';
             $out .= $form->textwithpicto($langs->trans("MailCCC"), $langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
             $out .= '</td><td>';
             if (!empty($this->withtocccreadonly)) {
                 $out .= !is_array($this->withtoccc) && !is_numeric($this->withtoccc) ? $this->withtoccc : "";
             } else {
                 $out .= '<input size="' . (is_array($this->withtoccc) ? "30" : "60") . '" id="sendtoccc" name="sendtoccc" value="' . (!is_array($this->withtoccc) && !is_numeric($this->withtoccc) ? isset($_POST["sendtoccc"]) ? $_POST["sendtoccc"] : $this->withtoccc : (isset($_POST["sendtoccc"]) ? $_POST["sendtoccc"] : "")) . '" />';
                 if (!empty($this->withtoccc) && is_array($this->withtoccc)) {
                     $out .= " " . $langs->trans("or") . " ";
                     $out .= $form->selectarray("receiverccc", $this->withtoccc, GETPOST("receiverccc"), 1);
                 }
             }
             //if (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print ' '.info_admin("+ ".$conf->global->MAIN_MAIL_AUTOCOPY_TO,1);
             $out .= "</td></tr>\n";
         }
         // Ask delivery receipt
         if (!empty($this->withdeliveryreceipt)) {
             $out .= '<tr><td width="180">' . $langs->trans("DeliveryReceipt") . '</td><td>';
             if (!empty($this->withdeliveryreceiptreadonly)) {
                 $out .= yn($this->withdeliveryreceipt);
             } else {
                 $out .= $form->selectyesno('deliveryreceipt', isset($_POST["deliveryreceipt"]) ? $_POST["deliveryreceipt"] : 0, 1);
             }
             $out .= "</td></tr>\n";
         }
         // Topic
         if (!empty($this->withtopic)) {
             $this->withtopic = make_substitutions($this->withtopic, $this->substit);
             $out .= '<tr>';
             $out .= '<td width="180">' . $langs->trans("MailTopic") . '</td>';
             $out .= '<td>';
             if ($this->withtopicreadonly) {
                 $out .= $this->withtopic;
                 $out .= '<input type="hidden" size="60" id="subject" name="subject" value="' . $this->withtopic . '" />';
             } else {
                 $out .= '<input type="text" size="60" id="subject" name="subject" value="' . (isset($_POST["subject"]) ? $_POST["subject"] : (is_numeric($this->withtopic) ? '' : $this->withtopic)) . '" />';
             }
             $out .= "</td></tr>\n";
         }
         // Attached files
         if (!empty($this->withfile)) {
             $out .= '<tr>';
             $out .= '<td width="180">' . $langs->trans("MailFile") . '</td>';
             $out .= '<td>';
             if (is_numeric($this->withfile)) {
                 // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
                 $out .= '<input type="hidden" class="removedfilehidden" name="removedfile" value="">' . "\n";
                 $out .= '<script type="text/javascript" language="javascript">';
                 $out .= 'jQuery(document).ready(function () {';
                 $out .= '    jQuery(".removedfile").click(function() {';
                 $out .= '        jQuery(".removedfilehidden").val(jQuery(this).val());';
                 $out .= '    });';
                 $out .= '})';
                 $out .= '</script>' . "\n";
                 if (count($listofpaths)) {
                     foreach ($listofpaths as $key => $val) {
                         $out .= '<div id="attachfile_' . $key . '">';
                         $out .= img_mime($listofnames[$key]) . ' ' . $listofnames[$key];
                         if (!$this->withfilereadonly) {
                             $out .= ' <input type="image" style="border: 0px;" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/delete.png" value="' . ($key + 1) . '" class="removedfile" id="removedfile_' . $key . '" name="removedfile_' . $key . '" />';
                             //$out.= ' <a href="'.$_SERVER["PHP_SELF"].'?removedfile='.($key+1).' id="removedfile_'.$key.'">'.img_delete($langs->trans("Delete").'</a>';
                         }
                         $out .= '<br></div>';
                     }
                 } else {
                     $out .= $langs->trans("NoAttachedFiles") . '<br>';
                 }
                 if ($this->withfile == 2) {
                     $out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="' . $langs->trans("Upload") . '" />';
                     $out .= ' ';
                     $out .= '<input type="submit" class="button" id="' . $addfileaction . '" name="' . $addfileaction . '" value="' . $langs->trans("MailingAddFile") . '" />';
                 }
             } else {
                 $out .= $this->withfile;
             }
             $out .= "</td></tr>\n";
         }
         // Message
         if (!empty($this->withbody)) {
             $defaultmessage = "";
             // TODO    A partir du type, proposer liste de messages dans table llx_c_email_template
             if ($this->param["models"] == 'facture_send') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendInvoice");
             } elseif ($this->param["models"] == 'facture_relance') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendInvoiceReminder");
             } elseif ($this->param["models"] == 'propal_send') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendProposal");
             } elseif ($this->param["models"] == 'order_send') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendOrder");
             } elseif ($this->param["models"] == 'order_supplier_send') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendSupplierOrder");
             } elseif ($this->param["models"] == 'invoice_supplier_send') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendSupplierInvoice");
             } elseif ($this->param["models"] == 'shipping_send') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendShipping");
             } elseif ($this->param["models"] == 'fichinter_send') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentSendFichInter");
             } elseif ($this->param["models"] == 'thirdparty') {
                 $defaultmessage = $langs->transnoentities("PredefinedMailContentThirdparty");
             } elseif (!is_numeric($this->withbody)) {
                 $defaultmessage = $this->withbody;
             }
             // Complete substitution array
             if (!empty($conf->paypal->enabled) && !empty($conf->global->PAYPAL_ADD_PAYMENT_URL)) {
                 require_once DOL_DOCUMENT_ROOT . '/paypal/lib/paypal.lib.php';
                 $langs->load('paypal');
                 if ($this->param["models"] == 'order_send') {
                     $url = getPaypalPaymentUrl(0, 'order', $this->substit['__ORDERREF__']);
                     $this->substit['__PERSONALIZED__'] = str_replace('\\n', "\n", $langs->transnoentitiesnoconv("PredefinedMailContentLink", $url));
                 }
                 if ($this->param["models"] == 'facture_send') {
                     $url = getPaypalPaymentUrl(0, 'invoice', $this->substit['__FACREF__']);
                     $this->substit['__PERSONALIZED__'] = str_replace('\\n', "\n", $langs->transnoentitiesnoconv("PredefinedMailContentLink", $url));
                 }
             }
             $defaultmessage = str_replace('\\n', "\n", $defaultmessage);
             // Deal with format differences between message and signature (text / HTML)
             if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__SIGNATURE__'])) {
                 $this->substit['__SIGNATURE__'] = dol_nl2br($this->substit['__SIGNATURE__']);
             } else {
                 if (!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__SIGNATURE__'])) {
                     $defaultmessage = dol_nl2br($defaultmessage);
                 }
             }
             if (isset($_POST["message"])) {
                 $defaultmessage = $_POST["message"];
             } else {
                 $defaultmessage = make_substitutions($defaultmessage, $this->substit);
                 // Clean first \n and br (to avoid empty line when CONTACTCIVNAME is empty)
                 $defaultmessage = preg_replace("/^(<br>)+/", "", $defaultmessage);
                 $defaultmessage = preg_replace("/^\n+/", "", $defaultmessage);
             }
             $out .= '<tr>';
             $out .= '<td width="180" valign="top">' . $langs->trans("MailText") . '</td>';
             $out .= '<td>';
             if ($this->withbodyreadonly) {
                 $out .= nl2br($defaultmessage);
                 $out .= '<input type="hidden" id="message" name="message" value="' . $defaultmessage . '" />';
             } else {
                 if (!isset($this->ckeditortoolbar)) {
                     $this->ckeditortoolbar = 'dolibarr_notes';
                 }
                 // Editor wysiwyg
                 require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
                 if ($this->withfckeditor == -1) {
                     if (!empty($conf->global->FCKEDITOR_ENABLE_MAIL)) {
                         $this->withfckeditor = 1;
                     } else {
                         $this->withfckeditor = 0;
                     }
                 }
                 $doleditor = new DolEditor('message', $defaultmessage, '', 280, $this->ckeditortoolbar, 'In', true, true, $this->withfckeditor, 8, 72);
                 $out .= $doleditor->Create(1);
             }
             $out .= "</td></tr>\n";
         }
         if ($this->withform == 1 || $this->withform == -1) {
             $out .= '<tr><td align="center" colspan="2"><center>';
             $out .= '<input class="button" type="submit" id="sendmail" name="sendmail" value="' . $langs->trans("SendMail") . '"';
             // Add a javascript test to avoid to forget to submit file before sending email
             if ($this->withfile == 2 && $conf->use_javascript_ajax) {
                 $out .= ' onClick="if (document.mailform.addedfile.value != \'\') { alert(\'' . dol_escape_js($langs->trans("FileWasNotUploaded")) . '\'); return false; } else { return true; }"';
             }
             $out .= ' />';
             if ($this->withcancel) {
                 $out .= ' &nbsp; &nbsp; ';
                 $out .= '<input class="button" type="submit" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '" />';
             }
             $out .= '</center></td></tr>' . "\n";
         }
         $out .= '</table>' . "\n";
         if ($this->withform == 1) {
             $out .= '</form>' . "\n";
         }
         $out .= "<!-- Fin form mail -->\n";
         return $out;
     }
 }
Example #27
0
     $moreforfilter .= $htmlother->select_categories(Categorie::TYPE_PRODUCT, $search_categ, 'search_categ', 1);
     $moreforfilter .= '</div>';
 }
 if ($moreforfilter) {
     print '<div class="liste_titre liste_titre_bydiv centpercent">';
     print $moreforfilter;
     $parameters = array();
     $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters);
     // Note that $action and $object may have been modified by hook
     print $hookmanager->resPrint;
     print '</div>';
 }
 if (empty($conf->global->PRODUIT_MULTIPRICES)) {
     $titlesellprice = $langs->trans("SellingPrice");
     if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
         $titlesellprice = $form->textwithpicto($langs->trans("SellingPrice"), $langs->trans("DefaultPriceRealPriceMayDependOnCustomer"));
     }
 }
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
 $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage);
 // This also change content of $arrayfields
 print '<table class="liste ' . ($moreforfilter ? "listwithfilterbefore" : "") . '">';
 print '<tr class="liste_titre">';
 if (!empty($arrayfields['p.ref']['checked'])) {
     print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, "", $sortfield, $sortorder);
 }
 if (!empty($arrayfields['pfp.ref_fourn']['checked'])) {
     print_liste_field_titre($arrayfields['pfp.ref_fourn']['label'], $_SERVER["PHP_SELF"], "pfp.ref_fourn", "", $param, "", $sortfield, $sortorder);
 }
 if (!empty($arrayfields['p.label']['checked'])) {
     print_liste_field_titre($arrayfields['p.label']['label'], $_SERVER["PHP_SELF"], "p.label", "", $param, "", $sortfield, $sortorder);
 /**
  *	Return description of a module
  *
  *	@param	Translate	$langs      Lang object to use for output
  *	@return string       			Description
  */
 function info($langs)
 {
     global $conf, $langs;
     $langs->load("companies");
     $langs->load("errors");
     $form = new Form($this->db);
     $texte = $this->description . ".<br>\n";
     $texte .= '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
     $texte .= '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
     $texte .= '<input type="hidden" name="action" value="setModuleOptions">';
     $texte .= '<input type="hidden" name="param1" value="SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH">';
     if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0) {
         $texte .= '<input type="hidden" name="param2" value="SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT">';
         $texte .= '<input type="hidden" name="param3" value="SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL">';
         $texte .= '<input type="hidden" name="param4" value="SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED">';
     }
     $texte .= '<table class="nobordernopadding" width="100%">';
     // List of directories area
     $texte .= '<tr><td>';
     $texttitle = $langs->trans("ListOfDirectories");
     $listofdir = explode(',', preg_replace('/[\\r\\n]+/', ',', trim($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH)));
     $listoffiles = array();
     foreach ($listofdir as $key => $tmpdir) {
         $tmpdir = trim($tmpdir);
         $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir);
         if (!$tmpdir) {
             unset($listofdir[$key]);
             continue;
         }
         if (!is_dir($tmpdir)) {
             $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0);
         } else {
             $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\\.(ods|odt)');
             if (count($tmpfiles)) {
                 $listoffiles = array_merge($listoffiles, $tmpfiles);
             }
         }
     }
     $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT");
     // Add list of substitution keys
     $texthelp .= '<br>' . $langs->trans("FollowingSubstitutionKeysCanBeUsed") . '<br>';
     $texthelp .= $langs->transnoentitiesnoconv("FullListOnOnlineDocumentation");
     // This contains an url, we don't modify it
     $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1);
     $texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
     $texte .= '<textarea class="flat" cols="60" name="value1">';
     $texte .= $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH;
     $texte .= '</textarea>';
     $texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
     $texte .= '<input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button">';
     $texte .= '<br></div></div>';
     // Scan directories
     if (count($listofdir)) {
         $texte .= $langs->trans("NumberOfModelFilesFound") . ': <b>' . count($listoffiles) . '</b>';
         if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0) {
             // Model for creation
             $liste = ModelePDFSupplierProposal::liste_modeles($this->db);
             $texte .= '<table width="50%;">';
             $texte .= '<tr>';
             $texte .= '<td width="60%;">' . $langs->trans("DefaultModelSupplierProposalCreate") . '</td>';
             $texte .= '<td colspan="">';
             $texte .= $form->selectarray('value2', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT);
             $texte .= "</td></tr>";
             $texte .= '<tr>';
             $texte .= '<td width="60%;">' . $langs->trans("DefaultModelSupplierProposalToBill") . '</td>';
             $texte .= '<td colspan="">';
             $texte .= $form->selectarray('value3', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL);
             $texte .= "</td></tr>";
             $texte .= '<tr>';
             $texte .= '<td width="60%;">' . $langs->trans("DefaultModelSupplierProposalClosed") . '</td>';
             $texte .= '<td colspan="">';
             $texte .= $form->selectarray('value4', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED);
             $texte .= "</td></tr>";
             $texte .= '</table>';
         }
     }
     $texte .= '</td>';
     $texte .= '<td valign="top" rowspan="2" class="hideonsmartphone">';
     $texte .= $langs->trans("ExampleOfDirectoriesForModelGen");
     $texte .= '</td>';
     $texte .= '</tr>';
     $texte .= '</table>';
     $texte .= '</form>';
     return $texte;
 }
Example #29
0
                if (defined($option['constant'])) {
                    $value = constant($option['constant']);
                } else {
                    $value = isset($option['default']) ? $option['default'] : '';
                }
            }
            print $option['name'] . ': <input type="text" class="flat" name="' . $option['constant'] . '" value="' . $value . '"' . (isset($option['attr']) ? ' ' . $option['attr'] : '') . '>';
            if (!empty($option['example'])) {
                print '<br>' . $langs->trans("Example") . ': ' . $option['example'];
            }
        }
    }
    print '</td>';
    print '<td align="left">';
    if ($module->getInfo()) {
        print $form->textwithpicto('', $module->getInfo());
    }
    print '</td>';
    print "</tr>\n";
}
print "</table>\n";
print "</form>\n";
print '<br>' . "\n\n";
print_titre($langs->trans("SyslogLevel"));
// Level
print '<form action="syslog.php" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="setlevel">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameter") . '</td><td>' . $langs->trans("Value") . '</td>';
Example #30
0
     print img_object('', $entityicon) . ' ' . $langs->trans($entitylang);
     print '</td>';
     $text = $langs->trans($label);
     $tablename = getablenamefromfield($code, $sqlmaxforexport);
     $htmltext = '<b>' . $langs->trans("Name") . ":</b> " . $text . '<br>';
     $htmltext .= '<b>' . $langs->trans("Table") . " -> " . $langs->trans("Field") . ":</b> " . $tablename . " -> " . preg_replace('/^.*\\./', '', $code) . "<br>";
     if (!empty($objexport->array_export_examplevalues[0][$code])) {
         $htmltext .= $langs->trans("SourceExample") . ': <b>' . $objexport->array_export_examplevalues[0][$code] . '</b><br>';
     }
     if (isset($array_selected[$code]) && $array_selected[$code]) {
         // Selected fields
         print '<td>&nbsp;</td>';
         print '<td align="center"><a href="' . $_SERVER["PHP_SELF"] . '?step=2&datatoexport=' . $datatoexport . '&action=unselectfield&field=' . $code . '">' . img_left('default', 0, 'style="max-width: 20px"') . '</a></td>';
         print '<td>';
         //print $text.'-'.$htmltext."<br>";
         print $form->textwithpicto($text, $htmltext);
         //print ' ('.$code.')';
         print '</td>';
     } else {
         // Fields not selected
         print '<td>';
         //print $text.'-'.$htmltext."<br>";
         print $form->textwithpicto($text, $htmltext);
         //print ' ('.$code.')';
         print '</td>';
         print '<td align="center"><a href="' . $_SERVER["PHP_SELF"] . '?step=2&datatoexport=' . $datatoexport . '&action=selectfield&field=' . $code . '">' . img_right('default', 0, 'style="max-width: 20px"') . '</a></td>';
         print '<td>&nbsp;</td>';
     }
     print '</tr>';
 }
 print '</table>';