Пример #1
0
    print '</td></tr>';
}
if ($soc->fournisseur) {
    print '<tr><td>';
    print $langs->trans('SupplierCode') . '</td><td colspan="3">';
    print $soc->code_fournisseur;
    if ($soc->check_codefournisseur() != 0) {
        print ' <font class="error">(' . $langs->trans("WrongSupplierCode") . ')</font>';
    }
    print '</td></tr>';
}
if (!empty($conf->barcode->enabled)) {
    print '<tr><td>' . $langs->trans('Gencod') . '</td><td colspan="3">' . $soc->barcode . '</td></tr>';
}
print "<tr><td valign=\"top\">" . $langs->trans('Address') . "</td><td colspan=\"3\">";
dol_print_address($soc->address, 'gmap', 'thirdparty', $soc->id);
print "</td></tr>";
// Zip / Town
print '<tr><td width="25%">' . $langs->trans('Zip') . '</td><td width="25%">' . $soc->zip . "</td>";
print '<td width="25%">' . $langs->trans('Town') . '</td><td width="25%">' . $soc->town . "</td></tr>";
// Country
if ($soc->country) {
    print '<tr><td>' . $langs->trans('Country') . '</td><td colspan="3">';
    $img = picto_from_langcode($soc->country_code);
    print $img ? $img . ' ' : '';
    print $soc->country;
    print '</td></tr>';
}
// EMail
print '<tr><td>' . $langs->trans('EMail') . '</td><td colspan="3">';
print dol_print_email($soc->email, 0, $soc->id, 'AC_EMAIL');
Пример #2
0
	/**
	 * return box address for a company
	 *
	 *  @return	@string
	 */
	function content_box_information($id = 0) {
		global $conf, $user, $langs;

		$rtr = '<div class="row">';
		$rtr.= '<div class="two column vcard avatar">';
		$rtr.= '<div class="avatar sepH_b">';
		$rtr.= '<img src="' . DOL_URL_ROOT . '/theme/companies.png" alt="" />';
		$rtr.= '</div>';
		$rtr.= '</div>';
		$rtr.= '<div class="five column vcard">';
		$img = '<img src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/ico/icSw2/16-Apartment-Building.png" alt="" />';
		$rtr.= '<h1 class="sepH_a"><a id="view_fiche" href="#">' . $img . $this->ThirdPartyName . '</a></h1>';
		$rtr.= '<div class="sepH_a">' . $this->getLibStatus() . '</div>';
		$rtr.= '<h5 class="s_color">';
		$rtr.= dol_print_address($this->Address, 'gmap', 'thirdparty', $this->id());
		$rtr.= '</h5>';
		//$img=picto_from_langcode($object->country_id);
		$rtr.= '<h3 class="sepH_a country">' . $this->Zip . ($this->Zip && $this->Town ? " " : "") . $this->Town;
		// MAP GPS
		$rtr.= "&nbsp" . img_picto(($this->gps[0] . ',' . $this->gps[1]), (($this->gps[0] && $this->gps[1]) ? "green-dot" : "red-dot"));
		$rtr.= '</h3>';
		$rtr.= '</div>';

		// Partie droite
		$rtr.= '<div class="five column">';
		$rtr.= '<div class="row sepH_b">';


		if ($user->rights->societe->supprimer) {
			$rtr.= '<div class="gh_button-group right">';
			if ($user->rights->societe->creer) {
				$rtr.= '<a class="gh_button pill icon edit" id="edit_fiche" href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&amp;action=edit">' . $langs->trans("Modify") . '</a>' . "\n";
			}
			$rtr.= '<span id="action-delete" class="gh_button pill icon trash danger">' . $langs->trans('Delete') . '</span>' . "\n";
			$rtr.= '</div>';
		} else {
			if ($user->rights->societe->creer)
				$rtr.= '<a class="gh_button pill primary right" href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id() . '&amp;action=edit">' . $langs->trans("Modify") . '</a>' . "\n"; // bouton rond
		}

		$rtr.= '</div>';

		if ($this->CustomerCode || $this->SupplierCode) {
			$rtr.= '<div class="row vcard sepH_b inner_heading">';
			$rtr.= '<ul>';
			if ($this->CustomerCode) {
				$key = 'CustomerCode';
				$label = $langs->trans($key);
				$img = '<img src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/ico/icSw2/16-Money.png" title="' . $label . '" />';
				$rtr.= '<li><span>' . $img . '</span><span class="s_color">' . $label . '</span><span> : </span><span>' . $this->$key . '</span></li>';
			}
			if ($this->SupplierCode) {
				$key = 'SupplierCode';
				$label = $langs->trans($key);
				$img = '<img src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/ico/icSw2/16-Money.png" title="' . $label . '" />';
				$rtr.= '<li><span>' . $img . '</span><span class="s_color">' . $label . '</span><span> : </span><span>' . $this->$key . '</span></li>';
			}
			$rtr.= '</ul>';
			$rtr.= '</div>';
		}

		$rtr.= $this->content_box($id); //external content

		$rtr.= '</div>'; // termine la colonne droite
		$rtr.= '</div>';

		return $rtr;
	}
Пример #3
0
            print '</td>';
            print $htmllogobar; $htmllogobar='';
            print '</tr>';
        }

        // Status
        print '<tr><td>'.$langs->trans("Status").'</td>';
        print '<td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
        print $object->getLibStatus();
        print '</td>';
        print $htmllogobar; $htmllogobar='';
        print '</tr>';

        // Address
        print "<tr><td valign=\"top\">".$langs->trans('Address').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
        print dol_print_address($object->address,'gmap','thirdparty',$object->id);
        print "</td></tr>";

        // Zip / Town
        print '<tr><td width="25%">'.$langs->trans('Zip').' / '.$langs->trans("Town").'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
        print $object->zip.($object->zip && $object->town?" / ":"").$object->town;
        print "</td>";
        print '</tr>';

        // Country
        print '<tr><td>'.$langs->trans("Country").'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'" nowrap="nowrap">';
        $img=picto_from_langcode($object->country_code);
        if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
        else print ($img?$img.' ':'').$object->country;
        print '</td></tr>';
Пример #4
0
         $objsoc->fetch($object->socid);
         print $objsoc->getNomUrl(1);
     } else {
         print $langs->trans("ContactNotLinkedToCompany");
     }
     print '</td></tr>';
 }
 // Civility
 print '<tr><td width="15%">' . $langs->trans("UserTitle") . '</td><td colspan="3">';
 print $object->getCivilityLabel();
 print '</td></tr>';
 // Role
 print '<tr><td>' . $langs->trans("PostOrFunction") . '</td><td colspan="3">' . $object->poste . '</td>';
 // Address
 print '<tr><td>' . $langs->trans("Address") . '</td><td colspan="3">';
 dol_print_address($object->address, 'gmap', 'contact', $object->id);
 print '</td></tr>';
 // Zip/Town
 print '<tr><td>' . $langs->trans("Zip") . ' / ' . $langs->trans("Town") . '</td><td colspan="3">';
 print $object->zip;
 if ($object->zip) {
     print '&nbsp;';
 }
 print $object->town . '</td></tr>';
 // Country
 print '<tr><td>' . $langs->trans("Country") . '</td><td colspan="3">';
 $img = picto_from_langcode($object->country_code);
 if ($img) {
     print $img . ' ';
 }
 print $object->country;
Пример #5
0
 /**
  * 	Return full address of contact
  *
  * 	@param		string		$htmlkey            HTML id to make banner content unique
  *  @param      Object      $object				Object (thirdparty, thirdparty of contact for contact, null for a member)
  *	@return		string							Full address string
  */
 function getBannerAddress($htmlkey, $object)
 {
     global $conf, $langs;
     $countriesusingstate = array('AU', 'US', 'IN', 'GB', 'ES', 'UK', 'TR');
     $contactid = 0;
     $thirdpartyid = 0;
     if ($this->element == 'societe') {
         $thirdpartyid = $this->id;
     }
     if ($this->element == 'contact') {
         $contactid = $this->id;
         $thirdpartyid = $object->fk_soc;
     }
     if ($this->element == 'user') {
         $contactid = $this->contact_id;
         $thirdpartyid = $object->fk_soc;
     }
     $out = '<!-- BEGIN part to show address block -->';
     $outdone = 0;
     $coords = $this->getFullAddress(1, ', ');
     if ($coords) {
         if (!empty($conf->use_javascript_ajax)) {
             $namecoords = $this->getFullName($langs, 1) . '<br>' . $coords;
             // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
             $out .= '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\'' . dol_escape_js($namecoords) . '\',\'' . dol_escape_js($langs->trans("HelpCopyToClipboard")) . '\');">';
             $out .= img_picto($langs->trans("Address"), 'object_address.png');
             $out .= '</a> ';
         }
         $out .= dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1);
         $outdone++;
         $outdone++;
     }
     if (!in_array($this->country_code, $countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) && !empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) {
         $out .= ($outdone ? '<br>' : '') . $this->state;
         $outdone++;
     }
     if (!empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) {
         $out .= $outdone ? '<br>' : '';
     }
     if (!empty($this->phone) && empty($this->phone_pro)) {
         // For objects that store pro phone into ->phone
         $out .= dol_print_phone($this->phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', '&nbsp;', 'phone', $langs->trans("PhonePro"));
         $outdone++;
     }
     if (!empty($this->phone_pro)) {
         $out .= dol_print_phone($this->phone_pro, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', '&nbsp;', 'phone', $langs->trans("PhonePro"));
         $outdone++;
     }
     if (!empty($this->phone_mobile)) {
         $out .= dol_print_phone($this->phone_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', '&nbsp;', 'phone', $langs->trans("PhoneMobile"));
         $outdone++;
     }
     if (!empty($this->phone_perso)) {
         $out .= dol_print_phone($this->phone_perso, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', '&nbsp;', 'phone', $langs->trans("PhonePerso"));
         $outdone++;
     }
     if (!empty($this->fax)) {
         $out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', '&nbsp;', 'fax', $langs->trans("Fax"));
         $outdone++;
     }
     if (!empty($this->office_phone)) {
         $out .= dol_print_phone($this->office_phone, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', '&nbsp;', 'phone', $langs->trans("PhonePro"));
         $outdone++;
     }
     if (!empty($this->user_mobile)) {
         $out .= dol_print_phone($this->user_mobile, $this->country_code, $contactid, $thirdpartyid, 'AC_TEL', '&nbsp;', 'phone', $langs->trans("PhoneMobile"));
         $outdone++;
     }
     if (!empty($this->office_fax)) {
         $out .= dol_print_phone($this->fax, $this->country_code, $contactid, $thirdpartyid, 'AC_FAX', '&nbsp;', 'fax', $langs->trans("Fax"));
         $outdone++;
     }
     $out .= '<div style="clear: both;"></div>';
     $outdone = 0;
     if (!empty($this->email)) {
         $out .= dol_print_email($this->email, $this->id, $object->id, 'AC_EMAIL', 0, 0, 1);
         $outdone++;
     }
     if (!empty($this->url)) {
         $out .= dol_print_url($this->url, '', 0, 1);
         $outdone++;
     }
     if (!empty($conf->skype->enabled)) {
         $out .= '<div style="clear: both;"></div>';
         if ($this->skype) {
             $out .= dol_print_skype($this->skype, $this->id, $object->id, 'AC_SKYPE');
         }
         $outdone++;
     }
     $out .= '<!-- END Part to show address block -->';
     return $out;
 }
Пример #6
0
/**
 * 		Show html area for list of contacts
 *
 *		@param	Conf		$conf		Object conf
 * 		@param	Translate	$langs		Object langs
 * 		@param	DoliDB		$db			Database handler
 * 		@param	Societe		$object		Third party object
 *      @param  string		$backtopage	Url to go once contact is created
 *      @return	void
 */
function show_contacts($conf, $langs, $db, $object, $backtopage = '')
{
    global $user, $conf;
    global $bc;
    $form = new Form($db);
    $sortfield = GETPOST("sortfield", 'alpha');
    $sortorder = GETPOST("sortorder", 'alpha');
    $search_status = GETPOST("search_status", 'int');
    if ($search_status == '') {
        $search_status = 1;
    }
    // always display activ customer first
    $search_name = GETPOST("search_name", 'alpha');
    $search_addressphone = GETPOST("search_addressphone", 'alpha');
    if (!$sortorder) {
        $sortorder = "ASC";
    }
    if (!$sortfield) {
        $sortfield = "p.lastname";
    }
    $i = -1;
    $contactstatic = new Contact($db);
    if (!empty($conf->clicktodial->enabled)) {
        $user->fetch_clicktodial();
        // lecture des infos de clicktodial
    }
    $buttoncreate = '';
    if ($user->rights->societe->contact->creer) {
        $addcontact = !empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress");
        $buttoncreate = '<a class="addnewrecord" href="' . DOL_URL_ROOT . '/contact/card.php?socid=' . $object->id . '&amp;action=create&amp;backtopage=' . urlencode($backtopage) . '">' . $addcontact;
        if (empty($conf->dol_optimize_smallscreen)) {
            $buttoncreate .= ' ' . img_picto($addcontact, 'filenew');
        }
        $buttoncreate .= '</a>' . "\n";
    }
    print "\n";
    $title = !empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ContactsForCompany") : $langs->trans("ContactsAddressesForCompany");
    print_fiche_titre($title, $buttoncreate, '');
    print '<form method="GET" action="' . $_SERVER["PHP_SELF"] . '" name="formfilter">';
    print '<input type="hidden" name="socid" value="' . $object->id . '">';
    print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
    print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
    print "\n" . '<table class="noborder" width="100%">' . "\n";
    $param = "socid=" . $object->id;
    if ($search_status != '') {
        $param .= '&amp;search_status=' . $search_status;
    }
    if ($search_name != '') {
        $param .= '&amp;search_name=' . urlencode($search_name);
    }
    $colspan = 9;
    print '<tr class="liste_titre">';
    print_liste_field_titre($langs->trans("Name"), $_SERVER["PHP_SELF"], "p.lastname", "", $param, '', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("Poste"), $_SERVER["PHP_SELF"], "p.poste", "", $param, '', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("Address") . ' / ' . $langs->trans("Phone") . ' / ' . $langs->trans("Email"), $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder);
    print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder);
    // Add to agenda
    if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create)) {
        $colspan++;
        print_liste_field_titre('');
    }
    // Edit
    print_liste_field_titre('');
    print "</tr>\n";
    print '<tr class="liste_titre">';
    // Name - Position
    print '<td class="liste_titre">';
    print '<input type="text" class="flat" name="search_name" size="20" value="' . $search_name . '">';
    print '</td>';
    // Address / Phone
    print '<td>';
    //print '<input type="text" class="flat" name="search_addressphone" size="20" value="'.$search_addressphone.'">';
    print '</td>';
    // Email
    print '<td>&nbsp;</td>';
    // Status
    print '<td class="liste_titre maxwidthonsmartphone">';
    print $form->selectarray('search_status', array('-1' => '', '0' => $contactstatic->LibStatut(0, 1), '1' => $contactstatic->LibStatut(1, 1)), $search_status);
    print '</td>';
    // Add to agenda
    if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) {
        $colspan++;
        print '<td>&nbsp;</td>';
    }
    // Edit
    print '<td class="liste_titre" align="right">';
    print '<input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
    print '</td>';
    print "</tr>";
    $sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays as country_id, p.civility, p.poste, p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.email, p.skype, p.statut ";
    $sql .= ", p.civility as civility_id, p.address, p.zip, p.town";
    $sql .= " FROM " . MAIN_DB_PREFIX . "socpeople as p";
    $sql .= " WHERE p.fk_soc = " . $object->id;
    if ($search_status != '' && $search_status != '-1') {
        $sql .= " AND p.statut = " . $db->escape($search_status);
    }
    if ($search_name) {
        $sql .= " AND (p.lastname LIKE '%" . $db->escape($search_name) . "%' OR p.firstname LIKE '%" . $db->escape($search_name) . "%')";
    }
    $sql .= " ORDER BY {$sortfield} {$sortorder}";
    dol_syslog('core/lib/company.lib.php :: show_contacts', LOG_DEBUG);
    $result = $db->query($sql);
    if (!$result) {
        dol_print_error($db);
    }
    $num = $db->num_rows($result);
    $var = true;
    if ($num) {
        $i = 0;
        while ($i < $num) {
            $obj = $db->fetch_object($result);
            $var = !$var;
            print "<tr " . $bc[$var] . ">";
            print '<td>';
            $contactstatic->id = $obj->rowid;
            $contactstatic->statut = $obj->statut;
            $contactstatic->lastname = $obj->lastname;
            $contactstatic->firstname = $obj->firstname;
            $contactstatic->civility_id = $obj->civility_id;
            $contactstatic->poste = $obj->poste;
            $contactstatic->address = $obj->address;
            $contactstatic->zip = $obj->zip;
            $contactstatic->town = $obj->town;
            $contactstatic->phone_pro = $obj->phone_pro;
            $contactstatic->phone_mobile = $obj->phone_mobile;
            $contactstatic->phone_perso = $obj->phone_perso;
            $contactstatic->email = $obj->email;
            print $contactstatic->getNomUrl(1, '', 0, '&backtopage=' . urlencode($backtopage));
            print '</td><td>';
            if ($obj->poste) {
                print $obj->poste;
            }
            print '</td>';
            $country_code = getCountry($obj->country_id, 'all');
            // Address and phone
            print '<td>';
            $outdone = 0;
            $contactstatic->address = $obj->address;
            $contactstatic->zip = $obj->zip;
            $contactstatic->town = $obj->town;
            $contactstatic->country_id = $obj->country_id;
            $coords = $contactstatic->getFullAddress(1, ', ');
            if (!empty($conf->use_javascript_ajax)) {
                $namecoords = $contactstatic->getFullName($langs, 1) . '<br>' . $coords;
                // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
                print '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\'' . dol_escape_js($namecoords) . '\',\'' . dol_escape_js($langs->trans("HelpCopyToClipboard")) . '\');">';
                print img_picto($langs->trans("Address"), 'object_address.png');
                print '</a> ';
            }
            if ($coords) {
                print dol_print_address($coords, 'address_contact_' . $obj->rowid, 'contact', $obj->rowid);
                $outdone++;
            }
            if ($obj->phone_pro || $obj->phone_mobile || $obj->phone_perso || $obj->fax) {
                print $outdone ? '<br>' : '';
            }
            if ($obj->phone_pro) {
                print dol_print_phone($obj->phone_pro, $country_code['code'], $obj->rowid, $object->id, 'AC_TEL', '&nbsp;', 'phone');
                $outdone++;
            }
            if ($obj->phone_mobile) {
                print dol_print_phone($obj->phone_mobile, $country_code['code'], $obj->rowid, $object->id, 'AC_TEL', '&nbsp;', 'phone');
                $outdone++;
            }
            if ($obj->phone_perso) {
                print dol_print_phone($obj->phone_perso, $country_code['code'], $obj->rowid, $object->id, 'AC_TEL', '&nbsp;', 'phone');
                $outdone++;
            }
            if ($obj->fax) {
                print dol_print_phone($obj->fax, $country_code['code'], $obj->rowid, $object->id, 'AC_FAX', '&nbsp;', 'fax');
                $outdone++;
            }
            print '<div style="clear: both;"></div>';
            $outdone = 0;
            if ($obj->email) {
                print dol_print_email($obj->email, $obj->rowid, $object->id, 'AC_EMAIL', 0, 0, 1);
            }
            if (!empty($conf->skype->enabled)) {
                if ($obj->skype) {
                    print ($outdone ? '<br>' : '') . dol_print_skype($obj->skype, $obj->rowid, $object->id, 'AC_SKYPE');
                }
            }
            print '</td>';
            // Status
            print '<td>' . $contactstatic->getLibStatut(5) . '</td>';
            // Add to agenda
            if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) {
                print '<td align="center">';
                print '<a href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&actioncode=&contactid=' . $obj->rowid . '&socid=' . $object->id . '&backtopage=' . urlencode($backtopage) . '">';
                print img_object($langs->trans("Event"), "action");
                print '</a></td>';
            }
            // Edit
            if ($user->rights->societe->contact->creer) {
                print '<td align="right">';
                print '<a href="' . DOL_URL_ROOT . '/contact/card.php?action=edit&amp;id=' . $obj->rowid . '&amp;backtopage=' . urlencode($backtopage) . '">';
                print img_edit();
                print '</a></td>';
            } else {
                print '<td>&nbsp;</td>';
            }
            print "</tr>\n";
            $i++;
        }
    } else {
        print "<tr " . $bc[!$var] . ">";
        print '<td colspan="' . $colspan . '">' . $langs->trans("None") . '</td>';
        print "</tr>\n";
    }
    print "\n</table>\n";
    print '</form>' . "\n";
    print "<br>\n";
    ?>
<div id="dialog" title="<?php 
    echo dol_escape_htmltag($langs->trans('Address'));
    ?>
" style="display: none;"></div>
<?php 
    return $i;
}
Пример #7
0
 print '<tr><td>' . $langs->trans("Firstname") . '</td><td class="valeur">' . $object->firstname . '&nbsp;</td></tr>';
 // EMail
 print '<tr><td>' . $langs->trans("EMail") . '</td><td class="valeur">' . dol_print_email($object->email, 0, $object->fk_soc, 1) . '</td></tr>';
 // Password
 if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
     print '<tr><td>' . $langs->trans("Password") . '</td><td>' . preg_replace('/./i', '*', $object->pass);
     if ((!empty($object->pass) || !empty($object->pass_crypted)) && empty($object->user_id)) {
         $langs->load("errors");
         $htmltext = $langs->trans("WarningPasswordSetWithNoAccount");
         print ' ' . $form->textwithpicto('', $htmltext, 1, 'warning');
     }
     print '</td></tr>';
 }
 // Address
 print '<tr><td>' . $langs->trans("Address") . '</td><td class="valeur">';
 dol_print_address($object->address, 'gmap', 'member', $object->id);
 print '</td></tr>';
 // Zip / Town
 print '<tr><td class="nowrap">' . $langs->trans("Zip") . ' / ' . $langs->trans("Town") . '</td><td class="valeur">' . $object->zip . ($object->zip && $object->town ? ' / ' : '') . $object->town . '</td></tr>';
 // Country
 print '<tr><td>' . $langs->trans("Country") . '</td><td class="valeur">';
 $img = picto_from_langcode($object->country_code);
 if ($img) {
     print $img . ' ';
 }
 print getCountry($object->country_code);
 print '</td></tr>';
 // State
 print '<tr><td>' . $langs->trans('State') . '</td><td class="valeur">' . $object->state . '</td>';
 // Tel pro.
 print '<tr><td>' . $langs->trans("PhonePro") . '</td><td class="valeur">' . dol_print_phone($object->phone, $object->country_code, 0, $object->fk_soc, 1) . '</td></tr>';
Пример #8
0
    // Name
    print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->nom.'&nbsp;</td>';
	print '</tr>';

    // Firstname
    print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->prenom.'&nbsp;</td></tr>';

	// Password
    if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
    {
        print '<tr><td>'.$langs->trans("Password").'</td><td>'.preg_replace('/./i','*',$adh->pass).'</td></tr>';
    }

    // Address
    print '<tr><td>'.$langs->trans("Address").'</td><td class="valeur">';
    dol_print_address($adh->address,'gmap','member',$adh->id);
    print '</td></tr>';

    // Zip / Town
    print '<tr><td nowrap="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td class="valeur">'.$adh->zip.(($adh->zip && $adh->town)?' / ':'').$adh->town.'</td></tr>';

	// Country
    print '<tr><td>'.$langs->trans("Country").'</td><td class="valeur">';
	$img=picto_from_langcode($adh->pays_code);
	if ($img) print $img.' ';
    print getCountry($adh->pays_code);
    print '</td></tr>';

	// State
	print '<tr><td>'.$langs->trans('State').'</td><td class="valeur">'.$adh->departement.'</td>';