Working on fixing the preferences on main screen

This commit is contained in:
jengo 2000-10-23 19:52:50 +00:00
parent 9d9bd233ad
commit 586e096725

View File

@ -30,9 +30,9 @@
$phpgw->common->phpgw_header(); $phpgw->common->phpgw_header();
$phpgw->common->navbar(); $phpgw->common->navbar();
$phpgw->common->read_preferences($phpgw_info["user"]["loginid"],"addressbook",True); $phpgw->common->read_preferences($phpgw_info["user"]["userid"],"addressbook",True);
$phpgw->common->read_preferences($phpgw_info["user"]["loginid"],"email",True); $phpgw->common->read_preferences($phpgw_info["user"]["userid"],"email",True);
$phpgw->common->read_preferences($phpgw_info["user"]["loginid"],"calendar",True); $phpgw->common->read_preferences($phpgw_info["user"]["userid"],"calendar",True);
if ($phpgw_info["user"]["permissions"]["admin"] && $phpgw_info["server"]["checkfornewversion"]) { if ($phpgw_info["user"]["permissions"]["admin"] && $phpgw_info["server"]["checkfornewversion"]) {
$phpgw->network->set_addcrlf(False); $phpgw->network->set_addcrlf(False);
@ -54,7 +54,7 @@
} }
} }
echo '<TABLE border="0">'; echo '<p><TABLE border="0">';
?> ?>
<script langague="JavaScript"> <script langague="JavaScript">
function opennotifywindow() function opennotifywindow()
@ -94,26 +94,22 @@
echo "<!-- Mailox info -->\n"; echo "<!-- Mailox info -->\n";
} }
if ($phpgw_info["user"]["preferences"]["addressbook"]["mainscreen_showbirthdays"]) {
echo "addressbook pereferences";
}
if ($phpgw_info["user"]["apps"]["addressbook"] if ($phpgw_info["user"]["apps"]["addressbook"]
&& $phpgw_info["user"]["preferences"]["addressbook"]["mainscreen_showbirthdays"]) { && $phpgw_info["user"]["preferences"]["addressbook"]["mainscreen_showbirthdays"]) {
echo "<!-- Birthday info -->\n"; echo "<!-- Birthday info -->\n";
$phpgw->db->query("select DISTINCT firstname,lastname from addressbook where " $phpgw->db->query("select DISTINCT ab_firstname,ab_lastname from addressbook where "
. "bday like '" . $phpgw->common->show_date(time(),"n/d") . "ab_bday like '" . $phpgw->common->show_date(time(),"n/d")
. "/%' and (owner='" . $phpgw_info["user"]["userid"] . "' or access='" . "/%' and (ab_owner='" . $phpgw_info["user"]["userid"] . "' or ab_access='"
. "public')"); . "ab_public')");
while ($phpgw->db->next_record()) { while ($phpgw->db->next_record()) {
echo "<tr><td>" . lang("Today is x's birthday!", $phpgw->db->f("firstname") . " " echo "<tr><td>" . lang("Today is x's birthday!", $phpgw->db->f("ab_firstname") . " "
. $phpgw->db->f("lastname")) . "</td></tr>\n"; . $phpgw->db->f("ab_lastname")) . "</td></tr>\n";
} }
$tommorow = $phpgw->common->show_date(mktime(0,0,0, $tommorow = $phpgw->common->show_date(mktime(0,0,0,
$phpgw->common->show_date(time(),"m"), $phpgw->common->show_date(time(),"m"),
$phpgw->common->show_date(time(),"d")+1, $phpgw->common->show_date(time(),"d")+1,
$phpgw->common->show_date(time(),"Y")),"n/d" ); $phpgw->common->show_date(time(),"Y")),"n/d" );
$phpgw->db->query("select firstname,lastname from addressbook where " $phpgw->db->query("select ab_firstname,ab_lastname from addressbook where "
. "ab_bday like '$tommorow/%' and (ab_owner='" . "ab_bday like '$tommorow/%' and (ab_owner='"
. $phpgw_info["user"]["userid"] . "' or ab_access='public')"); . $phpgw_info["user"]["userid"] . "' or ab_access='public')");
while ($phpgw->db->next_record()) { while ($phpgw->db->next_record()) {