address format

This commit is contained in:
bettina 2002-01-05 23:57:41 +00:00
parent 14e84a2d1a
commit ade7a6bdbf
3 changed files with 34 additions and 18 deletions

View File

@ -2,18 +2,18 @@
<table border="0" cellpadding="2" cellspacing="2"> <table border="0" cellpadding="2" cellspacing="2">
<tr> <tr>
<td><font face="{font}">{company}</font></td> <td><font face="{font}" size="{fontsize}">{company}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{department}</font></td> <td><font face="{font}" size="{fontsize}">{department}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{street}</font></td> <td><font face="{font}" size="{fontsize}">{street}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{zip}&nbsp;{city}</font></td> <td><font face="{font}" size="{fontsize}">{zip}&nbsp;{city}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{country}</font></td> <td><font face="{font}" size="{fontsize}">{country}</font></td>
</tr> </tr>
</table> </table>

View File

@ -2,18 +2,18 @@
<table border="0" cellpadding="2" cellspacing="2"> <table border="0" cellpadding="2" cellspacing="2">
<tr> <tr>
<td><font face="{font}">{company}</font></td> <td><font face="{font}" size="{fontsize}">{company}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{department}</font></td> <td><font face="{font}" size="{fontsize}">{department}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{street}</font></td> <td><font face="{font}" size="{fontsize}">{street}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{city},&nbsp;{state}&nbsp;{zip}</font></td> <td><font face="{font}" size="{fontsize}">{city},&nbsp;{state}&nbsp;{zip}</font></td>
</tr> </tr>
<tr> <tr>
<td><font face="{font}">{country}</font></td> <td><font face="{font}" size="{fontsize}">{country}</font></td>
</tr> </tr>
</table> </table>

View File

@ -278,7 +278,7 @@
return $new_ldap; return $new_ldap;
} }
function formatted_address($id, $business = True) function formatted_address($id, $business = True, $afont = '', $asize = '2')
{ {
$t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook')); $t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook'));
$s = CreateObject('phpgwapi.sbox'); $s = CreateObject('phpgwapi.sbox');
@ -350,7 +350,13 @@
$a = $t->set_file(array('address_format' => 'format_us.tpl')); $a = $t->set_file(array('address_format' => 'format_us.tpl'));
} }
$a .= $t->set_var('font',$GLOBALS['phpgw_info']['theme']['font']); if (!$afont)
{
$afont = $GLOBALS['phpgw_info']['theme']['font'];
}
$a .= $t->set_var('font',$afont);
$a .= $t->set_var('fontsize',$asize);
$a .= $t->set_var('company',$company); $a .= $t->set_var('company',$company);
$a .= $t->set_var('department',$address[0]['org_unit']); $a .= $t->set_var('department',$address[0]['org_unit']);
$a .= $t->set_var('street',$street); $a .= $t->set_var('street',$street);
@ -368,7 +374,7 @@
return $a; return $a;
} }
function formatted_address_full($id, $business = True, $fontsize = '2') function formatted_address_full($id, $business = True, $afont = '', $asize = '2')
{ {
$t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook')); $t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook'));
$s = CreateObject('phpgwapi.sbox'); $s = CreateObject('phpgwapi.sbox');
@ -450,8 +456,13 @@
$a = $t->set_file(array('address_format' => 'full_format_us.tpl')); $a = $t->set_file(array('address_format' => 'full_format_us.tpl'));
} }
$a .= $t->set_var('font',$GLOBALS['phpgw_info']['theme']['font']); if (!$afont)
$a .= $t->set_var('fontsize',$fontsize); {
$afont = $GLOBALS['phpgw_info']['theme']['font'];
}
$a .= $t->set_var('font',$afont);
$a .= $t->set_var('fontsize',$asize);
$a .= $t->set_var('lang_url',lang('url')); $a .= $t->set_var('lang_url',lang('url'));
$a .= $t->set_var('lang_email',lang('email')); $a .= $t->set_var('lang_email',lang('email'));
$a .= $t->set_var('lang_fax',lang('fax number')); $a .= $t->set_var('lang_fax',lang('fax number'));
@ -477,7 +488,7 @@
return $a; return $a;
} }
function formatted_address_line($id, $business = True, $fontsize = '2') function formatted_address_line($id, $business = True, $afont = '', $asize = '2')
{ {
$t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook')); $t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook'));
$s = CreateObject('phpgwapi.sbox'); $s = CreateObject('phpgwapi.sbox');
@ -548,8 +559,13 @@
$a = $t->set_file(array('address_format' => 'line_format_us.tpl')); $a = $t->set_file(array('address_format' => 'line_format_us.tpl'));
} }
$a .= $t->set_var('font',$GLOBALS['phpgw_info']['theme']['font']); if (!$afont)
$a .= $t->set_var('fontsize',$fontsize); {
$afont = $GLOBALS['phpgw_info']['theme']['font'];
}
$a .= $t->set_var('font',$afont);
$a .= $t->set_var('fontsize',$asize);
$a .= $t->set_var('company',$company); $a .= $t->set_var('company',$company);
$a .= $t->set_var('street',$street); $a .= $t->set_var('street',$street);
$a .= $t->set_var('city',$city); $a .= $t->set_var('city',$city);