set_var('str',$str);
$tpl->parse('header_column','head_col',True);
}
function add_image_ahref($link,$image,$alt)
{
return '';
}
$refer = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
$referrer = $refer[2];
$templates = Array(
'head_tpl' => 'head.tpl',
'form_button_dropdown' => 'form_button_dropdown.tpl',
'form_button_script' => 'form_button_script.tpl'
);
$tpl->set_file($templates);
$tpl->set_block('head_tpl','head','head');
$tpl->set_block('head_tpl','head_table','head_table');
$tpl->set_block('head_tpl','head_col','head_col');
$tpl->set_block('form_button_script','form_button');
if(floor(phpversion()) >= 4)
{
$tpl->set_var('cols',8);
}
else
{
$tpl->set_var('cols',7);
}
$today = date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
$col_width = 12;
add_col($tpl,'
| ');
add_col($tpl,' '.add_image_ahref($this->page('day','&date='.$today),'today',lang('Today')).' | ');
add_col($tpl,' '.add_image_ahref($this->page('week','&date='.$today),'week',lang('This week')).' | ');
add_col($tpl,' '.add_image_ahref($this->page('month','&date='.$today),'month',lang('This month')).' | ');
add_col($tpl,' '.add_image_ahref($this->page('year','&date='.$today),'year',lang('This Year')).' | ');
if(floor(phpversion()) >= 4)
{
add_col($tpl,' '.add_image_ahref($this->page('planner','&date='.$today),'planner',lang('Planner')).' | ');
$col_width += 2;
}
//add_col($tpl,' '.add_image_ahref($this->page('matrixselect'),'view',lang('Daily Matrix View')).' | ');
add_col($tpl,' | ');
$tpl->parse('row','head_table',True);
$tpl->set_var('header_column','');
$tpl->set_var('cols',$cols);
if($referrer!='view')
{
$remainder = 72;
$date = (isset($GLOBALS['date'])?$GLOBALS['date']:'');
$date = (isset($GLOBALS['HTTP_GET_VARS']['date'])?$GLOBALS['HTTP_GET_VARS']['date']:$date);
$date = ($date=='' && isset($GLOBALS['HTTP_POST_VARS']['date'])?$GLOBALS['HTTP_POST_VARS']['date']:$date);
$base_hidden_vars = ''."\n";
if(isset($GLOBALS['HTTP_GET_VARS']['cal_id']) && $GLOBALS['HTTP_GET_VARS']['cal_id'] != 0)
{
$base_hidden_vars .= ' '."\n";
}
if(isset($GLOBALS['HTTP_POST_VARS']['keywords']) && $GLOBALS['HTTP_POST_VARS']['keywords'])
{
$base_hidden_vars .= ' '."\n";
}
if(isset($GLOBALS['HTTP_POST_VARS']['matrixtype']) && $GLOBALS['HTTP_POST_VARS']['matrixtype'])
{
$base_hidden_vars .= ' '."\n";
}
if($date)
{
$base_hidden_vars .= ' '."\n";
}
$base_hidden_vars .= ' '."\n";
$base_hidden_vars .= ' '."\n";
$base_hidden_vars .= ' '."\n";
if(isset($GLOBALS['HTTP_POST_VARS']['participants']) && $GLOBALS['HTTP_POST_VARS']['participants'])
{
for ($i=0;$i'."\n";
}
}
$var = Array(
'form_width' => '28',
'form_link' => $this->page($referrer),
'form_name' => 'cat_id',
'title' => lang('Category'),
'hidden_vars' => $base_hidden_vars,
'form_options' => ''.$this->cat->formated_list('select','all',$this->bo->cat_id,'True'),
'button_value' => lang('Go!')
);
$tpl->set_var($var);
$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
$tpl->parse('header_column','head_col',True);
if($GLOBALS['HTTP_GET_VARS']['menuaction'] == 'calendar.uicalendar.planner')
{
$remainder -= 28;
print_debug('Sort By',$this->bo->sortby);
$form_options = ''."\n";
$form_options .= ' '."\n";
$var = Array(
'form_width' => '28',
'form_link' => $this->page($referrer),
'form_name' => 'sortby',
'title' => lang('Sort By'),
'hidden_vars' => $base_hidden_vars,
'form_options' => $form_options,
'button_value' => lang('Go!')
);
$tpl->set_var($var);
$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
$tpl->parse('header_column','head_col',True);
}
if($this->bo->check_perms(PHPGW_ACL_PRIVATE))
{
$remainder -= 28;
$form_options = ''."\n";
$form_options .= ' '."\n";
$var = Array(
'form_width' => '28',
'form_link' => $this->page($referrer),
'form_name' => 'filter',
'title' => lang('Filter'),
'hidden_vars' => $base_hidden_vars,
'form_options' => $form_options,
'button_value' => lang('Go!')
);
$tpl->set_var($var);
$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
$tpl->parse('header_column','head_col',True);
}
//aqui !!
if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || !$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && count($this->bo->grants) > 0)
{
$form_options = '';
$drop_down = $this->bo->list_cals(); //hehe
foreach($drop_down as $key => $grant)
{
if(!strstr(($grant['value']),'g_'))
$form_options .= ' '."\n";
}
$var = Array(
'form_width' => $remainder,
'form_link' => $this->page($referrer),
'form_name' => 'owner',
'title' => lang('User'),
'hidden_vars' => $base_hidden_vars,
'form_options' => $form_options,
'button_value' => lang('Go!')
);
$tpl->set_var($var);
$tpl->set_var('str',$tpl->fp('out','form_button_dropdown'));
$tpl->parse('header_column','head_col',True);
}
}
$hidden_vars = ' '."\n";
if(isset($GLOBALS['HTTP_GET_VARS']['date']) && $GLOBALS['HTTP_GET_VARS']['date'])
{
$hidden_vars .= ' '."\n";
}
$hidden_vars .= ' '."\n";
$hidden_vars .= ' '."\n";
$hidden_vars .= ' '."\n";
if(isset($this->bo->filter) && $this->bo->filter)
{
$hidden_vars .= ' '."\n";
}
if(isset($this->bo->sortby) && $this->bo->sortby)
{
$hidden_vars .= ' '."\n";
}
if(isset($this->bo->num_months) && $this->bo->num_months)
{
$hidden_vars .= ' '."\n";
}
$hidden_vars .= ' ';
$var = Array(
'action_url_button' => $this->page('search'),
'action_text_button' => lang('Search'),
'action_confirm_button' => '',
'action_extra_field' => $hidden_vars
);
$tpl->set_var($var);
$button = $tpl->fp('out','form_button');
$tpl->set_var('str',''.$button.' | ');
$tpl->parse('header_column','head_col',True);
$tpl->parse('row','head_table',True);
?>