forked from extern/egroupware
Added templates for add.php, edit.php and inc/functions.inc.php.
This commit is contained in:
parent
5174d4a86c
commit
dbee648038
@ -19,7 +19,9 @@
|
|||||||
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||||
$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( "add" => "add.tpl"));
|
||||||
|
|
||||||
if ($AddVcard){
|
if ($AddVcard){
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
|
||||||
@ -101,35 +103,12 @@
|
|||||||
"cd=14"));
|
"cd=14"));
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
$t->set_var("lang_ok",lang("ok"));
|
||||||
<TABLE border="0" cellPadding="0" cellSpacing="0" width="95%">
|
$t->set_var("lang_clear",lang("clear"));
|
||||||
<TBODY>
|
$t->set_var("lang_cancel",lang("cancel"));
|
||||||
<TR>
|
$t->set_var("cancel_link",'<a href="'.$phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/") . '">');
|
||||||
<TD>
|
$t->parse("out","add");
|
||||||
<TABLE border="0" cellPadding="1" cellSpacing="1">
|
$t->pparse("out","add");
|
||||||
<TBODY>
|
|
||||||
<TR>
|
|
||||||
<TD align="left">
|
|
||||||
<INPUT type="submit" name="submit" value="<?php echo lang("OK"); ?>">
|
|
||||||
</TD>
|
|
||||||
<TD align="left">
|
|
||||||
<INPUT name="reset" type="reset" value="<?php echo lang("Clear"); ?>">
|
|
||||||
</TD>
|
|
||||||
<TD align="left">
|
|
||||||
<a href="<?php echo $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/") . "\">" . lang("Cancel"); ?></a>
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
</TBODY>
|
|
||||||
</TABLE>
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
</TBODY>
|
|
||||||
</TABLE>
|
|
||||||
</FORM>
|
|
||||||
</DIV>
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
if (! $ab_id) {
|
if (! $ab_id) {
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($confirm != "true") {
|
if ($confirm != "true") {
|
||||||
@ -29,7 +29,7 @@
|
|||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"])
|
if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"])
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<body bgcolor=FFFFFF aLink=0000EE link=0000EE vlink=0000EE>
|
<body bgcolor=FFFFFF aLink=0000EE link=0000EE vlink=0000EE>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
$phpgw->db->query("delete from addressbook where ab_owner='" . $phpgw_info["user"]["account_id"]
|
$phpgw->db->query("delete from addressbook where ab_owner='" . $phpgw_info["user"]["account_id"]
|
||||||
. "' and ab_id='$ab_id'");
|
. "' and ab_id='$ab_id'");
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
@Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -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( "edit" => "edit.tpl"));
|
||||||
|
|
||||||
if (! $ab_id) {
|
if (! $ab_id) {
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||||
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||||
@ -31,31 +34,30 @@
|
|||||||
. $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id");
|
. $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id");
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
$fields = array('ab_id' => $phpgw->db->f("ab_id"),
|
$fields = array('ab_id' => $phpgw->db->f("ab_id"),
|
||||||
'owner' => $phpgw->db->f("ab_owner"),
|
'owner' => $phpgw->db->f("ab_owner"),
|
||||||
'access' => $phpgw->db->f("ab_access"),
|
'access' => $phpgw->db->f("ab_access"),
|
||||||
'firstname' => $phpgw->db->f("ab_firstname"),
|
'firstname' => $phpgw->db->f("ab_firstname"),
|
||||||
'lastname' => $phpgw->db->f("ab_lastname"),
|
'lastname' => $phpgw->db->f("ab_lastname"),
|
||||||
'title' => $phpgw->db->f("ab_title"),
|
'title' => $phpgw->db->f("ab_title"),
|
||||||
'email' => $phpgw->db->f("ab_email"),
|
'email' => $phpgw->db->f("ab_email"),
|
||||||
'hphone' => $phpgw->db->f("ab_hphone"),
|
'hphone' => $phpgw->db->f("ab_hphone"),
|
||||||
'wphone' => $phpgw->db->f("ab_wphone"),
|
'wphone' => $phpgw->db->f("ab_wphone"),
|
||||||
'fax' => $phpgw->db->f("ab_fax"),
|
'fax' => $phpgw->db->f("ab_fax"),
|
||||||
'pager' => $phpgw->db->f("ab_pager"),
|
'pager' => $phpgw->db->f("ab_pager"),
|
||||||
'mphone' => $phpgw->db->f("ab_mphone"),
|
'mphone' => $phpgw->db->f("ab_mphone"),
|
||||||
'ophone' => $phpgw->db->f("ab_ophone"),
|
'ophone' => $phpgw->db->f("ab_ophone"),
|
||||||
'street' => $phpgw->db->f("ab_street"),
|
'street' => $phpgw->db->f("ab_street"),
|
||||||
'address2' => $phpgw->db->f("ab_address2"),
|
'address2' => $phpgw->db->f("ab_address2"),
|
||||||
'city' => $phpgw->db->f("ab_city"),
|
'city' => $phpgw->db->f("ab_city"),
|
||||||
'state' => $phpgw->db->f("ab_state"),
|
'state' => $phpgw->db->f("ab_state"),
|
||||||
'zip' => $phpgw->db->f("ab_zip"),
|
'zip' => $phpgw->db->f("ab_zip"),
|
||||||
'bday' => $phpgw->db->f("ab_bday"),
|
'bday' => $phpgw->db->f("ab_bday"),
|
||||||
'company' => $phpgw->db->f("ab_company"),
|
'company' => $phpgw->db->f("ab_company"),
|
||||||
'company_id' => $phpgw->db->f("ab_company_id"),
|
'company_id' => $phpgw->db->f("ab_company_id"),
|
||||||
'notes' => $phpgw->db->f("ab_notes")
|
'notes' => $phpgw->db->f("ab_notes"),
|
||||||
,
|
'url' => $phpgw->db->f("ab_url")
|
||||||
'url' => $phpgw->db->f("ab_url")
|
);
|
||||||
);
|
|
||||||
|
|
||||||
form("","edit.php","Edit",$fields);
|
form("","edit.php","Edit",$fields);
|
||||||
|
|
||||||
@ -127,33 +129,22 @@
|
|||||||
$phpgw->common->phpgw_exit();
|
$phpgw->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
$t->set_var("ab_id",$ab_id);
|
||||||
<input type="hidden" name="ab_id" value="<? echo $ab_id; ?>">
|
$t->set_var("sort",$sort);
|
||||||
<input type="hidden" name="sort" value="<? echo $sort; ?>">
|
$t->set_var("order",$order);
|
||||||
<input type="hidden" name="order" value="<? echo $order; ?>">
|
$t->set_var("filter",$filter);
|
||||||
<input type="hidden" name="filter" value="<? echo $filter; ?>">
|
$t->set_var("start",$start);
|
||||||
<input type="hidden" name="start" value="<? echo $start; ?>">
|
$t->set_var("lang_ok",lang("ok"));
|
||||||
|
$t->set_var("lang_clear",lang("clear"));
|
||||||
|
$t->set_var("lang_cancel",lang("cancel"));
|
||||||
|
$t->set_var("lang_delete",lang("delete"));
|
||||||
|
$t->set_var("lang_submit",lang("submit"));
|
||||||
|
$t->set_var("cancel_link",'<form action="'.$phpgw->link("index.php","sort=$sort&order=$order&filter=$filter&start=$start") . '">');
|
||||||
|
$t->set_var("delete_link",'<form action="'.$phpgw->link("delete.php","ab_id=$ab_id") . '">');
|
||||||
|
|
||||||
<TABLE border="0" cellPadding="1" cellSpacing="1" width="95%">
|
$t->parse("out","edit");
|
||||||
<TBODY>
|
$t->pparse("out","edit");
|
||||||
<tr>
|
|
||||||
<TD align="left" width="7%">
|
|
||||||
<input type="submit" name="submit" value="<?php echo lang("Submit"); ?>">
|
|
||||||
</TD>
|
|
||||||
<TD align="left" width="7%">
|
|
||||||
<a href="<?php echo $phpgw->link("view.php","ab_id=$ab_id") . "\">" . lang("Cancel"); ?></a>
|
|
||||||
</TD>
|
|
||||||
<TD align="right">
|
|
||||||
<a href="<?php echo $phpgw->link("delete.php","ab_id=$ab_id") . "\">" . lang("Delete"); ?></a>
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
</TBODY>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
</DIV>
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
@ -36,24 +36,27 @@
|
|||||||
function form($format,$action,$title,$fields)
|
function form($format,$action,$title,$fields)
|
||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info;
|
global $phpgw, $phpgw_info;
|
||||||
|
|
||||||
|
$t = new Template($phpgw_info["server"]["app_tpl"]);
|
||||||
|
$t->set_file(array( "form" => "form.tpl"));
|
||||||
|
|
||||||
$email = $fields["email"];
|
$email = $fields["email"];
|
||||||
$firstname = $fields["firstname"];
|
$firstname = $fields["firstname"];
|
||||||
$lastname = $fields["lastname"];
|
$lastname = $fields["lastname"];
|
||||||
$title = $fields["title"];
|
$title = $fields["title"];
|
||||||
$hphone = $fields["hphone"];
|
$hphone = $fields["hphone"];
|
||||||
$wphone = $fields["wphone"];
|
$wphone = $fields["wphone"];
|
||||||
$fax = $fields["fax"];
|
$faxi = $fields["fax"];
|
||||||
$pager = $fields["pager"];
|
$pager = $fields["pager"];
|
||||||
$mphone = $fields["mphone"];
|
$mphone = $fields["mphone"];
|
||||||
$ophone = $fields["ophone"];
|
$ophone = $fields["ophone"];
|
||||||
$street = $fields["street"];
|
$street = $fields["street"];
|
||||||
$address2 = $fields["address2"];
|
$address2 = $fields["address2"];
|
||||||
$city = $fields["city"];
|
$city = $fields["city"];
|
||||||
$state = $fields["state"];
|
$state = $fields["state"];
|
||||||
$zip = $fields["zip"];
|
$zip = $fields["zip"];
|
||||||
$bday = $fields["bday"];
|
$bday = $fields["bday"];
|
||||||
$notes = $fields["notes"];
|
$notes = $fields["notes"];
|
||||||
$access = $fields["access"];
|
$access = $fields["access"];
|
||||||
$ab_company = $fields["company"];
|
$ab_company = $fields["company"];
|
||||||
$company_id = $fields["company_id"];
|
$company_id = $fields["company_id"];
|
||||||
@ -112,8 +115,7 @@
|
|||||||
. "<option value=10 $temp_month[10]>October</option>"
|
. "<option value=10 $temp_month[10]>October</option>"
|
||||||
. "<option value=11 $temp_month[11]>November</option>"
|
. "<option value=11 $temp_month[11]>November</option>"
|
||||||
. "<option value=12 $temp_month[12]>December</option>"
|
. "<option value=12 $temp_month[12]>December</option>"
|
||||||
. "</select>"
|
. "</select>";
|
||||||
;
|
|
||||||
$bday_day = '<input maxlength="2" name="bday_day" value="' . $day . '" size="2">'
|
$bday_day = '<input maxlength="2" name="bday_day" value="' . $day . '" size="2">'
|
||||||
;
|
;
|
||||||
$bday_year = '<input maxlength="4" name="bday_year" value="' . $year . '" size="4">';
|
$bday_year = '<input maxlength="4" name="bday_year" value="' . $year . '" size="4">';
|
||||||
@ -132,16 +134,12 @@
|
|||||||
. "<option value=10>October</option>"
|
. "<option value=10>October</option>"
|
||||||
. "<option value=11>November</option>"
|
. "<option value=11>November</option>"
|
||||||
. "<option value=12>December</option>"
|
. "<option value=12>December</option>"
|
||||||
. "</select>"
|
. "</select>";
|
||||||
;
|
$bday_day = '<input name="bday_day" size="2" maxlength="2">';
|
||||||
$bday_day = '<input name="bday_day" size="2" maxlength="2">'
|
$bday_year = '<input name="bday_year" size="4" maxlength="4">';
|
||||||
;
|
|
||||||
$bday_year = '<input name="bday_year" size="4" maxlength="4">'
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$notes = '<TEXTAREA cols="60" name="notes" rows="4">'
|
$notes = '<TEXTAREA cols="60" name="notes" rows="4">' . $notes . '</TEXTAREA>';
|
||||||
. $notes . '</TEXTAREA>';
|
|
||||||
} else {
|
} else {
|
||||||
$notes = "<form><TEXTAREA cols=\"60\" name=\"notes\" rows=\"4\">"
|
$notes = "<form><TEXTAREA cols=\"60\" name=\"notes\" rows=\"4\">"
|
||||||
. $notes . "</TEXTAREA></form>";
|
. $notes . "</TEXTAREA></form>";
|
||||||
@ -160,216 +158,125 @@
|
|||||||
|
|
||||||
// test:
|
// test:
|
||||||
//echo "Time track app status = " . $phpgw_info["apps"]["timetrack"]["enabled"];
|
//echo "Time track app status = " . $phpgw_info["apps"]["timetrack"]["enabled"];
|
||||||
|
#$url .= '<input name="url" value="';
|
||||||
|
|
||||||
?>
|
if (! ereg("^http://",$url)) {
|
||||||
|
$url .= "http://". $url;
|
||||||
|
}
|
||||||
|
#$url .= '">';
|
||||||
|
|
||||||
|
$birthday = $phpgw->common->dateformatorder($bday_year,$bday_month,$bday_day)
|
||||||
|
. '<font face="'.$theme["font"].'" size="-2">(e.g. 1969)</font>';
|
||||||
|
|
||||||
<table width="75%" border="0" align="center">
|
|
||||||
<tr>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("Last Name"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $lastname; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("First Name"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $firstname; ?>
|
|
||||||
</font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<font color="#000000" face="" size="-1"><?php echo lang("Title"); ?>:</font>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $title; ?>
|
|
||||||
</font></td>
|
|
||||||
<td>
|
|
||||||
<font color="#000000" face="" size="-1"><?php echo lang("E-mail"); ?>:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $email; ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<font color="#000000" face="" size="-1"><?php echo lang("Company Name"); ?>:</font>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<font size="-1"><?php echo $company; ?>
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<font color="#000000" face="" size="-1"><?php echo lang("URL"); ?>:</font>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input name="url" value="<?php
|
|
||||||
if (! ereg("^http://",$url)) {
|
|
||||||
echo "http://";
|
|
||||||
}
|
|
||||||
echo $url;
|
|
||||||
?>">
|
|
||||||
</td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("Home Phone"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $hphone; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("Fax"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $fax; ?>
|
|
||||||
</font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("Work Phone"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $wphone; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("Pager"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $pager; ?>
|
|
||||||
</font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("Mobile"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $mphone; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font face="" size="-1" color="#000000"><?php echo lang("Other number"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $ophone; ?>
|
|
||||||
</font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><font face="" size="-1"><?php echo lang("Street"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $street; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font face="" size="-1"><?php echo lang("Birthday"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<?php
|
|
||||||
echo $phpgw->common->dateformatorder($bday_year,$bday_month,$bday_day)
|
|
||||||
. '<font face="' . $theme["font"] . '" size="-2">(e.g. 1969)</font>';
|
|
||||||
?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><font face="" size="-1"><?php echo lang("Line 2"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $address2; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><font face="" size="-1"><?php echo lang("City"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $city; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><font color="#000000" face="" size="-1"><?php echo lang("State"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $state; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><font face="" size="-1"><?php echo lang("ZIP Code"); ?>:</font></td>
|
|
||||||
<td>
|
|
||||||
<font size="-1">
|
|
||||||
<?php echo $zip; ?>
|
|
||||||
</font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
<td><font size="-1"></font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4"><font size="-1"></font></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($format == "view") {
|
if ($format == "view") {
|
||||||
if ($access != "private" && $access != "public") {
|
if ($access != "private" && $access != "public") {
|
||||||
echo "<td><font size=\"-1\">" . lang("Group access") . ":</font></td>"
|
$access_link .= '<td><font size="-1">'.lang("Group access").':</font></td>'
|
||||||
. "<td colspan=\"3\"><font size=\"-1\">"
|
. '<td colspan="3"><font size="-1">'
|
||||||
. $phpgw->accounts->convert_string_to_names($access);
|
. $phpgw->accounts->convert_string_to_names($access);
|
||||||
} else {
|
} else {
|
||||||
echo "<td><font size=\"-1\">" . lang("access") . ":</font></td>"
|
$access_link .= '<td><font size="-1">'.lang("Access").':</font></td>'
|
||||||
. "<td colspan=\"3\"><font size=\"-1\">"
|
. '<td colspan="3"><font size="-1">'
|
||||||
. $access;
|
. $access;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
?>
|
$access_link .= '<td><font size="-1">'.lang("Access").':</font></td>
|
||||||
<td><font size="-1"><?php echo lang("Access"); ?>:</font></td>
|
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<font size="-1">
|
<font size="-1">
|
||||||
|
|
||||||
<select name="access">
|
<select name="access">
|
||||||
<option value="private"<?php
|
<option value="private"';
|
||||||
if ($access == "private") echo " selected"; ?>><?php echo lang("private"); ?></option>
|
|
||||||
<option value="public"<?php
|
if ($access == "private") $access_link .= ' selected>'.lang("private").'</option>';
|
||||||
if ($access == "public") echo " selected"; ?>><?php echo lang("Global Public"); ?></option>
|
else $access_link .= '>'.lang("private").'</option>';
|
||||||
<option value="group"<?php
|
|
||||||
|
$access_link .= '<option value="public"
|
||||||
|
';
|
||||||
|
|
||||||
|
if ($access == "public")
|
||||||
|
$access_link .= ' selected>'.lang("Global Public").'</option>';
|
||||||
|
else $access_link .= '>'.lang("Global Public").'</option>';
|
||||||
|
|
||||||
|
$access_link .= '<option value="group"
|
||||||
|
';
|
||||||
|
|
||||||
if ($access != "public" && $access != "private" && $access != "")
|
if ($access != "public" && $access != "private" && $access != "")
|
||||||
echo " selected";
|
$access_link .= ' selected>'.lang("Group Public").'</option></select>';
|
||||||
echo ">" . lang("Group Public") . "</option></select>";
|
else
|
||||||
|
$access_link .= '>'.lang("Group Public").'</option></select>';
|
||||||
|
|
||||||
|
$access_link .= '</tr>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
if ($format != "view") {
|
if ($format != "view") {
|
||||||
echo "<tr><td><font size=\"-1\">" . lang("Which groups")
|
$access_link .= '<tr><td><font size="-1">' . lang("Which groups")
|
||||||
. ":</font></td><td colspan=\"3\"><select name=\"n_groups[]\" "
|
. ':</font></td><td colspan="3"><select name="n_groups[]" '
|
||||||
. "multiple size=\"5\">";
|
. 'multiple size="5">';
|
||||||
|
|
||||||
$user_groups = $phpgw->accounts->read_group_names($fields["ab_owner"]);
|
$user_groups = $phpgw->accounts->read_group_names($fields["ab_owner"]);
|
||||||
for ($i=0;$i<count($user_groups);$i++) {
|
for ($i=0;$i<count($user_groups);$i++) {
|
||||||
echo "<option value=\"" . $user_groups[$i][0] . "\"";
|
$access_link .= '<option value="'.$user_groups[$i][0].'"';
|
||||||
if (ereg(",".$user_groups[$i][0].",",$access))
|
if (ereg(",".$user_groups[$i][0].",",$access))
|
||||||
echo " selected";
|
$access_link .= ' selected';
|
||||||
|
|
||||||
echo ">" . $user_groups[$i][1] . "</option>\n";
|
$access_link .= '>'.$user_groups[$i][1].'</option>
|
||||||
|
';
|
||||||
}
|
}
|
||||||
echo "</select></font></td></tr>";
|
$access_link .= '</select></font></td></tr>';
|
||||||
|
$t->set_var("lang_access",lang("access"));
|
||||||
|
} else {
|
||||||
|
$access_link = '';
|
||||||
|
$t->set_var("lang_access",'');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($format == "view")
|
if ($format == "view")
|
||||||
echo "<tr><td><font size=\"-1\">" . lang("Created by") . ":</font></td>"
|
$create .= '<tr><td><font size="-1">'.lang("Created by").':</font></td>'
|
||||||
. "<td colspan=\"3\"><font size=\"-1\">"
|
. '<td colspan="3"><font size="-1">'
|
||||||
. grab_owner_name($fields["owner"]);
|
. grab_owner_name($fields["owner"]);
|
||||||
|
else
|
||||||
?></font>
|
$create = '';
|
||||||
</td>
|
|
||||||
</tr>
|
$t->set_var("lang_lastname",lang("Last Name"));
|
||||||
<tr>
|
$t->set_var("lastname",$lastname);
|
||||||
<td><font size="-1"><?php echo lang("Notes"); ?>:
|
$t->set_var("lang_firstname",lang("First Name"));
|
||||||
|
$t->set_var("firstname",$firstname);
|
||||||
</font></td>
|
$t->set_var("lang_company",lang("Company"));
|
||||||
<td colspan="3">
|
$t->set_var("company",$company);
|
||||||
<font size="-1">
|
$t->set_var("lang_title",lang("Title"));
|
||||||
<?php echo $notes; ?>
|
$t->set_var("title",$title);
|
||||||
</font></td>
|
$t->set_var("lang_email",lang("Email"));
|
||||||
</tr>
|
$t->set_var("email",$email);
|
||||||
</table>
|
$t->set_var("lang_url",lang("url"));
|
||||||
<?php
|
$t->set_var("url",$url);
|
||||||
|
$t->set_var("lang_hphone",lang("Home Phone"));
|
||||||
|
$t->set_var("hphone",$hphone);
|
||||||
|
$t->set_var("lang_fax",lang("fax"));
|
||||||
|
$t->set_var("fax",$fax);
|
||||||
|
$t->set_var("lang_wphone",lang("Work Phone"));
|
||||||
|
$t->set_var("wphone",$wphone);
|
||||||
|
$t->set_var("lang_pager",lang("Pager"));
|
||||||
|
$t->set_var("pager",$pager);
|
||||||
|
$t->set_var("lang_mphone",lang("Mobile Phone"));
|
||||||
|
$t->set_var("mphone",$mphone);
|
||||||
|
$t->set_var("lang_ophone",lang("Other Phone"));
|
||||||
|
$t->set_var("ophone",$ophone);
|
||||||
|
$t->set_var("lang_street",lang("Street"));
|
||||||
|
$t->set_var("street",$street);
|
||||||
|
$t->set_var("lang_birthday",lang("Birthday"));
|
||||||
|
$t->set_var("birthday",$birthday);
|
||||||
|
$t->set_var("lang_address2",lang("Line 2"));
|
||||||
|
$t->set_var("address2",$address2);
|
||||||
|
$t->set_var("lang_city",lang("city"));
|
||||||
|
$t->set_var("city",$state);
|
||||||
|
$t->set_var("lang_state",lang("state"));
|
||||||
|
$t->set_var("state",$state);
|
||||||
|
$t->set_var("lang_zip",lang("Zip Code"));
|
||||||
|
$t->set_var("zip",$zip);
|
||||||
|
$t->set_var("access_link",$access_link);
|
||||||
|
$t->set_var("create",$create);
|
||||||
|
$t->set_var("lang_notes",lang("notes"));
|
||||||
|
$t->set_var("notes",$notes);
|
||||||
|
|
||||||
|
$t->parse("out","form");
|
||||||
|
$t->pparse("out","form");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -202,7 +202,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td valign="top" width="5%">
|
<td valign="top" width="5%">
|
||||||
<font face="'.$phpgw_info["theme"]["font"].'" size="2">
|
<font face="'.$phpgw_info["theme"]["font"].'" size="2">
|
||||||
'.$phpgw->common->check_owner($phpgw->db->f("ab_owner"),"edit.php",lang("edit"),"ab_id=" . $phpgw->db->f("ab_id")).'
|
'.$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).'
|
||||||
</font>
|
</font>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -219,6 +219,8 @@
|
|||||||
$t->set_var("lang_vcard",lang("VCard"));
|
$t->set_var("lang_vcard",lang("VCard"));
|
||||||
$t->set_var("lang_edit",lang("Edit"));
|
$t->set_var("lang_edit",lang("Edit"));
|
||||||
$t->set_var("start",$start);
|
$t->set_var("start",$start);
|
||||||
|
$t->set_var("sort",$sort);
|
||||||
|
$t->set_var("order",$order);
|
||||||
$t->set_var("filter",$filter);
|
$t->set_var("filter",$filter);
|
||||||
$t->set_var("qfield",$qfield);
|
$t->set_var("qfield",$qfield);
|
||||||
$t->set_var("query",$query);
|
$t->set_var("query",$query);
|
||||||
|
135
addressbook/oldadd.php
Executable file
135
addressbook/oldadd.php
Executable file
@ -0,0 +1,135 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* phpGroupWare - addressbook *
|
||||||
|
* http://www.phpgroupware.org *
|
||||||
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
|
* option) any later version. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
if ($submit || $AddVcard) {
|
||||||
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||||
|
}
|
||||||
|
|
||||||
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||||
|
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
||||||
|
include("../header.inc.php");
|
||||||
|
|
||||||
|
|
||||||
|
if ($AddVcard){
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] .
|
||||||
|
"/addressbook/vcardin.php"));
|
||||||
|
}
|
||||||
|
else if ($add_email) {
|
||||||
|
list($fields["firstname"],$fields["lastname"]) = explode(" ", $name);
|
||||||
|
$fields["email"] = $add_email;
|
||||||
|
form("","add.php","Add",$fields);
|
||||||
|
} else if (! $submit && ! $add_email) {
|
||||||
|
form("","add.php","Add","","","");
|
||||||
|
} else {
|
||||||
|
if (! $bday_month && ! $bday_day && ! $bday_year) {
|
||||||
|
$bday = "";
|
||||||
|
} else {
|
||||||
|
$bday = "$bday_month/$bday_day/$bday_year";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($access != "private" && $access != "public") {
|
||||||
|
$access = $phpgw->accounts->array_to_string($access,$n_groups);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($url == "http://") {
|
||||||
|
$url = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
|
||||||
|
$sql = "insert into addressbook (ab_owner,ab_access,ab_firstname,ab_lastname,ab_title,ab_email,"
|
||||||
|
. "ab_hphone,ab_wphone,ab_fax,ab_pager,ab_mphone,ab_ophone,ab_street,ab_address2,ab_city,"
|
||||||
|
. "ab_state,ab_zip,ab_bday,"
|
||||||
|
. "ab_notes,ab_company_id,ab_url) values ('" . $phpgw_info["user"]["account_id"] . "','$access','"
|
||||||
|
. addslashes($firstname). "','"
|
||||||
|
. addslashes($lastname) . "','"
|
||||||
|
. addslashes($title) . "','"
|
||||||
|
. addslashes($email) . "','"
|
||||||
|
. addslashes($hphone) . "','"
|
||||||
|
. addslashes($wphone) . "','"
|
||||||
|
. addslashes($fax) . "','"
|
||||||
|
. addslashes($pager) . "','"
|
||||||
|
. addslashes($mphone) . "','"
|
||||||
|
. addslashes($ophone) . "','"
|
||||||
|
. addslashes($street) . "','"
|
||||||
|
. addslashes($address2) . "','"
|
||||||
|
. addslashes($city) . "','"
|
||||||
|
. addslashes($state) . "','"
|
||||||
|
. addslashes($zip) . "','"
|
||||||
|
. addslashes($bday) . "','"
|
||||||
|
. addslashes($notes) . "','"
|
||||||
|
. addslashes($company) . "','"
|
||||||
|
. addslashes($url) . "')";
|
||||||
|
} else {
|
||||||
|
$sql = "insert into addressbook (ab_owner,ab_access,ab_firstname,ab_lastname,ab_title,ab_email,"
|
||||||
|
. "ab_hphone,ab_wphone,ab_fax,ab_pager,ab_mphone,ab_ophone,ab_street,ab_address2,ab_city,"
|
||||||
|
. "ab_state,ab_zip,ab_bday,"
|
||||||
|
. "ab_notes,ab_company,ab_url) values ('" . $phpgw_info["user"]["account_id"] . "','$access','"
|
||||||
|
. addslashes($firstname). "','"
|
||||||
|
. addslashes($lastname) . "','"
|
||||||
|
. addslashes($title) . "','"
|
||||||
|
. addslashes($email) . "','"
|
||||||
|
. addslashes($hphone) . "','"
|
||||||
|
. addslashes($wphone) . "','"
|
||||||
|
. addslashes($fax) . "','"
|
||||||
|
. addslashes($pager) . "','"
|
||||||
|
. addslashes($mphone) . "','"
|
||||||
|
. addslashes($ophone) . "','"
|
||||||
|
. addslashes($street) . "','"
|
||||||
|
. addslashes($address2) . "','"
|
||||||
|
. addslashes($city) . "','"
|
||||||
|
. addslashes($state) . "','"
|
||||||
|
. addslashes($zip) . "','"
|
||||||
|
. addslashes($bday) . "','"
|
||||||
|
. addslashes($notes) . "','"
|
||||||
|
. addslashes($company) . "','"
|
||||||
|
. addslashes($url) . "')";
|
||||||
|
}
|
||||||
|
$phpgw->db->query($sql);
|
||||||
|
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/",
|
||||||
|
"cd=14"));
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<TABLE border="0" cellPadding="0" cellSpacing="0" width="95%">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD>
|
||||||
|
<TABLE border="0" cellPadding="1" cellSpacing="1">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT type="submit" name="submit" value="<?php echo lang("OK"); ?>">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT name="reset" type="reset" value="<?php echo lang("Clear"); ?>">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
<a href="<?php echo $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/") . "\">" . lang("Cancel"); ?></a>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</FORM>
|
||||||
|
</DIV>
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$phpgw->common->phpgw_footer();
|
||||||
|
?>
|
53
addressbook/olddelete.php
Executable file
53
addressbook/olddelete.php
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* phpGroupWare - addressbook *
|
||||||
|
* http://www.phpgroupware.org *
|
||||||
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
|
* option) any later version. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
if ($confirm) {
|
||||||
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||||
|
}
|
||||||
|
|
||||||
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||||
|
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
||||||
|
include("../header.inc.php");
|
||||||
|
|
||||||
|
if (! $ab_id) {
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($confirm != "true") {
|
||||||
|
$phpgw->db->query("select ab_owner from addressbook where ab_id='$ab_id'");
|
||||||
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
|
if ($phpgw->db->f("ab_owner") != $phpgw_info["user"]["account_id"])
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/addressbook/"));
|
||||||
|
|
||||||
|
?>
|
||||||
|
<body bgcolor=FFFFFF aLink=0000EE link=0000EE vlink=0000EE>
|
||||||
|
<center><?php echo lang("Are you sure you want to delete this entry ?"); ?><center>
|
||||||
|
<br><center><a href="<?php
|
||||||
|
echo $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter=$filter&start=$start&query=$query");
|
||||||
|
?>"><?php echo lang("NO"); ?></a>
|
||||||
|
<a href="<?php echo $phpgw->link("delete.php","ab_id=$ab_id&confirm=true&order=$order&sort=$sort&filter=$filter&start=$start&query=$query");
|
||||||
|
?>"><?php echo lang("YES"); ?></a><center>
|
||||||
|
<?php
|
||||||
|
$phpgw->common->phpgw_footer();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$phpgw->db->query("delete from addressbook where ab_owner='" . $phpgw_info["user"]["account_id"]
|
||||||
|
. "' and ab_id='$ab_id'");
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||||
|
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
159
addressbook/oldedit.php
Executable file
159
addressbook/oldedit.php
Executable file
@ -0,0 +1,159 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* phpGroupWare - addressbook *
|
||||||
|
* http://www.phpgroupware.org *
|
||||||
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
|
* -------------------------------------------- *
|
||||||
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
|
* under the terms of the GNU General Public License as published by the *
|
||||||
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
|
* option) any later version. *
|
||||||
|
\**************************************************************************/
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
if ($submit || ! $ab_id) {
|
||||||
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||||
|
}
|
||||||
|
|
||||||
|
$phpgw_info["flags"]["currentapp"] = "addressbook";
|
||||||
|
$phpgw_info["flags"]["enable_addressbook_class"] = True;
|
||||||
|
include("../header.inc.php");
|
||||||
|
|
||||||
|
if (! $ab_id) {
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]. "/addressbook/",
|
||||||
|
"cd=16&order=$order&sort=$sort&filter=$filter&start=$start&query=$query"));
|
||||||
|
$phpgw->common->phpgw_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $submit) {
|
||||||
|
$phpgw->db->query("SELECT * FROM addressbook WHERE ab_owner='"
|
||||||
|
. $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id");
|
||||||
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
|
$fields = array('ab_id' => $phpgw->db->f("ab_id"),
|
||||||
|
'owner' => $phpgw->db->f("ab_owner"),
|
||||||
|
'access' => $phpgw->db->f("ab_access"),
|
||||||
|
'firstname' => $phpgw->db->f("ab_firstname"),
|
||||||
|
'lastname' => $phpgw->db->f("ab_lastname"),
|
||||||
|
'title' => $phpgw->db->f("ab_title"),
|
||||||
|
'email' => $phpgw->db->f("ab_email"),
|
||||||
|
'hphone' => $phpgw->db->f("ab_hphone"),
|
||||||
|
'wphone' => $phpgw->db->f("ab_wphone"),
|
||||||
|
'fax' => $phpgw->db->f("ab_fax"),
|
||||||
|
'pager' => $phpgw->db->f("ab_pager"),
|
||||||
|
'mphone' => $phpgw->db->f("ab_mphone"),
|
||||||
|
'ophone' => $phpgw->db->f("ab_ophone"),
|
||||||
|
'street' => $phpgw->db->f("ab_street"),
|
||||||
|
'address2' => $phpgw->db->f("ab_address2"),
|
||||||
|
'city' => $phpgw->db->f("ab_city"),
|
||||||
|
'state' => $phpgw->db->f("ab_state"),
|
||||||
|
'zip' => $phpgw->db->f("ab_zip"),
|
||||||
|
'bday' => $phpgw->db->f("ab_bday"),
|
||||||
|
'company' => $phpgw->db->f("ab_company"),
|
||||||
|
'company_id' => $phpgw->db->f("ab_company_id"),
|
||||||
|
'notes' => $phpgw->db->f("ab_notes")
|
||||||
|
,
|
||||||
|
'url' => $phpgw->db->f("ab_url")
|
||||||
|
);
|
||||||
|
|
||||||
|
form("","edit.php","Edit",$fields);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if ($url == "http://") {
|
||||||
|
$url = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $bday_month && ! $bday_day && ! $bday_year) {
|
||||||
|
$bday = "";
|
||||||
|
} else {
|
||||||
|
$bday = "$bday_month/$bday_day/$bday_year";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($access != "private" && $access != "public") {
|
||||||
|
$access = $phpgw->accounts->array_to_string($access,$n_groups);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($phpgw_info["apps"]["timetrack"]["enabled"]) {
|
||||||
|
$sql = "UPDATE addressbook set ab_email='" . addslashes($email)
|
||||||
|
. "', ab_firstname='" . addslashes($firstname)
|
||||||
|
. "', ab_lastname='" . addslashes($lastname)
|
||||||
|
. "', ab_title='" . addslashes($title)
|
||||||
|
. "', ab_hphone='" . addslashes($hphone)
|
||||||
|
. "', ab_wphone='" . addslashes($wphone)
|
||||||
|
. "', ab_fax='" . addslashes($fax)
|
||||||
|
. "', ab_pager='" . addslashes($pager)
|
||||||
|
. "', ab_mphone='" . addslashes($mphone)
|
||||||
|
. "', ab_ophone='" . addslashes($ophone)
|
||||||
|
. "', ab_street='" . addslashes($street)
|
||||||
|
. "', ab_address2='" . addslashes($address2)
|
||||||
|
. "', ab_city='" . addslashes($city)
|
||||||
|
. "', ab_state='" . addslashes($state)
|
||||||
|
. "', ab_zip='" . addslashes($zip)
|
||||||
|
. "', ab_bday='" . addslashes($bday)
|
||||||
|
. "', ab_notes='" . addslashes($notes)
|
||||||
|
. "', ab_company_id='" . addslashes($company)
|
||||||
|
. "', ab_access='" . addslashes($access)
|
||||||
|
. "', ab_url='" . addslashes($url)
|
||||||
|
. "' WHERE ab_owner='" . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id";
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE addressbook set ab_email='" . addslashes($email)
|
||||||
|
. "', ab_firstname='". addslashes($firstname)
|
||||||
|
. "', ab_lastname='" . addslashes($lastname)
|
||||||
|
. "', ab_title='" . addslashes($title)
|
||||||
|
. "', ab_hphone='" . addslashes($hphone)
|
||||||
|
. "', ab_wphone='" . addslashes($wphone)
|
||||||
|
. "', ab_fax='" . addslashes($fax)
|
||||||
|
. "', ab_pager='" . addslashes($pager)
|
||||||
|
. "', ab_mphone='" . addslashes($mphone)
|
||||||
|
. "', ab_ophone='" . addslashes($ophone)
|
||||||
|
. "', ab_street='" . addslashes($street)
|
||||||
|
. "', ab_address2='" . addslashes($address2)
|
||||||
|
. "', ab_city='" . addslashes($city)
|
||||||
|
. "', ab_state='" . addslashes($state)
|
||||||
|
. "', ab_zip='" . addslashes($zip)
|
||||||
|
. "', ab_bday='" . addslashes($bday)
|
||||||
|
. "', ab_notes='" . addslashes($notes)
|
||||||
|
. "', ab_company='" . addslashes($company)
|
||||||
|
. "', ab_access='" . addslashes($access)
|
||||||
|
. "', ab_url='" . addslashes($url)
|
||||||
|
. "' WHERE ab_owner='" . $phpgw_info["user"]["account_id"] . "' AND ab_id=$ab_id";
|
||||||
|
}
|
||||||
|
|
||||||
|
$phpgw->db->query($sql);
|
||||||
|
|
||||||
|
Header("Location: " . $phpgw->link("view.php","&ab_id=$ab_id&order=$order&sort=$sort&filter="
|
||||||
|
. "$filter&start=$start"));
|
||||||
|
$phpgw->common->phpgw_exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="ab_id" value="<? echo $ab_id; ?>">
|
||||||
|
<input type="hidden" name="sort" value="<? echo $sort; ?>">
|
||||||
|
<input type="hidden" name="order" value="<? echo $order; ?>">
|
||||||
|
<input type="hidden" name="filter" value="<? echo $filter; ?>">
|
||||||
|
<input type="hidden" name="start" value="<? echo $start; ?>">
|
||||||
|
|
||||||
|
<TABLE border="0" cellPadding="1" cellSpacing="1" width="95%">
|
||||||
|
<TBODY>
|
||||||
|
<tr>
|
||||||
|
<TD align="left" width="7%">
|
||||||
|
<input type="submit" name="submit" value="<?php echo lang("Submit"); ?>">
|
||||||
|
</TD>
|
||||||
|
<TD align="left" width="7%">
|
||||||
|
<a href="<?php echo $phpgw->link("view.php","ab_id=$ab_id") . "\">" . lang("Cancel"); ?></a>
|
||||||
|
</TD>
|
||||||
|
<TD align="right">
|
||||||
|
<a href="<?php echo $phpgw->link("delete.php","ab_id=$ab_id") . "\">" . lang("Delete"); ?></a>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
|
||||||
|
</DIV>
|
||||||
|
</BODY>
|
||||||
|
</HTML>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$phpgw->common->phpgw_footer();
|
||||||
|
?>
|
27
addressbook/templates/default/add.tpl
Normal file
27
addressbook/templates/default/add.tpl
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
<!-- BEGIN add -->
|
||||||
|
<TABLE border="0" cellPadding="0" cellSpacing="0" width="95%">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD>
|
||||||
|
<TABLE border="0" cellPadding="1" cellSpacing="1">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT type="submit" name="submit" value="{lang_ok}">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT type="reset" name="reset" value="{lang_clear}">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
{cancel_link}<INPUT type="submit" name="cancel" value="{lang_cancel}"></a>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</FORM>
|
||||||
|
<!-- END add -->
|
36
addressbook/templates/default/edit.tpl
Normal file
36
addressbook/templates/default/edit.tpl
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
<!-- BEGIN edit -->
|
||||||
|
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||||
|
<input type="hidden" name="sort" value="{sort}">
|
||||||
|
<input type="hidden" name="order" value="{order}">
|
||||||
|
<input type="hidden" name="filter" value="{filter}">
|
||||||
|
<input type="hidden" name="start" value="{start}">
|
||||||
|
|
||||||
|
<TABLE border="0" cellPadding="1" cellSpacing="1" width="95%">
|
||||||
|
<TBODY>
|
||||||
|
<tr>
|
||||||
|
<TD align="left" width="7%">
|
||||||
|
<input type="submit" name="submit" value="{lang_submit}"></form>
|
||||||
|
</TD>
|
||||||
|
<TD align="left" width="7%">
|
||||||
|
{cancel_link}
|
||||||
|
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||||
|
<input type="hidden" name="sort" value="{sort}">
|
||||||
|
<input type="hidden" name="order" value="{order}">
|
||||||
|
<input type="hidden" name="filter" value="{filter}">
|
||||||
|
<input type="hidden" name="start" value="{start}">
|
||||||
|
<INPUT type="submit" name="cancel" value="{lang_cancel}"></form>
|
||||||
|
</TD>
|
||||||
|
<TD align="right">
|
||||||
|
{delete_link}
|
||||||
|
<input type="hidden" name="ab_id" value="{ab_id}">
|
||||||
|
<input type="hidden" name="sort" value="{sort}">
|
||||||
|
<input type="hidden" name="order" value="{order}">
|
||||||
|
<input type="hidden" name="filter" value="{filter}">
|
||||||
|
<input type="hidden" name="start" value="{start}">
|
||||||
|
<INPUT type="submit" name="delete" value="{lang_delete}"></form>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
<!-- END edit -->
|
154
addressbook/templates/default/form.tpl
Executable file
154
addressbook/templates/default/form.tpl
Executable file
@ -0,0 +1,154 @@
|
|||||||
|
|
||||||
|
<!-- BEGIN addressbook entry form -->
|
||||||
|
<table width="75%" border="0" align="center">
|
||||||
|
<tr>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_lastname}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{lastname}
|
||||||
|
</font></td>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_firstname}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{firstname}
|
||||||
|
</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<font color="#000000" face="" size="-1">{lang_title}:</font>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{title}
|
||||||
|
</font></td>
|
||||||
|
<td>
|
||||||
|
<font color="#000000" face="" size="-1">{lang_email}:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{email}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<font color="#000000" face="" size="-1">{lang_company}:</font>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">{company}</font>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<font color="#000000" face="" size="-1">{lang_url}:</font>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input name="url" value="{url}">
|
||||||
|
</td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_hphone}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{hphone}
|
||||||
|
</font></td>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_fax}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{fax}
|
||||||
|
</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_wphone}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{wphone}
|
||||||
|
</font></td>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_pager}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{pager}
|
||||||
|
</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_mphone}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{mphone}
|
||||||
|
</font></td>
|
||||||
|
<td><font face="" size="-1" color="#000000">{lang_ophone}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{ophone}
|
||||||
|
</font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font face="" size="-1">{lang_street}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{street}
|
||||||
|
</font></td>
|
||||||
|
<td><font face="" size="-1">{lang_birthday}:</font></td>
|
||||||
|
<td>
|
||||||
|
{birthday}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font face="" size="-1">{lang_address2}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{address2}
|
||||||
|
</font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font face="" size="-1">{lang_city}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{city}
|
||||||
|
</font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font color="#000000" face="" size="-1">{lang_state}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{state}
|
||||||
|
</font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font face="" size="-1">{lang_zip}:</font></td>
|
||||||
|
<td>
|
||||||
|
<font size="-1">
|
||||||
|
{zip}
|
||||||
|
</font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
<td><font size="-1"></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="4"><font size="-1"></font></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<!-- BEGIN Access -->
|
||||||
|
{access_link}
|
||||||
|
<!-- END Access -->
|
||||||
|
<!-- BEGIN creator -->
|
||||||
|
{create}
|
||||||
|
<!-- END creator -->
|
||||||
|
<td colspan="3">
|
||||||
|
<font size="-1">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><font size="-1">{lang_notes}:</font></td>
|
||||||
|
<td colspan="3">
|
||||||
|
<font size="-1">
|
||||||
|
{notes}
|
||||||
|
</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- END addressbook entry form -->
|
27
addressbook/templates/justweb/add.tpl
Normal file
27
addressbook/templates/justweb/add.tpl
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
<!-- BEGIN add -->
|
||||||
|
<TABLE border="0" cellPadding="0" cellSpacing="0" width="95%">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD>
|
||||||
|
<TABLE border="0" cellPadding="1" cellSpacing="1">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT type="submit" name="submit" value="{lang_ok}">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT type="reset" name="reset" value="{lang_clear}">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
{cancel_link}<INPUT type="submit" name="cancel" value="{lang_cancel}"></a>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</FORM>
|
||||||
|
<!-- END add -->
|
27
addressbook/templates/verdilak/add.tpl
Normal file
27
addressbook/templates/verdilak/add.tpl
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
<!-- BEGIN add -->
|
||||||
|
<TABLE border="0" cellPadding="0" cellSpacing="0" width="95%">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD>
|
||||||
|
<TABLE border="0" cellPadding="1" cellSpacing="1">
|
||||||
|
<TBODY>
|
||||||
|
<TR>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT type="submit" name="submit" value="{lang_ok}">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
<INPUT type="reset" name="reset" value="{lang_clear}">
|
||||||
|
</TD>
|
||||||
|
<TD align="left">
|
||||||
|
{cancel_link}<INPUT type="submit" name="cancel" value="{lang_cancel}"></a>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</TD>
|
||||||
|
</TR>
|
||||||
|
</TBODY>
|
||||||
|
</TABLE>
|
||||||
|
</FORM>
|
||||||
|
<!-- END add -->
|
Loading…
Reference in New Issue
Block a user