forked from extern/egroupware
Working on changing all of the preferecnes to work of a new type of array. I added a column for appname
This commit is contained in:
parent
e9039ac2ea
commit
660c80f4e9
@ -25,7 +25,7 @@
|
|||||||
section_start("Address Book",$img);
|
section_start("Address Book",$img);
|
||||||
|
|
||||||
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/addressbook/preferences.php");
|
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/addressbook/preferences.php");
|
||||||
echo "<A href=".$pg.">Select columns to display</A>";
|
echo "<A href=".$pg.">" . lang("Select columns to display") . "</A>";
|
||||||
|
|
||||||
section_end();
|
section_end();
|
||||||
}
|
}
|
||||||
|
@ -75,16 +75,17 @@
|
|||||||
$phpgw->db->query("select count(*) from addressbook where $filtermethod");
|
$phpgw->db->query("select count(*) from addressbook where $filtermethod");
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
}
|
}
|
||||||
if($phpgw_info["apps"]["timetrack"]["enabled"])
|
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
|
||||||
$company_sortorder = "c.company_name";
|
$company_sortorder = "c.company_name";
|
||||||
else
|
} else {
|
||||||
$company_sortorder = "ab_company";
|
$company_sortorder = "ab_company";
|
||||||
|
}
|
||||||
|
|
||||||
//$phpgw->db->next_record();
|
//$phpgw->db->next_record();
|
||||||
|
|
||||||
if ($phpgw->db->f(0) > $phpgw_info["user"]["preferences"]["maxmatchs"])
|
if ($phpgw->db->f(0) > $phpgw_info["user"]["preferences"]["common"]["maxmatchs"])
|
||||||
echo "<br>" . lang("showing x - x of x",($start + 1),
|
echo "<br>" . lang("showing x - x of x",($start + 1),
|
||||||
($start + $phpgw_info["user"]["preferences"]["maxmatchs"]),$phpgw->db->f(0));
|
($start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),$phpgw->db->f(0));
|
||||||
else
|
else
|
||||||
echo "<br>" . lang("showing x",$phpgw->db->f(0));
|
echo "<br>" . lang("showing x",$phpgw->db->f(0));
|
||||||
?>
|
?>
|
||||||
@ -97,34 +98,34 @@
|
|||||||
<table width=75% border=0 cellspacing=1 cellpadding=3>
|
<table width=75% border=0 cellspacing=1 cellpadding=3>
|
||||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
|
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
|
||||||
<?php
|
<?php
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_company"] == "True" ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["company"]) {
|
||||||
echo '<td height="21">';
|
echo '<td height="21">';
|
||||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||||
echo $phpgw->nextmatchs->show_sort_order($sort,$company_sortorder,$order,"index.php",lang("Company Name"));
|
echo $phpgw->nextmatchs->show_sort_order($sort,$company_sortorder,$order,"index.php",lang("Company Name"));
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
}
|
}
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_lastname"] == "True" ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["lastname"]) {
|
||||||
echo '<td height="21">';
|
echo '<td height="21">';
|
||||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_lastname",$order,"index.php",
|
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_lastname",$order,"index.php",
|
||||||
lang("Last Name"));
|
lang("Last Name"));
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
}
|
}
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_firstname"] == "True" ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["firstname"]) {
|
||||||
echo '<td height="21">';
|
echo '<td height="21">';
|
||||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_firstname",$order,"index.php",
|
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_firstname",$order,"index.php",
|
||||||
lang("First Name"));
|
lang("First Name"));
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
}
|
}
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_email"] == "True" ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["email"]) {
|
||||||
echo '<td height="21">';
|
echo '<td height="21">';
|
||||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_email",$order,"index.php",
|
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_email",$order,"index.php",
|
||||||
lang("Email"));
|
lang("Email"));
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
}
|
}
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_wphone"] == "True" ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["wphone"]) {
|
||||||
echo '<td height="21">';
|
echo '<td height="21">';
|
||||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_wphone",$order,"index.php",
|
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_wphone",$order,"index.php",
|
||||||
@ -188,47 +189,48 @@
|
|||||||
$firstname = $phpgw->db->f("ab_firstname");
|
$firstname = $phpgw->db->f("ab_firstname");
|
||||||
$lastname = $phpgw->db->f("ab_lastname");
|
$lastname = $phpgw->db->f("ab_lastname");
|
||||||
$email = $phpgw->db->f("ab_email");
|
$email = $phpgw->db->f("ab_email");
|
||||||
if($phpgw_info["apps"]["timetrack"]["enabled"])
|
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
|
||||||
$company = $phpgw->db->f("company_name");
|
$company = $phpgw->db->f("company_name");
|
||||||
else
|
} else {
|
||||||
$company = $phpgw->db->f("company");
|
$company = $phpgw->db->f("company");
|
||||||
|
}
|
||||||
$wphone = $phpgw->db->f("ab_wphone");
|
$wphone = $phpgw->db->f("ab_wphone");
|
||||||
$ab_id = $phpgw->db->f("ab_id");
|
$ab_id = $phpgw->db->f("ab_id");
|
||||||
|
|
||||||
if($firstname == "") $firstname = " ";
|
if ($firstname == "") $firstname = " ";
|
||||||
if($lastname == "") $lastname = " ";
|
if ($lastname == "") $lastname = " ";
|
||||||
if($email == "") $email = " ";
|
if ($email == "") $email = " ";
|
||||||
if($company == "") $company = " ";
|
if ($company == "") $company = " ";
|
||||||
if($wphone == "") $wphone = " ";
|
if ($wphone == "") $wphone = " ";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
echo '<tr bgcolor="#'.$tr_color.'";>';
|
echo '<tr bgcolor="#'.$tr_color.'";>';
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_company"] == 'True' ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["company"]) {
|
||||||
echo '<td valign=top>';
|
echo '<td valign=top>';
|
||||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||||
echo $company;
|
echo $company;
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
};
|
};
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_lastname"] == 'True' ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["lastname"]) {
|
||||||
echo '<td valign=top>';
|
echo '<td valign=top>';
|
||||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||||
echo $lastname;
|
echo $lastname;
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
};
|
};
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_firstname"] == 'True' ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["firstname"]) {
|
||||||
echo '<td valign=top>';
|
echo '<td valign=top>';
|
||||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||||
echo $firstname;
|
echo $firstname;
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
};
|
};
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_email"] == 'True' ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["email"]) {
|
||||||
echo '<td valign=top>';
|
echo '<td valign=top>';
|
||||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||||
echo '<a href="mailto:' . $email . '">' . $email . '</a>';
|
echo '<a href="mailto:' . $email . '">' . $email . '</a>';
|
||||||
echo '</font></td>';
|
echo '</font></td>';
|
||||||
};
|
};
|
||||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_wphone"] == 'True' ) {
|
if ($phpgw_info["user"]["preferences"]["addressbook"]["wphone"]) {
|
||||||
echo '<td valign=top>';
|
echo '<td valign=top>';
|
||||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||||
echo $wphone;
|
echo $wphone;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
if (! $totalerrors) {
|
if (! $totalerrors) {
|
||||||
$phpgw->common->preferences_delete("byapp",$phpgw_info["user"]["userid"],"addressbook");
|
$phpgw->common->preferences_delete("byapp",$phpgw_info["user"]["userid"],"addressbook");
|
||||||
while ($pref = each($ab_selected)) {
|
while ($pref = each($ab_selected)) {
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],$pref[0],"addressbook",$pref[1]);
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],$pref[0],"addressbook","addressbook_" . $pref[1]);
|
||||||
}
|
}
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/index.php"));
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/index.php"));
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@
|
|||||||
while (list($col, $descr) = each($abc)) {
|
while (list($col, $descr) = each($abc)) {
|
||||||
$i++; $j++;
|
$i++; $j++;
|
||||||
echo '<td><input type="checkbox" name="ab_selected[' . $col . ']" value="True"'
|
echo '<td><input type="checkbox" name="ab_selected[' . $col . ']" value="True"'
|
||||||
. ($phpgw_info["user"]["preferences"][$col]?" checked":"") . '>' . $descr
|
. ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . $descr
|
||||||
. '</option></td>';
|
. '</option></td>';
|
||||||
|
|
||||||
if ($i ==3) {
|
if ($i ==3) {
|
||||||
|
@ -16,19 +16,19 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
if (! $phpgw_info["flags"]["nocalendarfooter"]) {
|
||||||
|
?>
|
||||||
|
<BR CLEAR="all">
|
||||||
|
<HR CLEAR="all">
|
||||||
|
<FONT SIZE="-1">
|
||||||
|
|
||||||
<BR CLEAR="all">
|
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
||||||
<HR CLEAR="all">
|
<FORM ACTION="<?php echo $phpgw->link("index.php"); ?>" method="post" name="SelectMonth">
|
||||||
<FONT SIZE="-1">
|
<TR>
|
||||||
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
<TD VALIGN="top" WIDTH=33%><FONT SIZE="-1">
|
||||||
<FORM ACTION="<?php echo $phpgw->link("index.php"); ?>" method="post" name="SelectMonth">
|
<B><?php echo lang("Month"); ?>:</B>
|
||||||
|
<SELECT NAME="date" ONCHANGE="document.SelectMonth.submit()">
|
||||||
<TR><TD VALIGN="top" WIDTH=33%><FONT SIZE="-1">
|
<?php
|
||||||
<B><?php echo lang("Month"); ?>:</B>
|
|
||||||
|
|
||||||
<SELECT NAME="date" ONCHANGE="document.SelectMonth.submit()">
|
|
||||||
<?php
|
|
||||||
if ($thisyear && $thismonth) {
|
if ($thisyear && $thismonth) {
|
||||||
$m = $thismonth;
|
$m = $thismonth;
|
||||||
$y = $thisyear;
|
$y = $thisyear;
|
||||||
@ -51,20 +51,16 @@
|
|||||||
echo " SELECTED";
|
echo " SELECTED";
|
||||||
echo ">" . lang(date("F", $d)) . strftime(" %Y", $d) . "</option>\n";
|
echo ">" . lang(date("F", $d)) . strftime(" %Y", $d) . "</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</SELECT>
|
</SELECT>
|
||||||
|
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT></FONT>
|
||||||
|
</TD>
|
||||||
|
</FORM>
|
||||||
|
<FORM ACTION="<?php echo $phpgw->link("week.php"); ?>" method="post" name="SelectWeek">
|
||||||
|
<TD VALIGN="top" align="center" WIDTH=33%><FONT SIZE="-1"><B><?php echo lang("Week"); ?>:</B>
|
||||||
|
|
||||||
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT>
|
<SELECT NAME="date" ONCHANGE="document.SelectWeek.submit()">
|
||||||
</FONT></TD>
|
<?php
|
||||||
</FORM>
|
|
||||||
|
|
||||||
<FORM ACTION="<?php echo $phpgw->link("week.php"); ?>" method="post" name="SelectWeek">
|
|
||||||
|
|
||||||
<TD VALIGN="top" align="center" WIDTH=33%><FONT SIZE="-1">
|
|
||||||
<B><?php echo lang("Week"); ?>:</B>
|
|
||||||
|
|
||||||
<SELECT NAME="date" ONCHANGE="document.SelectWeek.submit()">
|
|
||||||
<?php
|
|
||||||
if ($thisyear && $thismonth) {
|
if ($thisyear && $thismonth) {
|
||||||
$m = $thismonth;
|
$m = $thismonth;
|
||||||
$y = $thisyear;
|
$y = $thisyear;
|
||||||
@ -85,19 +81,18 @@
|
|||||||
$tsun = $sun + (3600 * 24 * 7 * $i);
|
$tsun = $sun + (3600 * 24 * 7 * $i);
|
||||||
$tsat = $tsun + (3600 * 24 * 6);
|
$tsat = $tsun + (3600 * 24 * 6);
|
||||||
echo "<OPTION VALUE=\"" . date("Ymd", $tsun) . "\"";
|
echo "<OPTION VALUE=\"" . date("Ymd", $tsun) . "\"";
|
||||||
if (date("Ymd", $tsun) <= $thisdate &&
|
if (date("Ymd", $tsun) <= $thisdate && date("Ymd", $tsat) >= $thisdate)
|
||||||
date("Ymd", $tsat) >= $thisdate)
|
|
||||||
echo " SELECTED";
|
echo " SELECTED";
|
||||||
echo ">" . lang(date("F",$tsun)) . strftime(" %d", $tsun) . "-"
|
echo ">" . lang(date("F",$tsun)) . strftime(" %d", $tsun) . "-"
|
||||||
. lang(date("F",$tsat)) . strftime(" %d", $tsat);
|
. lang(date("F",$tsat)) . strftime(" %d", $tsat);
|
||||||
echo "</option>\n";
|
echo "</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</SELECT>
|
</SELECT>
|
||||||
|
|
||||||
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT>
|
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT></FONT>
|
||||||
</FONT></TD>
|
</TD>
|
||||||
</FORM>
|
</FORM>
|
||||||
|
|
||||||
<FONT SIZE="-1">
|
<FONT SIZE="-1">
|
||||||
|
|
||||||
@ -128,3 +123,7 @@
|
|||||||
|
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
@ -1,3 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
if (! $phpgw_info["flags"]["nocalendarheader"]) {
|
||||||
|
?>
|
||||||
|
|
||||||
<table border="0" width="100%" cellpadding="0" cellspacing="0">
|
<table border="0" width="100%" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="2%">
|
<td width="2%">
|
||||||
@ -31,3 +35,6 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
32
calendar/inc/preferences.inc.php
Normal file
32
calendar/inc/preferences.inc.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* phpGroupWare - Calendar *
|
||||||
|
* http://www.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$ */
|
||||||
|
{
|
||||||
|
$img = "/" . $appname . "/images/" . $appname .".gif";
|
||||||
|
if (file_exists($phpgw_info["server"]["server_root"].$img)) {
|
||||||
|
$img = $phpgw_info["server"]["webserver_url"].$img;
|
||||||
|
} else {
|
||||||
|
$img = "/" . $appname . "/images/navbar.gif";
|
||||||
|
if (file_exists($phpgw_info["server"]["server_root"].$img)) {
|
||||||
|
$img=$phpgw_info["server"]["webserver_url"].$img;
|
||||||
|
} else {
|
||||||
|
$img = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
section_start("Calendar",$img);
|
||||||
|
|
||||||
|
$pg = $phpgw->link($phpgw_info["server"]["webserver_url"]."/calendar/preferences.php");
|
||||||
|
echo "<a href=".$pg.">" . lang("Calendar preferences") . "</a>";
|
||||||
|
|
||||||
|
section_end();
|
||||||
|
}
|
||||||
|
?>
|
100
calendar/preferences.php
Normal file
100
calendar/preferences.php
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<?php
|
||||||
|
/**************************************************************************\
|
||||||
|
* phpGroupWare - Calendar *
|
||||||
|
* http://www.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$ */
|
||||||
|
|
||||||
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "calendar",
|
||||||
|
"nocalendarheader" => True, "nocalendarfooter" => True);
|
||||||
|
include("../header.inc.php");
|
||||||
|
|
||||||
|
if ($submit) {
|
||||||
|
$phpgw->common->preferences_delete("byapp",$phpgw_info["user"]["userid"],"calendar");
|
||||||
|
|
||||||
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"weekdaystarts","calendar");
|
||||||
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"workdaystarts","calendar");
|
||||||
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"workdayends","calendar");
|
||||||
|
if ($mainscreen_showevents) {
|
||||||
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showevents","calendar");
|
||||||
|
}
|
||||||
|
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/preferences/index.php"));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$phpgw->common->phpgw_header();
|
||||||
|
$phpgw->common->navbar();
|
||||||
|
|
||||||
|
if ($totalerrors) {
|
||||||
|
echo "<p><center>" . $phpgw->common->error_list($errors) . "</center>";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<p><b>" . lang("Calendar preferences") . ":" . "</b><hr><p>";
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $phpgw->link(); ?>" method="POST">
|
||||||
|
<table border="0" align="center" width="50%">
|
||||||
|
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<?php $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); ?>
|
||||||
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
||||||
|
<td><?php echo lang("show high priority events on main screen"); ?> ?</td>
|
||||||
|
<td align="center"><input type="checkbox" name="mainscreen_showevents" value="Y" <?php if ($phpgw_info["user"]["preferences"]["mainscreen_showevents"] == "Y") echo " checked"; ?>></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$t_weekday[$phpgw_info["user"]["preferences"]["weekdaystarts"]] = " selected";
|
||||||
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
|
?>
|
||||||
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
||||||
|
<td><?php echo lang("weekday starts on"); ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<select name="weekdaystarts">
|
||||||
|
<option value="Monday"<?php echo $t_weekday["monday"]; ?>><?php echo lang("monday"); ?></option>
|
||||||
|
<option value="Sunday"<?php echo $t_weekday["sunday"]; ?>><?php echo lang("sunday"); ?></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<?php
|
||||||
|
$t_workdaystarts[$phpgw_info["user"]["preferences"]["workdaystarts"]] = " selected";
|
||||||
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
|
?>
|
||||||
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
||||||
|
<td><?php echo lang("work day starts on"); ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<select name="workdaystarts">
|
||||||
|
<?php
|
||||||
|
for ($i=0; $i<24; $i++)
|
||||||
|
echo "<option value=\"$i\"" . $t_workdaystarts[$i] . ">"
|
||||||
|
. $phpgw->common->formattime($i+1,"00") . "</option>";
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$t_workdayends[$phpgw_info["user"]["preferences"]["workdayends"]] = " selected";
|
||||||
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
|
?>
|
||||||
|
<tr bgcolor="<?php echo $tr_color; ?>">
|
||||||
|
<td><?php echo lang("work day ends on"); ?></td>
|
||||||
|
<td align="center">
|
||||||
|
<select name="workdayends">
|
||||||
|
<?php
|
||||||
|
for ($i=0; $i<24; $i++) {
|
||||||
|
echo "<option value=\"$i\"" . $t_workdayends[$i] . ">"
|
||||||
|
. $phpgw->common->formattime($i+1,"00") . "</option>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td align="center"><input type="submit" name="submit" value="<?php echo lang("submit"); ?>"></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); ?>
|
@ -12,19 +12,13 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "preferences");
|
||||||
|
|
||||||
$phpgw_info["flags"]["currentapp"] = "preferences";
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
if ($phpgw_info["user"]["permissions"]["anonymous"]) {
|
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/"));
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($ntheme) {
|
if ($ntheme) {
|
||||||
$theme = $ntheme;
|
$theme = $ntheme;
|
||||||
$phpgw->common->preferences_update($phpgw_info["user"]["userid"],"theme");
|
$phpgw->common->preferences_update($phpgw_info["user"]["userid"],"theme","common");
|
||||||
Header("location: " . $phpgw->link("changetheme.php"));
|
Header("location: " . $phpgw->link("changetheme.php"));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -152,58 +152,11 @@
|
|||||||
display_option("show current users on navigation bar","admin","show_currentusers",0);
|
display_option("show current users on navigation bar","admin","show_currentusers",0);
|
||||||
display_option("show new messages on main screen","email","mainscreen_showmail",0);
|
display_option("show new messages on main screen","email","mainscreen_showmail",0);
|
||||||
display_option("show birthday reminders on main screen","addressbook","mainscreen_showbirthdays",0);
|
display_option("show birthday reminders on main screen","addressbook","mainscreen_showbirthdays",0);
|
||||||
|
|
||||||
if ($phpgw_info["user"]["apps"]["calendar"]) {
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo lang("show high priority events on main screen"); ?> ?</td>
|
|
||||||
<td><input type="checkbox" name="mainscreen_showevents" value="Y" <?php if ($phpgw_info["user"]["preferences"]["mainscreen_showevents"] == "Y") echo " checked"; ?>></td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
$t_weekday[$phpgw_info["user"]["preferences"]["weekdaystarts"]] = " selected";
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
|
||||||
<td><?php echo lang("weekday starts on"); ?></td>
|
|
||||||
<td>
|
|
||||||
<select name="weekdaystarts">
|
|
||||||
<option value="Monday"<?php echo $t_weekday["monday"]; ?>><?php echo lang("monday"); ?></option>
|
|
||||||
<option value="Sunday"<?php echo $t_weekday["sunday"]; ?>><?php echo lang("sunday"); ?></option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$t_workdaystarts[$phpgw_info["user"]["preferences"]["workdaystarts"]] = " selected";
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo lang("work day starts on"); ?></td>
|
|
||||||
<td>
|
|
||||||
<select name="workdaystarts">
|
|
||||||
<?php
|
|
||||||
for ($i=0; $i<24; $i++)
|
|
||||||
echo "<option value=\"$i\"" . $t_workdaystarts[$i] . ">"
|
|
||||||
. $phpgw->common->formattime($i+1,"00") . "</option>";
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php $t_workdayends[$phpgw_info["user"]["preferences"]["workdayends"]] = " selected"; ?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo lang("work day ends on"); ?></td>
|
|
||||||
<td>
|
|
||||||
<select name="workdayends">
|
|
||||||
<?php
|
|
||||||
for ($i=0; $i<24; $i++)
|
|
||||||
echo "<option value=\"$i\"" . $t_workdayends[$i] . ">"
|
|
||||||
. $phpgw->common->formattime($i+1,"00") . "</option>";
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo lang("Default application"); ?></td>
|
<td><?php echo lang("Default application"); ?></td>
|
||||||
<td><select name="default_app">
|
<td>
|
||||||
|
<select name="default_app">
|
||||||
<option value=""> </option>
|
<option value=""> </option>
|
||||||
<?php
|
<?php
|
||||||
$db_perms = $phpgw->accounts->read_apps($phpgw_info["user"]["userid"]);
|
$db_perms = $phpgw->accounts->read_apps($phpgw_info["user"]["userid"]);
|
||||||
@ -217,7 +170,8 @@
|
|||||||
. "</option>";
|
. "</option>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?></select></td>
|
?></select>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -231,7 +185,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
// }
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -254,54 +208,40 @@
|
|||||||
$phpgw->db->lock("preferences");
|
$phpgw->db->lock("preferences");
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"maxmatchs");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"maxmatchs","common");
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"tz_offset");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"tz_offset","common");
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"dateformat");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"dateformat","common");
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"timeformat");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"timeformat","common");
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"lang");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"lang","common");
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_sorting");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_sorting","common");
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_app");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_app","common");
|
||||||
|
|
||||||
if ($navbar_text) {
|
if ($navbar_text) {
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"navbar_text");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"navbar_text","common");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($phpgw_info["user"]["apps"]["admin"]) {
|
if ($phpgw_info["user"]["apps"]["admin"]) {
|
||||||
if ($show_currentusers) {
|
if ($show_currentusers) {
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"show_currentusers");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"show_currentusers","common");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($phpgw_info["user"]["apps"]["email"]) {
|
if ($phpgw_info["user"]["apps"]["email"]) {
|
||||||
if ($mainscreen_showmail) {
|
if ($mainscreen_showmail) {
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showmail");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showmail","email");
|
||||||
}
|
}
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"email_sig");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"email_sig","email");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($phpgw_info["user"]["apps"]["addressbook"]) {
|
if ($phpgw_info["user"]["apps"]["addressbook"]) {
|
||||||
if ($mainscreen_showbirthdays) {
|
if ($mainscreen_showbirthdays) {
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showbirthdays");
|
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showbirthdays","addressbook");
|
||||||
}
|
|
||||||
$abc = get_abc(); # AddressBook Columns
|
|
||||||
while (list($col, $descr) = each($abc)) {
|
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"addressbook_view_".$col);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($phpgw_info["user"]["apps"]["calendar"]) {
|
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"weekdaystarts");
|
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"workdaystarts");
|
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"workdayends");
|
|
||||||
if ($mainscreen_showevents) {
|
|
||||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showevents");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->db->unlock();
|
$phpgw->db->unlock();
|
||||||
|
|
||||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]
|
Header("Location: " . $phpgw->link("index.php"));
|
||||||
. "/preferences/"));
|
|
||||||
}
|
}
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user