$tableWidth = '100%'; $monthURL = 'month.php?' . (!empty($cat_id) ? 'cat_id=' . $cat_id . '&' : ''); $nextMonth1 = $nextMonth2 = $prevMonth1 = $prevMonth2 = ''; $printerStr = $smallTasks = $unapprovedStr = ''; if (empty($DISPLAY_TASKS) || $DISPLAY_TASKS == 'N' && $DISPLAY_SM_MONTH != 'N') { $nextMonth1 = display_small_month($nextmonth, $nextyear, true, true, 'nextmonth', $monthURL); $prevMonth1 = display_small_month($prevmonth, $prevyear, true, true, 'prevmonth', $monthURL); } if ($DISPLAY_TASKS == 'Y' && $friendly != 1) { if ($DISPLAY_SM_MONTH != 'N') { $nextMonth2 = display_small_month($nextmonth, $nextyear, true, false, 'nextmonth', $monthURL) . '<br />'; $prevMonth2 = display_small_month($prevmonth, $prevyear, true, false, 'prevmonth', $monthURL) . '<br />'; } else { $nextMonth2 = $prevMonth2 = '<br /><br /><br /><br />'; } $smallTasks = display_small_tasks($cat_id); $tableWidth = '80%'; } $eventinfo = !empty($eventinfo) ? $eventinfo : ''; $monthStr = display_month($thismonth, $thisyear); $navStr = display_navigation('month'); if (empty($friendly)) { $unapprovedStr = display_unapproved_events($is_assistant || $is_nonuser_admin ? $user : $login); $printerStr = generate_printer_friendly('month.php'); } $trailerStr = print_trailer(); $HeadX = generate_refresh_meta() . '<script src="includes/js/weekHover.js" type="text/javascript"></script>'; print_header(array('js/popups.php/true', 'js/visible.php'), $HeadX, '', false, false, false, false); echo <<<EOT <table border="0" width="100%" cellpadding="1"> <tr>
} } } elseif ($page == 'register' || $page == 'edit_user') { // We're processing username field. $res = dbi_execute('SELECT cal_login FROM webcal_user WHERE cal_login = ?', array($name)); if ($res) { $row = dbi_fetch_row($res); // translate ( 'Username already exists.' ) if ($row[0] == $name) { echo str_replace('XXX', $name, translate('Username XXX already exists.', true)); } } } elseif ($page == 'email') { // We're processing email field from any page. $res = dbi_execute('SELECT cal_email FROM webcal_user WHERE cal_email = ?', array($name)); if ($res) { $row = dbi_fetch_row($res); // translate ( 'Email address already exists.' ) if ($row[0] == $name) { echo str_replace('XXX', $name, translate('Email address XXX already exists.', true)); } } } elseif ($page == 'minitask') { $name = !empty($name) ? $name : 0; require_once 'includes/classes/Event.class'; require_once 'includes/classes/RptEvent.class'; include_once 'includes/gradient.php'; $column_array = array('we.cal_priority', 'we.cal_name', 'we.cal_due_date', 'weu.cal_percent'); $task_filter = ' ORDER BY ' . $column_array[$name % 4] . ($name > 3 ? ' ASC' : ' DESC'); echo display_small_tasks($cat_id); }
$tableWidth = '100%'; $unapprovedStr = $printerStr = ''; if (empty($friendly)) { $unapprovedStr = display_unapproved_events($is_assistant || $is_nonuser_admin ? $user : $login); $printerStr = generate_printer_friendly('month.php'); } $trailerStr = print_trailer(); if ($DISPLAY_TASKS == 'Y') { $tableWidth = '80%'; $filler = '<td></td>'; $minical_tasks .= ' <td id="minicolumn" rowspan="2" valign="top"> <!-- START MINICAL --> <div class="minicontainer">' . ($DISPLAY_SM_MONTH == 'Y' ? ' <div class="minicalcontainer">' . display_small_month($thismonth, $thisyear, true) . '</div>' : '') . ' <div id="minitask">' . display_small_tasks($cat_id) . '</div> </div> </td>'; } print_header(array('js/popups.php/true'), generate_refresh_meta(), '', false, false, false, false); echo <<<EOT <table width="100%" cellpadding="1"> <tr> <td id="printarea" style="vertical-align:top; width:{$tableWidth};" > {$navStr} </td> {$filler} </tr> <tr> <td> <table class="main">
$TIME_SLOTS = 24; } $boldDays = $BOLD_DAYS_IN_YEAR == 'Y'; $startdate = mktime(0, 0, 0, $thismonth, 0, $thisyear); $enddate = mktime(23, 59, 59, $thismonth + 1, 0, $thisyear); $printerStr = $unapprovedStr = ''; /* Pre-Load the repeated events for quckier access */ $repeated_events = read_repeated_events(empty($user) ? $login : $user, $startdate, $enddate, $cat_id); /* Pre-load the non-repeating events for quicker access */ $events = read_events(empty($user) ? $login : $user, $startdate, $enddate, $cat_id); if (empty($DISPLAY_TASKS_IN_GRID) || $DISPLAY_TASKS_IN_GRID == 'Y') { /* Pre-load tasks for quicker access */ $tasks = read_tasks(!empty($user) && strlen($user) && $is_assistant ? $user : $login, $now, $cat_id); } $smallTasks = $DISPLAY_TASKS == 'Y' ? '<div id="minitask"> ' . display_small_tasks($cat_id) . ' </div>' : ''; $dayStr = print_day_at_a_glance($nowYmd, empty($user) ? $login : $user, $can_add); $navStr = display_navigation('day'); $smallMonthStr = display_small_month($thismonth, $thisyear, true); if (empty($friendly)) { $unapprovedStr = display_unapproved_events($is_assistant || $is_nonuser_admin ? $user : $login); $printerStr = generate_printer_friendly('day.php'); } $eventinfo = empty($eventinfo) ? '' : $eventinfo; $trailerStr = print_trailer(); print_header(array('js/popups.php/true'), generate_refresh_meta(), '', false, false, false, false); echo <<<EOT <table width="100%" cellpadding="1"> <tr>