more code

This commit is contained in:
skeeter 2000-11-11 20:55:25 +00:00
parent f59a1c8ebc
commit 7a7caded67
2 changed files with 58 additions and 66 deletions

View File

@ -14,8 +14,10 @@
/* $Id$ */ /* $Id$ */
if ($friendly) { if (isset($friendly) && $friendly){
$phpgw_info["flags"]["noheader"] = True; $phpgw_info["flags"]["noheader"] = True;
} else {
$friendly = 0;
} }
$phpgw_info["flags"]["currentapp"] = "calendar"; $phpgw_info["flags"]["currentapp"] = "calendar";
@ -23,85 +25,76 @@
$view = "day"; $view = "day";
if (strlen($date) > 0) { if (isset($date) && strlen($date) > 0) {
$thisyear = substr($date,0,4); $thisyear = substr($date, 0, 4);
$thismonth = substr($date,4,2); $thismonth = substr($date, 4, 2);
$thisday = substr($date,6,2); $thisday = substr($date, 6, 2);
} else { } else {
if ($month == 0) { if (!isset($day) || !$day)
$thismonth = date("m"); $thisday = $phpgw->calendar->today["day"];
} else { else
$thismonth = $month;
}
if ($year == 0) {
$thisyear = date("Y");
} else {
$thisyear = $year;
}
if ($day == 0) {
$thisday = date("d");
} else {
$thisday = $day; $thisday = $day;
} if (!isset($month) || !$month)
$thismonth = $phpgw->calendar->today["month"];
else
$thismonth = $month;
if (!isset($year) || !$year)
$thisyear = $phpgw->calendar->today["year"];
else
$thisyear = $year;
} }
$now = mktime (2, 0, 0, $thismonth, $thisday, $thisyear); $now = $phpgw->calendar->splitdate(mktime (2, 0, 0, $thismonth, $thisday, $thisyear));
$next = mktime(2, 0, 0, $thismonth, $thisday + 1, $thisyear); $next = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth,$thisday + 1,$thisyear));
$nextyear = date("Y", $next);
$nextmonth = date("m", $next);
$nextday = date("d", $next);
$month_ago = date("Ymd", mktime(2, 0, 0,$thismonth - 1,$thisday,$thisyear));
$prev = mktime(2, 0, 0, $thismonth, $day - 1, $thisyear); $month_ago = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth - 1,$thisday,$thisyear));
$prevyear = date("Y", $prev);
$prevmonth = date("m", $prev);
$prevday = date("d", $prev);
$month_ahead = date("Ymd", mktime(2,0,0,$thismonth + 1,$thisday,$thisyear));
/* Pre-Load the repeated events for quckier access */ $prev = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth - 1,1,$thisyear));
$repeated_events = read_repeated_events();
$month_ahead = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth + 1,$thisday,$thisyear));
if ($friendly) { if ($friendly) {
echo "<body bgcolor=\"".$phpgw_info["theme"][bg_color]."\">"; echo "<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">";
} }
?> ?>
<TABLE BORDER=0 WIDTH=100%> <table border="0" width="100%">
<TR><TD VALIGN="top" WIDTH=70%"><TR><TD> <tr><td valign="top" width="70%"><tr><td>
<TABLE BORDER=0 WIDTH=100%> <table border="0" width=100%>
<TR> <tr>
<TD ALIGN="middle"><FONT SIZE="+2" COLOR="<?php echo $H2COLOR;?>"><B> <td align="middle"><font size="+2" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>"><b>
<?php echo "$month_names[$thismonth], $thisday $thisyear"; ?> <?php
$m = mktime(2,0,0,$thismonth,1,$thisyear);
echo lang(strftime("%B",$m)) . " " .$thisday . ", " . $thisyear;
?>
</B></FONT> </b></font>
<FONT SIZE="+1" COLOR="<?php echo $H2COLOR;?>"> <font size="+1" color="<?php echo $phpgw_info["theme"]["bg_text"]; ?>">
<br> <br>
<?php <?php
echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]); echo $phpgw->common->display_fullname($phpgw_info["user"]["userid"],$phpgw_info["user"]["firstname"],$phpgw_info["user"]["lastname"]);
?> ?>
</FONT> </font>
</TD> </td>
</TR> </tr>
</TABLE> </table>
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0"> <table border="0" width="100%" cellspacing="0" cellpadding="0">
<TR> <tr>
<TD BGCOLOR="<?php echo $TABLEBG?>"> <td bgcolor="<?php echo $phpgw_info["theme"]["bg_text"]; ?>">
<TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="2" BORDER="0"> <table border="0" width="100%" cellspacing="1" cellpadding="2" border="0">
<?php print_day_at_a_glance($now, $friendly); ?> <?php echo $phpgw->calendar->print_day_at_a_glance($now); ?>
</td> </td>
</TR> </tr>
</TABLE> </table>
</TD></TR></TABLE> </td></tr></table>
</TD> </td>
<TD VALIGN="top"> <td valign="top">
<?php <?php
if (! $friendly) { if (!$friendly) {
?> ?>
<DIV ALIGN="right"> <DIV ALIGN="right">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">

View File

@ -24,9 +24,9 @@
include("../header.inc.php"); include("../header.inc.php");
if (isset($date) && strlen($date) > 0) { if (isset($date) && strlen($date) > 0) {
$thisyear = substr($date, 0, 4); $thisyear = substr($date, 0, 4);
$thismonth = substr($date, 4, 2); $thismonth = substr($date, 4, 2);
$thisday = substr($date, 6, 2); $thisday = substr($date, 6, 2);
} else { } else {
if (!isset($day) || !$day) if (!isset($day) || !$day)
$thisday = $phpgw->calendar->today["day"]; $thisday = $phpgw->calendar->today["day"];
@ -43,20 +43,18 @@
} }
$next = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth + 1,1,$thisyear)); $next = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth + 1,1,$thisyear));
// $nextdate = date("Ymd");
$prev = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth - 1,1,$thisyear)); $prev = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth - 1,1,$thisyear));
// $prevdate = date("Ymd");
if ($friendly) { if ($friendly) {
echo "<body bgcolor=\"".$phpgw_info["theme"][bg_color]."\">"; echo "<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">";
$view = "month"; $view = "month";
} }
?> ?>
<HEAD> <HEAD>
<STYLE TYPE="text/css"> <STYLE TYPE="text/css">
<?php echo "$CCS_DEFS";?> <!-- <?php echo "$CCS_DEFS";?> -->
.tablecell { .tablecell {
width: 80px; width: 80px;
@ -77,7 +75,7 @@
<td align="middle"><font size="+2" color="#000000"><B> <td align="middle"><font size="+2" color="#000000"><B>
<?php <?php
$m = mktime(2,0,0,$thismonth,1,$thisyear); $m = mktime(2,0,0,$thismonth,1,$thisyear);
print lang(strftime("%B",$m)) . " " . $thisyear; echo lang(strftime("%B",$m)) . " " . $thisyear;
?> ?>
</b></font> </b></font>
<font color="#000000" size="+1"> <font color="#000000" size="+1">
@ -95,8 +93,9 @@
</tr> </tr>
</table> </table>
<?php <?php
flush();
echo $phpgw->calendar->display_large_month($thismonth,$thisyear,True,"edit_entry.php"); echo $phpgw->calendar->display_large_month($thismonth,$thisyear,True,"edit_entry.php");
flush();
/* Pre-Load the repeated events for quckier access */ /* Pre-Load the repeated events for quckier access */
$repeated_events = read_repeated_events(); $repeated_events = read_repeated_events();
?> ?>