本文整理汇总了PHP中dol_escape_htmltag函数的典型用法代码示例。如果您正苦于以下问题:PHP dol_escape_htmltag函数的具体用法?PHP dol_escape_htmltag怎么用?PHP dol_escape_htmltag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dol_escape_htmltag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Adherent
print '<td class="liste_titre">';
$listetype=$membertypestatic->liste_array();
print $form->selectarray("type", $listetype, $_REQUEST["type"], 1, 0, 0, '', 0, 12);
print '</td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_email" value="'.$_REQUEST["search_email"].'" size="12"></td>';
print '<td class="liste_titre"> </td>';
print '<td align="right" colspan="2" class="liste_titre">';
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print ' ';
print '<input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
print '</td>';
print "</tr>\n";
print '</form>';
$var=True;
while ($i < $num && $i < $conf->liste_limit)
{
$objp = $db->fetch_object($resql);
$datefin=$db->jdate($objp->datefin);
$adh=new Adherent($db);
// Nom
示例2:
print '<form method="get" action="impayees.php">';
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input class="flat" size="8" type="text" name="search_ref" value="'.$_GET["search_ref"].'"></td>';
print '<td class="liste_titre">';
print '<input class="flat" size="8" type="text" name="search_ref_supplier" value="'.$_GET["search_ref_supplier"].'"></td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre"> </td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="6" name="search_societe" value="'.$_GET["search_societe"].'">';
print '</td><td class="liste_titre" align="right">';
print '<input class="flat" type="text" size="8" name="search_montant_ht" value="'.$_GET["search_montant_ht"].'">';
print '</td><td class="liste_titre" align="right">';
print '<input class="flat" type="text" size="8" name="search_montant_ttc" value="'.$_GET["search_montant_ttc"].'">';
print '</td><td class="liste_titre" colspan="2" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</td>';
print "</tr>\n";
print '</form>';
if ($num > 0)
{
$var=True;
$total_ht=0;
$total_ttc=0;
$total_paid=0;
while ($i < $num)
{
$objp = $db->fetch_object($result);
示例3: img_picto
}
// We are on a specific warehouse card, no filter on other should be possible
print '</td>';
print '<td class="liste_titre" align="left">';
if (empty($idproduct) || $idproduct < 0) {
print '<input class="flat" type="text" size="10" name="search_warehouse_destiny" value="' . $search_warehouse_destiny . '">';
}
// We are on a specific warehouse card, no filter on other should be possible
print '</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" size="6" name="search_user" value="' . $search_user . '">';
print '</td>';
print '<td class="liste_titre" align="right">';
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" name="button_search" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
print ' ';
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" name="button_removefilter" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
print '</td>';
print "</tr>\n";
print '</form>';
$arrayofuniqueproduct = array();
$var = True;
while ($i < min($num, $conf->liste_limit)) {
$objp = $db->fetch_object($resql);
$entrepot_origen = $obj->stock;
$entrepot_destino = $obj->stock;
$entrepot_id_origen = $obj->entrepot_id;
$entrepot_id_destino = $obj->entrepot_id;
// Checkpoin: evaluar las transferencias
if (substr($objp->label, 0, 6) == 'Transf') {
if ((double) $objp->value < 0) {
$entrepot_origen = $objp->stock;
示例4: dol_escape_htmltag
echo '<a class="alogin" href="' . DOL_URL_ROOT . '/user/passwordforgotten.php' . $moreparam . '">(';
echo $langs->trans('PasswordForgotten');
if (!$helpcenterlink) {
echo ')';
}
echo '</a>';
}
if ($forgetpasslink && $helpcenterlink) {
echo ' - ';
}
if ($helpcenterlink) {
$url = DOL_URL_ROOT . '/support/index.php' . $moreparam;
if (!empty($conf->global->MAIN_HELPCENTER_LINKTOUSE)) {
$url = $conf->global->MAIN_HELPCENTER_LINKTOUSE;
}
echo '<a class="alogin" href="' . dol_escape_htmltag($url) . '" target="_blank">';
if (!$forgetpasslink) {
echo '(';
}
echo $langs->trans('NeedHelpCenter');
echo ')</a>';
}
echo '</div>';
}
if (isset($conf->file->main_authentication) && preg_match('/openid/', $conf->file->main_authentication)) {
$langs->load("users");
//if (! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $url=
echo '<br>';
echo '<div align="center" style="margin-top: 4px;">';
$url = $conf->global->MAIN_AUTHENTICATION_OPENID_URL;
if (!empty($url)) {
示例5: draw_jflot
/**
* Build a graph onto disk using JFlot library. Input when calling this method should be:
* $this->data = array(array( 0=>'labelxA', 1=>yA), array('labelxB',yB)); or
* $this->data = array(array('label'=>'labelxA','data'=>yA), array('labelxB',yB)); // TODO Syntax not supported. Removed when dol_print_graph_removed
* $this->data = array(array(0=>'labelxA',1=>yA1,...,n=>yAn), array('labelxB',yB1,...yBn)); // when there is n series to show for each x
* $this->legend= array("Val1",...,"Valn"); // list of n series name
* $this->type = array('bars',...'lines'); or array('pie')
* $this->mode = 'depth' ???
* $this->bgcolorgrid
* $this->datacolor
*
* @param string $file Image file name to use to save onto disk (also used as javascript unique id)
* @param string $fileurl Url path to show image if saved onto disk
* @return void
*/
private function draw_jflot($file, $fileurl)
{
global $artichow_defaultfont;
dol_syslog(get_class($this) . "::draw_jflot this->type=" . join(',', $this->type));
if (empty($this->width) && empty($this->height)) {
print 'Error width or height not set';
return;
}
$legends = array();
$nblot = count($this->data[0]) - 1;
// -1 to remove legend
if ($nblot < 0) {
dol_print_error('Bad value for property ->data. Must be set by mydolgraph->SetData before callinf mydolgrapgh->draw');
}
$firstlot = 0;
// Works with line but not with bars
//if ($nblot > 2) $firstlot = ($nblot - 2); // We limit nblot to 2 because jflot can't manage more than 2 bars on same x
$i = $firstlot;
$serie = array();
while ($i < $nblot) {
$values = array();
// Array with horizontal y values (specific values of a serie) for each abscisse x
$serie[$i] = "var d" . $i . " = [];\n";
// Fill array $values
$x = 0;
foreach ($this->data as $valarray) {
$legends[$x] = $valarray[0];
$values[$x] = is_numeric($valarray[$i + 1]) ? $valarray[$i + 1] : null;
$x++;
}
// TODO Avoid push by adding generated long array...
if (isset($this->type[$firstlot]) && $this->type[$firstlot] == 'pie') {
foreach ($values as $x => $y) {
if (isset($y)) {
$serie[$i] .= 'd' . $i . '.push({"label":"' . dol_escape_js($legends[$x]) . '", "data":' . $y . '});' . "\n";
}
}
} else {
foreach ($values as $x => $y) {
if (isset($y)) {
$serie[$i] .= 'd' . $i . '.push([' . $x . ', ' . $y . ']);' . "\n";
}
}
}
unset($values);
$i++;
}
$tag = dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file), '_', array('-', '.'))));
$this->_stringtoshow = '<!-- Build using ' . $this->_library . ' -->' . "\n";
if (!empty($this->title)) {
$this->_stringtoshow .= '<div align="center" class="dolgraphtitle' . (empty($this->cssprefix) ? '' : ' dolgraphtitle' . $this->cssprefix) . '">' . $this->title . '</div>';
}
$this->_stringtoshow .= '<div id="placeholder_' . $tag . '" style="width:' . $this->width . 'px;height:' . $this->height . 'px;" class="dolgraph' . (empty($this->cssprefix) ? '' : ' dolgraph' . $this->cssprefix) . '"></div>' . "\n";
$this->_stringtoshow .= '<script id="' . $tag . '">' . "\n";
$this->_stringtoshow .= '$(function () {' . "\n";
$i = $firstlot;
while ($i < $nblot) {
$this->_stringtoshow .= $serie[$i];
$i++;
}
$this->_stringtoshow .= "\n";
// Special case for Graph of type 'pie'
if (isset($this->type[$firstlot]) && $this->type[$firstlot] == 'pie') {
$datacolor = array();
foreach ($this->datacolor as $val) {
$datacolor[] = "#" . sprintf("%02x%02x%02x", $val[0], $val[1], $val[2]);
}
$urltemp = '';
// TODO Add support for url link into labels
$showlegend = $this->showlegend;
$showpointvalue = $this->showpointvalue;
$showpercent = $this->showpercent;
$this->_stringtoshow .= '
function plotWithOptions_' . $tag . '() {
$.plot($("#placeholder_' . $tag . '"), d0,
{
series: {
pie: {
show: true,
radius: 3/4,
label: {
show: true,
radius: 3/4,
formatter: function(label, series) {
var percent=Math.round(series.percent);
//.........这里部分代码省略.........
示例6: dol_fiche_end
case "submit":
if ($key['enabled']) {
$submit_enabled = 1;
}
break;
}
$i++;
}
} else {
print $langs->trans('PleaseSelectaDriverfromList');
}
print '</table>';
dol_fiche_end();
if (!empty($driver)) {
if ($submit_enabled) {
print '<div class="center"><input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans("Modify")) . '"></div>';
}
}
print '</form>';
}
if ($mode == 'config' && $user->admin) {
dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic');
print $langs->trans("PrintingDesc") . "<br><br>\n";
print '<table class="noborder" width="100%">' . "\n";
$var = true;
print '<tr class="liste_titre">';
print '<th>' . $langs->trans("Description") . '</th>';
print '<th class="center">' . $langs->trans("Active") . '</th>';
print '<th class="center">' . $langs->trans("Setup") . '</th>';
print '<th class="center">' . $langs->trans("TargetedPrinter") . '</th>';
print "</tr>\n";
示例7: dol_escape_htmltag
print $form->select_date($birthday, 'birth', 0, 0, 1, "newmember");
print '</td></tr>' . "\n";
// Photo
print '<tr><td>' . $langs->trans("URLPhoto") . '</td><td><input type="text" name="photo" size="40" value="' . dol_escape_htmltag(GETPOST('photo')) . '"></td></tr>' . "\n";
// Public
print '<tr><td>' . $langs->trans("Public") . '</td><td><input type="checkbox" name="public" value="1" checked></td></tr>' . "\n";
// Extrafields
foreach ($extrafields->attribute_label as $key => $value) {
print "<tr><td>" . $value . "</td><td>";
print $extrafields->showInputField($key, GETPOST('options_' . $key));
print "</td></tr>\n";
}
// Comments
print '<tr>';
print '<td valign="top">' . $langs->trans("Comments") . '</td>';
print '<td valign="top"><textarea name="comment" wrap="soft" cols="60" rows="' . ROWS_4 . '">' . dol_escape_htmltag(GETPOST('comment')) . '</textarea></td>';
print '</tr>' . "\n";
// Add specific fields used by Dolibarr foundation for example
if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) {
$arraybudget = array('50' => '<= 100 000', '100' => '<= 200 000', '200' => '<= 500 000', '300' => '<= 1 500 000', '600' => '<= 3 000 000', '1000' => '<= 5 000 000', '2000' => '5 000 000+');
print '<tr id="trbudget" class="trcompany"><td>' . $langs->trans("TurnoverOrBudget") . ' <FONT COLOR="red">*</FONT></td><td>';
print $form->selectarray('budget', $arraybudget, GETPOST('budget'), 1);
print ' € or $';
print '<script type="text/javascript">
jQuery(document).ready(function () {
initturnover();
jQuery("#morphy").click(function() {
initturnover();
});
jQuery("#budget").change(function() {
if (jQuery("#budget").val() > 0) { jQuery(".amount").val(jQuery("#budget").val()); }
示例8:
$var = !$var;
// Rupture detectee, on recupere objMod
$objMod=$modules[$obj->module];
$picto=($objMod->picto?$objMod->picto:'generic');
if ($caneditperms && (! $objMod->rights_admin_allowed || ! $fuser->admin))
{
// On affiche ligne pour modifier droits
print '<tr '. $bc[$var].'>';
print '<td nowrap="nowrap">'.img_object('',$picto).' '.$objMod->getName();
print '<a name="'.$objMod->getName().'"> </a></td>';
print '<td align="center" nowrap="nowrap">';
print '<a title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="perms.php?id='.$fuser->id.'&action=addrights&module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("All")."</a>";
print '/';
print '<a title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="perms.php?id='.$fuser->id.'&action=delrights&module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("None")."</a>";
print '</td>';
print '<td colspan="2"> </td>';
print '</tr>'."\n";
}
}
print '<tr '. $bc[$var].'>';
// Picto and label of permission
print '<td>'.img_object('',$picto).' '.$objMod->getName();
print '</td>';
// Permission and tick
if ($fuser->admin && $objMod->rights_admin_allowed)
{
示例9: print_titre
$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>';
}
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="100" colspan="2">' . $langs->trans("Ref") . '</td>';
print '<td width="100" align="center">' . $langs->trans("Date") . '</td>';
print '<td>' . $langs->trans("ThirdParty") . '</td>';
if (empty($value['disableamount'])) {
print '<td align="right" width="120">' . $langs->trans("AmountHT") . '</td>';
} else {
print '<td width="120"></td>';
}
if (empty($value['disableamount'])) {
print '<td align="right" width="120">' . $langs->trans("AmountTTC") . '</td>';
示例10: checkCoords
print '<!-- Form to crop -->'."\n";
print '<fieldset id="redim_file">';
print '<legend>'.$langs->trans("Recenter").'</legend>';
print $langs->trans("DefineNewAreaToPick").'...<br>';
print '<br><center>';
print '<div style="border: 1px solid #888888; width: '.$width.'px;"><img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&file='.$original_file.'" alt="" id="cropbox" /></div>';
print '</center><br>';
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$_GET['id'].'" method="post" onsubmit="return checkCoords();">
<div class="jc_coords">
'.$langs->trans("NewSizeAfterCropping").':
<label>X1 <input type="text" size="4" id="x" name="x" /></label>
<label>Y1 <input type="text" size="4" id="y" name="y" /></label>
<label>X2 <input type="text" size="4" id="x2" name="x2" /></label>
<label>Y2 <input type="text" size="4" id="y2" name="y2" /></label>
<label>W <input type="text" size="4" id="w" name="w" /></label>
<label>H <input type="text" size="4" id="h" name="h" /></label>
</div>
<input type="hidden" id="file" name="file" value="'.urlencode($original_file).'" />
<input type="hidden" id="action" name="action" value="confirm_crop" />
<input type="hidden" id="product" name="product" value="'.$_REQUEST['id'].'" />
<input type="hidden" name="id" value="'.$_REQUEST['id'].'" />
<br><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("Recenter")).'" />
</form>';
print '</fieldset>';
}
llxFooter('$Date: 2011/07/31 23:45:15 $ - $Revision: 1.14 $');
?>
示例11: showBox
/**
*Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
*
* @param array $head Array with properties of box title
* @param array $contents Array with properties of box lines
*
* @return void
*/
function showBox($head, $contents)
{
global $langs, $user, $conf;
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
$MAXLENGTHBOX = 60;
// Mettre 0 pour pas de limite
$bcx = array();
$bcx[0] = 'class="box_pair"';
$bcx[1] = 'class="box_impair"';
$var = false;
$cachetime = 900;
// 900 : 15mn
$cachedir = DOL_DATA_ROOT . '/boxes/temp';
$fileid = get_class($this) . 'id-' . $this->box_id . '-e' . $conf->entity . '-u' . $user->id . '-s' . $user->societe_id . '.cache';
$filename = '/box-' . $fileid;
$refresh = dol_cache_refresh($cachedir, $filename, $cachetime);
$out = '';
if ($refresh) {
dol_syslog(get_class($this) . '::showBox');
// Define nbcol and nblines of the box to show
$nbcol = 0;
if (isset($contents[0])) {
$nbcol = count($contents[0]);
}
$nblines = count($contents);
$out .= "\n<!-- Box " . get_class($this) . " start -->\n";
$out .= '<div class="box" id="boxto_' . $this->box_id . '">' . "\n";
if (!empty($head['text']) || !empty($head['sublink']) || !empty($head['subpicto']) || $nblines) {
$out .= '<table summary="boxtable' . $this->box_id . '" width="100%" class="noborder boxtable">' . "\n";
}
// Show box title
if (!empty($head['text']) || !empty($head['sublink']) || !empty($head['subpicto'])) {
//$out.= '<div id="boxto_'.$this->box_id.'_title">'."\n";
//$out.= '<table summary="boxtabletitle'.$this->box_id.'" width="100%" class="noborder">'."\n";
$out .= '<tr class="box_titre">';
$out .= '<td';
if ($nbcol > 0) {
$out .= ' colspan="' . $nbcol . '"';
}
$out .= '>';
if ($conf->use_javascript_ajax) {
$out .= '<table summary="" class="nobordernopadding" width="100%"><tr><td>';
}
if (!empty($head['text'])) {
$s = dol_trunc($head['text'], isset($head['limit']) ? $head['limit'] : $MAXLENGTHBOX);
$out .= $s;
}
$out .= ' ';
if (!empty($head['sublink'])) {
$out .= '<a href="' . $head['sublink'] . '"' . (empty($head['target']) ? ' target="_blank"' : '') . '>';
}
if (!empty($head['subpicto'])) {
$out .= img_picto($head['subtext'], $head['subpicto'], 'class="' . (empty($head['subclass']) ? '' : $head['subclass']) . '" id="idsubimg' . $this->boxcode . '"');
}
if (!empty($head['sublink'])) {
'</a>';
}
if (!empty($conf->use_javascript_ajax)) {
$out .= '</td><td class="nocellnopadd boxclose nowrap">';
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
$out .= img_picto($langs->trans("MoveBox", $this->box_id), 'grip_title', 'class="boxhandle hideonsmartphone" style="cursor:move;"');
$out .= img_picto($langs->trans("Close2", $this->box_id), 'close_title', 'class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose' . $this->box_id . '"');
$label = $head['text'];
if (!empty($head['graph'])) {
$label .= ' (' . $langs->trans("Graph") . ')';
}
$out .= '<input type="hidden" id="boxlabelentry' . $this->box_id . '" value="' . dol_escape_htmltag($label) . '">';
$out .= '</td></tr></table>';
}
$out .= '</td>';
$out .= "</tr>\n";
//$out.= "</table>\n";
//$out.= "</div>\n";
}
// Show box lines
if ($nblines) {
//$out.= '<table summary="boxtablelines'.$this->box_id.'" width="100%" class="noborder">'."\n";
// Loop on each record
for ($i = 0, $n = $nblines; $i < $n; $i++) {
if (isset($contents[$i])) {
$var = !$var;
// TR
if (isset($contents[$i][0]['tr'])) {
$out .= '<tr valign="top" ' . $contents[$i][0]['tr'] . '>';
} else {
$out .= '<tr valign="top" ' . $bcx[$var] . '>';
}
// Loop on each TD
$nbcolthisline = count($contents[$i]);
for ($j = 0; $j < $nbcolthisline; $j++) {
// Define tdparam
$tdparam = '';
//.........这里部分代码省略.........
示例12: img_picto
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
print img_picto($langs->trans("Enabled"),'on');
print '</a>';
//}
//else
//{
// print img_picto($langs->trans("Enabled"),'on');
//}
print "</td>";
}
else
{
if (versioncompare($module->phpmin,versionphparray()) > 0)
{
print "<td align=\"center\">\n";
print img_picto(dol_escape_htmltag($langs->trans("ErrorModuleRequirePHPVersion",join('.',$module->phpmin))),'off');
print "</td>";
}
else
{
print "<td align=\"center\">\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
print "</td>";
}
}
// Info
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
if ($modele->type == 'pdf')
{
示例13: GETPOST
});
</script>';
// Checkbox to select from free text
print '<input id="fillmanually" type="radio" ' . (!GETPOST("selectorforbarcode") || GETPOST("selectorforbarcode") == 'fillmanually' ? 'checked ' : '') . 'name="selectorforbarcode" value="fillmanually" class="radiobarcodeselect"> ' . $langs->trans("FillBarCodeTypeAndValueManually") . ' ';
print '<br>';
print '<input id="fillfromproduct" type="radio" ' . (GETPOST("selectorforbarcode") == 'fillfromproduct' ? 'checked ' : '') . 'name="selectorforbarcode" value="fillfromproduct" class="radiobarcodeselect"> ' . $langs->trans("FillBarCodeTypeAndValueFromProduct") . ' ';
print '<br>';
print '<div class="showforproductselector">';
$form->select_produits(GETPOST('productid'), 'productid', '');
print ' <input type="submit" id="submitproduct" name="submitproduct" class="button" value="' . dol_escape_htmltag($langs->trans("GetBarCode")) . '">';
print '</div>';
print '<input id="fillfromthirdparty" type="radio" ' . (GETPOST("selectorforbarcode") == 'fillfromthirdparty' ? 'checked ' : '') . 'name="selectorforbarcode" value="fillfromthirdparty" class="radiobarcodeselect"> ' . $langs->trans("FillBarCodeTypeAndValueFromThirdParty") . ' ';
print '<br>';
print '<div class="showforthirdpartyselector">';
print $form->select_company(GETPOST('socid'), 'socid', '', 1, 0, 0, array(), 0, 'minwidth300');
print ' <input type="submit" id="submitthirdparty" name="submitthirdparty" class="button showforthirdpartyselector" value="' . dol_escape_htmltag($langs->trans("GetBarCode")) . '">';
print '</div>';
print '<br>';
if ($producttmp->id > 0) {
print $langs->trans("BarCodeDataForProduct", '') . ' ' . $producttmp->getNomUrl(1) . '<br>';
}
if ($thirdpartytmp->id > 0) {
print $langs->trans("BarCodeDataForThirdparty", '') . ' ' . $thirdpartytmp->getNomUrl(1) . '<br>';
}
print '<div class="tagtable">';
// Barcode type
print ' <div class="tagtr">';
print ' <div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
print $langs->trans("BarcodeType") . ' ';
print '</div><div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 300px;">';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formbarcode.class.php';
示例14: getNomUrl
/**
* Return clicable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param string $option Where point the link
* @param int $max Maxlength of ref
* @param int $short 1=Return just URL
* @param string $moretitle Add more text to title tooltip
* @return string String with URL
*/
function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '')
{
global $langs, $conf;
$result = '';
if ($option == 'withdraw') {
$url = DOL_URL_ROOT . '/compta/facture/prelevement.php?facid=' . $this->id;
} else {
$url = DOL_URL_ROOT . '/compta/facture.php?facid=' . $this->id;
}
if ($short) {
return $url;
}
$picto = 'bill';
if ($this->type == self::TYPE_REPLACEMENT) {
$picto .= 'r';
}
// Replacement invoice
if ($this->type == self::TYPE_CREDIT_NOTE) {
$picto .= 'a';
}
// Credit note
if ($this->type == self::TYPE_DEPOSIT) {
$picto .= 'd';
}
// Deposit invoice
$label = '<u>' . $langs->trans("ShowInvoice") . '</u>';
if (!empty($this->ref)) {
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
}
if (!empty($this->ref_client)) {
$label .= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client;
}
if (!empty($this->total_ht)) {
$label .= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
}
if (!empty($this->total_tva)) {
$label .= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
}
if (!empty($this->total_ttc)) {
$label .= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
}
if ($this->type == self::TYPE_REPLACEMENT) {
$label = $langs->transnoentitiesnoconv("ShowInvoiceReplace") . ': ' . $this->ref;
}
if ($this->type == self::TYPE_CREDIT_NOTE) {
$label = $langs->transnoentitiesnoconv("ShowInvoiceAvoir") . ': ' . $this->ref;
}
if ($this->type == self::TYPE_DEPOSIT) {
$label = $langs->transnoentitiesnoconv("ShowInvoiceDeposit") . ': ' . $this->ref;
}
if ($this->type == self::TYPE_SITUATION) {
$label = $langs->transnoentitiesnoconv("ShowInvoiceSituation") . ': ' . $this->ref;
}
if ($moretitle) {
$label .= ' - ' . $moretitle;
}
$linkstart = '<a href="' . $url . '" title="' . dol_escape_htmltag($label, 1) . '" class="classfortooltip">';
$linkend = '</a>';
if ($withpicto) {
$result .= $linkstart . img_object($max ? dol_trunc($label, $max) : $label, $picto, 'class="classfortooltip"') . $linkend;
}
if ($withpicto && $withpicto != 2) {
$result .= ' ';
}
if ($withpicto != 2) {
$result .= $linkstart . ($max ? dol_trunc($this->ref, $max) : $this->ref) . $linkend;
}
return $result;
}
示例15:
$url=$_SERVER["PHP_SELF"].'?action=gotodemo&urlfrom='.urlencode($_SERVER["PHP_SELF"]);
$urlwithmod=$url.'&demochoice='.$profilearray['key'];
// Should work with DOL_URL_ROOT='' or DOL_URL_ROOT='/dolibarr'
//print "xx".$_SERVER["PHP_SELF"].' '.DOL_URL_ROOT.'<br>';
$urlfrom=preg_replace('/^'.preg_quote(DOL_URL_ROOT,'/').'/i','',$_SERVER["PHP_SELF"]);
//print $urlfrom;
if (! empty($profilearray['url'])) $urlwithmod=$profilearray['url'];
//if ($i % $NBOFCOLS == 0) print '<tr>';
//print '<tr>';
//print '<td>'."\n";
print '<form method="POST" name="form'.$profilearray['key'].'" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<input type="hidden" name="action" value="gotodemo">'."\n";
print '<input type="hidden" name="urlfrom" value="'.dol_escape_htmltag($urlfrom).'">'."\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
print '<input type="hidden" name="username" value="demo">'."\n";
print '<input type="hidden" name="dol_hide_topmenu" value="'.$conf->dol_hide_topmenu.'">'."\n";
print '<input type="hidden" name="dol_hide_leftmenu" value="'.$conf->dol_hide_leftmenu.'">'."\n";
print '<input type="hidden" name="dol_optimize_smallscreen" value="'.$conf->dol_optimize_smallscreen.'">'."\n";
print '<input type="hidden" name="dol_no_mouse_hover" value="'.$conf->dol_no_mouse_hover.'">'."\n";
print '<input type="hidden" name="dol_use_jmobile" value="'.$conf->dol_use_jmobile.'">'."\n";
print '<table summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" style="font-size:14px;" width="100%" class="CTable CTableRow'.($i%2==0?'1':'0').'">'."\n";
// Title
print '<tr>';
print '<td width="50" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img src="'.$profilearray['icon'].'" width="48" border="0" alt="Demo '.$profilearray['label'].'"></a></td>';
print '<td id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($profilearray['label']).'</a></td>';
print '</tr>'."\n";
// Modules