当前位置: 首页>>代码示例>>PHP>>正文


PHP dol_htmlentitiesbr函数代码示例

本文整理汇总了PHP中dol_htmlentitiesbr函数的典型用法代码示例。如果您正苦于以下问题:PHP dol_htmlentitiesbr函数的具体用法?PHP dol_htmlentitiesbr怎么用?PHP dol_htmlentitiesbr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dol_htmlentitiesbr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DolEditor

 /**
  *      Create an object to build an HTML area to edit a large string content
  *
  *      @param 	string	$htmlname		        HTML name of WYSIWIG field
  *      @param 	string	$content		        Content of WYSIWIG field
  *      @param	int		$width					Width in pixel of edit area (auto by default)
  *      @param 	int		$height			        Height in pixel of edit area (200px by default)
  *      @param 	string	$toolbarname	        Name of bar set to use ('Full', 'dolibarr_notes', 'dolibarr_details', 'dolibarr_mailings')
  *      @param  string	$toolbarlocation       	Where bar is stored :
  *                       		             	'In' each window has its own toolbar
  *                              		      	'Out:name' share toolbar into the div called 'name'
  *      @param  boolean	$toolbarstartexpanded  	Bar is visible or not at start
  *		@param	int		$uselocalbrowser		Enabled to add links to local object with local browser. If false, only external images can be added in content.
  *      @param  int		$okforextendededitor    True=Allow usage of extended editor tool (like fckeditor)
  *      @param  int		$rows                   Size of rows for textarea tool
  *      @param  int		$cols                   Size of cols for textarea tool
  */
 function DolEditor($htmlname, $content, $width = '', $height = 200, $toolbarname = 'Basic', $toolbarlocation = 'In', $toolbarstartexpanded = false, $uselocalbrowser = true, $okforextendededitor = true, $rows = 0, $cols = 0)
 {
     global $conf, $langs;
     dol_syslog(get_class($this) . "::DolEditor htmlname=" . $htmlname . " toolbarname=" . $toolbarname);
     if (!$rows) {
         $rows = round($height / 20);
     }
     if (!$cols) {
         $cols = $width ? round($width / 6) : 80;
     }
     // Name of extended editor to use (FCKEDITOR_EDITORNAME can be 'ckeditor' or 'fckeditor')
     $defaulteditor = 'ckeditor';
     $this->tool = empty($conf->global->FCKEDITOR_EDITORNAME) ? $defaulteditor : $conf->global->FCKEDITOR_EDITORNAME;
     $this->uselocalbrowser = $uselocalbrowser;
     // Define content and some properties
     if ($this->tool == 'ckeditor') {
         $content = dol_htmlentitiesbr($content);
         // If content is not HTML, we convert to HTML.
     }
     if ($this->tool == 'fckeditor') {
         require_once DOL_DOCUMENT_ROOT . "/includes/fckeditor/fckeditor.php";
         $content = dol_htmlentitiesbr($content);
         // If content is not HTML, we convert to HTML.
         $this->editor = new FCKeditor($htmlname);
         $this->editor->BasePath = DOL_URL_ROOT . '/includes/fckeditor/';
         $this->editor->Value = $content;
         $this->editor->Height = $height;
         if (!empty($width)) {
             $this->editor->Width = $width;
         }
         $this->editor->ToolbarSet = $toolbarname;
         $this->editor->Config['AutoDetectLanguage'] = 'true';
         $this->editor->Config['ToolbarLocation'] = $toolbarlocation ? $toolbarlocation : 'In';
         $this->editor->Config['ToolbarStartExpanded'] = $toolbarstartexpanded;
         // Rem: Le forcage de ces 2 parametres ne semble pas fonctionner.
         // Dolibarr utilise toujours liens avec modulepart='fckeditor' quelque soit modulepart.
         // Ou se trouve donc cette valeur /viewimage.php?modulepart=fckeditor&file=' ?
         $modulepart = 'fckeditor';
         $this->editor->Config['UserFilesPath'] = '/viewimage.php?modulepart=' . $modulepart . '&file=';
         $this->editor->Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT . '/' . $modulepart . '/';
         $this->editor->Config['LinkBrowser'] = $uselocalbrowser ? 'true' : 'false';
         $this->editor->Config['ImageBrowser'] = $uselocalbrowser ? 'true' : 'false';
         if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/fckeditor/fckconfig.js')) {
             $this->editor->Config['CustomConfigurationsPath'] = DOL_URL_ROOT . '/theme/' . $conf->theme . '/fckeditor/fckconfig.js';
             $this->editor->Config['SkinPath'] = DOL_URL_ROOT . '/theme/' . $conf->theme . '/fckeditor/';
         }
     }
     // Define some properties
     if (in_array($this->tool, array('textarea', 'ckeditor'))) {
         $this->content = $content;
         $this->htmlname = $htmlname;
         $this->toolbarname = $toolbarname;
         $this->toolbarstartexpanded = $toolbarstartexpanded;
         $this->rows = max(ROWS_3, $rows);
         $this->cols = max(40, $cols);
         $this->height = $height;
         $this->width = $width;
     }
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:76,代码来源:doleditor.class.php

示例2: makeSubstitution

 /**
  * Make substitution
  *
  * @param	$object				Adherent Object
  * @return  string      		Value of input text string with substitutions done
  */
 function makeSubstitution($object)
 {
     global $conf, $langs;
     $text = $this->body;
     $birthday = dol_print_date($object->naiss, 'day');
     $msgishtml = 0;
     if (dol_textishtml($text, 1)) {
         $msgishtml = 1;
     }
     $infos = '';
     // Specific for Photo
     $photoName = $object->photo;
     $photoType = $object->_attachments->{$photoName}->content_type;
     $photoBase64 = $object->getFileBase64($object->photo);
     $photo = '<img src="data:' . $PhotoType . ';base64,' . $photoBase64 . '"/>';
     // Substitutions
     $substitutionarray = array('__DOL_MAIN_URL_ROOT__' => DOL_MAIN_URL_ROOT, '__ID__' => $msgishtml ? dol_htmlentitiesbr($object->login) : $object->login, '__CIVILITE__' => $object->getCivilityLabel($msgishtml ? 0 : 1), '__FIRSTNAME__' => $msgishtml ? dol_htmlentitiesbr($object->Firstname) : $object->Firstname, '__LASTNAME__' => $msgishtml ? dol_htmlentitiesbr($object->Lastname) : $object->Lastname, '__FULLNAME__' => $msgishtml ? dol_htmlentitiesbr($object->getFullName($langs)) : $object->getFullName($langs), '__COMPANY__' => $msgishtml ? dol_htmlentitiesbr($object->societe) : $object->societe, '__ADDRESS__' => $msgishtml ? dol_htmlentitiesbr($object->address) : $object->address, '__ZIP__' => $msgishtml ? dol_htmlentitiesbr($object->zip) : $object->zip, '__TOWN__' => $msgishtml ? dol_htmlentitiesbr($object->town) : $object->town, '__COUNTRY__' => $msgishtml ? dol_htmlentitiesbr($object->country) : $object->country, '__EMAIL__' => $msgishtml ? dol_htmlentitiesbr($object->email) : $object->email, '__NAISS__' => $msgishtml ? dol_htmlentitiesbr($birthday) : $birthday, '__PHOTO__' => $photo, '__LOGIN__' => $msgishtml ? dol_htmlentitiesbr($object->login) : $object->login, '__PASSWORD__' => $msgishtml ? dol_htmlentitiesbr($object->pass) : $object->pass, '__STATUS__' => $object->getLibStatus(), '__INFOS__' => $msgishtml ? dol_htmlentitiesbr($infos) : $infos, '__PRENOM__' => $msgishtml ? dol_htmlentitiesbr($object->Firstname) : $object->Firstname, '__NOM__' => $msgishtml ? dol_htmlentitiesbr($object->Lastname) : $object->Lastname, '__SOCIETE__' => $msgishtml ? dol_htmlentitiesbr($object->societe) : $object->societe, '__ADRESSE__' => $msgishtml ? dol_htmlentitiesbr($object->address) : $object->address, '__CP__' => $msgishtml ? dol_htmlentitiesbr($object->zip) : $object->zip, '__VILLE__' => $msgishtml ? dol_htmlentitiesbr($object->town) : $object->town, '__PAYS__' => $msgishtml ? dol_htmlentitiesbr($object->country) : $object->country);
     complete_substitutions_array($substitutionarray, $langs);
     $this->body = make_substitutions($text, $substitutionarray);
     return 1;
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:27,代码来源:adherent_card.class.php

示例3: showOutputField


//.........这里部分代码省略.........
         }
     } elseif ($type == 'radio') {
         $value = $params['options'][$value];
     } elseif ($type == 'checkbox') {
         $value_arr = explode(',', $value);
         $value = '';
         if (is_array($value_arr)) {
             foreach ($value_arr as $keyval => $valueval) {
                 $value .= $params['options'][$valueval] . '<br>';
             }
         }
     } elseif ($type == 'chkbxlst') {
         $value_arr = explode(',', $value);
         $param_list = array_keys($params['options']);
         $InfoFieldList = explode(":", $param_list[0]);
         $selectkey = "rowid";
         $keyList = 'rowid';
         if (count($InfoFieldList) >= 3) {
             $selectkey = $InfoFieldList[2];
             $keyList = $InfoFieldList[2] . ' as rowid';
         }
         $fields_label = explode('|', $InfoFieldList[1]);
         if (is_array($fields_label)) {
             $keyList .= ', ';
             $keyList .= implode(', ', $fields_label);
         }
         $sql = 'SELECT ' . $keyList;
         $sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList[0];
         if (strpos($InfoFieldList[4], 'extra') !== false) {
             $sql .= ' as main';
         }
         // $sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
         // $sql.= ' AND entity = '.$conf->entity;
         dol_syslog(get_class($this) . ':showOutputField:$type=chkbxlst', LOG_DEBUG);
         $resql = $this->db->query($sql);
         if ($resql) {
             $value = '';
             // value was used, so now we reste it to use it to build final output
             while ($obj = $this->db->fetch_object($resql)) {
                 // Several field into label (eq table:code|libelle:rowid)
                 $fields_label = explode('|', $InfoFieldList[1]);
                 if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
                     if (is_array($fields_label) && count($fields_label) > 1) {
                         foreach ($fields_label as $field_toshow) {
                             $translabel = '';
                             if (!empty($obj->{$field_toshow})) {
                                 $translabel = $langs->trans($obj->{$field_toshow});
                             }
                             if ($translabel != $field_toshow) {
                                 $value .= dol_trunc($translabel, 18) . '<BR>';
                             } else {
                                 $value .= $obj->{$field_toshow} . '<BR>';
                             }
                         }
                     } else {
                         $translabel = '';
                         if (!empty($obj->{$InfoFieldList}[1])) {
                             $translabel = $langs->trans($obj->{$InfoFieldList}[1]);
                         }
                         if ($translabel != $obj->{$InfoFieldList}[1]) {
                             $value .= dol_trunc($translabel, 18) . '<BR>';
                         } else {
                             $value .= $obj->{$InfoFieldList}[1] . '<BR>';
                         }
                     }
                 }
             }
         } else {
             dol_syslog(get_class($this) . '::showOutputField error ' . $this->db->lasterror(), LOG_WARNING);
         }
     } elseif ($type == 'link') {
         $out = '';
         // only if something to display (perf)
         if ($value) {
             $param_list = array_keys($params['options']);
             // 0 : ObjectName
             // 1 : classPath
             $InfoFieldList = explode(":", $param_list[0]);
             dol_include_once($InfoFieldList[1]);
             if ($InfoFieldList[0] && class_exists($InfoFieldList[0])) {
                 $object = new $InfoFieldList[0]($this->db);
                 $object->fetch($value);
                 $value = $object->getNomUrl(3);
             } else {
                 dol_syslog('Error bad setup of extrafield', LOG_WARNING);
                 $out .= 'Error bad setup of extrafield';
             }
         }
     } elseif ($type == 'text') {
         $value = dol_htmlentitiesbr($value);
     } else {
         $showsize = round($size);
         if ($showsize > 48) {
             $showsize = 48;
         }
     }
     //print $type.'-'.$size;
     $out = $value;
     return $out;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:101,代码来源:extrafields.class.php

示例4: write_file


//.........这里部分代码省略.........
             }
             // Situation invoice handling
             if ($object->situation_cycle_ref) {
                 $this->situationinvoice = True;
                 $progress_width = 14;
                 $this->posxtva -= $progress_width;
                 $this->posxup -= $progress_width;
                 $this->posxqty -= $progress_width;
                 $this->posxdiscount -= $progress_width;
                 $this->posxprogress -= $progress_width;
             }
             // New page
             $pdf->AddPage();
             if (!empty($tplidx)) {
                 $pdf->useTemplate($tplidx);
             }
             $pagenb++;
             $this->_pagehead($pdf, $object, 1, $outputlangs);
             $pdf->SetFont('', '', $default_font_size - 1);
             $pdf->MultiCell(0, 3, '');
             // Set interline to 3
             $pdf->SetTextColor(0, 0, 0);
             $tab_top = 90;
             $tab_top_newpage = empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10;
             $tab_height = 130;
             $tab_height_newpage = 150;
             // Incoterm
             $height_incoterms = 0;
             if ($conf->incoterm->enabled) {
                 $desc_incoterms = $object->getIncotermsForPDF();
                 if ($desc_incoterms) {
                     $tab_top = 88;
                     $pdf->SetFont('', '', $default_font_size - 1);
                     $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top - 1, dol_htmlentitiesbr($desc_incoterms), 0, 1);
                     $nexY = $pdf->GetY();
                     $height_incoterms = $nexY - $tab_top;
                     // Rect prend une longueur en 3eme param
                     $pdf->SetDrawColor(192, 192, 192);
                     $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_incoterms + 1);
                     $tab_top = $nexY + 6;
                     $height_incoterms += 4;
                 }
             }
             // Affiche notes
             $notetoshow = empty($object->note_public) ? '' : $object->note_public;
             if (!empty($conf->global->MAIN_ADD_SALE_REP_SIGNATURE_IN_NOTE)) {
                 // Get first sale rep
                 if (is_object($object->thirdparty)) {
                     $salereparray = $object->thirdparty->getSalesRepresentatives($user);
                     $salerepobj = new User($this->db);
                     $salerepobj->fetch($salereparray[0]['id']);
                     if (!empty($salerepobj->signature)) {
                         $notetoshow = dol_concatdesc($notetoshow, $salerepobj->signature);
                     }
                 }
             }
             if ($notetoshow) {
                 $tab_top = 88 + $height_incoterms;
                 $pdf->SetFont('', '', $default_font_size - 1);
                 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);
                 $nexY = $pdf->GetY();
                 $height_note = $nexY - $tab_top;
                 // Rect prend une longueur en 3eme param
                 $pdf->SetDrawColor(192, 192, 192);
                 $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
                 $tab_height = $tab_height - $height_note;
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:67,代码来源:pdf_crabe.modules.php

示例5: foreach

    print $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;type=' . $type, $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete');
}
print '<table border="0" width="100%" class="border">';
// Path of category
print '<tr><td width="20%" class="notopnoleft">';
$ways = $object->print_all_ways();
print $langs->trans("Ref") . '</td><td>';
print '<a href="' . DOL_URL_ROOT . '/categories/index.php?leftmenu=cat&type=' . $type . '">' . $langs->trans("Root") . '</a> >> ';
foreach ($ways as $way) {
    print $way . "<br>\n";
}
print '</td></tr>';
// Description
print '<tr><td class="notopnoleft">';
print $langs->trans("Description") . '</td><td>';
print dol_htmlentitiesbr($object->description);
print '</td></tr>';
// Color
print '<tr><td class="notopnoleft">';
print $langs->trans("Color") . '</td><td>';
print $formother->showColor($object->color);
print '</td></tr>';
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
// Note that $action and $object may have been modified by hook
if (empty($reshook) && !empty($extrafields->attribute_label)) {
    print $object->showOptionals($extrafields);
}
print '</table>';
dol_fiche_end();
/*
 * Boutons actions
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:viewcat.php

示例6: dolGetElementUrl

     }
     print '</td></tr>';
 }
 // Priority
 print '<tr><td class="nowrap" width="30%">' . $langs->trans("Priority") . '</td><td colspan="3">';
 print $object->priority ? $object->priority : '';
 print '</td></tr>';
 // Object linked
 if (!empty($object->fk_element) && !empty($object->elementtype)) {
     include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
     print '<tr><td>' . $langs->trans("LinkedObject") . '</td>';
     print '<td colspan="3">' . dolGetElementUrl($object->fk_element, $object->elementtype, 1) . '</td></tr>';
 }
 // Description
 print '<tr><td class="tdtop">' . $langs->trans("Description") . '</td><td colspan="3">';
 print dol_htmlentitiesbr($object->note);
 print '</td></tr>';
 // Other attributes
 $parameters = array('colspan' => ' colspan="3"', 'colspanvalue' => '3', 'id' => $object->id);
 $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
 // Note that $action and $object may have been modified by hook
 print '</table>';
 //Extra field
 if (empty($reshook) && !empty($extrafields->attribute_label)) {
     print '<br><br><table class="border" width="100%">';
     foreach ($extrafields->attribute_label as $key => $label) {
         if (isset($_POST["options_" . $key])) {
             if (is_array($_POST["options_" . $key])) {
                 // $_POST["options"] is an array but following code expects a comma separated string
                 $value = implode(",", $_POST["options_" . $key]);
             } else {
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:card.php

示例7:

					$product_static->type=$objp->fk_product_type;
					$product_static->id=$objp->fk_product;
					$product_static->ref=$objp->ref;
					$product_static->libelle=$objp->product_label;
					$text=$product_static->getNomUrl(1);
					$text.= ' - '.$objp->product_label;
					$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($objp->description));
					print $html->textwithtooltip($text,$description,3,'','',$i);

					// Show range
					print_date_range($objp->date_start,$objp->date_end);

					// Add description in form
					if ($conf->global->PRODUIT_DESC_IN_FORM)
					{
						print ($objp->description && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
					}
					print '</td>';
				}
				else
				{
					print '<td>';
					print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
					if (($objp->info_bits & 2) == 2)
					{
						print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->socid.'">';
						print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount");
						print '</a>';
						if ($objp->description)
						{
							if ($objp->description == '(CREDIT_NOTE)')
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:propal.php

示例8: write_file


//.........这里部分代码省略.........
             if (empty($conf->global->MAIN_DISABLE_FPDI) && !empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
                 $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output . '/' . $conf->global->MAIN_ADD_PDF_BACKGROUND);
                 $tplidx = $pdf->importPage(1);
             }
             $pdf->Open();
             $pagenb = 0;
             $pdf->SetDrawColor(128, 128, 128);
             //$pdf->AliasNbPages();
             $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
             $pdf->SetSubject($outputlangs->transnoentities("Sending"));
             $pdf->SetCreator("Dolibarr " . DOL_VERSION);
             $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
             $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref) . " " . $outputlangs->transnoentities("Sending"));
             if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
                 $pdf->SetCompression(false);
             }
             $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
             // Left, Top, Right
             // New page
             $pdf->AddPage();
             $pagenb++;
             $this->_pagehead($pdf, $object, 1, $outputlangs);
             $pdf->SetFont('', '', $default_font_size - 3);
             $pdf->MultiCell(0, 3, '');
             // Set interline to 3
             $pdf->SetTextColor(0, 0, 0);
             $tab_top = 52;
             $tab_top_newpage = empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10;
             $tab_height = $this->page_hauteur - $tab_top - $heightforfooter;
             $tab_height_newpage = $this->page_hauteur - $tab_top_newpage - $heightforfooter;
             // Affiche notes
             if (!empty($object->note_public)) {
                 $pdf->SetFont('', '', $default_font_size - 1);
                 $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
                 $nexY = $pdf->GetY();
                 $height_note = $nexY - $tab_top;
                 // Rect prend une longueur en 3eme param
                 $pdf->SetDrawColor(192, 192, 192);
                 $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
                 $tab_height = $tab_height - $height_note;
                 $tab_top = $nexY + 6;
             } else {
                 $height_note = 0;
             }
             $pdf->SetFillColor(240, 240, 240);
             $pdf->SetTextColor(0, 0, 0);
             $pdf->SetXY(10, $tab_top + 5);
             $iniY = $tab_top + 7;
             $curY = $tab_top + 7;
             $nexY = $tab_top + 7;
             $num = count($object->lines);
             // Loop on each lines
             for ($i = 0; $i < $num; $i++) {
                 $curY = $nexY;
                 $pdf->SetFont('', '', $default_font_size - 3);
                 $pdf->SetTextColor(0, 0, 0);
                 $pdf->setTopMargin($tab_top_newpage);
                 $pdf->setPageOrientation('', 1, $heightforfooter);
                 // The only function to edit the bottom margin of current page to set it.
                 $pageposbefore = $pdf->getPage();
                 // Description de la ligne produit
                 $libelleproduitservice = pdf_writelinedesc($pdf, $object, $i, $outputlangs, 90, 3, 50, $curY, 0, 1);
                 $nexY = $pdf->GetY();
                 $pageposafter = $pdf->getPage();
                 $pdf->setPage($pageposbefore);
                 $pdf->setTopMargin($this->marge_haute);
开发者ID:sergioeugenio,项目名称:Dolibarr37_berrypro_Modulo,代码行数:67,代码来源:pdf_expedition_pruebaA5.modules.php

示例9: write_file


//.........这里部分代码省略.........
             $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
             // Left, Top, Right
             $pdf->SetAutoPageBreak(1, 0);
             /*
             // Positionne $this->atleastonediscount si on a au moins une remise
             for ($i = 0 ; $i < $nblignes ; $i++)
             {
             if ($object->lines[$i]->remise_percent)
             {
             $this->atleastonediscount++;
             }
             }
             */
             // New page
             $pdf->AddPage();
             if (!empty($tplidx)) {
                 $pdf->useTemplate($tplidx);
             }
             $pagenb++;
             $this->_pagehead($pdf, $object, 1, $outputlangs);
             $pdf->SetFont('', '', $default_font_size - 1);
             $pdf->MultiCell(0, 3, '');
             // Set interline to 3
             $pdf->SetTextColor(0, 0, 0);
             $tab_top = 90;
             $tab_top_newpage = 50;
             $tab_height = 110;
             $tab_height_newpage = 150;
             // Affiche notes
             if (!empty($object->note_public)) {
                 $tab_top = 88;
                 $pdf->SetFont('', '', $default_font_size - 1);
                 // Dans boucle pour gerer multi-page
                 $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
                 $nexY = $pdf->GetY();
                 $height_note = $nexY - $tab_top;
                 // Rect prend une longueur en 3eme param
                 $pdf->SetDrawColor(192, 192, 192);
                 $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
                 $tab_height = $tab_height - $height_note;
                 $tab_top = $nexY + 6;
             } else {
                 $height_note = 0;
             }
             $iniY = $tab_top + 7;
             $curY = $tab_top + 7;
             $nexY = $tab_top + 7;
             // Boucle sur les lignes
             for ($i = 0; $i < $nblines; $i++) {
                 $curY = $nexY;
                 $pdf->SetFont('', '', $default_font_size - 1);
                 // Dans boucle pour gerer multi-page
                 // Description de la ligne produit
                 //$libelleproduitservice=pdf_getlinedesc($object,$i,$outputlangs);
                 pdf_writelinedesc($pdf, $object, $i, $outputlangs, 108, 3, $this->posxdesc - 1, $curY);
                 //$pdf->writeHTMLCell(108, 3, $this->posxdesc-1, $curY, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 1);
                 $pdf->SetFont('', '', $default_font_size - 1);
                 // On repositionne la police par defaut
                 $nexY = $pdf->GetY();
                 /*
                 // TVA
                 $pdf->SetXY($this->posxtva, $curY);
                 $pdf->MultiCell(10, 4, ($object->lines[$i]->tva_tx < 0 ? '*':'').abs($object->lines[$i]->tva_tx), 0, 'R');
                 
                 // Prix unitaire HT avant remise
                 $pdf->SetXY($this->posxup, $curY);
开发者ID:nrjacker4,项目名称:crm-php,代码行数:67,代码来源:pdf_typhon.modules.php

示例10: 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);
//.........这里部分代码省略.........
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:101,代码来源:sendings.lib.php

示例11: img_object

     print '<td>';
     // Affiche ligne produit
     $text = '<a href="' . DOL_URL_ROOT . '/product/card.php?id=' . $object->lines[$i]->fk_product . '">';
     if ($object->lines[$i]->fk_product_type == 1) {
         $text .= img_object($langs->trans('ShowService'), 'service');
     } else {
         $text .= img_object($langs->trans('ShowProduct'), 'product');
     }
     $text .= ' ' . $object->lines[$i]->product_ref . '</a>';
     $text .= ' - ' . $label;
     $description = !empty($conf->global->PRODUIT_DESC_IN_FORM) ? '' : dol_htmlentitiesbr($object->lines[$i]->description);
     //print $description;
     print $form->textwithtooltip($text, $description, 3, '', '', $i);
     print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end);
     if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) {
         print !empty($object->lines[$i]->description) && $object->lines[$i]->description != $object->lines[$i]->product_label ? '<br>' . dol_htmlentitiesbr($object->lines[$i]->description) : '';
     }
 } else {
     print "<td>";
     if ($object->lines[$i]->fk_product_type == 1) {
         $text = img_object($langs->trans('Service'), 'service');
     } else {
         $text = img_object($langs->trans('Product'), 'product');
     }
     if (!empty($object->lines[$i]->label)) {
         $text .= ' <strong>' . $object->lines[$i]->label . '</strong>';
         print $form->textwithtooltip($text, $object->lines[$i]->description, 3, '', '', $i);
     } else {
         print $text . ' ' . nl2br($object->lines[$i]->description);
     }
     print_date_range($objp->date_start, $objp->date_end);
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:card.php

示例12: explode

$toutsujet = explode(",", $object->sujet);
$listofanswers = array();
foreach ($toutsujet as $value) {
    $tmp = explode('@', $value);
    $listofanswers[] = array('label' => $tmp[0], 'format' => $tmp[1] ? $tmp[1] : 'checkbox');
}
$toutsujet = str_replace("°", "'", $toutsujet);
print '<div class="survey_invitation">' . $langs->trans("YouAreInivitedToVote") . '</div>';
print $langs->trans("OpenSurveyHowTo") . '<br><br>';
print '<div class="corps"> ' . "\n";
//affichage du titre du sondage
$titre = str_replace("\\", "", $object->titre);
print '<strong>' . dol_htmlentities($titre) . '</strong><br><br>' . "\n";
//affichage des commentaires du sondage
if ($object->commentaires) {
    print dol_htmlentitiesbr($object->commentaires);
    print '<br>' . "\n";
}
print '</div>' . "\n";
//The survey has expired, users can't vote or do any action
if (!$canbemodified) {
    print '<div style="text-align: center"><p>' . $langs->trans('SurveyExpiredInfo') . '</p></div>';
    llxFooterSurvey();
    $db->close();
    die;
}
print '<form name="formulaire" action="studs.php?sondage=' . $numsondage . '"' . '#bas" method="POST">' . "\n";
print '<input type="hidden" name="sondage" value="' . $numsondage . '"/>';
print '<div class="cadre"> ' . "\n";
print '<br><br>' . "\n";
// Start to show survey result
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:studs.php

示例13: print_date_range

     print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end);
     // Add description in form
     if (!empty($conf->global->PRODUIT_DESC_IN_FORM)) {
         print !empty($object->lines[$i]->desc) && $object->lines[$i]->desc != $fac->lines[$i]->product_label ? '<br>' . dol_htmlentitiesbr($object->lines[$i]->desc) : '';
     }
     print '</td>';
 } else {
     print '<td>';
     if ($type == 1) {
         $text = img_object($langs->trans('Service'), 'service');
     } else {
         $text = img_object($langs->trans('Product'), 'product');
     }
     if (!empty($object->lines[$i]->label)) {
         $text .= ' <strong>' . $object->lines[$i]->label . '</strong>';
         print $form->textwithtooltip($text, dol_htmlentitiesbr($object->lines[$i]->desc), 3, '', '', $i);
     } else {
         print $text . ' ' . nl2br($object->lines[$i]->desc);
     }
     // Show range
     print_date_range($object->lines[$i]->date_start, $object->lines[$i]->date_end);
     print '</td>';
 }
 print '<td align="right">' . price($object->lines[$i]->price) . '</td>';
 print '<td align="center">' . $object->lines[$i]->remise_percent . ' %</td>';
 print '<td align="center">' . $object->lines[$i]->qty . '</td>';
 if ($conf->global->PRODUCT_USE_UNITS) {
     print "<td align=\"left\">" . $object->lines[$i]->getLabelOfUnit() . "</td>";
 }
 print "</tr>\n";
 $i++;
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:fiche-rec.php

示例14: foreach

     // Message
     print '<tr><td width="25%" valign="top">' . $langs->trans("MailMessage") . '<br>';
     print '<br><i>' . $langs->trans("CommonSubstitutions") . ':<br>';
     foreach ($object->substitutionarray as $key => $val) {
         print $key . ' = ' . $langs->trans($val) . '<br>';
     }
     print '</i></td>';
     print '<td colspan="3" bgcolor="' . ($object->bgcolor ? (preg_match('/^#/', $object->bgcolor) ? '' : '#') . $object->bgcolor : 'white') . '">';
     if (empty($object->bgcolor) || strtolower($object->bgcolor) == 'ffffff') {
         $readonly = 1;
         // Editeur wysiwyg
         require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
         $doleditor = new DolEditor('body', $object->body, '', 320, 'dolibarr_mailings', '', false, true, empty($conf->global->FCKEDITOR_ENABLE_MAILING) ? 0 : 1, 20, 120, $readonly);
         $doleditor->Create();
     } else {
         print dol_htmlentitiesbr($object->body);
     }
     print '</td>';
     print '</tr>';
     print '</table>';
     print "<br>";
 } else {
     /*
      * Mailing en mode edition
      */
     dol_htmloutput_mesg($mesg);
     print '<table class="border" width="100%">';
     // Ref
     print '<tr><td width="25%">' . $langs->trans("Ref") . '</td><td colspan="3">' . $object->id . '</td></tr>';
     // Topic
     print '<tr><td width="25%">' . $langs->trans("MailTitle") . '</td><td colspan="3">' . $object->titre . '</td></tr>';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:fiche.php

示例15: dol_htmlentitiesbr

            print !empty($line->description) && $line->description != $line->product_label ? '<br>' . dol_htmlentitiesbr($line->description) : '';
        }
    } else {
        if ($type == 1) {
            $text = img_object($langs->trans('Service'), 'service');
        } else {
            $text = img_object($langs->trans('Product'), 'product');
        }
        if (!empty($line->label)) {
            $text .= ' <strong>' . $line->label . '</strong>';
            echo $form->textwithtooltip($text, dol_htmlentitiesbr($line->description), 3, '', '', $i, 0, !empty($line->fk_parent_line) ? img_picto('', 'rightarrow') : '');
        } else {
            if (!empty($line->fk_parent_line)) {
                echo img_picto('', 'rightarrow');
            }
            echo $text . ' ' . dol_htmlentitiesbr($line->description);
        }
        // Show range
        echo get_date_range($line->date_start, $line->date_end, $format);
    }
}
?>
	</td>
	<?php 
if ($object->element == 'supplier_proposal') {
    ?>
		<td class="linecolrefsupplier" align="right"><?php 
    echo $line->ref_fourn;
    ?>
</td>
	<?php 
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:objectline_view.tpl.php


注:本文中的dol_htmlentitiesbr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。