示例#1
0
文件: day.php 项目: noikiy/owaspbwa
?>
</span>
<?php 
if ($categories_enabled == "Y" && (!$user || ($user == $login || $is_assistant))) {
    echo "<br />\n<br />\n";
    print_category_menu('day', sprintf("%04d%02d%02d", $thisyear, $thismonth, $thisday), $cat_id);
}
?>
</div>
</div>
</td>
<td style="vertical-align:top;" rowspan="2">
<!-- START MINICAL -->
<div class="minicalcontainer">
<?php 
display_small_month($thismonth, $thisyear, true);
?>
</div>
</td></tr><tr><td>
<table class="glance" cellspacing="0" cellpadding="0">
<?php 
if (empty($TIME_SLOTS)) {
    $TIME_SLOTS = 24;
}
print_day_at_a_glance(date("Ymd", $now), empty($user) ? $login : $user, $can_add);
?>
</table>
</td>
</tr></table>
<br />
<?php 
示例#2
0
        array_push($events, $e_save[$i]);
    }
}
for ($i = 0; $i < count($re_save); $i++) {
    $should_add = 1;
    for ($j = 0; $j < count($repeated_events) && $should_add; $j++) {
        if ($re_save[$i]['cal_id'] == $repeated_events[$j]['cal_id']) {
            $should_add = 0;
        }
    }
    if ($should_add) {
        array_push($repeated_events, $re_save[$i]);
    }
}
display_small_month($prevmonth, $prevyear, true, true, "prevmonth", "view_l.php?id={$id}&amp;");
display_small_month($nextmonth, $nextyear, true, true, "nextmonth", "view_l.php?id={$id}&amp;");
?>

<div class="title">
<span class="date"><br /><?php 
echo date_to_str(sprintf("%04d%02d01", $thisyear, $thismonth), $DATE_FORMAT_MY, false, false);
?>
</span>
<span class="viewname"><br /><?php 
echo $view_name;
?>
</span></div>
<br /><br /><br /><br />

<table class="main" style="clear:both;" cellspacing="0" cellpadding="0">
<tr>
示例#3
0
		</td></tr>
		<tr><td>
			<?php 
display_small_month(9, $year, False);
?>
</td><td>
			<?php 
display_small_month(10, $year, False);
?>
</td><td>
			<?php 
display_small_month(11, $year, False);
?>
</td><td>
			<?php 
display_small_month(12, $year, False);
?>
		</td></tr>
	</table>
</div>

<br />
<?php 
display_unapproved_events($login);
?>
<br />
<a title="<?php 
etranslate("Generate printer-friendly version");
?>
" class="printer" href="#" onClick="popup('year.php?<?php 
if ($thisyear) {
示例#4
0
文件: month.php 项目: noikiy/owaspbwa
    // convert to seconds
    $HeadX = "<meta http-equiv=\"refresh\" content=\"{$refresh}; url=month.php?{$u_url}" . "year={$thisyear}&amp;month={$thismonth}{$caturl}" . (!empty($friendly) ? "&amp;friendly=1" : "") . "\" />\n";
}
$INC = array('js/popups.php');
print_header($INC, $HeadX);
/* Pre-Load the repeated events for quicker access */
$repeated_events = read_repeated_events(!empty($user) && strlen($user) ? $user : $login, $cat_id, $startdate);
/* Pre-load the non-repeating events for quicker access */
$events = read_events(!empty($user) && strlen($user) ? $user : $login, $startdate, $enddate, $cat_id);
if (!empty($cat_id)) {
    $monthURL = "month.php?cat_id={$cat_id}&amp;";
} else {
    $monthURL = 'month.php?';
}
display_small_month($prevmonth, $prevyear, true, true, "prevmonth", $monthURL);
display_small_month($nextmonth, $nextyear, true, true, "nextmonth", $monthURL);
?>
<div class="title">
<span class="date"><br /><?php 
echo date_to_str(sprintf("%04d%02d01", $thisyear, $thismonth), $DATE_FORMAT_MY, false, false);
?>
</span>
<span class="user"><?php 
if ($single_user == "N") {
    echo "<br />\n";
    echo $user_fullname;
}
if ($is_nonuser_admin) {
    echo "<br />-- " . translate("Admin mode") . " --";
}
if ($is_assistant) {
示例#5
0
文件: year.php 项目: rhertzog/lcs
    $printerStr = generate_printer_friendly('year.php');
} else {
    $unapprovedStr = $printerStr = '';
}
$yr_rows = 3;
/* TODO: Move $yr_rows = 3 to webcal_config as default.
 * Add to webcal_user_prefs for each user.
 */
$yr_cols = intval(12 / $yr_rows);
$m = 1;
$gridOmonths = '';
for ($r = 1; $r <= $yr_rows; $r++) {
    $gridOmonths .= '        <tr>';
    for ($c = 1; $c <= $yr_cols; $c++, $m++) {
        $gridOmonths .= '
          <td>' . display_small_month($m, $year, false) . '</td>';
    }
    $gridOmonths .= '
        </tr>';
}
$trailerStr = print_trailer();
print_header();
echo <<<EOT
    <div class="title">
      <a title="{$prevStr}" class="prev" href="year.php?year={$prevYear}{$userStr}">
        <img src="images/leftarrow.gif" alt="{$prevStr}" /></a>
      <a title="{$nextStr}" class="next" href="year.php?year={$nextYear}{$userStr}">
        <img src="images/rightarrow.gif" alt="{$nextStr}" /></a>
      <span class="date">{$thisyear}</span><br />
      <span class="user">{$fullnameStr}</span><br />
      {$asstModeStr}
示例#6
0
文件: month.php 项目: rhertzog/lcs
if ($DISPLAY_TASKS_IN_GRID == 'Y') {
    /* Pre-load tasks for quicker access */
    $tasks = read_tasks(!empty($user) && strlen($user) && $is_assistant ? $user : $login, $enddate, $cat_id);
}
$tableWidth = '100%';
$monthURL = 'month.php?' . (!empty($cat_id) ? 'cat_id=' . $cat_id . '&amp;' : '');
$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>';
示例#7
0
文件: week.php 项目: rhertzog/lcs
$eventinfo = empty($eventinfo) ? '' : $eventinfo;
$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>
示例#8
0
文件: view_l.php 项目: rhertzog/lcs
    }
}
for ($i = 0, $cnt = count($re_save); $i < $cnt; $i++) {
    $should_add = 1;
    for ($j = 0, $cnt_j = count($repeated_events); $j < $cnt_j && $should_add; $j++) {
        if (!$re_save[$i]->getClone() && $re_save[$i]->getID() == $repeated_events[$j]->getID()) {
            $should_add = 0;
        }
    }
    if ($should_add) {
        array_push($repeated_events, $re_save[$i]);
    }
}
if ($DISPLAY_SM_MONTH != 'N') {
    $prevMonth = display_small_month($prevmonth, $prevyear, true, true, 'prevmonth', 'view_l.php?id=' . $id . '&amp;');
    $nextMonth = display_small_month($nextmonth, $nextyear, true, true, 'nextmonth', 'view_l.php?id=' . $id . '&amp;');
    $navStr = display_navigation('view_l', false, false);
} else {
    $navStr = display_navigation('view_l', true, false);
}
$monthStr = display_month($thismonth, $thisyear);
$eventinfo = empty($eventinfo) ? '' : $eventinfo;
echo <<<EOT
  <div class="title">
    <div class="minical">
     {$prevMonth}{$nextMonth}
    </div>
    {$navStr}
    <span class="viewname"><br />{$view_name}</span>
  </div>
  <br />
示例#9
0
文件: day.php 项目: rhertzog/lcs
$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>
        <td width="80%">
          {$navStr}
        </td>
        <td class="aligntop" rowspan="2">
示例#10
0
    $enddate = sprintf("%04d%02d31", $thisyear, $thismonth);
}
$HeadX = '';
if ($auto_refresh == "Y" && !empty($auto_refresh_time)) {
    $refresh = $auto_refresh_time * 60;
    // convert to seconds
    $HeadX = "<meta http-equiv=\"refresh\" content=\"{$refresh}; url=month.php?{$u_url}" . "date={$startdate}{$caturl}\" />\n";
}
$INC = array('js/popups.php');
print_header($INC, $HeadX);
/* Pre-Load the repeated events for quckier access */
$repeated_events = read_repeated_events(!empty($user) && strlen($user) ? $user : $login, $cat_id, $startdate);
/* Pre-load the non-repeating events for quicker access */
$events = read_events(!empty($user) && strlen($user) ? $user : $login, $startdate, $enddate, $cat_id);
display_small_month($prevmonth, $prevyear, true, true, "prevmonth");
display_small_month($nextmonth, $nextyear, true, true, "nextmonth");
?>
<div class="title">
<span class="date"><br /><?php 
echo date_to_str(sprintf("%04d%02d01", $thisyear, $thismonth), $DATE_FORMAT_MY, false, false);
?>
</span>
<span class="user"><?php 
if ($single_user == "N") {
    echo "<br />\n";
    echo $user_fullname;
}
if ($is_nonuser_admin) {
    echo "<br />-- " . translate("Admin mode") . " --";
}
if ($is_assistant) {
示例#11
0
文件: minical.php 项目: rhertzog/lcs
}
load_user_preferences();
user_load_variables($login, 'minical_');
if ($user != '__public__' && !nonuser_load_variables($login, 'minica_')) {
    die_miserable_death(str_replace('XXX', $login, translate('No such nonuser calendar XXX.')));
}
if ($user != '__public__' && (empty($minical_is_public) || $minical_is_public != 'Y')) {
    die_miserable_death(translate('This Calendar is not Public.'));
}
$next = mktime(0, 0, 0, $thismonth + 1, 1, $thisyear);
$nextmonth = date('m', $next);
$nextyear = date('Y', $next);
$prev = mktime(0, 0, 0, $thismonth - 1, 1, $thisyear);
$prevmonth = date('m', $prev);
$prevyear = date('Y', $prev);
$boldDays = true;
$startdate = mktime(0, 0, 0, $thismonth, 0, $thisyear);
$enddate = mktime(23, 59, 59, $thismonth + 1, 0, $thisyear);
// Don't display custom header.
print_header('', generate_refresh_meta(), '', true);
/* Pre-Load the repeated events for quicker access. */
$repeated_events = read_repeated_events($user, $startdate, $enddate, $cat_id);
/* Pre-load the non-repeating events for quicker access. */
$events = read_events($user, $startdate, $enddate, $cat_id);
echo display_small_month($thismonth, $thisyear, true, false);
// Reset...just in case.
$login = '';
?>
  </body>
</html>