phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.bowo_hour.inc.php,1.5,1.6 cla


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.bowo_hour.inc.php,1.5,1.6 class.sowo_hour.inc.php,1.5,1.6 class.uiwo_hour.inc.php,1.9,1.10
Date: Fri, 04 Apr 2003 05:34:45 -0500

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv15422/inc

Modified Files:
        class.bowo_hour.inc.php class.sowo_hour.inc.php 
        class.uiwo_hour.inc.php 
Log Message:
no message

Index: class.bowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bowo_hour.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.bowo_hour.inc.php     31 Mar 2003 21:14:14 -0000      1.5
--- class.bowo_hour.inc.php     4 Apr 2003 10:34:43 -0000       1.6
***************
*** 396,399 ****
--- 396,443 ----
                }
  
+               function get_extra_email($to_email,$vendor_email,$vendor_id)
+               {
+                       $selected = $to_email;
+ 
+                       $email_extra_list = 
$this->so->get_extra_email($vendor_id);
+                       if($email_extra_list)
+                       {
+                               $email_extra_list[]['email']    = $vendor_email;
+                       }
+ 
+                       while (is_array($email_extra_list) && 
list(,$email_extra) = each($email_extra_list))
+                       {
+                               $sel_email = '';
+                               if ($email_extra['email']==$selected)
+                               {
+                                       $sel_email = 'selected';
+                               }
+ 
+                               $email_list[] = array
+                               (
+                                       'email'         => 
$email_extra['email'],
+                                       'selected'      => $sel_email
+                               );
+                       }
+ 
+                       for ($i=0;$i<count($email_list);$i++)
+                       {
+                               if ($email_list[$i]['selected'] != 'selected')
+                               {
+                                       unset($email_list[$i]['selected']);
+                               }
+                       }
+ 
+ //_debug_array($email_list);
+                       return  $email_list;
+               }
+ 
+ 
+               function update_email($to_email,$workorder_id)
+               {
+                       $this->so->update_email($to_email,$workorder_id);
+               }
+ 
+ 
                function delete($hour_id,$workorder_id)
                {

Index: class.sowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sowo_hour.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.sowo_hour.inc.php     31 Mar 2003 21:14:14 -0000      1.5
--- class.sowo_hour.inc.php     4 Apr 2003 10:34:43 -0000       1.6
***************
*** 646,649 ****
--- 646,668 ----
                }
  
+               function update_email($to_email,$workorder_id)
+               {
+                       $this->db->query("SELECT vendor_id FROM fm_wo_wrkorders 
where id ='$workorder_id'",__LINE__,__FILE__);
+                       $this->db->next_record();
+                       $vendor_id      = $this->db->f('vendor_id');
+ 
+                       $this->db->query("UPDATE phpgw_addressbook set email 
='$to_email' where  id= '$vendor_id'",__LINE__,__FILE__);
+               }
+ 
+               function get_extra_email($vendor_id)
+               {
+                       $this->db->query("select contact_value from 
phpgw_addressbook_extra where contact_id='$vendor_id' and contact_value like 
'address@hidden'",__LINE__,__FILE__);
+                       while ($this->db->next_record())
+                       {
+                               $email_list[] = array('email' => 
$this->db->f('contact_value'));
+                       }
+                       return  $email_list;
+               }
+ 
                function delete($hour_id,$workorder_id )
                {

Index: class.uiwo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uiwo_hour.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.uiwo_hour.inc.php     3 Apr 2003 19:12:45 -0000       1.9
--- class.uiwo_hour.inc.php     4 Apr 2003 10:34:43 -0000       1.10
***************
*** 364,367 ****
--- 364,371 ----
  
  
+                       if($update_email)
+                       {
+                               
$this->bo->update_email($to_email,$workorder_id);
+                       }
                        $workorder = 
$this->boworkorder->read_single($workorder_id);
                        $workorder_history = 
$this->boworkorder->read_record_history($workorder_id);
***************
*** 517,520 ****
--- 521,529 ----
  
  
+                       if($send_order && !$to_email)
+                       {
+                                       
$receipt['error'][]=array('msg'=>lang('No mailaddress is selected'));
+                       }
+ 
                        if($to_email)
                        {
***************
*** 535,539 ****
  
                                $mail_method= 
$this->config->config_data['fmwrkorder_mail'];
!                               echo 'mail_method: '.$mail_method .'<BR>';
  
                                if ($mail_method=='smtp'):
--- 544,548 ----
  
                                $mail_method= 
$this->config->config_data['fmwrkorder_mail'];
! //                            echo 'mail_method: '.$mail_method .'<BR>';
  
                                if ($mail_method=='smtp'):
***************
*** 541,554 ****
                                        $bcc = $from_email;
                                        $send = CreateObject('phpgwapi.send');
! //                                    $rcpt = $send->msg('email', $to_email, 
$subject, stripslashes($message), '', $cc, $bcc, $from_email, $from_name, 
'html');
                                }
                                elseif ($mail_method=='sendmail'):
                                {
!       //                              $rcpt=mail($to_email,$subject,$message, 
$headers);
                                }
                                else:
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Mailing method is not chosen! ("admin" 
section)'));
- 
                                }
                                endif;
--- 550,562 ----
                                        $bcc = $from_email;
                                        $send = CreateObject('phpgwapi.send');
!                                       $rcpt = $send->msg('email', $to_email, 
$subject, $html, '', $cc, $bcc, $from_email, $from_name, 'html');
                                }
                                elseif ($mail_method=='sendmail'):
                                {
!                                       $rcpt=mail($to_email,$subject,$html, 
$headers);
                                }
                                else:
                                {
                                        
$receipt['error'][]=array('msg'=>lang('Mailing method is not chosen! ("admin" 
section)'));
                                }
                                endif;
***************
*** 578,581 ****
--- 586,591 ----
                                'lang_to_email_address_statustext'      =>      
lang('The address to which this order will be sendt'),
                                'to_email'                                      
        =>      $workorder['vendor_email'],
+                               'email_list'                                    
=> 
$this->bo->get_extra_email($to_email,$workorder['vendor_email'],$workorder['vendor_id']),
+                               'lang_select_email'                             
=> lang('Select email'),
  
                                'send_order_action'                             
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiwo_hour.view&send=true&workorder_id='
 . $workorder_id),
***************
*** 586,589 ****
--- 596,600 ----
                                'table_header_history'                  => 
$table_header_history,
                                'email_data'                                    
=> $email_data,
+                               'no_email'                                      
        => $no_email,
                                'table_send'                                    
=> $table_send,
                                'table_done'                                    
=> $table_done
***************
*** 593,604 ****
  
  
!                       if($no_email)
!                       {
!                               
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('email_data' => $email_data));
!                       }
!                       else
!                       {
!                               
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
!                       }
  
                        $this->save_sessiondata();
--- 604,608 ----
  
  
!                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('view' => $data));
  
                        $this->save_sessiondata();
***************
*** 701,706 ****
                        $this->pdf->ezText(lang('Order') . ': ' . $workorder_id 
. ' ' .$common_data['workorder']['title'],14);
                        $this->pdf->ezText(lang('Chapter') . ' ' 
.$common_data['workorder']['chapter_id'] . ' ' . 
$common_data['workorder']['chapter'] ,14);
!                       $this->pdf->ezNewPage();
!                       $this->pdf->ezTable($content,'',$project['name'],
                                                        
array('xPos'=>70,'xOrientation'=>'right','width'=>500,0,'shaded'=>0,'fontSize' 
=> 8,'showLines'=> 2,'titleFontSize' => 12,'outerLineThickness'=>2
                                                        ,'cols'=>array(
--- 705,713 ----
                        $this->pdf->ezText(lang('Order') . ': ' . $workorder_id 
. ' ' .$common_data['workorder']['title'],14);
                        $this->pdf->ezText(lang('Chapter') . ' ' 
.$common_data['workorder']['chapter_id'] . ' ' . 
$common_data['workorder']['chapter'] ,14);
! 
!                       if(is_array($values_hour))
!                       {
!                               $this->pdf->ezNewPage();
!                               
$this->pdf->ezTable($content,'',$project['name'],
                                                        
array('xPos'=>70,'xOrientation'=>'right','width'=>500,0,'shaded'=>0,'fontSize' 
=> 8,'showLines'=> 2,'titleFontSize' => 12,'outerLineThickness'=>2
                                                        ,'cols'=>array(
***************
*** 710,716 ****
                                                        
,lang('descr')=>array('width'=>120))
                                                        ));
  
                        $this->pdf->ezStream();
- 
                }
  
--- 717,723 ----
                                                        
,lang('descr')=>array('width'=>120))
                                                        ));
+                       }
  
                        $this->pdf->ezStream();
                }
  





reply via email to

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