mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
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);
|
||||
|
||||
$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();
|
||||
}
|
||||
|
@ -75,16 +75,17 @@
|
||||
$phpgw->db->query("select count(*) from addressbook where $filtermethod");
|
||||
$phpgw->db->next_record();
|
||||
}
|
||||
if($phpgw_info["apps"]["timetrack"]["enabled"])
|
||||
$company_sortorder = "c.company_name";
|
||||
else
|
||||
$company_sortorder = "ab_company";
|
||||
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
|
||||
$company_sortorder = "c.company_name";
|
||||
} else {
|
||||
$company_sortorder = "ab_company";
|
||||
}
|
||||
|
||||
//$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),
|
||||
($start + $phpgw_info["user"]["preferences"]["maxmatchs"]),$phpgw->db->f(0));
|
||||
($start + $phpgw_info["user"]["preferences"]["common"]["maxmatchs"]),$phpgw->db->f(0));
|
||||
else
|
||||
echo "<br>" . lang("showing x",$phpgw->db->f(0));
|
||||
?>
|
||||
@ -97,34 +98,34 @@
|
||||
<table width=75% border=0 cellspacing=1 cellpadding=3>
|
||||
<tr bgcolor="<?php echo $phpgw_info["theme"]["th_bg"]; ?>">
|
||||
<?php
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_company"] == "True" ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["company"]) {
|
||||
echo '<td height="21">';
|
||||
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 '</font></td>';
|
||||
}
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_lastname"] == "True" ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["lastname"]) {
|
||||
echo '<td height="21">';
|
||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_lastname",$order,"index.php",
|
||||
lang("Last Name"));
|
||||
echo '</font></td>';
|
||||
}
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_firstname"] == "True" ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["firstname"]) {
|
||||
echo '<td height="21">';
|
||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_firstname",$order,"index.php",
|
||||
lang("First Name"));
|
||||
echo '</font></td>';
|
||||
}
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_email"] == "True" ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["email"]) {
|
||||
echo '<td height="21">';
|
||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_email",$order,"index.php",
|
||||
lang("Email"));
|
||||
echo '</font></td>';
|
||||
}
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_wphone"] == "True" ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["wphone"]) {
|
||||
echo '<td height="21">';
|
||||
echo '<font size="-1" face="Arial, Helvetica, sans-serif">';
|
||||
echo $phpgw->nextmatchs->show_sort_order($sort,"ab_wphone",$order,"index.php",
|
||||
@ -187,48 +188,49 @@
|
||||
|
||||
$firstname = $phpgw->db->f("ab_firstname");
|
||||
$lastname = $phpgw->db->f("ab_lastname");
|
||||
$email = $phpgw->db->f("ab_email");
|
||||
if($phpgw_info["apps"]["timetrack"]["enabled"])
|
||||
$email = $phpgw->db->f("ab_email");
|
||||
if ($phpgw_info["apps"]["timetrack"]["enabled"]) {
|
||||
$company = $phpgw->db->f("company_name");
|
||||
else
|
||||
} else {
|
||||
$company = $phpgw->db->f("company");
|
||||
$wphone = $phpgw->db->f("ab_wphone");
|
||||
$ab_id = $phpgw->db->f("ab_id");
|
||||
}
|
||||
$wphone = $phpgw->db->f("ab_wphone");
|
||||
$ab_id = $phpgw->db->f("ab_id");
|
||||
|
||||
if($firstname == "") $firstname = " ";
|
||||
if($lastname == "") $lastname = " ";
|
||||
if($email == "") $email = " ";
|
||||
if($company == "") $company = " ";
|
||||
if($wphone == "") $wphone = " ";
|
||||
if ($firstname == "") $firstname = " ";
|
||||
if ($lastname == "") $lastname = " ";
|
||||
if ($email == "") $email = " ";
|
||||
if ($company == "") $company = " ";
|
||||
if ($wphone == "") $wphone = " ";
|
||||
|
||||
?>
|
||||
<?php
|
||||
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 '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||
echo $company;
|
||||
echo '</font></td>';
|
||||
};
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_lastname"] == 'True' ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["lastname"]) {
|
||||
echo '<td valign=top>';
|
||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||
echo $lastname;
|
||||
echo '</font></td>';
|
||||
};
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_firstname"] == 'True' ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["firstname"]) {
|
||||
echo '<td valign=top>';
|
||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||
echo $firstname;
|
||||
echo '</font></td>';
|
||||
};
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_email"] == 'True' ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["email"]) {
|
||||
echo '<td valign=top>';
|
||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||
echo '<a href="mailto:' . $email . '">' . $email . '</a>';
|
||||
echo '</font></td>';
|
||||
};
|
||||
if ( $phpgw_info["user"]["preferences"]["addressbook_view_wphone"] == 'True' ) {
|
||||
if ($phpgw_info["user"]["preferences"]["addressbook"]["wphone"]) {
|
||||
echo '<td valign=top>';
|
||||
echo '<font face=Arial, Helvetica, sans-serif size=2>';
|
||||
echo $wphone;
|
||||
|
@ -23,7 +23,7 @@
|
||||
if (! $totalerrors) {
|
||||
$phpgw->common->preferences_delete("byapp",$phpgw_info["user"]["userid"],"addressbook");
|
||||
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"));
|
||||
}
|
||||
@ -51,7 +51,7 @@
|
||||
while (list($col, $descr) = each($abc)) {
|
||||
$i++; $j++;
|
||||
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>';
|
||||
|
||||
if ($i ==3) {
|
||||
|
@ -16,88 +16,83 @@
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
if (! $phpgw_info["flags"]["nocalendarfooter"]) {
|
||||
?>
|
||||
<BR CLEAR="all">
|
||||
<HR CLEAR="all">
|
||||
<FONT SIZE="-1">
|
||||
|
||||
<BR CLEAR="all">
|
||||
<HR CLEAR="all">
|
||||
<FONT SIZE="-1">
|
||||
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
||||
<FORM ACTION="<?php echo $phpgw->link("index.php"); ?>" method="post" name="SelectMonth">
|
||||
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
|
||||
<FORM ACTION="<?php echo $phpgw->link("index.php"); ?>" method="post" name="SelectMonth">
|
||||
<TR>
|
||||
<TD VALIGN="top" WIDTH=33%><FONT SIZE="-1">
|
||||
<B><?php echo lang("Month"); ?>:</B>
|
||||
<SELECT NAME="date" ONCHANGE="document.SelectMonth.submit()">
|
||||
<?php
|
||||
if ($thisyear && $thismonth) {
|
||||
$m = $thismonth;
|
||||
$y = $thisyear;
|
||||
} else {
|
||||
$m = date("m");
|
||||
$y = date("Y");
|
||||
}
|
||||
$d_time = mktime(0,0,0,$m,1,$y);
|
||||
$thisdate = date("Ymd", $d_time);
|
||||
$y--;
|
||||
for ($i = 0; $i < 25; $i++) {
|
||||
$m++;
|
||||
if ($m > 12) {
|
||||
$m = 1;
|
||||
$y++;
|
||||
}
|
||||
$d = mktime(0,0,0,$m,1,$y);
|
||||
echo "<OPTION VALUE=\"" . date("Ymd", $d) . "\"";
|
||||
if (date("Ymd", $d) == $thisdate)
|
||||
echo " SELECTED";
|
||||
echo ">" . lang(date("F", $d)) . strftime(" %Y", $d) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
|
||||
<TR><TD VALIGN="top" WIDTH=33%><FONT SIZE="-1">
|
||||
<B><?php echo lang("Month"); ?>:</B>
|
||||
<SELECT NAME="date" ONCHANGE="document.SelectWeek.submit()">
|
||||
<?php
|
||||
if ($thisyear && $thismonth) {
|
||||
$m = $thismonth;
|
||||
$y = $thisyear;
|
||||
} else {
|
||||
$m = date("m");
|
||||
$y = date("Y");
|
||||
}
|
||||
if ($thisday) {
|
||||
$d = $thisday;
|
||||
} else {
|
||||
$d = date ("d");
|
||||
}
|
||||
$d_time = mktime(0,0,0,$m,$d,$y);
|
||||
$thisdate = date("Ymd", $d_time);
|
||||
$wday = date("w", $d_time);
|
||||
$sun = mktime(0,0,0,$m,$d - $wday, $y);
|
||||
for ($i = -7; $i <= 7; $i++) {
|
||||
$tsun = $sun + (3600 * 24 * 7 * $i);
|
||||
$tsat = $tsun + (3600 * 24 * 6);
|
||||
echo "<OPTION VALUE=\"" . date("Ymd", $tsun) . "\"";
|
||||
if (date("Ymd", $tsun) <= $thisdate && date("Ymd", $tsat) >= $thisdate)
|
||||
echo " SELECTED";
|
||||
echo ">" . lang(date("F",$tsun)) . strftime(" %d", $tsun) . "-"
|
||||
. lang(date("F",$tsat)) . strftime(" %d", $tsat);
|
||||
echo "</option>\n";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
|
||||
<SELECT NAME="date" ONCHANGE="document.SelectMonth.submit()">
|
||||
<?php
|
||||
if ($thisyear && $thismonth) {
|
||||
$m = $thismonth;
|
||||
$y = $thisyear;
|
||||
} else {
|
||||
$m = date("m");
|
||||
$y = date("Y");
|
||||
}
|
||||
$d_time = mktime(0,0,0,$m,1,$y);
|
||||
$thisdate = date("Ymd", $d_time);
|
||||
$y--;
|
||||
for ($i = 0; $i < 25; $i++) {
|
||||
$m++;
|
||||
if ($m > 12) {
|
||||
$m = 1;
|
||||
$y++;
|
||||
}
|
||||
$d = mktime(0,0,0,$m,1,$y);
|
||||
echo "<OPTION VALUE=\"" . date("Ymd", $d) . "\"";
|
||||
if (date("Ymd", $d) == $thisdate)
|
||||
echo " SELECTED";
|
||||
echo ">" . lang(date("F", $d)) . strftime(" %Y", $d) . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
|
||||
<SELECT NAME="date" ONCHANGE="document.SelectWeek.submit()">
|
||||
<?php
|
||||
if ($thisyear && $thismonth) {
|
||||
$m = $thismonth;
|
||||
$y = $thisyear;
|
||||
} else {
|
||||
$m = date("m");
|
||||
$y = date("Y");
|
||||
}
|
||||
if ($thisday) {
|
||||
$d = $thisday;
|
||||
} else {
|
||||
$d = date ("d");
|
||||
}
|
||||
$d_time = mktime(0,0,0,$m,$d,$y);
|
||||
$thisdate = date("Ymd", $d_time);
|
||||
$wday = date("w", $d_time);
|
||||
$sun = mktime(0,0,0,$m,$d - $wday, $y);
|
||||
for ($i = -7; $i <= 7; $i++) {
|
||||
$tsun = $sun + (3600 * 24 * 7 * $i);
|
||||
$tsat = $tsun + (3600 * 24 * 6);
|
||||
echo "<OPTION VALUE=\"" . date("Ymd", $tsun) . "\"";
|
||||
if (date("Ymd", $tsun) <= $thisdate &&
|
||||
date("Ymd", $tsat) >= $thisdate)
|
||||
echo " SELECTED";
|
||||
echo ">" . lang(date("F",$tsun)) . strftime(" %d", $tsun) . "-"
|
||||
. lang(date("F",$tsat)) . strftime(" %d", $tsat);
|
||||
echo "</option>\n";
|
||||
}
|
||||
?>
|
||||
</SELECT>
|
||||
|
||||
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT>
|
||||
</FONT></TD>
|
||||
</FORM>
|
||||
<NOSCRIPT><INPUT TYPE="submit" VALUE="<?php echo lang("Go!"); ?>"></NOSCRIPT></FONT>
|
||||
</TD>
|
||||
</FORM>
|
||||
|
||||
<FONT SIZE="-1">
|
||||
|
||||
@ -128,3 +123,7 @@
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
@ -1,3 +1,7 @@
|
||||
<?php
|
||||
if (! $phpgw_info["flags"]["nocalendarheader"]) {
|
||||
?>
|
||||
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="2%">
|
||||
@ -31,3 +35,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
</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$ */
|
||||
|
||||
$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");
|
||||
|
||||
if ($phpgw_info["user"]["permissions"]["anonymous"]) {
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/"));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if ($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"));
|
||||
exit;
|
||||
}
|
||||
|
@ -149,81 +149,35 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
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 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>
|
||||
<td><?php echo lang("Default application"); ?></td>
|
||||
<td><select name="default_app">
|
||||
<option value=""> </option>
|
||||
<?php
|
||||
$db_perms = $phpgw->accounts->read_apps($phpgw_info["user"]["userid"]);
|
||||
while ($permission = each($db_perms)) {
|
||||
if ($phpgw_info["apps"][$permission[0]]["enabled"]) {
|
||||
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 birthday reminders on main screen","addressbook","mainscreen_showbirthdays",0);
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo lang("Default application"); ?></td>
|
||||
<td>
|
||||
<select name="default_app">
|
||||
<option value=""> </option>
|
||||
<?php
|
||||
$db_perms = $phpgw->accounts->read_apps($phpgw_info["user"]["userid"]);
|
||||
while ($permission = each($db_perms)) {
|
||||
if ($phpgw_info["apps"][$permission[0]]["enabled"]) {
|
||||
echo "<option value=\"" . $permission[0] . "\"";
|
||||
if ($phpgw_info["user"]["preferences"]["default_app"] == $permission[0]) {
|
||||
echo " selected";
|
||||
}
|
||||
}
|
||||
echo ">" . lang($phpgw_info["apps"][$permission[0]]["title"])
|
||||
. "</option>";
|
||||
}
|
||||
}
|
||||
?></select></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
?></select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?php echo lang("Default sorting order"); ?></td>
|
||||
<tr>
|
||||
<td><?php echo lang("Default sorting order"); ?></td>
|
||||
<td><?php
|
||||
$default_order_display[$phpgw_info["user"]["preferences"]["default_sorting"]] = " selected"; ?>
|
||||
$default_order_display[$phpgw_info["user"]["preferences"]["default_sorting"]] = " selected"; ?>
|
||||
<select name="default_sorting">
|
||||
<option value="old_new"<?php echo $default_order_display["old_new"]; ?>>oldest -> newest</option>
|
||||
<option value="new_old"<?php echo $default_order_display["new_old"]; ?>>newest -> oldest</option>
|
||||
@ -231,7 +185,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
// }
|
||||
?>
|
||||
|
||||
<tr>
|
||||
@ -254,54 +208,40 @@
|
||||
$phpgw->db->lock("preferences");
|
||||
}
|
||||
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"maxmatchs");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"tz_offset");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"dateformat");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"timeformat");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"lang");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_sorting");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_app");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"maxmatchs","common");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"tz_offset","common");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"dateformat","common");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"timeformat","common");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"lang","common");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_sorting","common");
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"default_app","common");
|
||||
|
||||
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 ($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 ($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 ($mainscreen_showbirthdays) {
|
||||
$phpgw->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showbirthdays");
|
||||
}
|
||||
$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->common->preferences_add($phpgw_info["user"]["userid"],"mainscreen_showbirthdays","addressbook");
|
||||
}
|
||||
}
|
||||
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"]
|
||||
. "/preferences/"));
|
||||
Header("Location: " . $phpgw->link("index.php"));
|
||||
}
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user