本文整理汇总了PHP中print_titre函数的典型用法代码示例。如果您正苦于以下问题:PHP print_titre函数的具体用法?PHP print_titre怎么用?PHP print_titre使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_titre函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listOfLinks
/**
* Show array with linked files
*
* @param Object $object Object
* @param int $permtodelete Deletion is allowed
* @param string $action Action
* @param string $selected ???
* @param string $param More param to add into URL
* @return int Number of links
*/
public function listOfLinks($object, $permtodelete = 1, $action = null, $selected = null, $param = '')
{
global $user, $conf, $langs, $user;
global $bc;
global $sortfield, $sortorder;
$langs->load("link");
require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
$link = new Link($this->db);
$links = array();
if ($sortfield == "name") {
$sortfield = "label";
} elseif ($sortfield == "date") {
$sortfield = "datea";
} else {
$sortfield = null;
}
$res = $link->fetchAll($links, $object->element, $object->id, $sortfield, $sortorder);
$param .= isset($object->id) ? '&id=' . $object->id : '';
// Show list of associated links
print_titre($langs->trans("LinkedFiles"));
print '<form action="' . $_SERVER['PHP_SELF'] . ($param ? '?' . $param : '') . '" method="POST">';
print '<table width="100%" class="liste">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Links"), $_SERVER['PHP_SELF'], "name", "", $param, 'align="left"', $sortfield, $sortorder);
print_liste_field_titre("", "", "", "", "", 'align="right"');
print_liste_field_titre($langs->trans("Date"), $_SERVER['PHP_SELF'], "date", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER['PHP_SELF'], "", "", $param, 'align="center"');
print_liste_field_titre('', '', '');
print '</tr>';
$nboflinks = count($links);
if ($nboflinks > 0) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
}
$var = true;
foreach ($links as $link) {
$var = !$var;
print '<tr ' . $bc[$var] . '>';
//edit mode
if ($action == 'update' && $selected === $link->id) {
print '<td>';
print '<input type="hidden" name="id" value="' . $object->id . '">';
print '<input type="hidden" name="linkid" value="' . $link->id . '">';
print '<input type="hidden" name="action" value="confirm_updateline">';
print $langs->trans('Link') . ': <input type="text" name="link" size="50" value="' . $link->url . '">';
print '</td>';
print '<td>';
print $langs->trans('Label') . ': <input type="text" name="label" value="' . $link->label . '">';
print '</td>';
print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
print '<td align="right"></td>';
print '<td align="right">';
print '<input type="submit" name="save" class="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '">';
print '<input type="submit" name="cancel" class="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '">';
print '</td>';
} else {
print '<td>';
print '<a data-ajax="false" href="' . $link->url . '" target="_blank">';
print $link->label;
print '</a>';
print '</td>' . "\n";
print '<td align="right"></td>';
print '<td align="center">' . dol_print_date($link->datea, "dayhour", "tzuser") . '</td>';
print '<td align="center"></td>';
print '<td align="right">';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink" >' . img_edit() . '</a>';
// id= is included into $param
if ($permtodelete) {
print ' <a href="' . $_SERVER['PHP_SELF'] . '?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>';
// id= is included into $param
} else {
print ' ';
}
print '</td>';
}
print "</tr>\n";
}
if ($nboflinks == 0) {
print '<tr ' . $bc[false] . '><td colspan="5">';
print $langs->trans("NoLinkFound");
print '</td></tr>';
}
print "</table>";
print '</form>';
return $nboflinks;
}
示例2: llxFooterVierge
print '<center>';
print $langs->trans("NewMemberbyWeb");
print '</center>';
llxFooterVierge();
exit;
}
/*
* View
*/
$form = new Form($db);
$formcompany = new FormCompany($db);
$adht = new AdherentType($db);
$extrafields->fetch_name_optionals_label('adherent');
// fetch optionals attributes and labels
llxHeaderVierge($langs->trans("NewSubscription"));
print_titre($langs->trans("NewSubscription"));
if (!empty($conf->global->MEMBER_NEWFORM_TEXT)) {
print $langs->trans($conf->global->MEMBER_NEWFORM_TEXT) . "<br>\n";
} else {
print $langs->trans("NewSubscriptionDesc", $conf->global->MAIN_INFO_SOCIETE_MAIL) . "<br>\n";
}
dol_htmloutput_errors($errmsg);
print '<div align="center">';
print '<br>' . $langs->trans("FieldsWithAreMandatory", '*') . '<br>';
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
print '<script type="text/javascript">
jQuery(document).ready(function () {
jQuery(document).ready(function () {
function initmorphy()
{
if (jQuery("#morphy").val()==\'phy\') {
示例3: dol_print_date
}
print '<tr><td valign="top">' . $langs->trans("LastMovement") . '</td><td colspan="3">';
if ($lastmovementdate) {
print dol_print_date($lastmovementdate, 'dayhour');
} else {
print $langs->trans("None");
}
print "</td></tr>";
print "</table>";
print '</div>';
}
/*
* Correct stock
*/
if ($action == "correction") {
print_titre($langs->trans("StockCorrection"));
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="correct_stock">';
print '<table class="border" width="100%">';
// Warehouse
print '<tr>';
print '<td width="20%">' . $langs->trans("Product") . '</td>';
print '<td width="20%">';
print $form->select_produits(GETPOST('productid'), 'product_id', empty($conf->global->STOCK_SUPPORTS_SERVICES) ? '0' : '');
print '</td>';
print '<td width="20%">';
print '<select name="mouvement" class="flat">';
print '<option value="0">' . $langs->trans("Add") . '</option>';
print '<option value="1">' . $langs->trans("Delete") . '</option>';
print '</select></td>';
示例4: print_titre
//print '<td>'.$langs->trans("Filter").':</td>';
print '<td>' . $langs->trans("From") . ' ';
print $form->select_date($dates, 'dates', 0, 0, 1);
print '</td>';
print '<td>' . $langs->trans("to") . ' ';
print $form->select_date($datee, 'datee', 0, 0, 1);
print '</td>';
print '<td>';
print '<input type="submit" name="refresh" value="' . $langs->trans("Refresh") . '" class="button">';
print '</td>';
print '</tr></table>';
print '</form><br>';
$showdatefilter++;
}
print '<br>';
print_titre($langs->trans($title));
$selectList = $formproject->select_element($tablename, $project->thirdparty->id);
if (!$selectList || $selectList < 0) {
setEventMessage($formproject->error, 'errors');
} else {
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $projectid . '" method="post">';
print '<input type="hidden" name="tablename" value="' . $tablename . '">';
print '<input type="hidden" name="action" value="addelement">';
print '<input type="hidden" name="datesrfc" value="' . dol_print_date($dates, 'dayhourrfc') . '">';
print '<input type="hidden" name="dateerfc" value="' . dol_print_date($datee, 'dayhourrfc') . '">';
print '<table><tr><td>' . $langs->trans("SelectElement") . '</td>';
print '<td>' . $selectList . '</td>';
print '<td><input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans("AddElement")) . '"></td>';
print '</tr></table>';
print '</form>';
}
示例5: IN
$langs->load("users");
$title=$langs->trans("ListOfUsers");
$sql = "SELECT u.rowid, u.name, u.firstname, u.login";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
$sql.= " ORDER BY u.name ASC ";
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
print_titre($title);
// Lignes des titres
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Login").'</td>';
print '<td> </td>';
print "</tr>\n";
$var=True;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
$var=!$var;
示例6: print_titre
}
print '</td>';
print "</tr>\n";
}
}
}
closedir($handle);
}
}
}
print '</table>';
print '<br>';
print_titre($langs->trans("Other"));
// Autres options
$html=new Form($db);
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print "<td>".$langs->trans("Parameters")."</td>\n";
print '<td align="right" width="60">'.$langs->trans("Value").'</td>'."\n";
print '<td width="80"> </td></tr>'."\n";
// Utilisation formulaire Ajax sur choix societe
$var=!$var;
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="COMPANY_USE_SEARCH_TO_SELECT">';
示例7: print_titre
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ttc, l.qty, l.rowid, l.tva_tx, l.fk_code_ventilation ";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l";
$sql .= " , " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql .= " WHERE f.rowid = l.fk_facture_fourn AND f.fk_statut = 1 AND l.rowid = " . $_GET["id"];
$result = $db->query($sql);
if ($result) {
$num_lignes = $db->num_rows($result);
$i = 0;
if ($num_lignes) {
$objp = $db->fetch_object($result);
if ($objp->fk_code_ventilation == 0) {
print '<form action="fiche.php?id=' . $_GET["id"] . '" method="post">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="ventil">';
}
print_titre("Ventilation");
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
print '<tr><td>Facture</td>';
print '<td><a href="' . DOL_URL_ROOT . '/compta/facture.php?facid=' . $objp->facid . '">' . $objp->facnumber . '</a></td></tr>';
print '<tr><td width="20%">Ligne</td>';
print '<td>' . stripslashes(nl2br($objp->description)) . '</td></tr>';
print '<tr><td width="20%">Ventiler dans le compte :</td><td>';
if ($objp->fk_code_ventilation == 0) {
print $form->selectarray("codeventil", $cgs, $objp->fk_code_ventilation);
} else {
print $cgs[$objp->fk_code_ventilation];
}
print '</td></tr>';
if ($objp->fk_code_ventilation == 0) {
print '<tr><td> </td><td><input type="submit" value="' . $langs->trans("Ventiler") . '"></td></tr>';
}
示例8: FormActions
print '</td><td valign="top" width="50%">';
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'order', $socid);
print '</td></tr></table>';
}
/*
* Action presend
*
*/
if ($action == 'presend') {
$ref = dol_sanitizeFileName($object->ref);
$file = $conf->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
print '<br>';
print_titre($langs->trans('SendOrderByMail'));
// Cree l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->fromtype = 'user';
$formmail->fromid = $user->id;
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom = 1;
$formmail->withto = empty($_POST["sendto"]) ? 1 : $_POST["sendto"];
$formmail->withtosocid = $soc->id;
$formmail->withtocc = 1;
$formmail->withtoccsocid = 0;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
$formmail->withtocccsocid = 0;
$formmail->withtopic = $langs->trans('SendOrderRef', '__ORDERREF__');
示例9: GETPOST
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/compta/tva/class/tva.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/sociales/class/chargesociales.class.php';
// Security check
$socid = GETPOST('socid', 'int');
if ($user->societe_id > 0) {
$socid = $user->societe_id;
}
if (!empty($conf->comptabilite->enabled)) {
$result = restrictedArea($user, 'compta', '', '', 'resultat');
}
if (!empty($conf->accounting->enabled)) {
$result = restrictedArea($user, 'accounting', '', '', 'comptarapport');
}
/*
* Views
*/
llxHeader();
$year = $_GET["year"];
$month = $_GET["month"];
if (!$year) {
$year = strftime("%Y", time());
}
/* Le compte de resultat est un document officiel requis par l'administration selon le status ou activite */
print_titre("Compte de resultat" . ($year ? " annee {$year}" : ""));
print '<br>';
print $langs->trans("FeatureNotYetAvailable");
llxFooter();
$db->close();
示例10: print_titre
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 method=\"post\" action=\"" . $_SERVER["PHP_SELF"] . "\">";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print "<input type=\"hidden\" name=\"action\" value=\"set_PROPALE_DRAFT_WATERMARK\">";
print '<tr ' . $bc[$var] . '><td colspan="2">';
print $langs->trans("WatermarkOnDraftProposal") . '<br>';
print '<input size="50" class="flat" type="text" name="PROPALE_DRAFT_WATERMARK" value="' . $conf->global->PROPALE_DRAFT_WATERMARK . '">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
print "</td></tr>\n";
print '</form>';
print '</table>';
/*
* Directory
*/
print '<br>';
print_titre($langs->trans("PathToDocuments"));
print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
print " <td>" . $langs->trans("Name") . "</td>\n";
print " <td>" . $langs->trans("Value") . "</td>\n";
print "</tr>\n";
print "<tr " . $bc[false] . ">\n <td width=\"140\">" . $langs->trans("PathDirectory") . "</td>\n <td>" . $conf->propal->dir_output . "</td>\n</tr>\n";
print "</table>\n<br>";
dol_htmloutput_mesg($mesg);
$db->close();
llxFooter();
示例11: show_list_sending_receive
/**
* List sendings and receive receipts
*
* @param string $origin Origin ('commande', ...)
* @param int $origin_id Origin id
* @param string $filter Filter
* @return int <0 if KO, >0 if OK
*/
function show_list_sending_receive($origin, $origin_id, $filter = '')
{
global $db, $conf, $langs, $bc;
global $form;
$product_static = new Product($db);
$expedition = new Expedition($db);
$sql = "SELECT obj.rowid, obj.fk_product, obj.label, obj.description, obj.product_type as fk_product_type, obj.qty as qty_asked, obj.date_start, obj.date_end";
$sql .= ", ed.qty as qty_shipped, ed.fk_expedition as expedition_id, ed.fk_origin_line";
$sql .= ", e.rowid as sendingid, e.ref as exp_ref, e.date_creation, e.date_delivery, e.date_expedition,";
//if ($conf->livraison_bon->enabled) $sql .= " l.rowid as livraison_id, l.ref as livraison_ref, l.date_delivery, ld.qty as qty_received,";
$sql .= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,';
$sql .= ' p.description as product_desc';
$sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed";
$sql .= ", " . MAIN_DB_PREFIX . "expedition as e";
$sql .= ", " . MAIN_DB_PREFIX . $origin . "det as obj";
//if ($conf->livraison_bon->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.fk_expedition = e.rowid LEFT JOIN ".MAIN_DB_PREFIX."livraisondet as ld ON ld.fk_livraison = l.rowid AND obj.rowid = ld.fk_origin_line";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid";
$sql .= " WHERE e.entity = " . $conf->entity;
$sql .= " AND obj.fk_" . $origin . " = " . $origin_id;
$sql .= " AND obj.rowid = ed.fk_origin_line";
$sql .= " AND ed.fk_expedition = e.rowid";
if ($filter) {
$sql .= $filter;
}
$sql .= " ORDER BY obj.fk_product";
dol_syslog("show_list_sending_receive sql=" . $sql, LOG_DEBUG);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
if ($num) {
if ($filter) {
print_titre($langs->trans("OtherSendingsForSameOrder"));
} else {
print_titre($langs->trans("SendingsAndReceivingForSameOrder"));
}
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
//print '<td align="left">'.$langs->trans("QtyOrdered").'</td>';
print '<td align="left">' . $langs->trans("SendingSheet") . '</td>';
print '<td align="left">' . $langs->trans("Description") . '</td>';
print '<td align="center">' . $langs->trans("DateCreation") . '</td>';
print '<td align="center">' . $langs->trans("DateDeliveryPlanned") . '</td>';
print '<td align="center">' . $langs->trans("QtyShipped") . '</td>';
if ($conf->livraison_bon->enabled) {
print '<td>' . $langs->trans("DeliveryOrder") . '</td>';
//print '<td align="center">'.$langs->trans("QtyReceived").'</td>';
print '<td align="right">' . $langs->trans("DeliveryDate") . '</td>';
}
print "</tr>\n";
$var = True;
while ($i < $num) {
$var = !$var;
$objp = $db->fetch_object($resql);
print "<tr " . $bc[$var] . ">";
// Sending id
print '<td align="left" class="nowrap"><a href="' . DOL_URL_ROOT . '/expedition/fiche.php?id=' . $objp->expedition_id . '">' . img_object($langs->trans("ShowSending"), 'sending') . ' ' . $objp->exp_ref . '<a></td>';
// Description
if ($objp->fk_product > 0) {
// Define output language
if (!empty($conf->global->MAIN_MULTILANGS) && !empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$object = new $origin($db);
$object->fetch($origin_id);
$object->fetch_thirdparty();
$prod = new Product($db);
$prod->id = $objp->fk_product;
$prod->getMultiLangs();
$outputlangs = $langs;
$newlang = '';
if (empty($newlang) && !empty($_REQUEST['lang_id'])) {
$newlang = $_REQUEST['lang_id'];
}
if (empty($newlang)) {
$newlang = $object->client->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$label = !empty($prod->multilangs[$outputlangs->defaultlang]["label"]) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label;
} else {
$label = !empty($objp->label) ? $objp->label : $objp->product_label;
}
print '<td>';
// Show product and description
$product_static->type = $objp->fk_product_type;
$product_static->id = $objp->fk_product;
$product_static->ref = $objp->ref;
$text = $product_static->getNomUrl(1);
$text .= ' - ' . $label;
$description = !empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($objp->description);
print $form->textwithtooltip($text, $description, 3, '', '', $i);
//.........这里部分代码省略.........
示例12: showactions
/**
* Show list of actions for element
*
* @param Object $object Object
* @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter'
* @param int $socid socid of user
* @param int $forceshowtitle Show title even if there is no actions to show
* @return int <0 if KO, >=0 if OK
*/
function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0)
{
global $langs, $conf, $user;
global $bc;
require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
$listofactions = ActionComm::getActions($this->db, $socid, $object->id, $typeelement);
if (!is_array($listofactions)) {
dol_print_error($this->db, 'FailedToGetActions');
}
$num = count($listofactions);
if ($num || $forceshowtitle) {
if ($typeelement == 'invoice') {
$title = $langs->trans('ActionsOnBill');
} elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') {
$title = $langs->trans('ActionsOnBill');
} elseif ($typeelement == 'propal') {
$title = $langs->trans('ActionsOnPropal');
} elseif ($typeelement == 'order') {
$title = $langs->trans('ActionsOnOrder');
} elseif ($typeelement == 'order_supplier' || $typeelement == 'supplier_order') {
$title = $langs->trans('ActionsOnOrder');
} elseif ($typeelement == 'project') {
$title = $langs->trans('ActionsOnProject');
} elseif ($typeelement == 'shipping') {
$title = $langs->trans('ActionsOnShipping');
} elseif ($typeelement == 'fichinter') {
$title = $langs->trans('ActionsOnFicheInter');
} else {
$title = $langs->trans("Actions");
}
print_titre($title);
$total = 0;
$var = true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<th class="liste_titre">' . $langs->trans('Ref') . '</th>';
print '<th class="liste_titre">' . $langs->trans('Action') . '</th>';
print '<th class="liste_titre">' . $langs->trans('Date') . '</th>';
print '<th class="liste_titre">' . $langs->trans('By') . '</th>';
print '</tr>';
print "\n";
$userstatic = new User($this->db);
foreach ($listofactions as $action) {
$savlabel = $action->label;
$action->label = $action->ref;
$ref = $action->getNomUrl(1);
$action->label = $savlabel;
$label = $action->getNomUrl(0, 38);
$var = !$var;
print '<tr ' . $bc[$var] . '>';
print '<td>' . $ref . '</td>';
print '<td>' . $label . '</td>';
print '<td>' . dol_print_date($action->datep, 'day') . '</td>';
print '<td>';
if (!empty($action->author->id)) {
$userstatic->id = $action->author->id;
$userstatic->firstname = $action->author->firstname;
$userstatic->lastname = $action->author->lastname;
print $userstatic->getNomUrl(1);
}
print '</td>';
print '</tr>';
}
print '</table>';
}
return $num;
}
示例13: Translate
$outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang($newlang);
$outputlangs->load('bills');
}
// Build document if it not exists
if (!$file || !is_readable($file)) {
$result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result <= 0) {
dol_print_error($db, $result);
exit;
}
$fileparams = dol_most_recent_file($conf->facture->dir_output . '/' . $ref, preg_quote($ref, '/'));
$file = $fileparams['fullname'];
}
print '<br>';
print_titre($langs->trans($titreform));
// Cree l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->param['langsmodels'] = empty($newlang) ? $langs->defaultlang : $newlang;
$formmail->fromtype = 'user';
$formmail->fromid = $user->id;
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom = 1;
$liste = array();
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) {
$liste[$key] = $value;
}
$formmail->withto = GETPOST('sendto') ? GETPOST('sendto') : $liste;
// List suggested for send to
示例14: dol_escape_htmltag
if ($object->statut <= 1 && $user->rights->mailing->creer || $user->rights->mailing->supprimer) {
if ($object->statut > 0 && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !$user->rights->mailing->mailing_advance->delete)) {
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")) . '">' . $langs->trans("DeleteMailing") . '</a>';
} else {
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?action=delete&id=' . $object->id . (!empty($urlfrom) ? '&urlfrom=' . $urlfrom : '') . '">' . $langs->trans("DeleteMailing") . '</a>';
}
}
print '<br><br></div>';
}
if (!empty($mesgembedded)) {
dol_htmloutput_mesg($mesgembedded, '', 'warning', 1);
print '<br>';
}
// Affichage formulaire de TEST
if ($action == 'test') {
print_titre($langs->trans("TestMailing"));
// Create l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->fromname = $object->email_from;
$formmail->frommail = $object->email_from;
$formmail->withsubstit = 1;
$formmail->withfrom = 0;
$formmail->withto = $user->email ? $user->email : 1;
$formmail->withtocc = 0;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic = 0;
$formmail->withtopicreadonly = 1;
$formmail->withfile = 0;
$formmail->withbody = 0;
$formmail->withbodyreadonly = 1;
示例15: FormActions
print '</td><td valign="top" width="50%">';
// List of actions on element
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions($db);
$somethingshown = $formactions->showactions($object, 'shipping', $socid);
print '</td></tr></table>';
}
/*
* Action presend
*
*/
if ($action == 'presend') {
$ref = dol_sanitizeFileName($object->ref);
$file = $conf->expedition->dir_output . '/sending/' . $ref . '/' . $ref . '.pdf';
print '<br>';
print_titre($langs->trans('SendShippingByEMail'));
// Cree l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->fromtype = 'user';
$formmail->fromid = $user->id;
$formmail->fromname = $user->getFullName($langs);
$formmail->frommail = $user->email;
$formmail->withfrom = 1;
$formmail->withto = empty($_POST["sendto"]) ? 1 : $_POST["sendto"];
$formmail->withtosocid = $soc->id;
$formmail->withtocc = 1;
$formmail->withtoccsocid = 0;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
$formmail->withtocccsocid = 0;
$formmail->withtopic = $langs->trans('SendShippingRef', '__SHIPPINGREF__');