// Code
 print '<tr><td valign="top" class="fieldrequired">' . $langs->trans("Code") . '</td>';
 print '<td colspan="3"><input size="8" type="text" class="flat" name="code" value="' . (GETPOST('code') ? GETPOST('code') : $cash->code) . '"></td></tr>';
 // Name
 print '<tr><td valign="top" class="fieldrequired">' . $langs->trans("Name") . '</td>';
 print '<td colspan="3"><input size="30" type="text" class="flat" name="name" value="' . GETPOST('name', 'string') . '"></td></tr>';
 //Tactil
 print '<tr>';
 print '<td><span class="fieldrequired">' . $langs->trans('Type') . '</span></td><td>';
 print $cash->selecttypeterminal("tactil", isset($_POST["tactil"]) ? $_POST["tactil"] : 0, 1);
 print '</td>';
 print '</tr>';
 //Barcode
 print '<tr>';
 print '<td><span class="fieldrequired">' . $langs->trans('Barcode') . '</span></td><td>';
 print $form->selectyesno("barcode", isset($_POST["barcode"]) ? $_POST["barcode"] : 0, 1);
 print '</td>';
 print '</tr>';
 //Printer Name
 if (!empty($conf->global->POS_PRINT_MODE)) {
     print '<tr><td valign="top">' . $langs->trans("PrinterName") . '</td>';
     print '<td colspan="3"><input size="30" type="text" class="flat" name="printer_name" value="' . GETPOST('printer_name', 'string') . '"></td></tr>';
 }
 // Cash
 print '<tr><td valign="top" class="fieldrequired">' . $langs->trans("PaymentCash") . '</td>';
 print '<td colspan="3">';
 print $form->select_comptes(isset($_POST["cash"]) ? $_POST["cash"] : 1, 'cash', 0, $filtrecash);
 print '</td></tr>';
 // Mode payment Cash
 print '<tr><td valign="top" class="fieldrequired">' . $langs->trans("ModePaymentCash") . '</td>';
 print '<td colspan="3">';
示例#2
0
文件: ihm.php 项目: Samara94/dolibarr
 print '<br>';
 print '<table summary="edit" class="noborder" width="100%">';
 print '<tr class="liste_titre"><td>' . $langs->trans("Parameters") . '</td><td>' . $langs->trans("Value") . '</td>';
 print '<td width="20">&nbsp;</td>';
 print '</tr>';
 // Default language
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("DefaultLanguage") . '</td><td>';
 print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'main_lang_default', 1, 0, 0, 0, 0, 'minwidth300');
 print '</td>';
 print '<td width="20">&nbsp;</td>';
 print '</tr>';
 // Multilangual GUI
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td width="35%">' . $langs->trans("EnableMultilangInterface") . '</td><td>';
 print $form->selectyesno('main_multilangs', $conf->global->MAIN_MULTILANGS, 1);
 print '</td>';
 print '<td width="20">&nbsp;</td>';
 print '</tr>';
 print '</table><br>' . "\n";
 // Themes and themes options
 show_theme(null, 1);
 print '<br>';
 // Liste des zone de recherche permanantes supportees
 if (!empty($searchform)) {
     print '<table summary="search" class="noborder" width="100%">';
     print '<tr class="liste_titre"><td width="35%">' . $langs->trans("PermanentLeftSearchForm") . '</td><td colspan="2">' . $langs->trans("Activated") . '</td></tr>';
     $var = True;
     foreach ($searchform as $key => $value) {
         $var = !$var;
         print '<tr ' . $bc[$var] . '><td width="35%">' . $searchformtitle[$key] . '</td><td colspan="2">';
示例#3
0
print load_fiche_titre($langs->trans("MemberMainOptions"), '', '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Description") . '</td>';
print '<td>' . $langs->trans("Value") . '</td>';
print '<td align="center">' . $langs->trans("Action") . '</td>';
print "</tr>\n";
$var = true;
// Login/Pass required for members
$var = !$var;
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_LOGIN_NOT_REQUIRED">';
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("AdherentLoginRequired") . '</td><td>';
print $form->selectyesno('constvalue', !empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED) ? 0 : 1, 1);
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="' . $langs->trans("Update") . '" name="Button">';
print "</td></tr>\n";
print '</form>';
// Mail required for members
$var = !$var;
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="constname" value="ADHERENT_MAIL_REQUIRED">';
print '<tr ' . $bc[$var] . '><td>' . $langs->trans("AdherentMailRequired") . '</td><td>';
print $form->selectyesno('constvalue', !empty($conf->global->ADHERENT_MAIL_REQUIRED) ? $conf->global->ADHERENT_MAIL_REQUIRED : 0, 1);
print '</td><td align="center" width="80">';
print '<input type="submit" class="button" value="' . $langs->trans("Update") . '" name="Button">';
print "</td></tr>\n";
 /**
  *	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;
     }
 }
示例#5
0
    print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
	print '<td width="20">&nbsp;</td>';
	print '</tr>';

    // Default language
    $var=!$var;
    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
    print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT,'main_lang_default',1);
    print '</td>';
	print '<td width="20">&nbsp;</td>';
	print '</tr>';

	// Multilangual GUI
    $var=!$var;
    print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableMultilangInterface").'</td><td>';
    print $html->selectyesno('main_multilangs',$conf->global->MAIN_MULTILANGS,1);
    print '</td>';
	print '<td width="20">&nbsp;</td>';
	print '</tr>';

	print '</table><br>'."\n";


    // Themes
    show_theme('',1);
    print '<br>';


    // Liste des zone de recherche permanantes supportees
    print '<table summary="search" class="noborder" width="100%">';
    print '<tr class="liste_titre"><td width="35%">'.$langs->trans("PermanentLeftSearchForm").'</td><td colspan="2">'.$langs->trans("Activated").'</td></tr>';
 *  General Optiones
*/
$html = new Form($db);
print_titre($langs->trans("ShowOptions"));
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameter") . " " . $langs->trans("max2") . '</td>';
print '<td align="center" width="60">' . $langs->trans("Value") . '</td>';
print "</tr>\n";
$var = true;
// Show Company Name
$var = !$var;
print "<tr " . $bc[$var] . ">";
print "<td>" . $langs->trans("ShowCompanyName") . "</td>";
print '<td>';
print $html->selectyesno("labComp", $labcomp, 1);
print '</td>';
print "</tr>";
// Show prod label
$var = !$var;
print "<tr " . $bc[$var] . ">";
print "<td>" . $langs->trans("ShowProdLabel") . "</td>";
print '<td>';
print $html->selectyesno("labProdLabel", $labprodlabel, 1);
print '</td>';
print "</tr>";
$var = !$var;
print '<tr ' . $bc[$var] . '><td colspan=2>';
print $langs->trans("FreeText") . '<br>';
print '<textarea name="labFreeText" class="flat" cols="120">' . $conf->global->LAB_FREE_TEXT . '</textarea>';
print '</td></tr>';
示例#7
0
/*                                                                            */
/* Creation mode                                                              */
/*                                                                            */
/* ************************************************************************** */
if ($action == 'create') {
    $object = new AdherentType($db);
    print_fiche_titre($langs->trans("NewMemberType"));
    print '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    dol_fiche_head('');
    print '<table class="border" width="100%">';
    print '<tbody>';
    print '<input type="hidden" name="action" value="add">';
    print '<tr><td class="fieldrequired">' . $langs->trans("Label") . '</td><td><input type="text" name="libelle" size="40"></td></tr>';
    print '<tr><td>' . $langs->trans("SubscriptionRequired") . '</td><td>';
    print $form->selectyesno("cotisation", 1, 1);
    print '</td></tr>';
    print '<tr><td>' . $langs->trans("VoteAllowed") . '</td><td>';
    print $form->selectyesno("vote", 0, 1);
    print '</td></tr>';
    print '<tr><td valign="top">' . $langs->trans("Description") . '</td><td>';
    print '<textarea name="comment" wrap="soft" cols="60" rows="3"></textarea></td></tr>';
    print '<tr><td valign="top">' . $langs->trans("WelcomeEMail") . '</td><td>';
    require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
    $doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, 90);
    $doleditor->Create();
    print '</td></tr>';
    // Other attributes
    $parameters = array();
    $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $act, $action);
    // Note that $action and $object may have been modified by hook
示例#8
0
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setvalue">';


print '<table class="nobordernopadding" width="100%">';

$var=true;
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("AccountParameter").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print "</tr>\n";

$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">';
print $langs->trans("PAYPAL_API_SANDBOX").'</td><td>';
print $form->selectyesno("PAYPAL_API_SANDBOX",$conf->global->PAYPAL_API_SANDBOX,1);
print '</td></tr>';

$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">';
print $langs->trans("PAYPAL_API_USER").'</td><td>';
print '<input size="32" type="text" name="PAYPAL_API_USER" value="'.$conf->global->PAYPAL_API_USER.'">';
print ' &nbsp; '.$langs->trans("Example").': paypal_api1.mywebsite.com';
print '</td></tr>';

$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">';
print $langs->trans("PAYPAL_API_PASSWORD").'</td><td>';
print '<input size="32" type="text" name="PAYPAL_API_PASSWORD" value="'.$conf->global->PAYPAL_API_PASSWORD.'">';
print '</td></tr>';
示例#9
0
print '</tr>'."\n";

/*
 * Formulaire parametres divers
 */

$var=!$var;

print "<tr ".$bc[$var].">";
print '<td width="60%">'.$langs->trans("UserWarehouseAutoCreate").'</td>';

print '<td width="160" align="right">';
print "<form method=\"post\" action=\"stock.php\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_USERSTOCK_AUTOCREATE\">";
print $html->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1);
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print '</form>';
print "</td>\n";
print "</tr>\n";


// Title rule for stock decrease
print '<tr class="liste_titre">';
print "  <td>".$langs->trans("RuleForStockManagementDecrease")."</td>\n";
print "  <td align=\"right\" width=\"160\">".$langs->trans("Value")."</td>\n";
print '</tr>'."\n";
$var=true;

if ($conf->facture->enabled)
{
llxHeader('', $langs->trans($page_name));
// Subheader
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans($page_name), $linkback);
// Configuration header
$head = quickcustomerpriceAdminPrepareHead();
dol_fiche_head($head, 'settings', $langs->trans("Module104874Name"), 0, "quickcustomerprice@quickcustomerprice");
// Setup page goes here
$form = new Form($db);
$var = false;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameters") . '</td>' . "\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">' . $langs->trans("Value") . '</td>' . "\n";
// Example with a yes / no select
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->trans("ParamLabel") . '</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="300">';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_CONSTNAME">';
print $form->selectyesno("CONSTNAME", $conf->global->CONSTNAME, 1);
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</form>';
print '</td></tr>';
print '</table>';
llxFooter();
$db->close();
function showParameters()
{
    global $db, $conf, $langs, $bc;
    $html = new Form($db);
    $var = false;
    print '<table class="noborder" width="100%">';
    print '<tr class="liste_titre">';
    print '<td>' . $langs->trans("Parameters") . '</td>' . "\n";
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="100">' . $langs->trans("Value") . '</td>' . "\n";
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("ActivateTitleDatePerDay") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_SEE_DELIVERYDATE_PER_DAY');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("ActivateTitleDatePerWeek") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_SEE_DELIVERYDATE_PER_WEEK');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("SetDeliveryDateByOtherTask") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_SET_DELIVERYDATE_BY_OTHER_TASK');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("SetSCRUM_ALLOW_ALL_TASK_IN_GRID") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_ALLOW_ALL_TASK_IN_GRID');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("SetSCRUM_ADD_TASKS_TO_GRID") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_ADD_TASKS_TO_GRID');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("DefaultVelocity") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_DEFAULT_VELOCITY">';
    print '<input type="text" name="SCRUM_DEFAULT_VELOCITY" value="' . $conf->global->SCRUM_DEFAULT_VELOCITY . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("NumberOfDayForVelocity") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_VELOCITY_NUMBER_OF_DAY">';
    print '<input type="text" name="SCRUM_VELOCITY_NUMBER_OF_DAY" value="' . $conf->global->SCRUM_VELOCITY_NUMBER_OF_DAY . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("NumberOfWorkingHourInDay") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_TIMESHEET_WORKING_HOUR_PER_DAY">';
    print '<input type="text" name="TIMESHEET_WORKING_HOUR_PER_DAY" value="' . $conf->global->TIMESHEET_WORKING_HOUR_PER_DAY . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("UseProjectPriority") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_USE_PROJECT_PRIORITY">';
    print $html->selectyesno("SCRUM_USE_PROJECT_PRIORITY", $conf->global->SCRUM_USE_PROJECT_PRIORITY, 1);
    print '&nbsp;<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("GroupTaskByProduct") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_GROUP_TASK_BY_PRODUCT');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("GroupTaskByRAL") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_GROUP_TASK_BY_RAL">';
    print $html->selectyesno("SCRUM_GROUP_TASK_BY_RAL", $conf->global->SCRUM_GROUP_TASK_BY_RAL, 1);
    print '&nbsp;<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("GroupTaskByCustomer") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_GROUP_TASK_BY_CUSTOMER');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("ProductTolerance") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_GROUP_TASK_BY_PRODUCT_TOLERANCE">';
    print '<input type="text" name="SCRUM_GROUP_TASK_BY_PRODUCT_TOLERANCE" value="' . $conf->global->SCRUM_GROUP_TASK_BY_PRODUCT_TOLERANCE . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("TimeMoreForPrevision") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_TIME_MORE_PREVISION">';
    print '<input type="text" name="SCRUM_TIME_MORE_PREVISION" value="' . $conf->global->SCRUM_TIME_MORE_PREVISION . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("TimeMoreForPrevisionPropal") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_TIME_MORE_PREVISION_PROPAL">';
    print '<input type="text" name="SCRUM_TIME_MORE_PREVISION_PROPAL" value="' . $conf->global->SCRUM_TIME_MORE_PREVISION_PROPAL . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("WhenBeginOrdo") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_TIME_ORDO_START">';
    print '<input type="text" name="SCRUM_TIME_ORDO_START" value="' . $conf->global->SCRUM_TIME_ORDO_START . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("WhenEndOrdo") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_TIME_ORDO_END">';
    print '<input type="text" name="SCRUM_TIME_ORDO_END" value="' . $conf->global->SCRUM_TIME_ORDO_END . '" size="3" />&nbsp;';
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("heightOfTaskIsDividedByRessource") . '</td>&nbsp;';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_HEIGHT_DIVIDED_BY_RESSOURCE');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("hideProjectsOnTheRight") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_HIDE_PROJECT_LIST_ON_THE_RIGHT');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("showLinkedContactToTask") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_SHOW_LINKED_CONTACT');
    print '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("showTaskWithoutDuration") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print ajax_constantonoff('SCRUM_SHOW_TASK_WITHOUT_DURATION');
    print '</td></tr>';
    $TSnapMode = array('' => $langs->trans('None'), 'SAME_PROJECT_AFTER' => $langs->trans('SnapTaskFromSameProjectAfter'));
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("SnapMode") . '</td>';
    print '<td align="center" width="20">&nbsp;</td>';
    print '<td align="right" width="300">';
    print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="set_SCRUM_SNAP_MODE">';
    print $html->selectarray('SCRUM_SNAP_MODE', $TSnapMode, $conf->global->SCRUM_SNAP_MODE);
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
    print '</form>';
    print '</table>';
}
示例#12
0
function form_constantes($tableau)
{
    global $db, $bc, $langs, $conf, $_Avery_Labels;
    $form = new Form($db);
    print '<table class="noborder" width="100%">';
    print '<tr class="liste_titre">';
    print '<td>' . $langs->trans("Description") . '</td>';
    print '<td>' . $langs->trans("Value") . '*</td>';
    print '<td>&nbsp;</td>';
    print '<td align="center" width="80">' . $langs->trans("Action") . '</td>';
    print "</tr>\n";
    $var = true;
    $listofparam = array();
    foreach ($tableau as $const) {
        $sql = "SELECT ";
        $sql .= "rowid";
        $sql .= ", " . $db->decrypt('name') . " as name";
        $sql .= ", " . $db->decrypt('value') . " as value";
        $sql .= ", type";
        $sql .= ", note";
        $sql .= " FROM " . MAIN_DB_PREFIX . "const";
        $sql .= " WHERE " . $db->decrypt('name') . " = '" . $const . "'";
        $sql .= " AND entity in (0, " . $conf->entity . ")";
        $sql .= " ORDER BY name ASC, entity DESC";
        $result = $db->query($sql);
        dol_syslog("List params sql=" . $sql);
        if ($result) {
            $obj = $db->fetch_object($result);
            // Take first result of select
            $var = !$var;
            print "\n" . '<form action="adherent.php" method="POST">';
            print "<tr " . $bc[$var] . ">";
            // Affiche nom constante
            print '<td>';
            print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
            print '<input type="hidden" name="action" value="update">';
            print '<input type="hidden" name="rowid" value="' . $rowid . '">';
            print '<input type="hidden" name="constname" value="' . $const . '">';
            print '<input type="hidden" name="constnote" value="' . nl2br($obj->note) . '">';
            print $langs->trans("Desc" . $const) != "Desc" . $const ? $langs->trans("Desc" . $const) : ($obj->note ? $obj->note : $const);
            if ($const == 'ADHERENT_MAILMAN_URL') {
                print '. ' . $langs->trans("Example") . ': <a href="#" id="exampleclick1">' . img_down() . '</a><br>';
                //print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&subscribees=%EMAIL%&send_welcome_msg_to_this_batch=1';
                print '<div id="example1" class="hidden">';
                print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/add?subscribees_upload=%EMAIL%&adminpw=%MAILMAN_ADMINPW%&subscribe_or_invite=0&send_welcome_msg_to_this_batch=0&notification_to_list_owner=0';
                print '</div>';
            }
            if ($const == 'ADHERENT_MAILMAN_UNSUB_URL') {
                print '. ' . $langs->trans("Example") . ': <a href="#" id="exampleclick2">' . img_down() . '</a><br>';
                print '<div id="example2" class="hidden">';
                print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/remove?unsubscribees_upload=%EMAIL%&adminpw=%MAILMAN_ADMINPW%&send_unsub_ack_to_this_batch=0&send_unsub_notifications_to_list_owner=0';
                print '</div>';
                //print 'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%';
            }
            print "</td>\n";
            if ($const == 'ADHERENT_CARD_TYPE' || $const == 'ADHERENT_ETIQUETTE_TYPE') {
                print '<td>';
                // List of possible labels (defined into $_Avery_Labels variable set into format_cards.lib.php)
                require_once DOL_DOCUMENT_ROOT . '/lib/format_cards.lib.php';
                $arrayoflabels = array();
                foreach (array_keys($_Avery_Labels) as $codecards) {
                    $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name'];
                }
                print $form->selectarray('constvalue', $arrayoflabels, $obj->value ? $obj->value : 'CARD', 1, 0, 0);
                print '</td><td>';
                print '<input type="hidden" name="consttype" value="yesno">';
                print '</td>';
            } else {
                print '<td>';
                //print 'aa'.$const;
                if (in_array($const, array('ADHERENT_CARD_TEXT', 'ADHERENT_CARD_TEXT_RIGHT'))) {
                    print '<textarea class="flat" name="constvalue" cols="35" rows="5" wrap="soft">' . "\n";
                    print $obj->value;
                    print "</textarea>\n";
                    print '</td><td>';
                    print '<input type="hidden" name="consttype" value="texte">';
                } else {
                    if (in_array($const, array('ADHERENT_AUTOREGISTER_MAIL', 'ADHERENT_MAIL_VALID', 'ADHERENT_MAIL_COTIS', 'ADHERENT_MAIL_RESIL'))) {
                        require_once DOL_DOCUMENT_ROOT . "/lib/doleditor.class.php";
                        $doleditor = new DolEditor('constvalue_' . $const, $obj->value, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, 5, 60);
                        $doleditor->Create();
                        print '</td><td>';
                        print '<input type="hidden" name="consttype" value="texte">';
                    } else {
                        if ($obj->type == 'yesno') {
                            print $form->selectyesno('constvalue', $obj->value, 1);
                            print '</td><td>';
                            print '<input type="hidden" name="consttype" value="yesno">';
                        } else {
                            print '<input type="text" class="flat" size="48" name="constvalue" value="' . $obj->value . '">';
                            print '</td><td>';
                            print '<input type="hidden" name="consttype" value="chaine">';
                        }
                    }
                }
                print '</td>';
            }
            print '<td align="center">';
            print '<input type="submit" class="button" value="' . $langs->trans("Update") . '" name="Button"> &nbsp;';
            // print '<a href="adherent.php?name='.$const.'&action=unset">'.img_delete().'</a>';
            print "</td>";
            print "</tr>\n";
            print "</form>\n";
            $i++;
        }
    }
    print '</table>';
}
示例#13
0
                     initfields();
                 });
            })';
     print '</script>' . "\n";
 }
 print '<form method="post" action="' . $_SERVER["PHP_SELF"] . '">';
 print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
 print '<input type="hidden" name="action" value="update">';
 clearstatcache();
 $var = true;
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre"><td>' . $langs->trans("Parameter") . '</td><td>' . $langs->trans("Value") . '</td></tr>';
 // Disable
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td>' . $langs->trans("MAIN_DISABLE_ALL_MAILS") . '</td><td>';
 print $form->selectyesno('MAIN_DISABLE_ALL_MAILS', $conf->global->MAIN_DISABLE_ALL_MAILS, 1);
 print '</td></tr>';
 // Separator
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td colspan="2">&nbsp;</td></tr>';
 // Method
 $var = !$var;
 print '<tr ' . $bc[$var] . '><td>' . $langs->trans("MAIN_MAIL_SENDMODE") . '</td><td>';
 // SuperAdministrator access only
 if (empty($conf->global->MAIN_MODULE_MULTICOMPANY) || $user->admin && !$user->entity) {
     print $form->selectarray('MAIN_MAIL_SENDMODE', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE);
 } else {
     $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE];
     if (empty($text)) {
         $text = $langs->trans("Undefined");
     }
示例#14
0
$form = new Form($db);
$var = false;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameters") . '</td>' . "\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">' . $langs->trans("Value") . '</td>' . "\n";
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->transnoentitiesnoconv("multicurrency_useRateOnInvoiceDate") . '</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_RATE_ON_INVOICE_DATE">';
print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE", $conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE, 1);
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</form>';
print '</td></tr>';
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->transnoentitiesnoconv("multicurrency_useOriginTx") . '</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="400">';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_MULTICURRENCY_USE_ORIGIN_TX">';
print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX", $conf->global->MULTICURRENCY_USE_ORIGIN_TX, 1);
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</form>';
print '</td></tr>';
llxHeader('', $langs->trans($page_name));
// Subheader
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
print_fiche_titre($langs->trans($page_name), $linkback);
// Configuration header
$head = recurrenceAdminPrepareHead();
dol_fiche_head($head, 'settings', $langs->trans("ModuleName"), 0, "recurrence@recurrence");
// Setup page goes here
$form = new Form($db);
$var = false;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameters") . '</td>' . "\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">' . $langs->trans("Value") . '</td>' . "\n";
// Example with a yes / no select
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->trans("RECURRENCE_DELETE_FUTUR_SOCIAL_TAXES") . '</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="300">';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_RECURRENCE_DELETE_FUTUR_SOCIAL_TAXES">';
print $form->selectyesno("RECURRENCE_DELETE_FUTUR_SOCIAL_TAXES", $conf->global->RECURRENCE_DELETE_FUTUR_SOCIAL_TAXES, 1);
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</form>';
print '</td></tr>';
print '</table>';
llxFooter();
$db->close();
示例#16
0
                $value = !empty($conf->global->{$delay}['code']) ? $conf->global->{$delay}['code'] : 0;
                print '<tr ' . $bc[$var] . '>';
                print '<td width="20px">' . img_object('', $delay['img']) . '</td>';
                print '<td>' . $langs->trans('Delays_' . $delay['code']) . '</td><td>';
                print '<input size="5" name="' . $delay['code'] . '" value="' . $value . '"> ' . $langs->trans("days") . '</td></tr>';
            }
        }
    }
    print '</table>';
    print '<br>';
    // Show if meteo is enabled
    print '<table class="noborder" width="100%">';
    print '<tr class="liste_titre"><td>' . $langs->trans("Parameter") . '</td><td width="120px">' . $langs->trans("Value") . '</td></tr>';
    $var = !$var;
    print '<tr ' . $bc[$var] . '>';
    print '<td>' . $langs->trans("MAIN_DISABLE_METEO") . '</td><td>' . $form->selectyesno('MAIN_DISABLE_METEO', isset($conf->global->MAIN_DISABLE_METEO) ? 1 : 0, 1) . '</td></tr>';
    print '</table>';
    print '<br>';
    print '<br><div class="center"><input type="submit" class="button" value="' . $langs->trans("Save") . '"></div>';
    print '<br>';
    print '</form>';
} else {
    /*
     * Affichage des parametres
     */
    print '<table class="noborder" width="100%">';
    print '<tr class="liste_titre"><td colspan="2">' . $langs->trans("DelaysOfToleranceBeforeWarning") . '</td><td width="120px">' . $langs->trans("Value") . '</td></tr>';
    $var = true;
    foreach ($modules as $module => $delays) {
        if (!empty($conf->{$module}->enabled)) {
            foreach ($delays as $delay) {
示例#17
0
文件: fiche.php 项目: netors/dolibarr
                }
            }
            print $text;
            print "</td></tr>\n";
            // Administrator
            print "<tr>" . '<td valign="top">' . $langs->trans("Administrator") . '</td>';
            if ($fuser->societe_id > 0) {
                print '<td>';
                print '<input type="hidden" name="admin" value="' . $fuser->admin . '">' . yn($fuser->admin);
                print ' (' . $langs->trans("ExternalUser") . ')';
                print '</td></tr>';
            } else {
                print '<td>';
                $nbSuperAdmin = $user->getNbOfUsers('superadmin');
                if ($user->admin && $user->id != $fuser->id && ($fuser->entity > 0 || $nbSuperAdmin > 1)) {
                    print $form->selectyesno('admin', $fuser->admin, 1);
                    if (!empty($conf->multicompany->enabled) && !$user->entity) {
                        if ($conf->use_javascript_ajax) {
                            print '<script type="text/javascript">
									$(function() {
										var admin = $("select[name=admin]");
										if (admin.val() == 0) {
											$("input[name=superadmin]")
													.attr("disabled", true)
													.attr("checked", false);
										}
										$("select[name=admin]").change(function() {
											 if ( $(this).val() == 0 ) {
											 	$("input[name=superadmin]")
											 		.attr("disabled", true)
											 		.attr("checked", false);
示例#18
0
文件: dict.php 项目: netors/dolibarr
/**
 *	\brief      Show field
 * 	\param		fieldlist		Array of fields
 * 	\param		obj				If we show a particular record, obj is filled with record fields
 */
function fieldList($fieldlist, $obj = '')
{
    global $conf, $langs, $db;
    global $region_id;
    global $elementList, $sourceList;
    $html = new Form($db);
    $formadmin = new FormAdmin($db);
    $formcompany = new FormCompany($db);
    foreach ($fieldlist as $field => $value) {
        if ($fieldlist[$field] == 'pays') {
            if (in_array('region_id', $fieldlist)) {
                print '<td>&nbsp;</td>';
                continue;
            }
            // For region page, we do not show the country input
            print '<td>';
            print $html->select_country($obj->pays_code ? $obj->pays_code : $obj->pays, 'pays');
            print '</td>';
        } elseif ($fieldlist[$field] == 'pays_id') {
            $pays_id = !empty($obj->{$fieldlist}[$field]) ? $obj->{$fieldlist}[$field] : 0;
            print '<input type="hidden" name="' . $fieldlist[$field] . '" value="' . $pays_id . '">';
        } elseif ($fieldlist[$field] == 'region') {
            print '<td>';
            $formcompany->select_region($region_id, 'region');
            print '</td>';
        } elseif ($fieldlist[$field] == 'region_id') {
            $region_id = $obj->{$fieldlist}[$field] ? $obj->{$fieldlist}[$field] : 0;
            print '<input type="hidden" name="' . $fieldlist[$field] . '" value="' . $region_id . '">';
        } elseif ($fieldlist[$field] == 'lang') {
            print '<td>';
            print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang');
            print '</td>';
        } elseif ($fieldlist[$field] == 'element') {
            print '<td>';
            print $html->selectarray('element', $elementList, $obj->{$fieldlist}[$field]);
            print '</td>';
        } elseif ($fieldlist[$field] == 'source') {
            print '<td>';
            print $html->selectarray('source', $sourceList, $obj->{$fieldlist}[$field]);
            print '</td>';
        } elseif ($fieldlist[$field] == 'type' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX . "c_actioncomm") {
            print '<td>';
            print 'user<input type="hidden" name="type" value="user">';
            print '</td>';
        } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm') {
            print '<td>';
            print $html->selectyesno($fieldlist[$field], $obj->{$fieldlist}[$field], 1);
            print '</td>';
        } elseif ($fieldlist[$field] == 'nbjour' || $fieldlist[$field] == 'decalage' || $fieldlist[$field] == 'taux') {
            print '<td><input type="text" class="flat" value="' . $obj->{$fieldlist}[$field] . '" size="3" name="' . $fieldlist[$field] . '"></td>';
        } elseif ($fieldlist[$field] == 'libelle_facture') {
            print '<td><textarea cols="30" rows="' . ROWS_2 . '" class="flat" name="' . $fieldlist[$field] . '">' . $obj->{$fieldlist}[$field] . '</textarea></td>';
        } elseif ($fieldlist[$field] == 'price') {
            print '<td><input type="text" class="flat" value="' . price($obj->{$fieldlist}[$field]) . '" size="8" name="' . $fieldlist[$field] . '"></td>';
        } elseif ($fieldlist[$field] == 'code') {
            print '<td><input type="text" class="flat" value="' . $obj->{$fieldlist}[$field] . '" size="10" name="' . $fieldlist[$field] . '"></td>';
        } elseif ($fieldlist[$field] == 'unit') {
            print '<td>';
            print $html->selectarray('unit', array('mm', 'cm', 'point', 'inch'), $obj->{$fieldlist}[$field], 0, 0, 1);
            print '</td>';
        } else {
            print '<td>';
            print '<input type="text" ' . ($fieldlist[$field] == 'libelle' ? 'size="32" ' : '') . ' class="flat" value="' . $obj->{$fieldlist}[$field] . '" name="' . $fieldlist[$field] . '">';
            print '</td>';
        }
    }
}
示例#19
0
文件: sms.php 项目: nrjacker4/crm-php
if ($action == 'edit') {
    $form = new Form($db);
    if (!count($listofmethods)) {
        print '<div class="warning">' . $langs->trans("NoSmsEngine", '<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=sms_manager">DoliStore</a>') . '</div>';
    }
    print '<form method="post" action="' . $_SERVER["PHP_SELF"] . '">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="update">';
    clearstatcache();
    $var = true;
    print '<table class="noborder" width="100%">';
    print '<tr class="liste_titre"><td>' . $langs->trans("Parameter") . '</td><td>' . $langs->trans("Value") . '</td></tr>';
    // Disable
    $var = !$var;
    print '<tr ' . $bc[$var] . '><td>' . $langs->trans("MAIN_DISABLE_ALL_SMS") . '</td><td>';
    print $form->selectyesno('MAIN_DISABLE_ALL_SMS', $conf->global->MAIN_DISABLE_ALL_SMS, 1);
    print '</td></tr>';
    // Separator
    $var = !$var;
    print '<tr ' . $bc[$var] . '><td colspan="2">&nbsp;</td></tr>';
    // Method
    $var = !$var;
    print '<tr ' . $bc[$var] . '><td>' . $langs->trans("MAIN_SMS_SENDMODE") . '</td><td>';
    if (count($listofmethods)) {
        print $form->selectarray('MAIN_SMS_SENDMODE', $listofmethods, $conf->global->MAIN_SMS_SENDMODE, 1);
    } else {
        print '<font class="error">' . $langs->trans("None") . '</font>';
    }
    print '</td></tr>';
    // From
    $var = !$var;
示例#20
0
    print '<td>';
    if (! empty($ldap_firstname))
    {
        print '<input type="hidden" name="firstname" value="'.$ldap_firstname.'">';
        print $ldap_firstname;
    }
    else
    {
        print '<input size="30" type="text" name="firstname" value="'.GETPOST('firstname').'">';
    }
    print '</td></tr>';

	// Employee
    print '<tr>';
    print '<td>'.fieldLabel('Employee','employee',0).'</td><td>';
    print $form->selectyesno("employee",(isset($_POST['employee'])?GETPOST('employee'):0),1);
    print '</td></tr>';

    // Position/Job
    print '<tr><td>'.$langs->trans("PostOrFunction").'</td>';
    print '<td>';
    print '<input size="30" type="text" name="job" value="'.GETPOST('job').'">';
    print '</td></tr>';

    // Gender
    print '<tr><td>'.$langs->trans("Gender").'</td>';
    print '<td>';
    $arraygender=array('man'=>$langs->trans("Genderman"),'woman'=>$langs->trans("Genderwoman"));
    print $form->selectarray('gender', $arraygender, GETPOST('gender'), 1);
    print '</td></tr>';
$var = false;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameters") . '</td>' . "\n";
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="center" width="100">' . $langs->trans("Value") . '</td>' . "\n";
// Example with a yes / no select
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $langs->transnoentitiesnoconv("quickpriceupdate_allowservice") . '</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="300">';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="set_QUICKPRICEUPDATE_ALLOW_SERVICE">';
print $form->selectyesno("QUICKPRICEUPDATE_ALLOW_SERVICE", $conf->global->QUICKPRICEUPDATE_ALLOW_SERVICE, 1);
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print '</form>';
print '</td></tr>';
print '</table>';
print '<br /><hr /><br />';
print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">';
print '<input type="hidden" name="action" value="priceupdate" />';
print '<table class="border" width="100%">';
print '<tr>';
print '<td class="fieldrequired" width="25%">' . $langs->transnoentitiesnoconv("quickpriceupdate_category") . '</td>';
print '<td>' . select_all_categories($form) . '</td>';
print '</tr>';
print '<tr>';
print '<td class="fieldrequired" width="25%">' . $langs->transnoentitiesnoconv("quickpriceupdate_date") . '</td>';
print '<td>' . $form->select_date('', 'tms', 1, 1, 1, "", 1, 0, 1) . '</td>';
示例#22
0
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameter") . '</td>';
print '<td align="center" width="60">' . $langs->trans("Value") . '</td>';
print '<td width="80">&nbsp;</td>';
print "</tr>\n";
$var = true;
// Force date validation
$var = !$var;
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
print '<input type="hidden" name="action" value="setforcedate" />';
print '<tr ' . $bc[$var] . '><td>';
print $langs->trans("ForceInvoiceDate");
print '</td><td width="60" align="center">';
print $form->selectyesno("forcedate", $conf->global->FAC_FORCE_DATE_VALIDATION, 1);
print '</td><td align="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '" />';
print "</td></tr>\n";
print '</form>';
$var = !$var;
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
print '<input type="hidden" name="action" value="set_FACTURE_FREE_TEXT" />';
print '<tr ' . $bc[$var] . '><td colspan="2">';
print $langs->trans("FreeLegalTextOnInvoices") . ' (' . $langs->trans("AddCRIfTooLong") . ')<br>';
print '<textarea name="FACTURE_FREE_TEXT" class="flat" cols="120">' . $conf->global->FACTURE_FREE_TEXT . '</textarea>';
print '</td><td align="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '" />';
print "</td></tr>\n";
print '</form>';
示例#23
0
    print '</script>' . "\n";
}
print $langs->trans("BlankSubscriptionFormDesc") . '<br><br>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Parameter") . '</td>';
print '<td align="right">' . $langs->trans("Value") . '</td>';
print "</tr>\n";
$var = true;
// Allow public form
$var = !$var;
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<tr ' . $bc[$var] . '><td>';
print $langs->trans("EnablePublicSubscriptionForm");
print '</td><td align="right">';
print $form->selectyesno("MEMBER_ENABLE_PUBLIC", !empty($conf->global->MEMBER_ENABLE_PUBLIC) ? $conf->global->MEMBER_ENABLE_PUBLIC : 0, 1);
print "</td></tr>\n";
// Type
/*$var=! $var;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].' class="drag"><td>';
print $langs->trans("EnablePublicSubscriptionForm");
print '</td><td width="60" align="center">';
print $form->selectyesno("forcedate",$conf->global->MEMBER_NEWFORM_FORCETYPE,1);
print "</td></tr>\n"; */
// Amount
$var = !$var;
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<tr ' . $bc[$var] . ' id="tramount"><td>';
print $langs->trans("DefaultAmount");
print '</td><td align="right">';
示例#24
0
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print "  <td>" . $langs->trans("RuleForStockManagementDecrease") . "</td>\n";
print "  <td align=\"right\" width=\"160\">&nbsp;</td>\n";
print '</tr>' . "\n";
$var = true;
$found = 0;
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td width="60%">' . $langs->trans("DeStockOnBill") . '</td>';
print '<td width="160" align="right">';
if (!empty($conf->facture->enabled)) {
    print "<form method=\"post\" action=\"stock.php\">";
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_BILL\">";
    print $form->selectyesno("STOCK_CALCULATE_ON_BILL", $conf->global->STOCK_CALCULATE_ON_BILL, 1, $disabled);
    print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '"' . $disabled . '>';
    print "</form>\n";
} else {
    print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module30Name"));
}
print "</td>\n</tr>\n";
$found++;
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td width="60%">' . $langs->trans("DeStockOnValidateOrder") . '</td>';
print '<td width="160" align="right">';
if (!empty($conf->commande->enabled)) {
    print "<form method=\"post\" action=\"stock.php\">";
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_VALIDATE_ORDER\">";
 print '<input type="hidden" name="action" value="add">';
 $nbrows = 11;
 if (!empty($conf->projet->enabled)) {
     $nbrows++;
 }
 // Date
 print '<tr><td class="fieldrequired">' . $langs->trans("Date") . '</td><td>';
 $form->select_date($donation_date ? $donation_date : -1, '', '', '', '', "add", 1, 1);
 print '</td>';
 print '<td rowspan="' . $nbrows . '" valign="top">' . $langs->trans("Comments") . ' :<br>';
 print "<textarea name=\"note_private\" wrap=\"soft\" cols=\"40\" rows=\"15\">" . GETPOST("note_private") . "</textarea></td>";
 print "</tr>";
 // Amount
 print "<tr>" . '<td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input type="text" name="amount" value="' . $_POST["amount"] . '" size="10"> ' . $langs->trans("Currency" . $conf->currency) . '</td></tr>';
 print '<tr><td class="fieldrequired">' . $langs->trans("PublicDonation") . "</td><td>";
 print $form->selectyesno("public", isset($_POST["public"]) ? $_POST["public"] : 1, 1);
 print "</td></tr>\n";
 print "<tr>" . '<td>' . $langs->trans("Company") . '</td><td><input type="text" name="societe" value="' . $_POST["societe"] . '" size="40"></td></tr>';
 print "<tr>" . '<td>' . $langs->trans("Firstname") . '</td><td><input type="text" name="firstname" value="' . $_POST["firstname"] . '" size="40"></td></tr>';
 print "<tr>" . '<td>' . $langs->trans("Lastname") . '</td><td><input type="text" name="lastname" value="' . $_POST["lastname"] . '" size="40"></td></tr>';
 print "<tr>" . '<td>' . $langs->trans("Address") . '</td><td>';
 print '<textarea name="address" wrap="soft" cols="40" rows="3">' . $_POST["address"] . '</textarea></td></tr>';
 // Zip / Town
 print '<tr><td>' . $langs->trans("Zip") . ' / ' . $langs->trans("Town") . '</td><td>';
 print $formcompany->select_ziptown(isset($_POST["zipcode"]) ? $_POST["zipcode"] : $don->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
 print ' ';
 print $formcompany->select_ziptown(isset($_POST["town"]) ? $_POST["town"] : $don->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
 print '</tr>';
 print "<tr>" . '<td>' . $langs->trans("Country") . '</td><td><input type="text" name="country" value="' . $_POST["country"] . '" size="40"></td></tr>';
 print "<tr>" . '<td>' . $langs->trans("EMail") . '</td><td><input type="text" name="email" value="' . $_POST["email"] . '" size="40"></td></tr>';
 print "<tr><td>" . $langs->trans("PaymentMode") . "</td><td>\n";
示例#26
0
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setvalue">';


print '<table class="nobordernopadding" width="100%">';

$var=true;
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("AccountParameter").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print "</tr>\n";

$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">';
print $langs->trans("PAYPAL_API_SANDBOX").'</td><td>';
print $form->selectyesno("PAYPAL_API_SANDBOX",$conf->global->PAYPAL_API_SANDBOX,1);
print '</td></tr>';

$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">';
print $langs->trans("PAYPAL_API_USER").'</td><td>';
print '<input size="32" type="text" name="PAYPAL_API_USER" value="'.$conf->global->PAYPAL_API_USER.'">';
print ' &nbsp; '.$langs->trans("Example").': paypal_api1.mywebsite.com';
print '</td></tr>';

$var=!$var;
print '<tr '.$bc[$var].'><td class="fieldrequired">';
print $langs->trans("PAYPAL_API_PASSWORD").'</td><td>';
print '<input size="32" type="text" name="PAYPAL_API_PASSWORD" value="'.$conf->global->PAYPAL_API_PASSWORD.'">';
print '</td></tr>';
示例#27
0
文件: soc.php 项目: nrjacker4/crm-php
                print '<td>'.$idprof.'</td><td>';
                $key='idprof'.$i;
                print $formcompany->get_input_id_prof($i,'idprof'.$i,$object->$key,$object->country_code);
                print '</td>';
                if (($j % 2) == 1) print '</tr>';
                $j++;
            }
            $i++;
        }
        if ($j % 2 == 1) print '<td colspan="2"></td></tr>';

        // Assujeti TVA
        $form = new Form($db);
        print '<tr><td>'.$langs->trans('VATIsUsed').'</td>';
        print '<td>';
        print $form->selectyesno('assujtva_value',1,1);     // Assujeti par defaut en creation
        print '</td>';
        print '<td nowrap="nowrap">'.$langs->trans('VATIntra').'</td>';
        print '<td nowrap="nowrap">';
        $s = '<input type="text" class="flat" name="tva_intra" size="12" maxlength="20" value="'.$object->tva_intra.'">';

        if (empty($conf->global->MAIN_DISABLEVATCHECK))
        {
            $s.=' ';

            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,300);\n";
示例#28
0
     if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
         print '<input class="flat" type="text" size="1" maxlength="2" name="deliveryday" value="' . $deliveryday . '">';
     }
     print '<input class="flat" type="text" size="1" maxlength="2" name="deliverymonth" value="' . $deliverymonth . '">';
     $formother->select_year($deliveryyear ? $deliveryyear : -1, 'deliveryyear', 1, 20, 5);
     print '</td>';
 }
 print '<td class="liste_titre" align="right">';
 print '<input class="flat" type="text" size="6" name="search_total_ht" value="' . $search_total_ht . '">';
 print '</td>';
 print '<td align="right">';
 $liststatus = array('0' => $langs->trans("StatusOrderDraftShort"), '1' => $langs->trans("StatusOrderValidated"), '2' => $langs->trans("StatusOrderSentShort"), '3' => $langs->trans("StatusOrderDelivered"), '-1' => $langs->trans("StatusOrderCanceledShort"));
 print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4);
 print '</td>';
 print '<td align="center">';
 print $form->selectyesno('billed', $billed, 1, 0, 1);
 print '</td>';
 print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
 print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
 print "</td></tr>\n";
 $var = true;
 $total = 0;
 $subtotal = 0;
 $productstat_cache = array();
 $i = 0;
 $generic_commande = new Commande($db);
 $generic_product = new Product($db);
 while ($i < min($num, $limit)) {
     $objp = $db->fetch_object($resql);
     $var = !$var;
     print '<tr ' . $bc[$var] . '>';
示例#29
0
文件: list.php 项目: Albertopf/prueba
 }
 // Minimum buying Price
 if (!empty($arrayfields['p.minbuyprice']['checked'])) {
     print '<td class="liste_titre">';
     print '&nbsp;';
     print '</td>';
 }
 // Desired stock
 if (!empty($arrayfields['p.desiredstock']['checked'])) {
     print '<td class="liste_titre">';
     print '&nbsp;';
     print '</td>';
 }
 // To batch
 if (!empty($arrayfields['p.tobatch']['checked'])) {
     print '<td class="liste_titre center">' . $form->selectyesno($search_tobatch, '', '', '', 1) . '</td>';
 }
 // Stock
 if (!empty($arrayfields['p.stock']['checked'])) {
     print '<td class="liste_titre">&nbsp;</td>';
 }
 // Accountancy code sell
 if (!empty($arrayfields['p.accountancy_code_sell']['checked'])) {
     print '<td class="liste_titre"><input class="flat" type="text" name="search_accountancy_code_sell" size="6" value="' . dol_escape_htmltag($search_accountancy_code_sell) . '"></td>';
 }
 // Accountancy code sell
 if (!empty($arrayfields['p.accountancy_code_buy']['checked'])) {
     print '<td class="liste_titre"><input class="flat" type="text" name="search_accountancy_code_buy" size="6" value="' . dol_escape_htmltag($search_accountancy_code_buy) . '"></td>';
 }
 // Extra fields
 if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) {
示例#30
0
 print '<tr><td><label for="email">' . $langs->trans("EMail") . '</label></td>';
 print '<td><input name="email" id="email" type="text" size="40" maxlength="80" value="' . (isset($_POST["email"]) ? $_POST["email"] : $object->email) . '"></td>';
 if (!empty($conf->mailing->enabled)) {
     $langs->load("mails");
     print '<td class="nowrap">' . $langs->trans("NbOfEMailingsSend") . '</td>';
     print '<td>' . $object->getNbOfEMailings() . '</td>';
 } else {
     print '<td colspan="2">&nbsp;</td>';
 }
 print '</tr>';
 // Jabberid
 print '<tr><td><label for="jabberid">' . $langs->trans("IM") . '</label></td>';
 print '<td><input name="jabberid" id="jabberid" type="text" size="40" maxlength="80" value="' . (isset($_POST["jabberid"]) ? $_POST["jabberid"] : $object->jabberid) . '"></td>';
 if (!empty($conf->mailing->enabled)) {
     print '<td><label for="no_email">' . $langs->trans("No_Email") . '</label></td>';
     print '<td>' . $form->selectyesno('no_email', isset($_POST["no_email"]) ? $_POST["no_email"] : $object->no_email, 1) . '</td>';
 } else {
     print '<td colspan="2">&nbsp;</td>';
 }
 print '</tr>';
 // Skype
 if (!empty($conf->skype->enabled)) {
     print '<tr><td><label for="skype">' . $langs->trans("Skype") . '</label></td>';
     print '<td><input name="skype" id="skype" type="text" size="40" maxlength="80" value="' . (isset($_POST["skype"]) ? $_POST["skype"] : $object->skype) . '"></td></tr>';
 }
 // Visibility
 print '<tr><td><label for="priv">' . $langs->trans("ContactVisibility") . '</label></td><td colspan="3">';
 $selectarray = array('0' => $langs->trans("ContactPublic"), '1' => $langs->trans("ContactPrivate"));
 print $form->selectarray('priv', $selectarray, $object->priv, 0);
 print '</td></tr>';
 // Note Public