mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 16:29:22 +01:00
now works with new api - beginnings of ACL support
This commit is contained in:
parent
28f53016d6
commit
89c174dcbc
@ -17,7 +17,7 @@
|
|||||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
|
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
|
||||||
|
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
$sb = CreateObject("phpgwapi.sbox");
|
$sb = CreateObject("phpgwapi.sbox");
|
||||||
|
|
||||||
$cal_info = CreateObject('calendar.calendar_item');
|
$cal_info = CreateObject('calendar.calendar_item');
|
||||||
@ -36,6 +36,12 @@
|
|||||||
$hourformat = "H";
|
$hourformat = "H";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!isset($owner)) {
|
||||||
|
$owner = $phpgw_info['user']['account_id'];
|
||||||
|
} else {
|
||||||
|
$owner = $phpgw_info['user']['account_id'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$cal = $phpgw->calendar->getevent(intval($id));
|
$cal = $phpgw->calendar->getevent(intval($id));
|
||||||
$cal_info = $cal[0];
|
$cal_info = $cal[0];
|
||||||
@ -48,12 +54,12 @@
|
|||||||
$cal_info->rpt_end = $cal_info->datetime + 86400;
|
$cal_info->rpt_end = $cal_info->datetime + 86400;
|
||||||
}
|
}
|
||||||
} else if(isset($readsess)) {
|
} else if(isset($readsess)) {
|
||||||
$cal_info = $phpgw->common->appsession();
|
$cal_info = $phpgw->common->appsession('entry','calendar');
|
||||||
if(!$cal_info->owner) $cal_info->owner = $phpgw_info["user"]["account_id"];
|
if(!$cal_info->owner) $cal_info->owner = $owner;
|
||||||
$can_edit = true;
|
$can_edit = true;
|
||||||
} else {
|
} else {
|
||||||
$cal_info->id = 0;
|
$cal_info->id = 0;
|
||||||
$cal_info->owner = $phpgw_info["user"]["account_id"];
|
$cal_info->owner = $owner;
|
||||||
$can_edit = true;
|
$can_edit = true;
|
||||||
|
|
||||||
if (!isset($day) || !$day)
|
if (!isset($day) || !$day)
|
||||||
@ -170,35 +176,50 @@
|
|||||||
display_item(lang("Access"),$sb->getAccessList("cal[access]",$cal_info->access));
|
display_item(lang("Access"),$sb->getAccessList("cal[access]",$cal_info->access));
|
||||||
|
|
||||||
// Groups
|
// Groups
|
||||||
$db2 = $phpgw->db;
|
$user_groups = $phpgw->accounts->memberships(intval($owner));
|
||||||
$db2->query("SELECT account_lid FROM phpgw_accounts WHERE account_id=".$cal_info->owner,__LINE__,__FILE__);
|
|
||||||
$db2->next_record();
|
|
||||||
$user_groups = $phpgw->accounts->read_group_names($db2->f("account_lid"));
|
|
||||||
|
|
||||||
display_item(lang("Groups"),$sb->getGroups($user_groups,$cal_info->groups,"cal[groups][]"));
|
display_item(lang("Groups"),$sb->getGroups($user_groups,$cal_info->groups,"cal[groups][]"));
|
||||||
|
|
||||||
// Participants
|
// Participants
|
||||||
$db2 = $phpgw->db;
|
$accounts = $phpgw->acl->get_ids_for_location('run',1,'calendar');
|
||||||
$db2->query("select account_id,account_lastname,account_firstname,account_lid "
|
$users = Array();
|
||||||
. "from phpgw_accounts where account_status !='L' and "
|
for($i=0;$i<count($accounts);$i++) {
|
||||||
. "account_id != ".$phpgw_info["user"]["account_id"]." "
|
switch ($phpgw->accounts->get_type($accounts[$i])) {
|
||||||
. "and account_permissions like '%:calendar:%' "
|
case 'u' :
|
||||||
. "order by account_lastname,account_firstname,account_lid");
|
if($accounts[$i] != $owner && !$users[$accounts[$i]]) {
|
||||||
|
$users[$accounts[$i]] = $phpgw->common->grab_owner_name($accounts[$i]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'g' :
|
||||||
|
$group_members = $phpgw->acl->get_ids_for_location($accounts[$i],1,'phpgw_group');
|
||||||
|
while($group_members && $user = each($group_members)) {
|
||||||
|
if($user[1] != $owner && !$users[$user[1]]) {
|
||||||
|
$users[$user[1]] = $phpgw->common->grab_owner_name($user[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($db2->num_rows() > 50)
|
$num_users = count($users);
|
||||||
|
if ($num_users > 50) {
|
||||||
$size = 15;
|
$size = 15;
|
||||||
else if ($db2->num_rows() > 5)
|
} else if ($num_users > 5) {
|
||||||
$size = 5;
|
$size = 5;
|
||||||
else
|
} else {
|
||||||
$size = $db2->num_rows();
|
$size = $num_users;
|
||||||
|
}
|
||||||
$str = "<select name=\"cal[participants][]\" multiple size=\"5\">";
|
$str = "<select name=\"cal[participants][]\" multiple size=\"5\">";
|
||||||
for ($l=0;$l<count($cal_info->participants);$l++)
|
for ($l=0;$l<count($cal_info->participants);$l++) {
|
||||||
$parts[$cal_info->participants[$l]] = True;
|
$parts[$cal_info->participants[$l]] = True;
|
||||||
while ($db2->next_record()) {
|
}
|
||||||
$str .= "<option value=\"" . $db2->f("account_id") . "\"";
|
|
||||||
if ($parts[$db2->f("account_id")])
|
@asort($users);
|
||||||
$str .= " selected";
|
@reset($users);
|
||||||
$str .= ">".$phpgw->common->grab_owner_name($db2->f("account_id"))."</option>";
|
while ($user = each($users)) {
|
||||||
|
$str .= "<option value=\"" . $user[0] . "\"";
|
||||||
|
if ($parts[$user[0]])
|
||||||
|
$str .= " selected";
|
||||||
|
$str .= ">".$user[1]."</option>";
|
||||||
}
|
}
|
||||||
$str .= "</select>";
|
$str .= "</select>";
|
||||||
display_item(lang("Participants"),$str);
|
display_item(lang("Participants"),$str);
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
$cal_info->edatetime = mktime($cal_info->end_hour,$cal_info->end_minute,0,$cal_info->end_month,$cal_info->end_day,$cal_info->end_year) - ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
$cal_info->edatetime = mktime($cal_info->end_hour,$cal_info->end_minute,0,$cal_info->end_month,$cal_info->end_day,$cal_info->end_year) - ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
||||||
$cal_info->rpt_end = mktime(12,0,0,$cal_info->rpt_month,$cal_info->rpt_day,$cal_info->rpt_year) - ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
$cal_info->rpt_end = mktime(12,0,0,$cal_info->rpt_month,$cal_info->rpt_day,$cal_info->rpt_year) - ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
||||||
|
|
||||||
$cal_info = $phpgw->common->appsession($cal_info);
|
$phpgw->common->appsession('entry','calendar',$cal_info);
|
||||||
$datetime_check = validate($cal_info);
|
$datetime_check = validate($cal_info);
|
||||||
if ($phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
|
if ($phpgw_info["user"]["preferences"]["common"]["timeformat"] == "12") {
|
||||||
if ($cal_info->hour >= 12) {
|
if ($cal_info->hour >= 12) {
|
||||||
@ -97,7 +97,7 @@
|
|||||||
$cal_info->edatetime += ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
$cal_info->edatetime += ((60 * 60) * $phpgw_info["user"]["preferences"]["common"]["tz_offset"]);
|
||||||
$overlapping_events = $phpgw->calendar->overlap($cal_info->datetime,$cal_info->edatetime,$cal_info->participants,$cal_info->groups,$cal_info->owner,$cal_info->id);
|
$overlapping_events = $phpgw->calendar->overlap($cal_info->datetime,$cal_info->edatetime,$cal_info->participants,$cal_info->groups,$cal_info->owner,$cal_info->id);
|
||||||
} else {
|
} else {
|
||||||
$cal_info = $phpgw->common->appsession();
|
$cal_info = $phpgw->common->appsession('entry','calendar');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($datetime_check) {
|
if($datetime_check) {
|
||||||
|
@ -1574,7 +1574,7 @@
|
|||||||
$calendar->description = htmlspecialchars(stripslashes($db2->f("cal_description")));
|
$calendar->description = htmlspecialchars(stripslashes($db2->f("cal_description")));
|
||||||
if($db2->f("cal_group")) {
|
if($db2->f("cal_group")) {
|
||||||
$groups = explode(',',$db2->f("cal_group"));
|
$groups = explode(',',$db2->f("cal_group"));
|
||||||
for($j=1;$j<count($groups);$j++) {
|
for($j=1;$j<count($groups) - 1;$j++) {
|
||||||
$calendar->groups[] = $groups[$j];
|
$calendar->groups[] = $groups[$j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,36 +61,38 @@
|
|||||||
|
|
||||||
$view = "month";
|
$view = "month";
|
||||||
|
|
||||||
$phpgw->template->set_file(array("index_t" => "index.tpl"));
|
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('calendar'));
|
||||||
|
|
||||||
$phpgw->template->set_block("index_t","index");
|
$p->set_file(array("index_t" => "index.tpl"));
|
||||||
|
|
||||||
|
$p->set_block("index_t","index");
|
||||||
|
|
||||||
if ($friendly) {
|
if ($friendly) {
|
||||||
$phpgw->template->set_var("printer_friendly","<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">");
|
$p->set_var("printer_friendly","<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">");
|
||||||
} else {
|
} else {
|
||||||
$phpgw->template->set_var("printer_friendly","");
|
$p->set_var("printer_friendly","");
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->template->set_var("bg_text",$phpgw_info["theme"]["bg_text"]);
|
$p->set_var("bg_text",$phpgw_info["theme"]["bg_text"]);
|
||||||
|
|
||||||
$phpgw->template->set_var("small_calendar_prev",$phpgw->calendar->mini_calendar(1,$prev["month"],$prev["year"],"day.php"));
|
$p->set_var("small_calendar_prev",$phpgw->calendar->mini_calendar(1,$prev["month"],$prev["year"],"day.php"));
|
||||||
|
|
||||||
$m = mktime(2,0,0,$thismonth,1,$thisyear);
|
$m = mktime(2,0,0,$thismonth,1,$thisyear);
|
||||||
$phpgw->template->set_var("month_identifier",lang(strftime("%B",$m)) . " " . $thisyear);
|
$p->set_var("month_identifier",lang(strftime("%B",$m)) . " " . $thisyear);
|
||||||
$phpgw->template->set_var("username",$phpgw->common->grab_owner_name($owner));
|
$p->set_var("username",$phpgw->common->grab_owner_name($owner));
|
||||||
$phpgw->template->set_var("small_calendar_next",$phpgw->calendar->mini_calendar(1,$next["month"],$next["year"],"day.php"));
|
$p->set_var("small_calendar_next",$phpgw->calendar->mini_calendar(1,$next["month"],$next["year"],"day.php"));
|
||||||
flush();
|
flush();
|
||||||
$phpgw->template->set_var("large_month",$phpgw->calendar->display_large_month($thismonth,$thisyear,True,$owner));
|
$p->set_var("large_month",$phpgw->calendar->display_large_month($thismonth,$thisyear,True,$owner));
|
||||||
if (!$friendly) {
|
if (!$friendly) {
|
||||||
$param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter;
|
$param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter;
|
||||||
$phpgw->template->set_var("print","<a href=\"".$phpgw->link("",$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
$p->set_var("print","<a href=\"".$phpgw->link("",$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
||||||
. "status = '" . lang("Generate printer-friendly version"). "'\">[". lang("Printer Friendly") . "]</a>");
|
. "status = '" . lang("Generate printer-friendly version"). "'\">[". lang("Printer Friendly") . "]</a>");
|
||||||
$phpgw->template->parse("out","index_t");
|
$p->parse("out","index_t");
|
||||||
$phpgw->template->pparse("out","index_t");
|
$p->pparse("out","index_t");
|
||||||
} else {
|
} else {
|
||||||
$phpgw->template->set_var("print","");
|
$p->set_var("print","");
|
||||||
$phpgw->template->parse("out","index_t");
|
$p->parse("out","index_t");
|
||||||
$phpgw->template->pparse("out","index_t");
|
$p->pparse("out","index_t");
|
||||||
}
|
}
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
|
$phpgw_info["flags"] = array("currentapp" => "calendar", "enable_nextmatchs_class" => True);
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
$debugme = "on";
|
||||||
if ($id < 1) {
|
if ($id < 1) {
|
||||||
echo lang("Invalid entry id.");
|
echo lang("Invalid entry id.");
|
||||||
$phpgw->common->phpgw_exit();
|
$phpgw->common->phpgw_exit();
|
||||||
@ -106,9 +106,9 @@
|
|||||||
$cal_grps = "";
|
$cal_grps = "";
|
||||||
for($i=0;$i<count($cal_info->groups);$i++) {
|
for($i=0;$i<count($cal_info->groups);$i++) {
|
||||||
if($i>0) $cal_grps .= "<br>";
|
if($i>0) $cal_grps .= "<br>";
|
||||||
$db->query("SELECT group_name FROM groups WHERE group_id=".$cal_info->groups[$i],__LINE__,__FILE__);
|
$db->query("SELECT account_lid FROM phpgw_accounts WHERE account_id=".$cal_info->groups[$i],__LINE__,__FILE__);
|
||||||
$db->next_record();
|
$db->next_record();
|
||||||
$cal_grps .= $db->f("group_name");
|
$cal_grps .= $db->f("account_lid");
|
||||||
}
|
}
|
||||||
display_item(lang("Groups"),$cal_grps);
|
display_item(lang("Groups"),$cal_grps);
|
||||||
}
|
}
|
||||||
|
@ -52,19 +52,51 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($owner)) { $owner = 0; }
|
if(!isset($owner)) { $owner = 0; }
|
||||||
unset($owner);
|
|
||||||
|
|
||||||
if(!isset($owner) || !$owner) {
|
if(!isset($owner) || !$owner) {
|
||||||
$id = $phpgw_info["user"]["userid"];
|
$owner = $phpgw_info['user']['account_id'];
|
||||||
$fn = $phpgw_info["user"]["firstname"];
|
|
||||||
$ln = $phpgw_info["user"]["lastname"];
|
|
||||||
$owner = 0;
|
|
||||||
} else {
|
} else {
|
||||||
$phpgw->db->query("SELECT account_lid,account_firstname,account_lastname FROM accounts WHERE account_id=$owner");
|
$grants = $phpgw->acl->get_location_list_for_id('calendar',PHPGW_ACL_READ,$owner);
|
||||||
$phpgw->db->next_record();
|
$memberships = $phpgw->accounts->memberships($phpgw_info['user']['account_id']);
|
||||||
$id = $phpgw->db->f("account_lid");
|
while($grants && $granted = each($grants)){
|
||||||
$fn = $phpgw->db->f("account_firstname");
|
if($granted[1] == 'u_'.$phpgw_info['user']['account_id']){
|
||||||
$ln = $phpgw->db->f("account_lastname");
|
$can_read = True;
|
||||||
|
break;
|
||||||
|
}else{
|
||||||
|
reset($memberships);
|
||||||
|
while($group = each($memberships)) {
|
||||||
|
if($granted[1] == 'g_'.$group[1]['account_id']){
|
||||||
|
$can_read = True;
|
||||||
|
break 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if(!$can_read){
|
||||||
|
// $my_groups = $phpgw->accounts->memberships($phpgw_info['user']['account_id']);
|
||||||
|
// $their_groups = $phpgw->accounts->memberships($owner);
|
||||||
|
// for($j=0;$j<count($my_groups);$j++){
|
||||||
|
//echo 'My Group ('.$my_groups[$j]['account_name'].') '.$my_groups[$j]['account_id']."<br>\n";
|
||||||
|
// if($can_read){ break; }
|
||||||
|
// for($k=0;$k<count($their_groups);$k++){
|
||||||
|
//echo 'Their Group ('.$their_groups[$k]['account_name'].') '.$their_groups[$k]['account_id']."<br>\n";
|
||||||
|
// if($can_read){ break 2; }
|
||||||
|
// if($my_groups[$j] == $their_groups[$k]){
|
||||||
|
//echo 'Match Group ('.$my_groups[$j]['account_name'].') '.$my_groups[$j]['account_id']."<br>\n";
|
||||||
|
// $users = $phpgw->acl->get_ids_for_location('g_'.$my_groups[$j]['account_id'],PHPGW_ACL_READ,'calendar');
|
||||||
|
// for($l=0;$l<count($users);$l++){
|
||||||
|
// if($users[$l] == $owner){
|
||||||
|
// $can_read = True;
|
||||||
|
// break 3;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
if(!$can_read) {
|
||||||
|
$owner = $phpgw_info['user']['account_id'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$next = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth,$thisday + 7,$thisyear));
|
$next = $phpgw->calendar->splitdate(mktime(2,0,0,$thismonth,$thisday + 7,$thisyear));
|
||||||
@ -80,25 +112,27 @@
|
|||||||
}
|
}
|
||||||
$first = $phpgw->calendar->splitdate($phpgw->calendar->get_weekday_start($thisyear, $thismonth, $thisday) + $start);
|
$first = $phpgw->calendar->splitdate($phpgw->calendar->get_weekday_start($thisyear, $thismonth, $thisday) + $start);
|
||||||
$last = $phpgw->calendar->splitdate($first["raw"] + 518400);
|
$last = $phpgw->calendar->splitdate($first["raw"] + 518400);
|
||||||
$phpgw->template->set_file(array("week_t" => "week.tpl"));
|
|
||||||
|
|
||||||
$phpgw->template->set_block("week_t","week");
|
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('calendar'));
|
||||||
|
$p->set_file(array("week_t" => "week.tpl"));
|
||||||
|
|
||||||
|
$p->set_block("week_t","week");
|
||||||
|
|
||||||
if ($friendly) {
|
if ($friendly) {
|
||||||
$phpgw->template->set_var("printer_friendly","<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">");
|
$p->set_var("printer_friendly","<body bgcolor=\"".$phpgw_info["theme"]["bg_color"]."\">");
|
||||||
} else {
|
} else {
|
||||||
$phpgw->template->set_var("printer_friendly","");
|
$p->set_var("printer_friendly","");
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->template->set_var("bg_text",$phpgw_info["theme"]["bg_text"]);
|
$p->set_var("bg_text",$phpgw_info["theme"]["bg_text"]);
|
||||||
|
|
||||||
$phpgw->template->set_var("small_calendar_prev",$phpgw->calendar->mini_calendar($thisday,$prevmonth["month"],$prevmonth["year"],"day.php"));
|
$p->set_var("small_calendar_prev",$phpgw->calendar->mini_calendar($thisday,$prevmonth["month"],$prevmonth["year"],"day.php"));
|
||||||
if (!$friendly) {
|
if (!$friendly) {
|
||||||
$phpgw->template->set_var("prev_week_link","<a href=\"".$phpgw->link("week.php","year=".$prev["year"]."&month=".$prev["month"]."&day=".$prev["day"])."\"><<</a>");
|
$p->set_var("prev_week_link","<a href=\"".$phpgw->link("week.php","year=".$prev["year"]."&month=".$prev["month"]."&day=".$prev["day"])."\"><<</a>");
|
||||||
} else {
|
} else {
|
||||||
$phpgw->template->set_var("prev_week_link","<<");
|
$p->set_var("prev_week_link","<<");
|
||||||
}
|
}
|
||||||
$phpgw->template->set_var("small_calendar_this",$phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,"day.php"));
|
$p->set_var("small_calendar_this",$phpgw->calendar->mini_calendar($thisday,$thismonth,$thisyear,"day.php"));
|
||||||
|
|
||||||
$week_id = lang(strftime("%B",$first["raw"]))." ".$first["day"];
|
$week_id = lang(strftime("%B",$first["raw"]))." ".$first["day"];
|
||||||
if($first["month"] <> $last["month"] && $first["year"] <> $last["year"]) $week_id .= ", ".$first["year"];
|
if($first["month"] <> $last["month"] && $first["year"] <> $last["year"]) $week_id .= ", ".$first["year"];
|
||||||
@ -106,27 +140,27 @@
|
|||||||
if($first["month"] <> $last["month"]) $week_id .= lang(strftime("%B",$last["raw"]))." ";
|
if($first["month"] <> $last["month"]) $week_id .= lang(strftime("%B",$last["raw"]))." ";
|
||||||
$week_id .= $last["day"].", ".$last["year"];
|
$week_id .= $last["day"].", ".$last["year"];
|
||||||
|
|
||||||
$phpgw->template->set_var("week_identifier",$week_id);
|
$p->set_var("week_identifier",$week_id);
|
||||||
$phpgw->template->set_var("username",$phpgw->common->display_fullname($id,$fn,$ln));
|
$p->set_var("username",$phpgw->common->grab_owner_name($owner));
|
||||||
|
|
||||||
if (!$friendly) {
|
if (!$friendly) {
|
||||||
$phpgw->template->set_var("next_week_link","<a href=\"".$phpgw->link("week.php","year=".$next["year"]."&month=".$next["month"]."&day=".$next["day"])."\">>></a>");
|
$p->set_var("next_week_link","<a href=\"".$phpgw->link("week.php","year=".$next["year"]."&month=".$next["month"]."&day=".$next["day"])."\">>></a>");
|
||||||
} else {
|
} else {
|
||||||
$phpgw->template->set_var("next_week_link",">>");
|
$p->set_var("next_week_link",">>");
|
||||||
}
|
}
|
||||||
$phpgw->template->set_var("small_calendar_next",$phpgw->calendar->mini_calendar($thisday,$nextmonth["month"],$nextmonth["year"],"day.php"));
|
$p->set_var("small_calendar_next",$phpgw->calendar->mini_calendar($thisday,$nextmonth["month"],$nextmonth["year"],"day.php"));
|
||||||
$phpgw->template->set_var("week_display",$phpgw->calendar->display_large_week($thisday,$thismonth,$thisyear,true,$owner));
|
$p->set_var("week_display",$phpgw->calendar->display_large_week($thisday,$thismonth,$thisyear,true,$owner));
|
||||||
|
|
||||||
if (!$friendly) {
|
if (!$friendly) {
|
||||||
$param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter;
|
$param = 'year='.$thisyear.'&month='.$thismonth.'&friendly=1&filter='.$filter;
|
||||||
$phpgw->template->set_var("print","<a href=\"".$phpgw->link("",$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
$p->set_var("print","<a href=\"".$phpgw->link("",$param)."\" TARGET=\"cal_printer_friendly\" onMouseOver=\"window."
|
||||||
. "status = '" . lang("Generate printer-friendly version"). "'\">[". lang("Printer Friendly") . "]</A>");
|
. "status = '" . lang("Generate printer-friendly version"). "'\">[". lang("Printer Friendly") . "]</A>");
|
||||||
$phpgw->template->parse("out","week_t");
|
$p->parse("out","week_t");
|
||||||
$phpgw->template->pparse("out","week_t");
|
$p->pparse("out","week_t");
|
||||||
} else {
|
} else {
|
||||||
$phpgw->template->set_var("print","");
|
$p->set_var("print","");
|
||||||
$phpgw->template->parse("out","week_t");
|
$p->parse("out","week_t");
|
||||||
$phpgw->template->pparse("out","week_t");
|
$p->pparse("out","week_t");
|
||||||
}
|
}
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user