phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.sowo_hour.php, 1.1.1.8


From: nomail
Subject: [Phpgroupware-cvs] property/class.sowo_hour.php, 1.1.1.8
Date: Tue, 1 Jun 2004 15:06:22 +0200

Update of /property
Modified Files:
        Branch: 
          class.sowo_hour.php

date: 2004/06/01 13:06:22;  author: sigurdne;  state: Exp;  lines: +10 -4

Log Message:
no message
=====================================================================
Index: property/class.sowo_hour.php
diff -u property/class.sowo_hour.php:1.1.1.7 
property/class.sowo_hour.php:1.1.1.8
--- property/class.sowo_hour.php:1.1.1.7        Sun May  9 13:42:35 2004
+++ property/class.sowo_hour.php        Tue Jun  1 13:06:22 2004
@@ -662,15 +662,21 @@
                        $GLOBALS['phpgw']->db->Execute("UPDATE fm_addressbook 
set email ='$to_email' where  id= '$vendor_id'");
                }
 
-               function get_extra_email($vendor_id)
+               function get_email($vendor_id)
                {
                        $vendor_id=(int)$vendor_id;
-                       $dbresult = $GLOBALS['phpgw']->db->Execute("SELECT 
contact_value from fm_addressbook_extra where contact_id='$vendor_id' and 
contact_value like 'address@hidden'");
+
+                       $dbresult = $GLOBALS['phpgw']->db->Execute("SELECT 
column_name from fm_vendor_attribute WHERE datatype='email'");
                        while (!$dbresult->EOF)
                        {
-                               $email_list[] = array('email' => 
$dbresult->fields['contact_value']);
+                               $dbresult2 = 
$GLOBALS['phpgw']->db->Execute("SELECT " . $dbresult->fields['column_name'] . 
"from fm_vendor WHERE id=$vendor_id");
+                               while (!$dbresult2->EOF)
+                               {
+                                       $email_list[] = array('email' => 
$dbresult2->fields[$dbresult->fields['column_name']]);
+                                       $dbresult2->MoveNext();
+                               }
                                $dbresult->MoveNext();
-                       }
+               }
                        return  $email_list;
                }
 




reply via email to

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