[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: fax/inc class.manager.inc.php,1.4,1.5
From: |
Marco Andriolo-Stagno (MAS!) <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: fax/inc class.manager.inc.php,1.4,1.5 |
Date: |
Mon, 09 Dec 2002 11:28:46 -0500 |
Update of /cvsroot/phpgroupware/fax/inc
In directory subversions:/tmp/cvs-serv24856/inc
Modified Files:
class.manager.inc.php
Log Message:
removed javascript bugs
Index: class.manager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/fax/inc/class.manager.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.manager.inc.php 5 Dec 2002 15:08:26 -0000 1.4
--- class.manager.inc.php 9 Dec 2002 16:28:44 -0000 1.5
***************
*** 65,68 ****
--- 65,89 ----
}
+ #to save all POSTed data (used by cover_preview and when send fail)
+ function get_post_params()
+ {
+ $result = array();
+
+ foreach ($_POST as $idx => $value)
+ {
+ if (is_array($value))
+ {
+ foreach ($value as $attr => $datum)
+ {
+ $result[$idx.'['.$attr.']'] =
$datum ;
+ }
+ }
+ else
+ { $result[$idx] = $value;}
+ }
+ return $result;
+ }
+
+
function compose()
{
***************
*** 104,108 ****
# print "</pre>";
! if (isset($_POST['action']))
{
$this->sendfax($_POST);
--- 125,129 ----
# print "</pre>";
! if (isset($_POST['action1']))
{
$this->sendfax($_POST);
***************
*** 210,213 ****
--- 231,235 ----
$tpl->set_block('send_fax', 'attachment_footer',
'write_attachment_footer');
$tpl->set_block('send_fax', 'no_data', 'write_no_data');
+ $tpl->set_block('send_fax', 'show_preview',
'write_show_preview');
$tpl->set_block('send_fax', 'categories_header',
'write_categories_header');
$tpl->set_block('send_fax', 'categories_footer',
'write_categories_footer');
***************
*** 601,605 ****
}
- /*
case 'file_show';
{ # check for errors!
--- 623,626 ----
***************
*** 624,628 ****
}
! */
}
}
--- 645,649 ----
}
!
}
}
***************
*** 677,680 ****
--- 698,704 ----
$tpl->set_var('msg_ok', lang('msgok'));
$tpl->set_block('send_fax', 'fax_sent', 'write_fax_sent');
+ $tpl->set_block('send_fax', 'hidden_data',
'write_hidden_data');
+ $tpl->set_block('send_fax', 'hidden_footer',
'write_hidden_footer');
+ $tpl->set_block('send_fax', 'hidden_header',
'write_hidden_header');
$comments = $data['comments'];
***************
*** 686,696 ****
$location = $data['location'];
$operand = $data['operand'];
!
if (!$attach_array)
{
$tpl->set_var('errmessage', lang('err2'));
$tpl->pparse('write_err_message', 'err_message', TRUE);
return;
}
$this->db = $GLOBALS['phpgw']->db;
--- 710,736 ----
$location = $data['location'];
$operand = $data['operand'];
! $back_url =
$GLOBALS['phpgw']->link('/index.php','menuaction=fax.manager.compose');
!
if (!$attach_array)
{
+ $tpl->set_var('l_goback',lang('goback'));
$tpl->set_var('errmessage', lang('err2'));
+ $tpl->set_var('back_url',$back_url);
+
$tpl->pparse('write_hidden_header','hidden_header');
+ foreach ($data as $idx => $value)
+ {
+ if ($idx != 'action1')
+ {
+ $tpl->set_var('hidden_name',$idx);
+ $tpl->set_var('hidden_value',$value);
+
$tpl->pparse('write_hidden_data','hidden_data',TRUE);
+ }
+
+ }
$tpl->pparse('write_err_message', 'err_message', TRUE);
+
$tpl->pparse('write_hidden_footer','hidden_footer');
return;
}
+
$this->db = $GLOBALS['phpgw']->db;
***************
*** 740,745 ****
--- 780,798 ----
if (!$final_data and !$faxnumber)
{
+ $tpl->set_var('back_url',$back_url);
$tpl->set_var('errmessage', lang('err1'));
+ $tpl->set_var('l_goback',lang('goback'));
+
$tpl->pparse('write_hidden_header','hidden_header');
+ foreach ($data as $idx => $value)
+ {
+ if ($idx != 'action1')
+ {
+
$tpl->set_var('hidden_name',$idx);
+
$tpl->set_var('hidden_value',$value);
+
$tpl->pparse('write_hidden_data','hidden_data',TRUE);
+ }
+ }
$tpl->pparse('write_err_message', 'err_message', TRUE);
+
$tpl->pparse('write_hidden_footer','hidden_footer');
return;
}
***************
*** 797,800 ****
--- 850,854 ----
function show()
{
+ print "perche' sono arrivato qui?";
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 803,807 ****
#print '</pre>';
! $dl_pic =
$GLOBALS['phpgw']->common->image('fax','pdf.png');
# check for errors!
--- 857,861 ----
#print '</pre>';
! $dl_pic = $GLOBALS['phpgw']->common->image('fax','pdf');
# check for errors!
***************
*** 837,841 ****
# Update Preferences
! if (isset($_POST['action']))
{
$this->write_prefs($_POST);
--- 891,895 ----
# Update Preferences
! if (isset($_POST['action1']))
{
$this->write_prefs($_POST);
***************
*** 939,945 ****
#Memo: original pics: 596x842
! $command = 'convert -size 596x842
'.$tmp_dir.SEP.$user_login.'_COVER.ps '.'/tmp/'.$user_login.'_COVER.jpg';
exec ($command, $ou);
! $tpl->set_var('img_src',
'/tmp/'.$user_login.'_COVER.jpg');
$tpl->pparse('write_cover_footer', 'cover_footer');
--- 993,999 ----
#Memo: original pics: 596x842
! $command = 'convert -size 596x842
'.$tmp_dir.SEP.$user_login.'_COVER.ps '.$tmp_dir.SEP.$user_login.'_COVER.jpg';
exec ($command, $ou);
! $tpl->set_var('img_src',
$tmp_dir.SEP.$user_login.'_COVER.jpg');
$tpl->pparse('write_cover_footer', 'cover_footer');
***************
*** 996,1003 ****
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
! #print "<pre>";
! #print_r ($_POST);
! #print "</pre>";
!
$faxnumber = $_POST['faxnumber'];
$recipient = $_POST['recipient'];
--- 1050,1057 ----
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
! $post_data = $this->get_post_params();
! print "<pre>";
! # print_r ($_POST);
! print "</pre>";
$faxnumber = $_POST['faxnumber'];
$recipient = $_POST['recipient'];
***************
*** 1008,1013 ****
$comments = $_POST['comments'];
$cover_file = $_POST['cover'];
!
!
if ($faxnumber == '')
{ $c_faxnum = '000 000 000 ';}
--- 1062,1066 ----
$comments = $_POST['comments'];
$cover_file = $_POST['cover'];
! $back_url =
$GLOBALS['phpgw']->link('/index.php','menuaction=fax.manager.compose');
if ($faxnumber == '')
{ $c_faxnum = '000 000 000 ';}
***************
*** 1015,1024 ****
{ $c_faxnum = $faxnumber;}
! if ($_POST['contacts'])
! {
$recipient=$company=$location=$c_faxnum=lang('multiple');}
$tpl = CreateObject('phpgwapi.Template', PHPGW_APP_TPL);
$tpl->set_file(array('cover_preview' => 'cover_preview.tpl'));
$tpl->set_block('cover_preview', 'image', 'write_image');
$user_login =
$GLOBALS['phpgw']->accounts->data['account_lid'];
--- 1068,1085 ----
{ $c_faxnum = $faxnumber;}
! if (isset($_POST['contacts']))
! {
! $recipient=lang('multiple');
! $company=lang('multiple');
! $location=lang('multiple');
! $c_faxnum=lang('multiple');
! }
$tpl = CreateObject('phpgwapi.Template', PHPGW_APP_TPL);
$tpl->set_file(array('cover_preview' => 'cover_preview.tpl'));
$tpl->set_block('cover_preview', 'image', 'write_image');
+ $tpl->set_block('cover_preview', 'form_header',
'write_form_header');
+ $tpl->set_block('cover_preview', 'form_footer',
'write_form_footer');
+ $tpl->set_block('cover_preview', 'hidden_input',
'write_hidden_input');
$user_login =
$GLOBALS['phpgw']->accounts->data['account_lid'];
***************
*** 1036,1045 ****
#Memo: Original pic size: 596x842
! $command = 'convert -size 596x842
'.$tmp_dir.SEP.$user_login.'_COVER.ps '.'/tmp/'.$user_login.'_COVER.jpg';
exec ($command, $ou);
! $tpl->set_var('img_src',
'/tmp/'.$user_login.'_COVER.jpg');
$tpl->pparse('write_image','image',TRUE);
!
}
--- 1097,1117 ----
#Memo: Original pic size: 596x842
! $command = 'convert -size 596x842
'.$tmp_dir.SEP.$user_login.'_COVER.ps '.$tmp_dir.SEP.$user_login.'_COVER.jpg';
exec ($command, $ou);
! $tpl->set_var('img_src',
$tmp_dir.SEP.$user_login.'_COVER.jpg');
! $tpl->set_var('back_url',$back_url);
! $tpl->set_var('l_goback',lang('goback'));
! $tpl->pparse('write_form_header','form_header');
! foreach ($post_data as $idx => $value)
! { if ($idx != 'query')
! {
! $tpl->set_var('hidden_name',$idx);
! $tpl->set_var('hidden_value',$value);
!
$tpl->pparse('write_hidden_input','hidden_input',TRUE);
! }
! }
$tpl->pparse('write_image','image',TRUE);
! $tpl->pparse('write_form_footer','form_footer');
}
***************
*** 1118,1122 ****
# -D, -R, and -N options.)
#xferfaxstats xferfaxlog /var/spool/hylafax/etc/xferfaxlog
!
?>
--- 1190,1194 ----
# -D, -R, and -N options.)
#xferfaxstats xferfaxlog /var/spool/hylafax/etc/xferfaxlog
! #ToDO: check attachment with blank spaces!
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: fax/inc class.manager.inc.php,1.4,1.5,
Marco Andriolo-Stagno (MAS!) <address@hidden> <=