[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: felamimail/inc hook_home.inc.php,1.5,1.6 hook_pr
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: felamimail/inc hook_home.inc.php,1.5,1.6 hook_preferences.inc.php,1.6,1.7 |
Date: |
Sat, 13 Apr 2002 00:22:30 -0400 |
Update of /cvsroot/phpgroupware/felamimail/inc
In directory subversions:/tmp/cvs-serv9414/felamimail/inc
Modified Files:
hook_home.inc.php hook_preferences.inc.php
Log Message:
GNU Bug #100583.
Index: hook_home.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/hook_home.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** hook_home.inc.php 27 Mar 2002 22:06:44 -0000 1.5
--- hook_home.inc.php 13 Apr 2002 04:22:28 -0000 1.6
***************
*** 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,36 ----
/* $Id$ */
! $d1 = strtolower(substr(PHPGW_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']->translation->add_app('felamimail');
! $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,49 ****
.'</td>'."\r\n"
.'</tr>'."\r\n";
! //$phpgw->common->phpgw_exit(True);
}
else
{
/* // this is the structure you will get
$inbox_data['is_imap'] boolean - pop3 server do not
know what is "new" or not
--- 43,82 ----
.'</td>'."\r\n"
.'</tr>'."\r\n";
! //$GLOBALS['phpgw']->common->phpgw_exit(True);
}
else
{
+ $title = '<font
color="#FFFFFF">'.lang('E-Mail').'</font>';
+
+ $portalbox = CreateObject('phpgwapi.listbox',
+ Array(
+ 'title' => $title,
+ 'primary' =>
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
+ 'secondary' =>
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
+ 'tertiary' =>
$GLOBALS['phpgw_info']['theme']['navbar_bg'],
+ 'width' => '100%',
+ 'outerborderwidth' => '0',
+ 'header_background_image' =>
$GLOBALS['phpgw']->common->image('phpgwapi/templates/phpgw_website','bg_filler.gif')
+ )
+ );
+
+ $app_id =
$GLOBALS['phpgw']->applications->name2id('calendar');
+ $GLOBALS['portal_order'][] = $app_id;
+ $var = Array(
+ 'up' => Array('url' => '/set_box.php',
'app' => $app_id),
+ 'down' => Array('url' => '/set_box.php',
'app' => $app_id),
+ 'close' => Array('url' => '/set_box.php',
'app' => $app_id),
+ 'question' => Array('url' =>
'/set_box.php', 'app' => $app_id),
+ 'edit' => Array('url' => '/set_box.php',
'app' => $app_id)
+ );
+
+ while(list($key,$value) = each($var))
+ {
+ $portalbox->set_controls($key,$value);
+ }
+
+ $portalbox->data = Array();
+
+
/* // this is the structure you will get
$inbox_data['is_imap'] boolean - pop3 server do not
know what is "new" or not
***************
*** 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)
--- 87,91 ----
*/
$inbox_data = Array();
! $inbox_data =
$GLOBALS['phpgw']->msg->new_message_check();
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)
{
--- 101,110 ----
{
$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,102 ****
$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 = '';
}
else
--- 113,131 ----
$linkData = array
(
! 'mailbox' =>
$GLOBALS['phpgw']->msg->prep_folder_out(''),
'passed_id' => $msg_array[$i],
'startMessage' => 1,
'show_more' => 0
);
! $data[] = array(
! 'data' => $subject,
! 'link' =>
$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)
{
! $extra_data = '';
}
else
***************
*** 107,134 ****
$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"
! .'<form name="switchbox"
action="'.$switchbox_action.'" method="post">'."\r\n"
! .'<td align="left">'."\r\n"
! .' <strong>E-Mail
Folders:</strong> '.$switchbox_listbox
! .'<input TYPE=HIDDEN
NAME="startMessage" VALUE="1">'
! .'</td>'."\r\n"
! .'</form>'."\r\n"
! .'</tr>'."\r\n";
! }
! $phpgw->msg->end_request();
! // output the portalbox and (if applicable) the folders
listbox below it
! echo '<!-- start Mailbox info -->'."\r\n"
! .'<tr>'."\r\n"
! .'<td align="left">'."\r\n"
! .$portalbox->draw()
! .'</td>'."\r\n"
! .'</tr>'."\r\n"
! .$switchbox_tablerow
! .'<!-- ends Mailox info -->'."\r\n";
}
}
--- 136,161 ----
$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');
! $extra_data = '<form name="switchbox"
action="'.$switchbox_action.'" method="post">'."\r\n"
! .'<td align="left">'."\r\n"
! .' <strong>'.lang('E-Mail
Folders').':</strong> '.$switchbox_listbox
! .'<input type="hidden"
name="startMessage" value="1">'
! .'</td>'."\r\n"
! .'</form>'."\r\n";
! }
! $GLOBALS['phpgw']->msg->end_request();
!
! if($data)
! {
! $portalbox->data = $data;
! }
!
! // output the portalbox and below it (1) the folders
listbox (if applicable) and (2) Compose New mail link
! echo "\r\n".'<!-- start Mailbox info -->'."\r\n"
! .$portalbox->draw($extra_data)
! .'<!-- ends Mailox info -->'."\r\n";
}
}
Index: hook_preferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/felamimail/inc/hook_preferences.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** hook_preferences.inc.php 27 Mar 2002 22:06:44 -0000 1.6
--- hook_preferences.inc.php 13 Apr 2002 04:22:28 -0000 1.7
***************
*** 13,46 ****
/* $Id$ */
{
! echo "<p>\n";
! $imgfile = $GLOBALS['phpgw']->common->get_image_dir($appname) . '/' .
$appname . '.gif';
! if (file_exists($imgfile))
! {
! $imgpath = $GLOBALS['phpgw']->common->get_image_path($appname)
. '/' . $appname . '.gif';
! }
! else
! {
! $imgfile = $GLOBALS['phpgw']->common->get_image_dir($appname) .
'/navbar.gif';
! if (file_exists($imgfile))
! {
! $imgpath =
$GLOBALS['phpgw']->common->get_image_path($appname) . '/navbar.gif';
! }
! else
! {
! $imgpath = '';
! }
! }
!
! section_start(ucfirst($appname),$imgpath);
!
!
section_item($GLOBALS['phpgw']->link('/felamimail/preferences_email.php'),lang('Mail
Settings'));
!
section_item($GLOBALS['phpgw']->link('/felamimail/preferences_highlight.php'),lang('Message
Highlighting'));
!
section_item($GLOBALS['phpgw']->link('/felamimail/preferences_index_order.php'),lang('Index
Order'));
!
section_item($GLOBALS['phpgw']->link('/felamimail/preferences_translate.php'),lang('Translation
Preferences'));
!
section_item($GLOBALS['phpgw']->link('/felamimail/preferences_display.php'),lang('Display
Preferences'));
!
section_item($GLOBALS['phpgw']->link('/felamimail/preferences_folder.php'),lang('Folder
Preferences'));
!
section_item($GLOBALS['phpgw']->link('/felamimail/folders.php'),lang('Manage
Folders'));
!
! section_end();
}
?>
--- 13,29 ----
/* $Id$ */
{
! // Only Modify the $file and $title variables.....
! $title = $appname;
! $file = array(
! 'Mail Settings' =>
$GLOBALS['phpgw']->link('/felamimail/preferences_email.php'),
! 'Message Highlighting' =>
$GLOBALS['phpgw']->link('/felamimail/preferences_highlight.php'),
! 'Index Order' =>
$GLOBALS['phpgw']->link('/felamimail/preferences_index_order.php'),
! 'Translation Preferences' =>
$GLOBALS['phpgw']->link('/felamimail/preferences_translate.php'),
! 'Display Preferences' =>
$GLOBALS['phpgw']->link('/felamimail/preferences_display.php'),
! 'Folder Preferences' =>
$GLOBALS['phpgw']->link('/felamimail/preferences_folder.php'),
! 'Manage Folders' =>
$GLOBALS['phpgw']->link('/felamimail/folders.php')
! );
! //Do not modify below this line
! display_section($appname,$title,$file);
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: felamimail/inc hook_home.inc.php,1.5,1.6 hook_preferences.inc.php,1.6,1.7,
Mark A Peters <address@hidden> <=