diff --git a/addressbook/view.php b/addressbook/view.php index fc9d84970f..23e9cecf2f 100755 --- a/addressbook/view.php +++ b/addressbook/view.php @@ -20,6 +20,9 @@ $phpgw_info["flags"]["enable_addressbook_class"] = True; include("../header.inc.php"); + $t = new Template($phpgw_info["server"]["app_tpl"]); + $t->set_file(array( "view" => "view.tpl")); + function checkfor_specialformat($field,$data) { global $phpgw_info, $phpgw; @@ -63,7 +66,7 @@ } $phpgw->db->next_record(); - echo "

 " . lang("Address book - view") . "


"; + $view_header = "

 " . lang("Address book - view") . "


"; $i = 0; while ($column = each($abc)) { @@ -79,7 +82,7 @@ $columns_to_display[$i]["field_value"] = $phpgw->db->f("ab_notes"); } - echo ''; + $view_header .= '
'; for ($i=0;$i<200;) { // The $i<200 is only used for a brake if (! $columns_to_display[$i]["field_name"]) break; @@ -102,40 +105,39 @@ $owner = $phpgw->db->f("ab_owner"); $ab_id = $phpgw->db->f("ab_id"); - echo $columns_html . ''; - echo "' + . '
 
" . lang("Record owner") . "" - . $phpgw->common->grab_owner_name($owner) . "" - . lang("Record Access") . ""; + $columns_html .= '
 
' . lang("Record owner") . '' + . $phpgw->common->grab_owner_name($owner) . '' + . lang("Record Access") . '
'; if ($access != "private" && $access != "public") { - echo lang("Group access") . " - " . $phpgw->accounts->convert_string_to_names_access($access); + $access_link .= lang("Group access") . " - " . $phpgw->accounts->convert_string_to_names_access($access); } else { - echo $access; + $access_link .= $access; } - - echo ""; -?> - - - - - - -
- common->check_owner($owner,"edit.php","Edit","ab_id=$ab_id"); - ?> - -
" method="post" name="Vcardform"> - -
-
-
" method="post" name="Doneform"> - -
-
+ $editlink .= $phpgw->common->check_owner($phpgw->db->f("ab_owner"),"edit.php",lang("edit"),"ab_id=" . $phpgw->db->f("ab_id")."&start=".$start."&sort=".$sort."&order=".$order); + $vcardlink = '

'; + $donelink = ''; + + $t->set_var("ab_id",$ab_id); + $t->set_var("sort",$sort); + $t->set_var("order",$order); + $t->set_var("filter",$filter); + $t->set_var("start",$start); + $t->set_var("view_header",$view_header); + $t->set_var("cols",$columns_html); + $t->set_var("lang_ok",lang("ok")); + $t->set_var("lang_done",lang("done")); + $t->set_var("lang_edit",lang("edit")); + $t->set_var("lang_submit",lang("submit")); + $t->set_var("lang_vcard",lang("vcard")); + $t->set_var("done_link",$donelink); + $t->set_var("edit_link",$editlink); + $t->set_var("vcard_link",$vcardlink); + + $t->parse("out","view"); + $t->pparse("out","view"); -common->phpgw_footer(); ?>