当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils_RecordBrowserCommon::get_records方法代码示例

本文整理汇总了PHP中Utils_RecordBrowserCommon::get_records方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils_RecordBrowserCommon::get_records方法的具体用法?PHP Utils_RecordBrowserCommon::get_records怎么用?PHP Utils_RecordBrowserCommon::get_records使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils_RecordBrowserCommon的用法示例。


在下文中一共展示了Utils_RecordBrowserCommon::get_records方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search_format

 public static function search_format($id)
 {
     $row = Utils_RecordBrowserCommon::get_records('bugtrack', array('id' => $id));
     if (!$row) {
         return false;
     }
     $row = array_pop($row);
     return Utils_RecordBrowserCommon::record_link_open_tag('bugtrack', $row['id']) . __('Bug (attachment) #%d, %s', array($row['id'], $row['project_name'])) . Utils_RecordBrowserCommon::record_link_close_tag();
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:9,代码来源:BugtrackCommon_0.php

示例2: get_tax_details

 public static function get_tax_details()
 {
     static $cache = null;
     if ($cache === null) {
         $cache = array();
         $r = Utils_RecordBrowserCommon::get_records('data_tax_rates');
         foreach ($r as $v) {
             $cache[$v['id']] = $v;
         }
     }
     return $cache;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:12,代码来源:TaxRatesCommon_0.php

示例3: body

 public function body()
 {
     $recs = Utils_RecordBrowserCommon::get_records('company', array(), array(), array('company_name' => 'ASC'));
     $i = 0;
     foreach ($recs as $k => $v) {
         if ($i >= 10) {
             unset($recs[$k]);
         }
         $i++;
     }
     $this->rbr->set_reference_records($recs);
     $this->rbr->set_reference_record_display_callback(array('Tests_ReportCommon', 'display_company'));
     $date_range = $this->rbr->display_date_picker();
     $this->rbr->set_categories(self::$cats);
     $this->rbr->set_summary('col', array('label' => 'Total'));
     $this->rbr->set_summary('row', array('label' => 'Total'));
     $this->rbr->set_format(array(self::$cats[0] => 'numeric', self::$cats[1] => 'currency'));
     $header = array('Company');
     $this->dates = $date_range['dates'];
     $this->range_type = $date_range['type'];
     switch ($date_range['type']) {
         case 'day':
             $this->format = 'd M Y';
             break;
         case 'week':
             $this->format = 'W Y';
             break;
         case 'month':
             $this->format = 'M Y';
             break;
         case 'year':
             $this->format = 'Y';
             break;
     }
     foreach ($this->dates as $v) {
         $header[] = date($this->format, $v);
     }
     $this->rbr->set_table_header($header);
     $this->rbr->set_display_cell_callback(array($this, 'display_cells'));
     $this->rbr->set_pdf_title(__('Companies - Report, %s', array(date('Y-m-d H:i:s'))));
     $this->rbr->set_pdf_subject($this->rbr->pdf_subject_date_range());
     $this->rbr->set_pdf_filename(__('Companies_Report_%s', array(date('Y_m_d__H_i_s'))));
     $this->display_module($this->rbr);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:44,代码来源:Report_0.php

示例4: define

$path = $_REQUEST['path'];
define('CID', $cid);
define('READ_ONLY_SESSION', true);
require_once '../../../include.php';
$crits = Module::static_get_module_variable($path, 'crits_stuff', null);
$order = Module::static_get_module_variable($path, 'order_stuff', null);
if ($crits === null || $order === null) {
    $crits = $order = array();
}
ModuleManager::load_modules();
if (!Utils_RecordBrowserCommon::get_access($tab, 'export') && !Base_AclCommon::i_am_admin()) {
    die('Access denied');
}
set_time_limit(0);
$tab_info = Utils_RecordBrowserCommon::init($tab);
$records = Utils_RecordBrowserCommon::get_records($tab, $crits, array(), $order, array(), $admin);
header('Content-Type: text/csv');
//header('Content-Length: '.strlen($buffer));
header('Content-disposition: attachement; filename="' . $tab . '_export_' . date('Y_m_d__H_i_s') . '.csv"');
if (headers_sent()) {
    die('Some data has already been output to browser, can\'t send the file');
}
$cols = array(__('Record ID'), __('Created on'), __('Created by'), __('Edited on'), __('Edited by'));
foreach ($tab_info as $v) {
    if (!$v['export']) {
        continue;
    }
    $cols[] = _V($v['name']);
    if ($v['style'] == 'currency') {
        $cols[] = _V($v['name']) . ' - ' . __('Currency');
    }
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:csv_export.php

示例5: send

 public function send($file)
 {
     if ($this->is_back()) {
         return $this->go_back($file);
     }
     $qf = $this->init_module(Libs_QuickForm::module_name(), null, 'send_fax');
     list($providers, $providers_arr) = self::get_providers($file);
     if (empty($providers)) {
         $this->go_back($file);
         Epesi::alert(__('No fax providers installed or configured for this type of file.'));
         return;
     }
     $qf->addElement('header', null, __('Faxing file: %s', array(basename($file))));
     $qf->addElement('select', 'provider', __('Provider'), $providers);
     $qf->addElement('header', null, __('Contact'));
     $fav_contact = CRM_ContactsCommon::get_contacts(array(':Fav' => true, '!fax' => ''));
     $fav_contact2 = array();
     foreach ($fav_contact as $v) {
         $fav_contact2[$v['id']] = CRM_ContactsCommon::contact_format_default($v, true);
     }
     $rb_contact = $this->init_module(Utils_RecordBrowser_RecordPicker::module_name());
     $this->display_module($rb_contact, array('contact', 'dest_contact', array('CRM_FaxCommon', 'rpicker_contact_format'), array('!fax' => ''), array('fax' => true)));
     $qf->addElement('multiselect', 'dest_contact', '', $fav_contact2);
     $qf->addElement('static', null, $rb_contact->create_open_link('Add contact'));
     $qf->addElement('header', null, __('Company'));
     $fav_company = CRM_ContactsCommon::get_companies(array(':Fav' => true, '!fax' => ''), array('id', 'company_name'));
     $fav_company2 = array();
     foreach ($fav_company as $v) {
         $fav_company2[$v['id']] = $v['company_name'];
     }
     $rb_company = $this->init_module(Utils_RecordBrowser_RecordPicker::module_name());
     $this->display_module($rb_company, array('company', 'dest_company', array('CRM_FaxCommon', 'rpicker_company_format'), array('!fax' => ''), array('fax' => true)));
     $qf->addElement('multiselect', 'dest_company', '', $fav_company2);
     $qf->addElement('static', null, $rb_company->create_open_link('Add company'));
     $qf->addElement('header', null, __('Other'));
     $qf->addElement('text', 'dest_other', __('Other fax numbers (comma separated)'));
     $qf->addFormRule(array($this, 'check_numbers'));
     if ($qf->validate()) {
         $data = $qf->exportValues();
         if (!isset($providers_arr[$data['provider']]['send_func'])) {
             Epesi::alert(__('Invalid fax provider.'));
         } else {
             $fax_func = array($data['provider'] . 'Common', $providers_arr[$data['provider']]['send_func']);
             $numbers = array();
             $contacts = Utils_RecordBrowserCommon::get_records('contact', array('id' => $data['dest_contact']), array('fax'));
             foreach ($contacts as $row) {
                 $numbers[] = $row['fax'];
             }
             $companies = Utils_RecordBrowserCommon::get_records('company', array('id' => $data['dest_company']), array('fax'));
             foreach ($companies as $row) {
                 $numbers[] = $row['fax'];
             }
             $numbers += explode(',', $data['dest_other']);
             $ret = call_user_func($fax_func, $file, $numbers);
             if ($ret) {
                 return $this->go_back($file);
             }
         }
     }
     $qf->display();
     Base_ActionBarCommon::add('send', __('Send'), $qf->get_submit_form_href());
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:63,代码来源:Fax_0.php

示例6: check_nickname

 public static function check_nickname($v, $id)
 {
     if (isset($id[2])) {
         $r = Utils_RecordBrowserCommon::get_records('rc_multiple_emails', array('nickname' => $v, 'record_type' => $id[0], 'record_id' => $id[1], '!id' => $id[2]), array());
         return empty($r);
     }
     $r = Utils_RecordBrowserCommon::get_records('rc_multiple_emails', array('nickname' => $v, 'record_type' => $id[0], 'record_id' => $id[1]), array());
     return empty($r);
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:9,代码来源:RoundcubeCommon_0.php

示例7: applet

 public function applet($conf, &$opts)
 {
     Epesi::load_js('modules/CRM/Roundcube/utils.js');
     $opts['go'] = true;
     $accounts = array();
     $ret = array();
     $update_applet = '';
     foreach ($conf as $key => $on) {
         $x = explode('_', $key);
         if ($x[0] == 'account' && $on) {
             $id = $x[1];
             $accounts[] = $id;
         }
     }
     $accs = Utils_RecordBrowserCommon::get_records('rc_accounts', array('epesi_user' => Acl::get_user(), 'id' => $accounts));
     print '<ul>';
     foreach ($accs as $row) {
         $mail = $row['account_name'];
         $cell_id = 'mailaccount_' . $opts['id'] . '_' . $row['id'];
         //interval execution
         eval_js_once('setInterval(\'CRM_RC.update_msg_num(' . $opts['id'] . ' ,' . $row['id'] . ' , 0)\',300000)');
         //and now
         $update_applet .= 'CRM_RC.update_msg_num(' . $opts['id'] . ' ,' . $row['id'] . ' ,1);';
         print '<li><i><a' . $this->create_callback_href(array($this, 'open_rc_account'), $row['id']) . '>' . $mail . '</a></i> - <span id="' . $cell_id . '"></span></li>';
     }
     print '</ul>';
     $this->js($update_applet);
     $href = $this->create_callback_href(array('Base_BoxCommon', 'push_module'), array($this->get_type(), 'account_manager', array(true)));
     $img = '<img src="' . Base_ThemeCommon::get_template_file('Base_Dashboard', 'configure.png') . '" border="0">';
     $tooltip = Utils_TooltipCommon::open_tag_attrs(__('Go to account settings'));
     $opts['actions'][] = "<a {$tooltip} {$href}>{$img}</a>";
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:32,代码来源:Roundcube_0.php

示例8: mobile_rb_edit


//.........这里部分代码省略.........
                     continue;
                 }
                 //skip multi recordsets chained selector
                 if ($tab2 == '__COMMON__') {
                     $data = Utils_CommonDataCommon::get_translated_tree($col);
                     if (!is_array($data)) {
                         $data = array();
                     }
                     $comp = $comp + $data;
                 } else {
                     if (isset($crits_callback)) {
                         $crit_callback = explode('::', $crits_callback);
                         if (is_callable($crit_callback)) {
                             $crits = call_user_func($crit_callback, false, $rec);
                             $adv_crits = call_user_func($crit_callback, true, $rec);
                         } else {
                             $crits = $adv_crits = array();
                         }
                         if ($adv_crits === $crits) {
                             $adv_crits = null;
                         }
                         if ($adv_crits !== null) {
                             continue;
                             //skip record picker
                         }
                     } else {
                         $crits = array();
                     }
                     $col = explode('|', $col);
                     $col_id = array();
                     foreach ($col as $c) {
                         $col_id[] = self::get_field_id($c);
                     }
                     $records = Utils_RecordBrowserCommon::get_records($tab2, $crits, empty($multi_adv_params['format_callback']) ? $col_id : array(), !empty($multi_adv_params['order']) ? $multi_adv_params['order'] : array());
                     $ext_rec = array();
                     if (isset($rec[$args['id']])) {
                         if (!is_array($rec[$args['id']])) {
                             if ($rec[$args['id']] != '') {
                                 $rec[$args['id']] = array($rec[$args['id']] => $rec[$args['id']]);
                             } else {
                                 $rec[$args['id']] = array();
                             }
                         }
                     }
                     if (isset($defaults[$args['id']])) {
                         if (!is_array($defaults[$args['id']])) {
                             $rec[$args['id']][$defaults[$args['id']]] = $defaults[$args['id']];
                         } else {
                             foreach ($defaults[$args['id']] as $v) {
                                 $rec[$args['id']][$v] = $v;
                             }
                         }
                     }
                     $single_column = count($col_id) == 1;
                     if (isset($rec[$args['id']])) {
                         $ext_rec = array_flip($rec[$args['id']]);
                         foreach ($ext_rec as $k => $v) {
                             $c = Utils_RecordBrowserCommon::get_record($tab2, $k);
                             if (!empty($multi_adv_params['format_callback'])) {
                                 $n = call_user_func($multi_adv_params['format_callback'], $c);
                             } else {
                                 if ($single_column) {
                                     $n = $c[$col_id[0]];
                                 } else {
                                     $n = array();
                                     foreach ($col_id as $cid) {
开发者ID:cretzu89,项目名称:EPESI,代码行数:67,代码来源:RecordBrowserCommon_0.php

示例9: mini_view

    public function mini_view($cols, $crits, $order, $info=null, $limit=null, $conf = array('actions_edit'=>true, 'actions_info'=>true), & $opts = array()){
        unset($_SESSION['client']['recordbrowser']['admin_access']);
        $this->init();
        $gb = $this->init_module('Utils/GenericBrowser',$this->tab,$this->tab);
        $field_hash = array();
        foreach($this->table_rows as $field => $args)
            $field_hash[$args['id']] = $field;
        $header = array();
        $callbacks = array();
        foreach($cols as $k=>$v) {
            if (isset($v['callback'])) $callbacks[] = $v['callback'];
            else $callbacks[] = null;
            if (is_array($v)) {
                $arr = array('name'=>_V($field_hash[$v['field']])); // TRSL
				if (isset($v['width'])) $arr['width'] = $v['width'];
                $cols[$k] = $v['field'];
            } else {
                $arr = array('name'=>_V($field_hash[$v])); // TRSL
                $cols[$k] = $v;
            }
            if (isset($v['label'])) $arr['name'] = $v['label'];
            $arr['wrapmode'] = 'nowrap';
            $header[] = $arr;
        }
        $gb->set_table_columns($header);
        $gb->set_fixed_columns_class($this->fixed_columns_class);

        $clean_order = array();
        foreach($order as $k=>$v) {
    	    if ($k==':Visited_on') $field_hash[$k] = $k;
    	    if ($k==':Fav') $field_hash[$k] = $k;
    	    if ($k==':Edited_on') $field_hash[$k] = $k;
            if ($k==':id') $field_hash[$k] = $k;
            $clean_order[] = array('column'=>$field_hash[$k],'order'=>$field_hash[$k],'direction'=>$v);
        }
        if ($limit!=null && !isset($conf['force_limit'])) {
            $limit = array('offset'=>0, 'numrows'=>$limit);
            $records_qty = Utils_RecordBrowserCommon::get_records_count($this->tab, $crits);
            if ($records_qty>$limit['numrows']) {
                if ($this->get_module_variable('no_limit_in_mini_view',false)) {
                    $opts['actions'][] = '<a '.Utils_TooltipCommon::open_tag_attrs(__('Display first %d records', array($limit['numrows']))).' '.$this->create_callback_href(array($this, 'set_no_limit_in_mini_view'), array(false)).'><img src="'.Base_ThemeCommon::get_template_file('Utils_RecordBrowser','show_some.png').'" border="0"></a>';
                    $limit = null;
                } else {
                    print(__('Displaying %s of %s records', array($limit['numrows'], $records_qty)));
                    $opts['actions'][] = '<a '.Utils_TooltipCommon::open_tag_attrs(__('Display all records')).' '.$this->create_callback_href(array($this, 'set_no_limit_in_mini_view'), array(true)).'><img src="'.Base_ThemeCommon::get_template_file('Utils_RecordBrowser','show_all.png').'" border="0"></a>';
                }
            }
        }
        $records = Utils_RecordBrowserCommon::get_records($this->tab, $crits, array(), $clean_order, $limit);
        foreach($records as $v) {
            $gb_row = $gb->get_new_row();
            $arr = array();
            foreach($cols as $k=>$w) {
                if (!isset($callbacks[$k])) $s = $this->get_val($field_hash[$w], $v, false, $this->table_rows[$field_hash[$w]]);
                else $s = call_user_func($callbacks[$k], $v);
                $arr[] = $s;
            }
            $gb_row->add_data_array($arr);
            if (is_callable($info)) {
                $additional_info = call_user_func($info, $v);
            } else $additional_info = '';
            if (!is_array($additional_info) && isset($additional_info)) $additional_info = array('notes'=>$additional_info);
            if (isset($additional_info['notes'])) $additional_info['notes'] = $additional_info['notes'].'<hr />';
            if (isset($additional_info['row_attrs'])) $gb_row->set_attrs($additional_info['row_attrs']);
            if (isset($conf['actions_info']) && $conf['actions_info']) $gb_row->add_info($additional_info['notes'].Utils_RecordBrowserCommon::get_html_record_info($this->tab, $v['id']));
            if (isset($conf['actions_view']) && $conf['actions_view']) $gb_row->add_action($this->create_callback_href(array($this,'navigate'),array('view_entry', 'view',$v['id'])),'View');
            if (isset($conf['actions_edit']) && $conf['actions_edit']) if ($this->get_access('edit',$v)) $gb_row->add_action($this->create_callback_href(array($this,'navigate'),array('view_entry', 'edit',$v['id'])),'Edit');
            if (isset($conf['actions_delete']) && $conf['actions_delete']) if ($this->get_access('delete',$v)) $gb_row->add_action($this->create_confirm_callback_href(__('Are you sure you want to delete this record?'),array($this,'delete_record'),array($v['id'], false)),'Delete');
            if (isset($conf['actions_history']) && $conf['actions_history']) {
                $r_info = Utils_RecordBrowserCommon::get_record_info($this->tab, $v['id']);
                if ($r_info['edited_on']===null) $gb_row->add_action('','This record was never edited',null,'history_inactive');
                else $gb_row->add_action($this->create_callback_href(array($this,'navigate'),array('view_edit_history', $v['id'])),'View edit history',null,'history');
            }
            $this->call_additional_actions_methods($v, $gb_row);
        }
        $this->display_module($gb);
    }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:77,代码来源:RecordBrowser_0.php

示例10: salesopportunity_addon

 public function salesopportunity_addon($salesopportunity)
 {
     $attachment_groups = array();
     if (ModuleManager::is_installed('CRM_Meeting') >= 0) {
         $records = Utils_RecordBrowserCommon::get_records('crm_meeting', array('opportunity' => $salesopportunity['id']), array());
         foreach ($records as $rec) {
             $attachment_groups[] = 'crm_meeting/' . $rec['id'];
         }
     }
     if (ModuleManager::is_installed('CRM_Tasks') >= 0) {
         $records = Utils_RecordBrowserCommon::get_records('task', array('opportunity' => $salesopportunity['id']), array());
         foreach ($records as $rec) {
             $attachment_groups[] = 'task/' . $rec['id'];
         }
     }
     if (ModuleManager::is_installed('CRM_PhoneCall') >= 0) {
         $records = Utils_RecordBrowserCommon::get_records('phonecall', array('opportunity' => $salesopportunity['id']), array());
         foreach ($records as $rec) {
             $attachment_groups[] = 'phonecall/' . $rec['id'];
         }
     }
     if (Base_User_SettingsCommon::get('CRM/Contacts/NotesAggregate', 'show_all_notes')) {
         $attachment_groups[] = 'premium_salesopportunity/' . $salesopportunity['id'];
     }
     $a = $this->init_module('Utils/Attachment', array($attachment_groups));
     $a->set_multiple_group_mode();
     $this->display_module($a);
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:28,代码来源:NotesAggregate_0.php

示例11: array

            continue;
        }
        $old_checkpoint->require_time(2);
        Utils_RecordBrowserCommon::new_record('rc_related', array('recordset' => $r['recordset']));
        unset($old[$i]);
        $old_checkpoint->set('old', $old);
    }
    $old_checkpoint->done();
}
Patch::set_message('Processing related');
$related_checkpoint = Patch::checkpoint('related');
if (!$related_checkpoint->is_done()) {
    while (1) {
        $related = $related_checkpoint->get('related', array());
        if (empty($related)) {
            $related = Utils_RecordBrowserCommon::get_records('rc_mails_assoc', array(), array(), array(), 10);
            if (empty($related)) {
                break;
            }
        }
        foreach ($related as $i => $r) {
            $related_checkpoint->require_time(5);
            $mail = Utils_RecordBrowserCommon::get_record('rc_mails', $r['mail']);
            $mail['related'][] = $r['recordset'] . '/' . $r['record_id'];
            Utils_RecordBrowserCommon::update_record('rc_mails', $r['mail'], array('related' => $mail['related']));
            Utils_RecordBrowserCommon::delete_record('rc_mails_assoc', $r['id']);
            unset($related[$i]);
            $related_checkpoint->set('related', $related);
        }
    }
    $related_checkpoint->done();
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:20150119_related.php

示例12: die

 */
if (!isset($_POST['select']) || !isset($_POST['path']) || !isset($_POST['cid'])) {
    die('alert(\'Invalid request\')');
}
define('JS_OUTPUT', 1);
define('CID', $_POST['cid']);
require_once '../../../../include.php';
foreach ($_POST as $k => $v) {
    $_POST[$k] = trim($v, '"');
}
$path = $_POST['path'];
$select = json_decode($_POST['select']);
$tab = Module::static_get_module_variable($path, 'tab', null);
$crits = Module::static_get_module_variable($path, 'crits_stuff', null);
$rp_path = Module::static_get_module_variable($path, 'rp_fs_path', null);
$selected =& Module::static_get_module_variable($rp_path, 'selected', array());
ModuleManager::load_modules();
if ($tab === null || $crits === null || $rp_path === null) {
    die('alert(\'Invalid usage - variables not set (path - ' . $path . ', module vars - ' . epesi::escapeJS(print_r($_SESSION['client']['__module_vars__'][$path], true)) . ')\');');
}
$tab_info = Utils_RecordBrowserCommon::init($tab);
$records = Utils_RecordBrowserCommon::get_records($tab, $crits, array('id'));
foreach ($records as $r) {
    if ($select) {
        $selected[$r['id']] = 1;
    } else {
        unset($selected[$r['id']]);
    }
}
session_commit();
print 'Epesi.procOn--;_chj(\'\',\'\',\'queue\');';
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:select_all.php

示例13: array

        break;
    case 'recent':
        $crits[':Recent'] = true;
        $sort = array(':Visited_on' => 'DESC');
        break;
}
if (!IPHONE && $type != 'recent' && $order && ($_GET['order_dir'] == 'asc' || $_GET['order_dir'] == 'desc')) {
    $sort = array($order => strtoupper($_GET['order_dir']));
}
$offset = isset($_GET['rb_offset']) ? $_GET['rb_offset'] : 0;
if (IPHONE) {
    $num_rows = 20;
} else {
    $num_rows = 10;
}
$data = Utils_RecordBrowserCommon::get_records($table, $crits, array(), $sort, array('numrows' => $num_rows, 'offset' => $num_rows * $offset));
//parse data
if (IPHONE) {
    $letter = null;
    $letter_col = current($cols_out);
    $letter_col = $letter_col['record']['id'];
    print '<ul>';
} else {
    $data_out = array();
}
foreach ($data as $v) {
    if (IPHONE) {
        $row_sort = '';
        $row_info = '';
    } else {
        $row = array();
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:mobile.php

示例14: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
$mails = Utils_RecordBrowserCommon::get_records('rc_mails');
foreach ($mails as $m) {
    Utils_RecordBrowserCommon::update_record('rc_mails', $m['id'], array('message_id' => ltrim(rtrim($m['message_id'], '>'), '<')));
}
foreach ($mails as $m) {
    CRM_RoundcubeCommon::create_thread($m['id']);
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:10,代码来源:20130606_add_thread_view2.php

示例15: reload_mails

 public static function reload_mails($rs, $id, $email_addresses = null)
 {
     $prefix = ($rs == 'contact' ? 'P' : 'C') . ':';
     if (!$email_addresses) {
         $email_addresses = self::get_email_addresses($rs, $id);
     }
     foreach ($email_addresses as $email) {
         $cc = Utils_RecordBrowserCommon::get_records('rc_mails', array('(~from' => '%' . $email . '%', '|~to' => '%' . $email . '%'));
         foreach ($cc as $mail) {
             if ($rs == 'contact' && $mail['employee'] == $id || in_array($prefix . $id, $mail['contacts'])) {
                 continue;
             }
             if (!preg_match('/(^|[\\s,\\<\\;])' . preg_quote($email, '/') . '($|[\\s,\\>\\&])/i', $mail['from'] . ',' . $mail['to'])) {
                 continue;
             }
             $mail['contacts'][] = $prefix . $id;
             Utils_RecordBrowserCommon::update_record('rc_mails', $mail['id'], array('contacts' => $mail['contacts']));
             CRM_RoundcubeCommon::create_thread($mail['id']);
         }
     }
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:21,代码来源:RoundcubeCommon_0.php


注:本文中的Utils_RecordBrowserCommon::get_records方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。