forked from extern/egroupware
Template-enabled view.php.
This commit is contained in:
parent
a4f54a4a1c
commit
7423bffc57
@ -20,6 +20,9 @@
|
|||||||
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
|
$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||||
|
$t->set_file(array( "view" => "view.tpl"));
|
||||||
|
|
||||||
function checkfor_specialformat($field,$data)
|
function checkfor_specialformat($field,$data)
|
||||||
{
|
{
|
||||||
global $phpgw_info, $phpgw;
|
global $phpgw_info, $phpgw;
|
||||||
@ -63,7 +66,7 @@
|
|||||||
}
|
}
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
echo "<p> <b>" . lang("Address book - view") . "</b><hr><p>";
|
$view_header = "<p> <b>" . lang("Address book - view") . "</b><hr><p>";
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($column = each($abc)) {
|
while ($column = each($abc)) {
|
||||||
@ -79,7 +82,7 @@
|
|||||||
$columns_to_display[$i]["field_value"] = $phpgw->db->f("ab_notes");
|
$columns_to_display[$i]["field_value"] = $phpgw->db->f("ab_notes");
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<table border="0" cellspacing="2" cellpadding="2" width="80%" align="center">';
|
$view_header .= '<table border="0" cellspacing="2" cellpadding="2" width="80%" align="center">';
|
||||||
for ($i=0;$i<200;) { // The $i<200 is only used for a brake
|
for ($i=0;$i<200;) { // The $i<200 is only used for a brake
|
||||||
if (! $columns_to_display[$i]["field_name"]) break;
|
if (! $columns_to_display[$i]["field_name"]) break;
|
||||||
|
|
||||||
@ -102,40 +105,39 @@
|
|||||||
$owner = $phpgw->db->f("ab_owner");
|
$owner = $phpgw->db->f("ab_owner");
|
||||||
$ab_id = $phpgw->db->f("ab_id");
|
$ab_id = $phpgw->db->f("ab_id");
|
||||||
|
|
||||||
echo $columns_html . '<tr><td colspan="4"> </td></tr>';
|
$columns_html .= '<tr><td colspan="4"> </td></tr>'
|
||||||
echo "<tr><td><b>" . lang("Record owner") . "</b></td><td>"
|
. '<tr><td><b>' . lang("Record owner") . '</b></td><td>'
|
||||||
. $phpgw->common->grab_owner_name($owner) . "</td><td><b>"
|
. $phpgw->common->grab_owner_name($owner) . '</td><td><b>'
|
||||||
. lang("Record Access") . "</b></td><td>";
|
. lang("Record Access") . '</b></td><td></table>';
|
||||||
|
|
||||||
if ($access != "private" && $access != "public") {
|
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 {
|
} else {
|
||||||
echo $access;
|
$access_link .= $access;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "</td></tr></table>";
|
$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 = '<form action="'.$phpgw->link("vcardout.php","ab_id=$ab_id&order=$order&start=$start&filter=$filter&query=$query&sort=$sort").'">';
|
||||||
|
$donelink = '<form action="'.$phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort").'">';
|
||||||
|
|
||||||
<TABLE border="0" cellpadding="1" cellspacing="1">
|
$t->set_var("ab_id",$ab_id);
|
||||||
<TR>
|
$t->set_var("sort",$sort);
|
||||||
<TD align="left">
|
$t->set_var("order",$order);
|
||||||
<?php
|
$t->set_var("filter",$filter);
|
||||||
echo $phpgw->common->check_owner($owner,"edit.php","Edit","ab_id=$ab_id");
|
$t->set_var("start",$start);
|
||||||
?>
|
$t->set_var("view_header",$view_header);
|
||||||
</TD>
|
$t->set_var("cols",$columns_html);
|
||||||
<TD align=left>
|
$t->set_var("lang_ok",lang("ok"));
|
||||||
<form action="<?php echo $phpgw->link("vcardout.php","ab_id=$ab_id&order=$order&start=$start&filter=$filter&query=$query&sort=$sort"); ?>" method="post" name="Vcardform">
|
$t->set_var("lang_done",lang("done"));
|
||||||
<input type="submit" value="Vcard">
|
$t->set_var("lang_edit",lang("edit"));
|
||||||
</form>
|
$t->set_var("lang_submit",lang("submit"));
|
||||||
</TD>
|
$t->set_var("lang_vcard",lang("vcard"));
|
||||||
<TD align="left">
|
$t->set_var("done_link",$donelink);
|
||||||
<form action="<?php echo $phpgw->link("index.php","order=$order&start=$start&filter=$filter&query=$query&sort=$sort"); ?>" method="post" name="Doneform">
|
$t->set_var("edit_link",$editlink);
|
||||||
<input type="submit" value="Done">
|
$t->set_var("vcard_link",$vcardlink);
|
||||||
</form>
|
|
||||||
</TD>
|
$t->parse("out","view");
|
||||||
</TR>
|
$t->pparse("out","view");
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user