本文整理汇总了PHP中img_object函数的典型用法代码示例。如果您正苦于以下问题:PHP img_object函数的具体用法?PHP img_object怎么用?PHP img_object使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了img_object函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: confirmMessage
/**
* Return message that say how many notification (and to which email) will occurs on requested event.
* This is to show confirmation messages before event is recorded.
*
* @param string $action Id of action in llx_c_action_trigger
* @param int $socid Id of third party
* @param Object $object Object the notification is about
* @return string Message
*/
function confirmMessage($action, $socid, $object)
{
global $langs;
$langs->load("mails");
$listofnotiftodo = $this->getNotificationsArray($action, $socid, $object);
$nb = count($listofnotiftodo);
if ($nb <= 0) {
$texte = img_object($langs->trans("Notifications"), 'email') . ' ' . $langs->trans("NoNotificationsWillBeSent");
}
if ($nb == 1) {
$texte = img_object($langs->trans("Notifications"), 'email') . ' ' . $langs->trans("ANotificationsWillBeSent");
}
if ($nb >= 2) {
$texte = img_object($langs->trans("Notifications"), 'email') . ' ' . $langs->trans("SomeNotificationsWillBeSent", $nb);
}
$i = 0;
foreach ($listofnotiftodo as $key => $val) {
if ($i) {
$texte .= ', ';
} else {
$texte .= ' (';
}
if ($val['isemailvalid']) {
$texte .= $val['email'];
} else {
$texte .= $val['emaildesc'];
}
$i++;
}
if ($i) {
$texte .= ')';
}
return $texte;
}
示例2: confirmMessage
/**
* \brief Renvoie le message signalant les notifications qui auront lieu sur
* un evenement pour affichage dans texte de confirmation evenement.
* \param action Id of action in llx_c_action_trigger
* \param socid Id of third party
* \return string Message
*/
function confirmMessage($action,$socid)
{
global $langs;
$langs->load("mails");
$nb=$this->countDefinedNotifications($action,$socid);
if ($nb <= 0) $texte=img_object($langs->trans("Notifications"),'email').' '.$langs->trans("NoNotificationsWillBeSent");
if ($nb == 1) $texte=img_object($langs->trans("Notifications"),'email').' '.$langs->trans("ANotificationsWillBeSent");
if ($nb >= 2) $texte=img_object($langs->trans("Notifications"),'email').' '.$langs->trans("SomeNotificationsWillBeSent",$nb);
return $texte;
}
示例3: printSearchForm
/** Overloading the doActions function : replacing the parent's function with the one below
* @param parameters meta datas of the hook (context, etc...)
* @param object the object you want to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
* @param action current action (if set). Generally create or edit or null
* @return void
*/
function printSearchForm($parameters, &$object, &$action, $hookmanager)
{
global $langs, $db;
if (in_array('searchform', explode(':', $parameters['context']))) {
$langs->load('searcheverywhere@searcheverywhere');
$res = '';
$res .= '<form method="post" action="' . dol_buildpath('/searcheverywhere/search.php', 1) . '">';
$res .= '<div class="menu_titre menu_titre_search"><label for="sew_keyword"><a class="vsmenu" href="' . dol_buildpath('/searcheverywhere/search.php', 1) . '">' . img_object($langs->trans('searcheverywhere'), 'searcheverywhere@searcheverywhere') . ' ' . $langs->trans('Searcheverywhere') . '</a></label></div>';
$res .= ' <input type="text" size="10" name="keyword" title="' . $langs->trans('Keyword') . '" class="flat" id="sew_keyword" /><input type="submit" value="' . $langs->trans('Go') . '" class="button" style="padding-top: 4px; padding-bottom: 4px; padding-left: 6px; padding-right: 6px">
</form>';
$this->resprints = $res;
}
return 0;
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_searcheverywhere,代码行数:20,代码来源:actions_searcheverywhere.class.php
示例4: printBookmarksList
/**
* Add area with bookmarks in menu
*
* @param DoliDb $aDb Database handler
* @param Translate $aLangs Object lang
* @return string
*/
function printBookmarksList($aDb, $aLangs)
{
global $conf, $user;
$db = $aDb;
$langs = $aLangs;
require_once DOL_DOCUMENT_ROOT . '/bookmarks/class/bookmark.class.php';
if (!isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) {
$conf->global->BOOKMARKS_SHOW_IN_MENU = 5;
}
$bookm = new Bookmark($db);
$langs->load("bookmarks");
$url = $_SERVER["PHP_SELF"] . (!empty($_SERVER["QUERY_STRING"]) ? '?' . $_SERVER["QUERY_STRING"] : '');
$ret = '';
// Menu bookmark
$ret .= '<div class="menu_titre">';
$ret .= '<table class="nobordernopadding" width="100%" summary="bookmarkstable"><tr><td>';
$ret .= '<a class="vmenu" href="' . DOL_URL_ROOT . '/bookmarks/liste.php">' . $langs->trans('Bookmarks') . '</a>';
$ret .= '</td><td align="right">';
if ($user->rights->bookmark->creer) {
$ret .= '<a class="vsmenu" href="' . DOL_URL_ROOT . '/bookmarks/fiche.php?action=create&urlsource=' . urlencode($url) . '&url=' . urlencode($url) . '">';
//$ret.=img_picto($langs->trans('AddThisPageToBookmarks'),'edit_add').' ';
$ret .= img_object($langs->trans('AddThisPageToBookmarks'), 'bookmark');
$ret .= '</a>';
}
$ret .= '</td></tr></table>';
$ret .= '</div>';
$ret .= '<div class="menu_top"></div>' . "\n";
// Menu with all bookmarks
if (!empty($conf->global->BOOKMARKS_SHOW_IN_MENU)) {
$sql = "SELECT rowid, title, url, target FROM " . MAIN_DB_PREFIX . "bookmark";
$sql .= " WHERE (fk_user = " . $user->id . " OR fk_user is NULL OR fk_user = 0)";
$sql .= " AND entity = " . $conf->entity;
$sql .= " ORDER BY position";
if ($resql = $db->query($sql)) {
$i = 0;
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && ($obj = $db->fetch_object($resql))) {
$ret .= '<div class="menu_contenu"><a class="vsmenu" title="' . $obj->title . '" href="' . $obj->url . '"' . ($obj->target == 1 ? ' target="_blank"' : '') . '>';
$ret .= ' ' . img_object('', 'bookmark') . ' ';
$ret .= dol_trunc($obj->title, 20) . '</a><br></div>';
$i++;
}
} else {
dol_print_error($db);
}
}
$ret .= '<div class="menu_end"></div>';
return $ret;
}
示例5: img_object
$text.= ' '.$delivery->lines[$i]->ref.'</a>';
$text.= ' - '.$delivery->lines[$i]->label;
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($delivery->lines[$i]->description));
//print $description;
print $html->textwithtooltip($text,$description,3,'','',$i);
print_date_range($delivery->lines[$i]->date_start,$delivery->lines[$i]->date_end);
if ($conf->global->PRODUIT_DESC_IN_FORM)
{
print ($delivery->lines[$i]->description && $delivery->lines[$i]->description!=$delivery->lines[$i]->label)?'<br>'.dol_htmlentitiesbr($delivery->lines[$i]->description):'';
}
}
else
{
print "<td>";
if ($delivery->lines[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service');
else $text = img_object($langs->trans('Product'),'product');
print $text.' '.nl2br($delivery->lines[$i]->description);
print_date_range($objp->date_start,$objp->date_end);
print "</td>\n";
}
print '<td align="center">'.$delivery->lines[$i]->qty_asked.'</td>';
print '<td align="center">'.$delivery->lines[$i]->qty_shipped.'</td>';
print "</tr>";
$i++;
}
print "</table>\n";
示例6: img_object
?>
">
<?php
if ($line->fk_product > 0) {
?>
<a href="<?php
echo DOL_URL_ROOT . '/product/card.php?id=' . $line->fk_product;
?>
">
<?php
if ($line->product_type == 1) {
echo img_object($langs->trans('ShowService'), 'service');
} else {
print img_object($langs->trans('ShowProduct'), 'product');
}
echo ' ' . $line->ref;
?>
</a>
<?php
echo ' - ' . nl2br($line->product_label);
?>
<br>
<?php
}
?>
<?php
示例7: while
$i = 0;
while ($i < min($num, $max)) {
$objp = $db->fetch_object($resql);
$var = !$var;
print "<tr " . $bc[$var] . ">";
print '<td>' . dol_print_date($db->jdate($objp->datem), 'dayhour') . '</td>';
print "<td><a href=\"../card.php?id={$objp->rowid}\">";
print img_object($langs->trans("ShowProduct"), "product") . ' ' . $objp->produit;
print "</a></td>\n";
if (!empty($conf->productbatch->enabled)) {
print '<td>' . $objp->batch . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->eatby), 'day') . '</td>';
print '<td>' . dol_print_date($db->jdate($objp->sellby), 'day') . '</td>';
}
print '<td><a href="card.php?id=' . $objp->entrepot_id . '">';
print img_object($langs->trans("ShowWarehouse"), "stock") . ' ' . $objp->stock;
print "</a></td>\n";
print '<td align="right">';
if ($objp->qty > 0) {
print '+';
}
print $objp->qty . '</td>';
print "</tr>\n";
$i++;
}
$db->free($resql);
print "</table>";
}
//print '</td></tr></table>';
print '</div></div></div>';
llxFooter();
示例8: dol_sanitizeFileName
$commandestatic->ref = $obj->ref;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td width="96" class="nobordernopadding nowrap">';
print $commandestatic->getNomUrl(1);
print '</td>';
print '<td width="16" class="nobordernopadding nowrap">';
print ' ';
print '</td>';
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
$filename = dol_sanitizeFileName($obj->ref);
$filedir = $conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
$urlsource = $_SERVER['PHP_SELF'] . '?id=' . $obj->rowid;
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
print '</td></tr></table>';
print '</td>';
print '<td><a href="' . DOL_URL_ROOT . '/fourn/card.php?socid=' . $obj->socid . '">' . img_object($langs->trans("ShowCompany"), "company") . ' ' . $obj->name . '</a></td>';
print '<td>' . dol_print_date($db->jdate($obj->tms), 'day') . '</td>';
print '<td align="right">' . $commandestatic->LibStatut($obj->fk_statut, 5) . '</td>';
print '</tr>';
$i++;
}
}
print "</table><br>";
} else {
dol_print_error($db);
}
/*
* Orders to process
*/
/*
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as name, s.rowid as socid";
示例9: getNomUrl
/**
* Return clicable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param string $option 'withproject' or ''
* @param string $mode Mode 'task', 'time', 'contact', 'note', document' define page to link to.
* @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string
* @param string $sep Separator between ref and label if option addlabel is set
* @return string Chaine avec URL
*/
function getNomUrl($withpicto = 0, $option = '', $mode = 'task', $addlabel = 0, $sep = ' - ')
{
global $langs;
$result = '';
$label = '<u>' . $langs->trans("ShowTask") . '</u>';
if (!empty($this->ref)) {
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
}
if (!empty($this->label)) {
$label .= '<br><b>' . $langs->trans('LabelTask') . ':</b> ' . $this->label;
}
if ($this->date_start || $this->date_end) {
$label .= "<br>" . get_date_range($this->date_start, $this->date_end, '', $langs, 0);
}
$linkclose = '" title="' . dol_escape_htmltag($label, 1) . '" class="classfortooltip">';
$link = '<a href="' . DOL_URL_ROOT . '/projet/tasks/' . $mode . '.php?id=' . $this->id . ($option == 'withproject' ? '&withproject=1' : '') . $linkclose;
$linkend = '</a>';
$picto = 'projecttask';
if ($withpicto) {
$result .= $link . img_object($label, $picto, 'class="classfortooltip"') . $linkend;
}
if ($withpicto && $withpicto != 2) {
$result .= ' ';
}
if ($withpicto != 2) {
$result .= $link . $this->ref . $linkend . ($addlabel && $this->label ? $sep . dol_trunc($this->label, $addlabel > 1 ? $addlabel : 0) : '');
}
return $result;
}
示例10: print_liste_field_titre
print '<table class="noborder" width="100%">';
print "<tr class=\"liste_titre\">";
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "e.label", "", "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("LocationSummary"), $_SERVER["PHP_SELF"], "e.lieu", "", "", "", $sortfield, $sortorder);
print_liste_field_titre($langs->trans("EstimatedStockValue"), $_SERVER["PHP_SELF"], "e.valo_pmp", '', '', 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("EstimatedStockValueSell"), $_SERVER["PHP_SELF"], "", '', '', 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "e.statut", '', '', 'align="right"', $sortfield, $sortorder);
print "</tr>\n";
if ($num) {
$entrepot = new Entrepot($db);
$total = $totalsell = 0;
$var = false;
while ($i < min($num, $limit)) {
$objp = $db->fetch_object($result);
print "<tr " . $bc[$var] . ">";
print '<td><a href="card.php?id=' . $objp->rowid . '">' . img_object($langs->trans("ShowWarehouse"), 'stock') . ' ' . $objp->ref . '</a></td>';
print '<td>' . $objp->lieu . '</td>';
// PMP value
print '<td align="right">';
if (price2num($objp->estimatedvalue, 'MT')) {
print price(price2num($objp->estimatedvalue, 'MT'), 1);
} else {
print '';
}
print '</td>';
// Selling value
print '<td align="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) {
print price(price2num($objp->sellvalue, 'MT'), 1);
} else {
print $langs->trans("Variable");
示例11: getNomUrl
/**
* Return a link on thirdparty (with picto)
* @param withpicto Inclut le picto dans le lien (0=No picto, 1=Inclut le picto dans le lien, 2=Picto seul)
* @param option Sur quoi pointe le lien ('', 'customer', 'prospect', 'supplier')
* @param maxlen Max length of text
* @return string String with URL
*/
function getNomUrl($withpicto=0,$option='',$maxlen=0)
{
global $conf,$langs;
$result='';
$lien=$lienfin='';
if ($option == 'customer' || $option == 'compta')
{
if (($this->client == 1 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) // Only customer
{
$lien = '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$this->id;
}
elseif($this->client == 2 && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) // Only prospect
{
$lien = '<a href="'.DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$this->id;
}
}
else if ($option == 'prospect' && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{
$lien = '<a href="'.DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$this->id;
}
else if ($option == 'supplier')
{
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$this->id;
}
// By default
if (empty($lien))
{
$lien = '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$this->id;
}
// Add type of canvas
$lien.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'">';
$lienfin='</a>';
$name=$this->name?$this->name:$this->nom;
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
$result.=$lien.($maxlen?dol_trunc($name,$maxlen):$name).$lienfin;
return $result;
}
示例12: getNomUrl
/**
* Return name with link
*
* @param int $withpicto Add image
*
* @return int if KO, >0 if OK
*/
public function getNomUrl($withpicto = 0)
{
global $langs;
$result = '';
$lien = '<a href="' . dol_buildpath('lead/lead/card.php', 1) . '?id=' . $this->id . '">';
$lienfin = '</a>';
$picto = 'propal';
$label = $langs->trans("LeadShowLead") . ': ' . $this->ref;
if ($withpicto) {
$result .= $lien . img_object($label, $picto) . $lienfin;
}
if ($withpicto && $withpicto != 2) {
$result .= ' ';
}
$result .= $lien . $this->ref . $lienfin;
return $result;
}
示例13: getTagUrl
/**
* Renvoie tags list clicable (avec eventuellement le picto)
*
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
* @param int $maxlen length max libelle
* @return string String with URL
*/
function getTagUrl($withpicto = 0, $maxlen = 0)
{
global $langs;
$result = '';
if (count($this->Tag)) {
for ($i = 0; $i < count($this->Tag); $i++) {
$lien = '<a href="' . DOL_URL_ROOT . '/adherent/type.php?id=' . $this->Tag[$i] . '">';
$lienfin = '</a> ';
$picto = 'group';
$label = $langs->trans("ShowTypeCard", $this->Tag[$i]);
if ($withpicto) {
$result .= $lien . img_object($label, $picto) . $lienfin;
}
if ($withpicto && $withpicto != 2) {
$result .= ' ';
}
$result .= $lien . ($maxlen ? dol_trunc($this->Tag[$i], $maxlen) : $this->Tag[$i]) . $lienfin;
}
}
return $result;
}
示例14: print_liste_field_titre
print_liste_field_titre($langs->trans("LocationSummary"),"valo.php", "e.lieu","","","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("EstimatedStockValue"),"valo.php", "e.valo_pmp",'','','align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("EstimatedStockValueSell"),"", "",'','','align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),"valo.php", "e.statut",'','','align="right"',$sortfield,$sortorder);
print "</tr>\n";
if ($num)
{
$entrepot=new Entrepot($db);
$total = $totalsell = 0;
$var=false;
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($result);
print "<tr $bc[$var]>";
print '<td><a href="fiche.php?id='.$objp->ref.'">'.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->label.'</a></td>';
print '<td>'.$objp->lieu.'</td>';
// PMP value
print '<td align="right">';
if (price2num($objp->estimatedvalue,'MT')) print price(price2num($objp->estimatedvalue,'MT'));
else print '';
print '</td>';
// Selling value
print '<td align="right">';
if (empty($conf->global->PRODUIT_MULTIPRICES)) print price(price2num($objp->sellvalue,'MT'));
else print $langs->trans("Variable");
print '</td>';
// Status
print '<td align="right">'.$entrepot->LibStatut($objp->statut,5).'</td>';
print "</tr>\n";
$total += price2num($objp->estimatedvalue,'MU');
示例15: img_object
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;
print "<tr $bc[$var]><td>";
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">';
print img_object($langs->trans("ShowUser"),"user").' ';
print stripslashes($obj->firstname)." " .stripslashes($obj->name)."\n";
print '</a>';
print '</td><td>'.$obj->login.'</td>';
print '<td><a href="commerciaux.php?socid='.$_GET["socid"].'&commid='.$obj->rowid.'">'.$langs->trans("Add").'</a></td>';
print '</tr>'."\n";
$i++;
}
print "</table>";
$db->free($resql);
}
else
{
dol_print_error($db);