本文整理汇总了PHP中FormMail::get_form方法的典型用法代码示例。如果您正苦于以下问题:PHP FormMail::get_form方法的具体用法?PHP FormMail::get_form怎么用?PHP FormMail::get_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormMail
的用法示例。
在下文中一共展示了FormMail::get_form方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($contactarr as $contact) {
if ($contact['libelle'] == $langs->trans('TypeContact_facture_external_BILLING')) {
// TODO Use code and not label
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
$contactstatic = new Contact($db);
$contactstatic->fetch($contact['id']);
$custcontact = $contactstatic->getFullName($langs, 1);
}
}
if (!empty($custcontact)) {
$formmail->substit['__CONTACTCIVNAME__'] = $custcontact;
}
}
// Tableau des parametres complementaires du post
$formmail->param['action'] = $action;
$formmail->param['models'] = $modelmail;
$formmail->param['models_id'] = GETPOST('modelmailselected', 'int');
$formmail->param['facid'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files
if (GETPOST("mode") == 'init') {
$formmail->clear_attached_files();
$formmail->add_attached_files($file, basename($file), dol_mimetype($file));
}
print $formmail->get_form();
dol_fiche_end();
}
}
}
llxFooter();
$db->close();
示例2: isset
$formmail->withto = !empty($_POST['sendto']) ? $_POST['sendto'] : ($user->email ? $user->email : 1);
$formmail->withtocc = !empty($_POST['sendtocc']) ? $_POST['sendtocc'] : 1;
// ! empty to keep field if empty
$formmail->withtoccc = !empty($_POST['sendtoccc']) ? $_POST['sendtoccc'] : 1;
// ! empty to keep field if empty
$formmail->withtopic = isset($_POST['subject']) ? $_POST['subject'] : $langs->trans("Test");
$formmail->withtopicreadonly = 0;
$formmail->withfile = 2;
$formmail->withbody = isset($_POST['message']) ? $_POST['message'] : ($action == 'testhtml' ? $langs->transnoentities("PredefinedMailTestHtml") : $langs->transnoentities("PredefinedMailTest"));
$formmail->withbodyreadonly = 0;
$formmail->withcancel = 1;
$formmail->withdeliveryreceipt = 1;
$formmail->withfckeditor = $action == 'testhtml' ? 1 : 0;
$formmail->ckeditortoolbar = 'dolibarr_mailings';
// Tableau des substitutions
$formmail->substit = $substitutionarrayfortest;
// Tableau des parametres complementaires du post
$formmail->param["action"] = $action == 'testhtml' ? "sendhtml" : "send";
$formmail->param["models"] = "body";
$formmail->param["mailid"] = 0;
$formmail->param["returnurl"] = $_SERVER["PHP_SELF"];
// Init list of files
if (GETPOST("mode") == 'init') {
$formmail->clear_attached_files();
}
print $formmail->get_form($action == 'testhtml' ? 'addfilehtml' : 'addfile', $action == 'testhtml' ? 'removefilehtml' : 'removefile');
print '<br>';
}
}
llxFooter();
$db->close();