phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: felamimail/inc hook_home.inc.php,1.1.1.1,1.2


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: felamimail/inc hook_home.inc.php,1.1.1.1,1.2
Date: Mon, 14 Jan 2002 09:30:44 -0500

Update of /cvsroot/phpgroupware/felamimail/inc
In directory subversions:/tmp/cvs-serv19759/inc

Modified Files:
        hook_home.inc.php 
Log Message:
GLOBALS

Index: hook_home.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/hook_home.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** hook_home.inc.php   31 Dec 2001 00:59:04 -0000      1.1.1.1
--- hook_home.inc.php   14 Jan 2002 14:30:39 -0000      1.2
***************
*** 12,35 ****
        /* $Id$ */
  
!       $d1 = strtolower(substr($phpgw_info['server']['app_inc'],0,3));
        if($d1 == 'htt' || $d1 == 'ftp' )
        {
                echo "Failed attempt to break in via an old Security 
Hole!<br>\n";
!               $phpgw->common->phpgw_exit();
        }
        unset($d1);
  
!       $tmp_app_inc = $phpgw->common->get_inc_dir('felamimail');
  
!       if 
($phpgw_info['user']['preferences']['felamimail']['mainscreen_showmail'] == 
True)
        {
                // ----  Create the base email Msg Class    -----
!               $phpgw->msg = CreateObject("email.mail_msg");
                $args_array = Array();
                $args_array['folder'] = 'INBOX';
                $args_array['do_login'] = True;
!               $phpgw->msg->begin_request($args_array);
  
!               if (!$phpgw->msg->mailsvr_stream)
                {
                        $error_msg = '<b>Mail error:</b> Can not open 
connection to mail server';
--- 12,35 ----
        /* $Id$ */
  
!       $d1 = 
strtolower(substr($GLOBALS['phpgw_info']['server']['app_inc'],0,3));
        if($d1 == 'htt' || $d1 == 'ftp' )
        {
                echo "Failed attempt to break in via an old Security 
Hole!<br>\n";
!               $GLOBALS['phpgw']->common->phpgw_exit();
        }
        unset($d1);
  
!       $tmp_app_inc = $GLOBALS['phpgw']->common->get_inc_dir('felamimail');
  
!       if 
($GLOBALS['phpgw_info']['user']['preferences']['felamimail']['mainscreen_showmail']
 == True)
        {
                // ----  Create the base email Msg Class    -----
!               $GLOBALS['phpgw']->msg = CreateObject("email.mail_msg");
                $args_array = Array();
                $args_array['folder'] = 'INBOX';
                $args_array['do_login'] = True;
!               $GLOBALS['phpgw']->msg->begin_request($args_array);
  
!               if (!$GLOBALS['phpgw']->msg->mailsvr_stream)
                {
                        $error_msg = '<b>Mail error:</b> Can not open 
connection to mail server';
***************
*** 42,46 ****
                                .'</td>'."\r\n"
                        .'</tr>'."\r\n";
!                       //$phpgw->common->phpgw_exit(True);
                }
                else
--- 42,46 ----
                                .'</td>'."\r\n"
                        .'</tr>'."\r\n";
!                       //$GLOBALS['phpgw']->common->phpgw_exit(True);
                }
                else
***************
*** 48,52 ****
                        /*  // this is the structure you will get
                          $inbox_data['is_imap'] boolean - pop3 server do not 
know what is "new" or not
!                         $inbox_data['folder_checked'] string - the folder 
checked, as processed by the msg class
                          $inbox_data['alert_string'] string - what to show the 
user about this inbox check
                          $inbox_data['number_new'] integer - for IMAP is 
number "unseen"; for pop3 is number messages
--- 48,52 ----
                        /*  // this is the structure you will get
                          $inbox_data['is_imap'] boolean - pop3 server do not 
know what is "new" or not
!                         $inbox_data['folder_checked'] string - the folder 
checked, as processed by the msg class
                          $inbox_data['alert_string'] string - what to show the 
user about this inbox check
                          $inbox_data['number_new'] integer - for IMAP is 
number "unseen"; for pop3 is number messages
***************
*** 54,65 ****
                        */
                        $inbox_data = Array();
!                       $inbox_data = $phpgw->msg->new_message_check();
  
                        $title = '<font color="FFFFFF">'.lang('EMail').' 
'.$inbox_data['alert_string'].'</font>';
  
!                       $portalbox = 
CreateObject('phpgwapi.linkbox',Array($title,$phpgw_info['theme']['navbar_bg'],$phpgw_info['theme']['bg_color'],$phpgw_info['theme']['bg_color']));
                        $portalbox->setvar('width',600);
                        $portalbox->outerborderwidth = 0;
!                       $portalbox->header_background_image = 
$phpgw_info['server']['webserver_url'] . 
'/phpgwapi/templates/verdilak/images/bg_filler.gif';
  
                        if($inbox_data['number_all'] >= 5)
--- 54,65 ----
                        */
                        $inbox_data = Array();
!                       $inbox_data = 
$GLOBALS['phpgw']->msg->new_message_check();
  
                        $title = '<font color="FFFFFF">'.lang('EMail').' 
'.$inbox_data['alert_string'].'</font>';
  
!                       $portalbox = 
CreateObject('phpgwapi.linkbox',Array($title,$GLOBALS['phpgw_info']['theme']['navbar_bg'],$GLOBALS['phpgw_info']['theme']['bg_color'],$GLOBALS['phpgw_info']['theme']['bg_color']));
                        $portalbox->setvar('width',600);
                        $portalbox->outerborderwidth = 0;
!                       $portalbox->header_background_image = 
$GLOBALS['phpgw_info']['server']['webserver_url'] . 
'/phpgwapi/templates/verdilak/images/bg_filler.gif';
  
                        if($inbox_data['number_all'] >= 5)
***************
*** 75,84 ****
                        {
                                $msg_array = array();
!                               $msg_array = $phpgw->msg->get_message_list();
                        }
                        for($i=0; $i<$check_msgs; $i++)
                        {
!                               $msg = 
$phpgw->dcom->header($phpgw->msg->mailsvr_stream,$msg_array[$i]);
!                               $subject = $phpgw->msg->get_subject($msg,'');
                                if (strlen($subject) > 65)
                                {
--- 75,84 ----
                        {
                                $msg_array = array();
!                               $msg_array = 
$GLOBALS['phpgw']->msg->get_message_list();
                        }
                        for($i=0; $i<$check_msgs; $i++)
                        {
!                               $msg = 
$GLOBALS['phpgw']->dcom->header($GLOBALS['phpgw']->msg->mailsvr_stream,$msg_array[$i]);
!                               $subject = 
$GLOBALS['phpgw']->msg->get_subject($msg,'');
                                if (strlen($subject) > 65)
                                {
***************
*** 87,100 ****
                                $linkData = array
                                (
!                                       'mailbox'       => 
$phpgw->msg->prep_folder_out(''),
                                        'passed_id'     => $msg_array[$i],
                                        'startMessage'  => 1,
                                        'show_more'     => 0
                                );
!                               $portalbox->data[$i] = 
array($subject,$phpgw->link('/felamimail/read_body.php',$linkData));
                        }
                        // ADD FOLDER LISTBOX TO HOME PAGE (Needs to be 
TEMPLATED)
                        // Does This Mailbox Support Folders (i.e. more than 
just INBOX)?
!                       if ($phpgw->msg->get_mailsvr_supports_folders() == 
False)
                        {
                                $switchbox_tablerow = '';
--- 87,100 ----
                                $linkData = array
                                (
!                                       'mailbox'       => 
$GLOBALS['phpgw']->msg->prep_folder_out(''),
                                        'passed_id'     => $msg_array[$i],
                                        'startMessage'  => 1,
                                        'show_more'     => 0
                                );
!                               $portalbox->data[$i] = 
array($subject,$GLOBALS['phpgw']->link('/felamimail/read_body.php',$linkData));
                        }
                        // ADD FOLDER LISTBOX TO HOME PAGE (Needs to be 
TEMPLATED)
                        // Does This Mailbox Support Folders (i.e. more than 
just INBOX)?
!                       if 
($GLOBALS['phpgw']->msg->get_mailsvr_supports_folders() == False)
                        {
                                $switchbox_tablerow = '';
***************
*** 107,114 ****
                                $switchbox_listbox = '<select name="mailbox" 
onChange="document.switchbox.submit()">'
                                                . '<option>' . lang('switch 
current folder to') . ':'
!                                               . 
$phpgw->msg->all_folders_listbox('','','',$listbox_show_unseen)
                                                . '</select>';
                                // make it another TR we can insert
!                               $switchbox_action = 
$phpgw->link('/felamimail/index.php');
                                $switchbox_tablerow = 
                                        '<tr>'."\r\n"
--- 107,114 ----
                                $switchbox_listbox = '<select name="mailbox" 
onChange="document.switchbox.submit()">'
                                                . '<option>' . lang('switch 
current folder to') . ':'
!                                               . 
$GLOBALS['phpgw']->msg->all_folders_listbox('','','',$listbox_show_unseen)
                                                . '</select>';
                                // make it another TR we can insert
!                               $switchbox_action = 
$GLOBALS['phpgw']->link('/felamimail/index.php');
                                $switchbox_tablerow = 
                                        '<tr>'."\r\n"
***************
*** 121,125 ****
                                        .'</tr>'."\r\n";
                        }
!                       $phpgw->msg->end_request();
                        // output the portalbox and (if applicable) the folders 
listbox below it
                        echo '<!-- start Mailbox info -->'."\r\n"
--- 121,125 ----
                                        .'</tr>'."\r\n";
                        }
!                       $GLOBALS['phpgw']->msg->end_request();
                        // output the portalbox and (if applicable) the folders 
listbox below it
                        echo '<!-- start Mailbox info -->'."\r\n"




reply via email to

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