Update to use get_tpl_dir call

This commit is contained in:
Miles Lott 2001-02-04 11:11:34 +00:00
parent 11e8f90aa7
commit 81caecf253
5 changed files with 15 additions and 9 deletions

View File

@ -20,7 +20,8 @@
$phpgw_info["flags"]["enable_addressbook_class"] = True;
include("../header.inc.php");
$t = new Template($phpgw_info["server"]["app_tpl"]);
#$t = new Template($phpgw_info["server"]["app_tpl"]);
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
$t->set_file(array( "add" => "add.tpl"));
$this = CreateObject("phpgwapi.contacts");

View File

@ -26,15 +26,17 @@
$this = CreateObject("phpgwapi.contacts");
$t = new Template($phpgw_info["server"]["app_tpl"]);
#$t = new Template($phpgw_info["server"]["app_tpl"]);
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
$t->set_file(array("delete" => "delete.tpl"));
if ($confirm != "true") {
$phpgw->db->query("select owner from addressbook where id='$ab_id'");
$phpgw->db->next_record();
$fields = $this->read($ab_id, array("owner" => $owner));
#$phpgw->db->query("select owner from addressbook where id='$ab_id'");
#$phpgw->db->next_record();
if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"]) {
if ($fielfs["owner"] != $phpgw_info["user"]["account_id"]) {
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
}

View File

@ -20,7 +20,8 @@
$phpgw_info["flags"]["enable_addressbook_class"] = True;
include("../header.inc.php");
$t = new Template($phpgw_info["server"]["app_tpl"]);
#$t = new Template($phpgw_info["server"]["app_tpl"]);
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
$t->set_file(array( "edit" => "edit.tpl"));
if (! $ab_id) {

View File

@ -17,7 +17,8 @@
"enable_nextmatchs_class" => True);
include("../header.inc.php");
$t = new Template($phpgw_info["server"]["app_tpl"]);
#$t = new Template($phpgw_info["server"]["app_tpl"]);
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
$t->set_file(array( "addressbook_header" => "header.tpl",
"column" => "column.tpl",
"row" => "row.tpl",
@ -48,7 +49,7 @@
$offset = $phpgw_info["user"]["preferences"]["common"]["maxmatchs"];
if ($filter == "none") { $filter = ""; }
else { $filter = "access=$filter"; }
if ($filter != "" ) { $filter = "access=$filter"; }
$entries = $this->read($start,$offset,$columns_to_display,$query,$filter,$sort,$order);

View File

@ -22,7 +22,8 @@
include("../header.inc.php");
$t = new Template($phpgw_info["server"]["app_tpl"]);
#$t = new Template($phpgw_info["server"]["app_tpl"]);
$t = new Template($phpgw->common->get_tpl_dir("addressbook"));
$t->set_file(array( "view" => "view.tpl"));
$this = CreateObject("phpgwapi.contacts");