3
function monthview_theme() {
5
global $globals, $cal, $dbtables, $user, $l, $theme;
6
global $days, $month, $year, $day, $birthdays, $today;
8
//Next and Previous Months
9
$nextmonth = $month + 1;
13
if ($nextmonth == 13) {
15
$nextyear = $year + 1;
16
} elseif ($nextmonth < 10) {
17
$nextmonth = '0' . $nextmonth;
20
$prevmonth = $month - 1;
22
if ($prevmonth == 00) {
24
$prevyear = $year - 1;
25
} elseif ($prevmonth < 10) {
26
$prevmonth = '0' . $prevmonth;
30
aefheader($l['<title>']);
32
echo '<link rel="stylesheet" type="text/css" href="' . $theme['url'] . '/calendar.css" />
34
<table width="100%" cellpadding="0" cellspacing="0" border="0">
39
<table width="100%" cellpadding="0" cellspacing="0">
43
<a class="prev" href="' . $globals['index_url'] . 'act=calendar&date=' . $prevyear . $prevmonth . '01"><img style="margin-bottom: 5px;" src="' . $theme['images'] . '/left.png" /> ' . $l['months'][$prevmonth] . ' ' . $prevyear . '</a>
46
<a href="' . $globals['index_url'] . 'act=calendar&date=' . $year . $month . '01">' . $l['months'][$month] . ' ' . $year . '</a>
49
<a class="next" href="' . $globals['index_url'] . 'act=calendar&date=' . $nextyear . $nextmonth . '01">' . $l['months'][$nextmonth] . ' ' . $nextyear . ' <img style="margin-bottom: 5px;" src="' . $theme['images'] . '/right.png" /></a>
62
<table width="100%" cellpadding="1" cellspacing="0" align="center" class="cbgbor">
64
<tr class="week_days">';
67
for ($x = 0; $x < 7; $x++) {
69
echo '<td width="14%">' . $l['days'][$x] . '</td>';
75
$offset = datify(mktime(0, 0, 0, $month, 1, $year), false, false, 'w');
77
//$week = datify(mktime( 0, 0, 0, $month, 1, $year), false, false, 'W');
78
//Empty Days in Previous Month
79
for ($t = 0; $t < $offset; $t++) {
81
echo '<td class="daybox"> </td>';
84
//Loop through the days
85
for ($d = 1; $d <= $days; $d++) {
87
//Start a New row for a new week
93
$thisday = datify(mktime(0, 0, 0, $month, $d, $year), false, false, 'Ymd');
95
echo '<td valign="top" class="' . ($thisday == $today ? 'todaybox' : 'daybox') . '">
96
<div class="' . ($thisday == $today ? 'topdayon' : 'topday') . '">' . $d . '</div>';
98
//Any Happy Birthdays on this day!!!
99
if (!empty($birthdays[$d])) {
101
echo '<div class="bdays">' . $l['birthdays'] . ' : ';
103
foreach ($birthdays[$d] as $b => $bd) {
105
echo '<a href="' . $globals['index_url'] . 'mid=' . $bd['id'] . '">' . $bd['username'] . '(' . $bd['age'] . ')</a><br />';
110
//If there is nothing
118
//Is it the end of the week ?
132
$offset = 7 - $offset;
136
//The next month Rows
137
for ($t = 0; $t < $offset; $t++) {
139
echo '<td class="daybox"> </td>';
149
<td class="currentmonth" colspan="7" align="center">
150
<a href="' . $globals['index_url'] . 'act=calendar">' . $l['current_month'] . '</a>
154
<td><img src="' . $theme['images'] . '/cbot.png" height="15" width="100%"></td>
159
//The defualt footers
b'\\ No newline at end of file'