[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: headlines preferences.php,1.19,1.19.2.1
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: headlines preferences.php,1.19,1.19.2.1 |
Date: |
Thu, 24 Jan 2002 21:53:32 -0500 |
Update of /cvsroot/phpgroupware/headlines
In directory subversions:/tmp/cvs-serv16883/headlines
Modified Files:
Tag: Version-0_9_14-branch
preferences.php
Log Message:
Changed this a little.
Index: preferences.php
===================================================================
RCS file: /cvsroot/phpgroupware/headlines/preferences.php,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -C2 -r1.19 -r1.19.2.1
*** preferences.php 22 Sep 2001 02:05:38 -0000 1.19
--- preferences.php 25 Jan 2002 02:53:28 -0000 1.19.2.1
***************
*** 22,75 ****
if (! $submit)
{
! $phpgw->common->phpgw_header();
echo parse_navbar();
! $phpgw->template->set_file(array('form' => 'preferences.tpl'));
!
$phpgw->template->set_var('form_action',$phpgw->link('/headlines/preferences.php'));
!
$phpgw->template->set_var('th_bg',$phpgw_info['theme']['th_bg']);
! $phpgw->template->set_var('lang_header',lang('select headline
news sites'));
! $phpgw->template->set_var('lang_headlines',lang('Headline
preferences'));
! $phpgw->db->query('SELECT con,display FROM
phpgw_headlines_sites ORDER BY display asc',__LINE__,__FILE__);
! while ($phpgw->db->next_record())
{
! $html_select .= '<option value=\'' .
$phpgw->db->f('con') . '\'';
! // . $users_headlines[$phpgw->db->f('con')];
! if
($phpgw_info['user']['preferences']['headlines'][$phpgw->db->f('con')])
{
$html_select .= ' selected';
}
! $html_select .= '>' . $phpgw->db->f('display') .
"</option>\n";
}
! $phpgw->template->set_var('select_options',$html_select);
!
$phpgw->template->set_var('tr_color_1',$phpgw->nextmatchs->alternate_row_color());
!
$phpgw->template->set_var('tr_color_2',$phpgw->nextmatchs->alternate_row_color());
! $phpgw->template->set_var('lang_submit',lang('submit'));
! $phpgw->template->pparse('out','form');
} else {
$i = 0;
! while
(is_array($phpgw_info['user']['preferences']['headlines']) && $preference =
each($phpgw_info['user']['preferences']['headlines']))
{
! $phpgw->preferences->delete('headlines',$preference[0]);
}
! if (count($headlines))
{
! while ($value = each($headlines))
{
!
$phpgw->preferences->change('headlines',$value[1],'True');
}
}
! $phpgw->preferences->commit(True);
! Header('Location: ' . $phpgw->link('/preferences/index.php'));
}
! $phpgw->common->phpgw_footer();
?>
--- 22,75 ----
if (! $submit)
{
! $GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
! $GLOBALS['phpgw']->template->set_file(array('form' =>
'preferences.tpl'));
!
$GLOBALS['phpgw']->template->set_var('form_action',$phpgw->link('/headlines/preferences.php'));
!
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
! $GLOBALS['phpgw']->template->set_var('lang_header',lang('select
headline news sites'));
!
$GLOBALS['phpgw']->template->set_var('lang_headlines',lang('Headline
preferences'));
! $GLOBALS['phpgw']->db->query('SELECT con,display FROM
phpgw_headlines_sites ORDER BY display asc',__LINE__,__FILE__);
! while ($GLOBALS['phpgw']->db->next_record())
{
! $html_select .= '<option value=\'' .
$GLOBALS['phpgw']->db->f('con') . '\'';
! // . $users_headlines[$GLOBALS['phpgw']->db->f('con')];
! if
($GLOBALS['phpgw_info']['user']['preferences']['headlines'][$GLOBALS['phpgw']->db->f('con')])
{
$html_select .= ' selected';
}
! $html_select .= '>' .
$GLOBALS['phpgw']->db->f('display') . '</option>'."\n";
}
!
$GLOBALS['phpgw']->template->set_var('select_options',$html_select);
!
$GLOBALS['phpgw']->template->set_var('tr_color_1',$GLOBALS['phpgw']->nextmatchs->alternate_row_color());
!
$GLOBALS['phpgw']->template->set_var('tr_color_2',$GLOBALS['phpgw']->nextmatchs->alternate_row_color());
!
$GLOBALS['phpgw']->template->set_var('lang_submit',lang('submit'));
! $GLOBALS['phpgw']->template->pparse('out','form');
} else {
$i = 0;
! while
(is_array($GLOBALS['phpgw_info']['user']['preferences']['headlines']) &&
$preference = each($GLOBALS['phpgw_info']['user']['preferences']['headlines']))
{
!
$GLOBALS['phpgw']->preferences->delete('headlines',$preference[0]);
}
! if (count($GLOBALS['HTTP_POST_VARS']['headlines']))
{
! while ($value =
each($GLOBALS['HTTP_POST_VARS']['headlines']))
{
!
$GLOBALS['phpgw']->preferences->add('headlines',$value[1],'True');
}
}
! $GLOBALS['phpgw']->preferences->save_repository(True);
! Header('Location: ' .
$GLOBALS['phpgw']->link('/preferences/index.php'));
}
! $GLOBALS['phpgw']->common->phpgw_footer();
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: headlines preferences.php,1.19,1.19.2.1,
Mark A Peters <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: forum/admin category.php,1.25.2.2,NONE deletecategory.php,1.11,NONE deleteforum.php,1.12,NONE forum.php,1.26,NONE index.php,1.31.2.1,NONE
- Next by Date:
[Phpgroupware-cvs] CVS: headlines preferences.php,1.19,1.20
- Previous by thread:
[Phpgroupware-cvs] CVS: forum/admin category.php,1.25.2.2,NONE deletecategory.php,1.11,NONE deleteforum.php,1.12,NONE forum.php,1.26,NONE index.php,1.31.2.1,NONE
- Next by thread:
[Phpgroupware-cvs] CVS: headlines preferences.php,1.19,1.20
- Index(es):