* * http://www.radix.net/~cknudsen * * Written by Mark Peters * * -------------------------------------------- * * This program is free software; you can redistribute it and/or modify it * * under the terms of the GNU General Public License as published by the * * Free Software Foundation; either version 2 of the License, or (at your * * option) any later version. * \**************************************************************************/ /* $Id$ */ $phpgw_flags = Array( 'currentapp' => 'calendar', 'enable_nextmatchs_class' => True, ); $phpgw_info['flags'] = $phpgw_flags; include('../header.inc.php'); $datetime = mktime(0,0,0,$thismonth,$thisday,$thisyear) - ((60 * 60) * intval($phpgw_info['user']['preferences']['common']['tz_offset'])); $sb = CreateObject('phpgwapi.sbox'); $p = CreateObject('phpgwapi.Template',$phpgw->calendar->template_dir); $templates = Array( 'matrix_query_begin' => 'matrix_query.tpl', 'list' => 'list.tpl', 'matrix_query_end' => 'matrix_query.tpl', 'form_button' => 'form_button_script.tpl' ); $p->set_file($templates); $var = Array( 'matrix_action' => lang('Daily Matrix View'), 'action_url' => $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/viewmatrix.php') ); $p->set_var($var); $p->parse('out','matrix_query_begin'); // Date $day_html = $sb->getDays('day',intval($phpgw->common->show_date($datetime,'d'))); $month_html = $sb->getMonthText('month',intval($phpgw->common->show_date($datetime,'n'))); $year_html = $sb->getYears('year',intval($phpgw->common->show_date($datetime,'Y')),intval($phpgw->common->show_date($datetime,'Y'))); $var = Array( 'field' => lang('Date'), 'data' => $phpgw->common->dateformatorder($year_html,$month_html,$day_html) ); $p->set_var($var); $p->parse('output','list',True); // View type $str = ''."\n"; $var = Array( 'field' => lang('View'), 'data' => $str ); $p->set_var($var); $p->parse('output','list',True); // Participants $accounts = $phpgw->acl->get_ids_for_location('run',1,'calendar'); $users = Array(); for($i=0;$icommon->grab_owner_name($user); if($phpgw->accounts->get_type($user) == 'g') { $group_members = $phpgw->acl->get_ids_for_location($user,1,'phpgw_group'); if($group_members != False) { for($j=0;$jcommon->grab_owner_name($group_members[$j]); } } } } } } if ($num_users > 50) { $size = 15; } elseif ($num_users > 5) { $size = 5; } else { $size = $num_users; } $str = "\n".' '; $var = Array( 'field' => lang('Participants'), 'data' => $str ); $p->set_var($var); $p->parse('output','list',True); $var = Array( 'submit_button' => lang('Submit'), 'action_url_button' => '', 'action_text_button' => lang('Cancel'), 'action_confirm_button' => 'onClick="history.back(-1)"' ); $p->set_var($var); $p->parse('cancel_button','form_button'); $p->pparse('out','matrix_query_end'); $phpgw->common->phpgw_footer(); ?>