phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] filemanager preferences.php,1.9,1.10


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] filemanager preferences.php,1.9,1.10
Date: Thu, 13 Nov 2003 16:58:12 +0000

Update of /cvsroot/phpgroupware/filemanager
In directory subversions:/tmp/cvs-serv16953

Modified Files:
        preferences.php 
Log Message:
bug #5128

Index: preferences.php
===================================================================
RCS file: /cvsroot/phpgroupware/filemanager/preferences.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** preferences.php     21 Sep 2002 05:26:43 -0000      1.9
--- preferences.php     13 Nov 2003 16:58:08 -0000      1.10
***************
*** 1,5 ****
  <?php
    /**************************************************************************\
!   * phpGroupWare - Filemanager                                               *
    * http://www.phpgroupware.org                                              *
    * --------------------------------------------                             *
--- 1,5 ----
  <?php
    /**************************************************************************\
!   * phpGroupWare - PHPWebHosting                                             *
    * http://www.phpgroupware.org                                              *
    * --------------------------------------------                             *
***************
*** 12,29 ****
        /* $Id$ */
  
!       $phpgw_info["flags"] = array
        (
!               'currentapp' => 'filemanger',
!               'enable_nextmatchs_class' => True,
!               'noheader' => True,
!               'nonavbar' => True
        );
  
!       include('../header.inc.php');
  
        /*
           To add an on/off preference, just add it here.  Key is internal 
name, value is displayed name
        */
!       $other_checkboxes = array ("viewinnewwin" => lang("View documents in 
new window"), "viewonserver" => lang("View documents on server (if 
available)"), "viewtextplain" => lang("Unknown MIME-type defaults to text/plain 
when viewing"), "dotdot" => lang("Show .."), "dotfiles" => lang("Show .files"), 
"show_help" => lang("Show help"), "show_command_line" => lang("Show command 
line (EXPERIMENTAL. DANGEROUS.)"));
  
        /*
--- 12,29 ----
        /* $Id$ */
  
!       $GLOBALS['phpgw_info']["flags"] = array
        (
!               "currentapp" => "filemanager",
!               "enable_nextmatchs_class" => True,
!               "noheader" => True,
!               "nonavbar" => True
        );
  
!       include("../header.inc.php");
  
        /*
           To add an on/off preference, just add it here.  Key is internal 
name, value is displayed name
        */
!       $other_checkboxes = array ("viewinnewwin" => lang("View documents in 
new window"), "viewonserver" => lang("View documents on server (if 
available)"), "viewtextplain" => lang("Unknown MIME-type defaults to text/plain 
when viewing"), "dotdot" => lang('Show ..'), "dotfiles" => lang('Show 
dotfiles'), "show_help" => lang('Show help'), "show_command_line" => lang('Show 
command line (EXPERIMENTAL. DANGEROUS)'));
  
        /*
***************
*** 33,44 ****
        $other_dropdown = array ("show_upload_boxes" => array (lang("Default 
number of upload fields to show"), "5", "10", "20", "30"));
  
!       if ($submit)
        {
!               $phpgw->preferences->read_repository ();
  
                reset ($file_attributes);
                while (list ($internal, $displayed) = each ($file_attributes))
                {
!                       $phpgw->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
                }
  
--- 33,44 ----
        $other_dropdown = array ("show_upload_boxes" => array (lang("Default 
number of upload fields to show"), "5", "10", "20", "30"));
  
!       if ($_POST['save'])
        {
!               $GLOBALS['phpgw']->preferences->read_repository ();
  
                reset ($file_attributes);
                while (list ($internal, $displayed) = each ($file_attributes))
                {
!                       $GLOBALS['phpgw']->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
                }
  
***************
*** 46,50 ****
                while (list ($internal, $displayed) = each ($other_checkboxes))
                {
!                       $phpgw->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
                }
  
--- 46,50 ----
                while (list ($internal, $displayed) = each ($other_checkboxes))
                {
!                       $GLOBALS['phpgw']->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
                }
  
***************
*** 52,69 ****
                while (list ($internal, $displayed) = each ($other_dropdown))
                {
!                       $phpgw->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
                }
  
!               $phpgw->preferences->save_repository (True);
       
!               Header('Location: '.$phpgw->link('/preferences/index.php'));
!               $phpgw->common->phpgw_exit();
        }
  
!       function display_item ($field,$data)
        {
!               global $phpgw, $p, $tr_color;
  
!               $tr_color = $phpgw->nextmatchs->alternate_row_color ($tr_color);
                $var = array (
                        'bg_color'      =>      $tr_color,
--- 52,73 ----
                while (list ($internal, $displayed) = each ($other_dropdown))
                {
!                       $GLOBALS['phpgw']->preferences->add 
($phpgw_info["flags"]["currentapp"], $internal, $$internal);
                }
  
!               $GLOBALS['phpgw']->preferences->save_repository (True);
       
!               $GLOBALS['phpgw']->redirect_link('/preferences/index.php');
!               $GLOBALS['phpgw']->common->phpgw_exit();
        }
  
!       if ($_POST['cancel'])
        {
!               $GLOBALS['phpgw']->redirect_link('/preferences/index.php');
!               $GLOBALS['phpgw']->common->phpgw_exit();
!       }
  
!       function display_item($field,$data)
!       {
!               $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color 
($tr_color);
                $var = array (
                        'bg_color'      =>      $tr_color,
***************
*** 71,117 ****
                        'data'          =>      $data
                );
!               $p->set_var ($var);
!               $p->parse ('row', 'pref_list', True);
        }
  
!       $phpgw->common->phpgw_header ();
        echo parse_navbar ();
  
!       $p = CreateObject ('phpgwapi.Template', $phpgw->common->get_tpl_dir 
('filemanager'));
!       $templates = array (
!               'pref'                  => 'pref.tpl',
!               'pref_colspan'  => 'pref_colspan.tpl',
!               'pref_list'             =>      'pref_list.tpl'
!       );
!       $p->set_file ($templates);
  
!       $var = array (
!               'title'                 =>      lang ('Filemanager 
preferences'),
!               'action_url'    =>      $phpgw->link ('/' . 
$phpgw_info['flags']['currentapp'] . '/preferences.php'),
!               'bg_color'              =>      $phpgw_info['theme']['th_bg'],
!               'submit_lang'   =>      lang ('submit')
        );
        
!       $p->set_var ($var);
!       $p->set_var ('text', '&nbsp;');
!       $p->parse ('row', 'pref_colspan', True);
  
        if ($totalerrors)
        {
!               echo '<p><center>' . $phpgw->common->error_list($errors) . 
'</center>';
        }
  
!       while (list ($internal, $displayed) = each ($file_attributes))
        {
                unset ($checked);
!               if 
($phpgw_info['user']['preferences']['filemanager'][$internal])
                {
                        $checked = 1;
                }
  
!               $str .= html_form_input ("checkbox", $internal, NULL, NULL, 
NULL, $checked, NULL, 1) . " $displayed" . html_break (1, NULL, 1);
        }
  
!       display_item (lang ('Display attributes'), $str);
  
        reset ($other_checkboxes);
--- 75,119 ----
                        'data'          =>      $data
                );
!               $GLOBALS['phpgw']->template->set_var($var);
!               $GLOBALS['phpgw']->template->fp('row','normal',True);
        }
  
!       $GLOBALS['phpgw_info']['flags']['app_header'] = lang('filemanager') . 
': ' . lang('preferences');
!       $GLOBALS['phpgw']->common->phpgw_header ();
        echo parse_navbar ();
  
!       $GLOBALS['phpgw']->template->set_file(array('prefs' => 'pref.tpl'));
!       $GLOBALS['phpgw']->template->set_block('prefs','normal');
  
!       $var = array(
!               'action_url'    => $GLOBALS['phpgw']->link ('/' . 
$GLOBALS['phpgw_info']['flags']['currentapp'] . '/preferences.php'),
!               'bg_color'              => 
$GLOBALS['phpgw_info']['theme']['th_bg'],
!               'lang_save'             => lang ('save'),
!               'lang_cancel'   => lang('cancel')               
        );
        
!       $GLOBALS['phpgw']->template->set_var ($var);
  
        if ($totalerrors)
        {
!               echo '<p><center>' . 
$GLOBALS['phpgw']->common->error_list($errors) . '</center>';
        }
  
!       display_item('<b>' . lang('Display attributes') . '</b>','&nbsp;');
! 
!       while (list($internal, $displayed) = each($file_attributes))
        {
                unset ($checked);
!               if 
($GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal])
                {
                        $checked = 1;
                }
  
!               $str = html_form_input("checkbox", $internal, NULL, NULL, NULL, 
$checked, NULL, 1);
!               display_item ($displayed, $str);
!               //$str .= html_form_input("checkbox", $internal, NULL, NULL, 
NULL, $checked, NULL, 1) . " $displayed" . html_break (1, NULL, 1);
        }
  
!       display_item ('<b>' . lang('other settings') . '</b>','&nbsp;');
  
        reset ($other_checkboxes);
***************
*** 119,123 ****
        {
                unset ($checked);
!               if 
($phpgw_info['user']['preferences']['filemanager'][$internal])
                {
                        $checked = 1;
--- 121,125 ----
        {
                unset ($checked);
!               if 
($GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal])
                {
                        $checked = 1;
***************
*** 129,137 ****
  
        reset ($other_dropdown);
!       while (list ($internal, $value_array) = each ($other_dropdown))
        {
!               reset ($value_array);
!               unset ($options);
!               while (list ($num, $value) = each ($value_array))
                {
                        if ($num == 0)
--- 131,139 ----
  
        reset ($other_dropdown);
!       while (list($internal, $value_array) = each($other_dropdown))
        {
!               reset($value_array);
!               unset($options);
!               while (list($num, $value) = each($value_array))
                {
                        if ($num == 0)
***************
*** 141,155 ****
                        }
  
!                       $options .= html_form_option ($value, $value, 
$phpgw_info['user']['preferences']['filemanager'][$internal] == $value, True);
                }
  
!               $output = html_form_select_begin ($internal, True);
                $output .= $options;
!               $output .= html_form_select_end (True);
  
!               display_item ($displayed, $output);
        }
  
!       $p->pparse ('out', 'pref');
!       $phpgw->common->phpgw_footer ();
  ?>
--- 143,158 ----
                        }
  
!                       $options .= html_form_option($value, 
$value,$GLOBALS['phpgw_info']["user"]["preferences"]["filemanager"][$internal] 
== $value, True);
                }
  
!               $output = html_form_select_begin($internal, True);
                $output .= $options;
!               $output .= html_form_select_end(True);
  
!               display_item($displayed, $output);
        }
  
!       $GLOBALS['phpgw']->template->set_var('normal','');
!       $GLOBALS['phpgw']->template->pfp('out','prefs');
!       $GLOBALS['phpgw']->common->phpgw_footer();
  ?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]