public function applet($conf, &$opts) { $opts['go'] = true; $rb = $this->init_module('Utils/RecordBrowser', 'phonecall', 'phonecall'); $me = CRM_ContactsCommon::get_my_record(); if ($me['id'] == -1) { CRM_ContactsCommon::no_contact_message(); return; } $crits = array('employees' => array($me['id']), '!status' => array(2, 3)); if (!isset($conf['past']) || !$conf['past']) { $crits['>=date_and_time'] = date('Y-m-d 00:00:00'); } if (!isset($conf['today']) || !$conf['today']) { $crits['(>=date_and_time'] = date('Y-m-d 00:00:00', strtotime('+1 day')); $crits['|<date_and_time'] = date('Y-m-d 00:00:00'); } if ($conf['future'] != -1) { $crits['<=date_and_time'] = date('Y-m-d 23:59:59', strtotime('+' . $conf['future'] . ' day')); } $conds = array(array(array('field' => 'contact_name', 'width' => 14), array('field' => 'phone_number', 'width' => 20), array('field' => 'status', 'width' => 8)), $crits, array('status' => 'ASC', 'date_and_time' => 'ASC', 'priority' => 'DESC'), array('CRM_PhoneCallCommon', 'applet_info_format'), 15, $conf, &$opts); $date = $this->get_module_variable('applet_date', date('Y-m-d H:i:s')); $opts['actions'][] = Utils_RecordBrowserCommon::applet_new_record_button('phonecall', array('date_and_time' => $date, 'employees' => array($me['id']), 'permission' => '0', 'status' => '0', 'priority' => CRM_CommonCommon::get_default_priority())); $this->display_module($rb, $conds, 'mini_view'); }
public function install() { Base_AclCommon::add_permission(_M('View Activity Report'), array('ACCESS:employee', 'ACCESS:manager')); Base_ThemeCommon::install_default_theme($this->get_type()); Utils_RecordBrowserCommon::new_addon('contact', 'Apps/ActivityReport', 'contact_addon', array('Apps_ActivityReportCommon', 'contact_addon_label')); return true; }
public function uninstall() { $ret = true; Utils_RecordBrowserCommon::uninstall_recordset('quick_search'); Utils_RecordBrowserCommon::unregister_processing_callback('quick_search', array('Applets_QuickSearchCommon', 'parse_values')); return $ret; }
public function create_contact($r) { global $OUTPUT; $mail = $r['record']['email']; require_once dirname(__FILE__) . '/epesi_contacts_addressbook_backend.php'; $contacts = new epesi_contacts_addressbook_backend('CRM Contacts'); $ret = $contacts->search('email', $mail, true, false); if (count($ret->records)) { $OUTPUT->show_message('contactexists', 'warning'); } else { require_once dirname(__FILE__) . '/epesi_companies_addressbook_backend.php'; $companies = new epesi_companies_addressbook_backend('CRM Companies'); $ret = $companies->search('email', $mail, true, false); if (count($ret->records)) { $OUTPUT->show_message('contactexists', 'warning'); } else { if (isset($r['record']['firstname']) && $r['record']['firstname'] !== "" && isset($r['record']['surname']) && $r['record']['surname'] !== "") { $name = array($r['record']['firstname'], $r['record']['surname']); } else { $name = explode(' ', $r['record']['name'], 2); } if (count($name) < 2) { $OUTPUT->show_message('errorsavingcontact', 'warning'); } else { $loc = Base_RegionalSettingsCommon::get_default_location(); Utils_RecordBrowserCommon::new_record('contact', array('first_name' => $name[0], 'last_name' => $name[1], 'email' => $mail, 'permission' => 0, 'country' => $loc['country'])); $OUTPUT->show_message('addedsuccessfully', 'confirmation'); } } } $OUTPUT->send(); // return array('abort'=>true); }
public function uninstall() { Utils_RecordBrowserCommon::delete_record_field('company', 'County'); Utils_RecordBrowserCommon::delete_record_field('contact', 'County'); Utils_RecordBrowserCommon::delete_record_field('contact', 'Home County'); return true; }
protected function format_values($tab, $record_id) { $rb_obj = new RBO_RecordsetAccessor($tab); $record = $rb_obj->get_record($record_id); if (!$record) { return array(); } $access = Utils_RecordBrowserCommon::get_access($tab, 'view', $record); if (!$access) { return array(); } // use RB object instance for better display callback compatibility // some of them uses Utils_RecordBrowser::$rb_obj instance $rb = ModuleManager::new_instance('Utils_RecordBrowser', null, 'rb'); $rb->construct($tab); $rb->init($tab); $fields = Utils_RecordBrowserCommon::init($tab); $printable_data = array(); foreach ($fields as $f) { if ($access[$f['id']]) { $printable_data[] = array('label' => _V($f['name']), 'value' => $record->get_val($f['id'], true)); } } // fill rows - it's easier here than in template if ($this->fill_empty_rows()) { while (count($printable_data) % $this->cols() != 0) { $printable_data[] = array('label' => '', 'value' => ''); } } return $printable_data; }
public function uninstall() { Utils_RecordBrowserCommon::delete_addon('company', 'Tests/Bugtrack', 'company_bugtrack_addon'); Utils_AttachmentCommon::delete_addon('bugtrack'); Utils_RecordBrowserCommon::uninstall_recordset('bugtrack'); Utils_CommonDataCommon::remove('Bugtrack_Status'); return true; }
public function uninstall() { Base_ThemeCommon::uninstall_default_theme('CRM/Contacts/Activities'); Utils_RecordBrowserCommon::delete_addon('company', 'CRM/Contacts/Activities', 'company_activities'); Utils_RecordBrowserCommon::delete_addon('contact', 'CRM/Contacts/Actitivies', 'contact_activities'); return true; }
public function applet($conf, &$opts) { $opts['go'] = true; $opts['title'] = __('Meetings'); $me = CRM_ContactsCommon::get_my_record(); if ($me['id'] == -1) { CRM_ContactsCommon::no_contact_message(); return; } $closed = isset($conf['closed']) && $conf['closed']; $related = $conf['related']; $rb = $this->init_module('Utils/RecordBrowser', 'crm_meeting', 'crm_meeting'); $crits = array(); if (!$closed) { $crits['!status'] = array(2, 3); } if ($related == 0) { $crits['employees'] = array($me['id']); } if ($related == 1) { $crits['customers'] = array($me['id']); } if ($related == 2) { $crits['(employees'] = array($me['id']); $crits['|customers'] = array($me['id']); } $conds = array(array(array('field' => 'title', 'width' => 14, 'callback' => array('CRM_MeetingCommon', 'display_title_with_mark')), array('field' => 'status', 'width' => 4)), $crits, array('date' => 'ASC', 'time' => 'ASC', 'status' => 'ASC', 'priority' => 'DESC'), array('CRM_MeetingCommon', 'applet_info_format'), 15, $conf, &$opts); $opts['actions'][] = Utils_RecordBrowserCommon::applet_new_record_button('crm_meeting', array('employees' => array($me['id']), 'status' => 0, 'permission' => 0, 'priority' => CRM_CommonCommon::get_default_priority(), 'date' => $this->get_module_variable('date', date('Y-m-d')), 'time' => $this->get_module_variable('time', date('H:i:s')), 'duration' => 3600)); $this->display_module($rb, $conds, 'mini_view'); }
public static function display_company($record, $nolink = false) { $def = Utils_RecordBrowserCommon::create_linked_label_r('company', 'Company Name', $record, $nolink); if (!$def) { return '---'; } return $def; }
public function uninstall() { Base_ThemeCommon::uninstall_default_theme($this->get_type()); Utils_RecordBrowserCommon::delete_addon('contact', 'CRM/Contacts/NotesAggregate', 'contact_addon'); Utils_RecordBrowserCommon::delete_addon('company', 'CRM/Contacts/NotesAggregate', 'company_addon'); Utils_RecordBrowserCommon::delete_addon('premium_salesopportunity', 'CRM/Contacts/NotesAggregate', 'salesopportunity_addon'); return true; }
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(); }
public function uninstall() { Base_ThemeCommon::uninstall_default_theme('CRM/Contacts/Activities'); Utils_RecordBrowserCommon::set_tpl('contact', Base_ThemeCommon::get_template_filename('CRM/Contacts', 'Contact')); Utils_RecordBrowserCommon::unregister_processing_callback('contact', array('CRM_Contacts_PhotoCommon', 'submit_contact')); $this->remove_data_dir(); DB::DropTable(CRM_Contacts_PhotoCommon::table_name); return true; }
public static function user_label($id) { $label = Base_UserCommon::get_user_login($id); $c = Utils_RecordBrowserCommon::get_id('contact', 'login', $id); if ($c) { $label = CRM_ContactsCommon::contact_format_no_company($c, true) . ' [' . $label . ']'; } return $label; }
public function uninstall() { CRM_CalendarCommon::delete_event_handler('Tasks'); CRM_RoundcubeCommon::delete_addon('task'); Utils_AttachmentCommon::delete_addon('task'); Base_ThemeCommon::uninstall_default_theme(CRM_TasksInstall::module_name()); Utils_RecordBrowserCommon::unregister_processing_callback('task', array('CRM_TasksCommon', 'submit_task')); Utils_RecordBrowserCommon::uninstall_recordset('task'); return true; }
public function uninstall() { CRM_CalendarCommon::delete_event_handler('Phonecalls'); CRM_RoundcubeCommon::delete_addon('phonecall'); Base_ThemeCommon::uninstall_default_theme(CRM_PhoneCallInstall::module_name()); Utils_AttachmentCommon::delete_addon('phonecall'); Utils_AttachmentCommon::persistent_mass_delete('phonecall/'); Utils_RecordBrowserCommon::unregister_processing_callback('phonecall', array('CRM_PhoneCallCommon', 'submit_phonecall')); Utils_RecordBrowserCommon::uninstall_recordset('phonecall'); return true; }
public function uninstall() { Utils_AttachmentCommon::delete_addon('crm_meeting'); Utils_RecordBrowserCommon::delete_addon('crm_meeting', CRM_MeetingInstall::module_name(), 'messanger_addon'); CRM_RoundcubeCommon::delete_addon('crm_meeting'); CRM_CalendarCommon::delete_event_handler('Meetings'); Base_ThemeCommon::uninstall_default_theme(CRM_MeetingInstall::module_name()); Utils_RecordBrowserCommon::uninstall_recordset('crm_meeting'); Utils_RecordBrowserCommon::unregister_processing_callback('crm_meeting', array('CRM_MeetingCommon', 'submit_meeting')); return true; }
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; }
public function uninstall() { Base_ThemeCommon::uninstall_default_theme($this->get_type()); Utils_CommonDataCommon::remove('crm_assets_category'); Utils_CommonDataCommon::remove('crm_assets_monitor_type'); Utils_CommonDataCommon::remove('crm_assets_printer_type'); Utils_RecordBrowserCommon::delete_addon('company', 'CRM/Assets', 'assets_addon'); Utils_AttachmentCommon::delete_addon('crm_assets'); Utils_AttachmentCommon::persistent_mass_delete('crm_assets'); Utils_RecordBrowserCommon::uninstall_recordset('crm_assets'); Utils_RecordBrowserCommon::unregister_processing_callback('crm_assets', array('CRM_AssetsCommon', 'process_request')); return true; }
public function body() { if (!Base_AclCommon::check_permission('Dashboard')) { return; } $this->help('Dashboard Help', 'main'); if (Utils_RecordBrowserInstall::is_installed()) { //speed up links to RB if (Utils_RecordBrowserCommon::check_for_jump()) { return; } } $this->dashboard(); Base_ActionBarCommon::show_quick_access_shortcuts(true); }
public static function menu() { $tabs = DB::GetAssoc('SELECT menu, tab FROM recordbrowser_custom_recordsets WHERE active=1'); $result = array(); foreach ($tabs as $k => $v) { if (!$k) { continue; } if (!Utils_RecordBrowserCommon::get_access($v, 'browse')) { continue; } $k = explode(self::$sep, $k); $menu = self::build_menu($k, array('tab' => $v)); $result = array_merge_recursive($menu, $result); } return $result; }
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); }
public function applet($conf, &$opts) { $opts['go'] = true; $opts['title'] = __('Tasks') . ($conf['related'] == 0 ? ' - ' . __('Todo') : '') . ($conf['related'] == 1 ? ' - ' . __('Related') : '') . ($conf['term'] == 's' ? ' - ' . __('Short-term') : ($conf['term'] == 'l' ? ' - ' . __('Long-term') : '')); $me = CRM_ContactsCommon::get_my_record(); if ($me['id'] == -1) { CRM_ContactsCommon::no_contact_message(); return; } $short = $conf['term'] == 's' || $conf['term'] == 'b'; $long = $conf['term'] == 'l' || $conf['term'] == 'b'; $related = $conf['related']; $rb = $this->init_module(Utils_RecordBrowser::module_name(), 'task', 'task'); $status = array(); foreach (Utils_CommonDataCommon::get_array('CRM/Status') as $status_id => $label) { if (isset($conf['status_' . $status_id]) && $conf['status_' . $status_id]) { $status[] = $status_id; } } $crits = array(); $crits['status'] = $status; if ($short && !$long) { $crits['!longterm'] = 1; } if (!$short && $long) { $crits['longterm'] = 1; } if ($related == 0) { $crits['employees'] = array($me['id']); } if ($related == 1) { $crits['customers'] = array($me['id']); } if ($related == 2) { $crits['(employees'] = array($me['id']); $crits['|customers'] = array($me['id']); } $conds = array(array(array('field' => 'title', 'width' => 20, 'callback' => array('CRM_TasksCommon', 'display_title_with_mark')), array('field' => 'deadline', 'width' => 10), array('field' => 'status', 'width' => 6)), $crits, array('deadline' => 'ASC', 'status' => 'ASC', 'priority' => 'DESC'), array('CRM_TasksCommon', 'applet_info_format'), 15, $conf, &$opts); $opts['actions'][] = Utils_RecordBrowserCommon::applet_new_record_button('task', array('employees' => array($me['id']), 'status' => 0, 'permission' => 0, 'priority' => CRM_CommonCommon::get_default_priority())); $this->display_module($rb, $conds, 'mini_view'); }
private function output($applet = false) { Base_ThemeCommon::load_css($this->get_type(), 'tray'); $tray_settings = Utils_TrayCommon::get_trays(); $tray_def = array(); $total_pending = 0; $displayed = 0; foreach ($tray_settings as $module=>$module_settings) { foreach ($module_settings as $tab=>$tab_settings) { if (!isset($tab_settings['__title__'])) continue; $tray = Utils_TrayCommon::get_tray($tab, $tab_settings); if (!isset($tray['__slots__']) || count($tray['__slots__'])==0) continue; $tray_id = $this->get_type().'__'.Utils_RecordBrowserCommon::get_field_id($tray['__title__']); $tray_def += array($tray_id =>array('__title__' => $tray['__title__'], '__weight__'=>isset($tray['__weight__'])?$tray['__weight__']:0)); foreach ($tray['__slots__'] as $slot_id=>$slot_def) { $total_pending += $slot_def['__count__']; $displayed += $slot_def['__count__']; $tray_def[$tray_id]['__slots__'][$slot_id]['__weight__'] = isset($slot_def['__weight__'])? $slot_def['__weight__']: 0; $icon = $this->get_icon($slot_def['__count__']); $tray_count_width = ($slot_def['__count__']>99)? 'style="width:28px;"':''; $tip_text = __('Click to view %s items from %s<br><br>%d item(s)', array(_V($slot_def['__name__']),_V($tray['__title__']), $slot_def['__count__'])); $tray_def[$tray_id]['__slots__'][$slot_id]['__html__'] = '<td><a '.$this->create_main_href($module, null, array($tab), null, array('tray_slot'=>$slot_id)).'><div class="Utils_Tray__slot">'. Utils_TooltipCommon::create('<img src="'.$icon.'"> <div class="Utils_Tray__count" '.$tray_count_width.'>'.$slot_def['__count__'].'</div><div>'._V($slot_def['__name__']).'</div>',$tip_text).'</div></a></td>'; } } } Utils_TrayCommon::sort_trays($tray_def); $trays = array(); $tray_slots_html = array(); $current_tray = 0; $tray_cols = $applet? 2:$this->get_tray_cols(); foreach ($tray_def as $tray_id=>$def) { $current_tray += 1; $current_row = max(array(round($current_tray/$tray_cols), 1)); $current_col = $current_tray - $tray_cols*($current_row-1); if (isset($this->max_trays) && $this->max_trays != '__NULL__') { //allow only trays in applet mode as per setting if (count($trays) >= $this->max_trays) break; } if (self::get_tray_layout()=='checkered') $class = (($current_row+$current_col) % 2)?'Utils_Tray__group_even':'Utils_Tray__group_odd'; else $class = 'Utils_Tray__group_even'; $trays[] = array( 'class' => $class, 'col'=>$current_col, 'title'=>_V($def['__title__']), 'id'=>$tray_id); foreach ($def['__slots__'] as $slot) { $tray_slots_html[$tray_id][] = $slot['__html__']; if (isset($this->max_slots) && $this->max_slots != '__NULL__') { //allow slots in applet mode as per setting if (count($tray_slots_html[$tray_id]) >= $this->max_slots) continue 2; } } } eval_js( 'function Utils_Tray__trays() { var trays = '.json_encode($tray_slots_html).'; return trays; } jq( document ).ready(function() { var resizeId; jq(window).resize(function(){ clearTimeout(resizeId); resizeId = setTimeout(Utils_Tray__resize, 300); }); Utils_Tray__resize(); });'); load_js($this->get_module_dir().'tray.js'); $theme = $this->init_module('Base/Theme'); $icon = Base_ThemeCommon::get_template_file($this->get_type(),'pile2.png'); $theme->assign('main_page', !$applet); $theme->assign('caption', Utils_TrayCommon::caption()); $theme->assign('icon', $icon); $theme->assign('trays', $trays); $theme->assign('tray_cols', $tray_cols); if ($total_pending!=$displayed) { print (__('Displaying %d of %d pending', array($displayed, $total_pending))); } $theme->display('tray'); }
<?php defined("_VALID_ACCESS") || die('Direct access forbidden'); Utils_RecordBrowserCommon::register_processing_callback('rc_mails', array('CRM_RoundcubeCommon', 'submit_mail')); $mails = Utils_RecordBrowserCommon::get_records('rc_mails', array('thread' => null)); foreach ($mails as $m) { if (preg_match('/\\nreferences:(.*)\\n/i', $m['headers_data'], $match)) { $ref = trim($match[1]); Utils_RecordBrowserCommon::update_record('rc_mails', $m['id'], array('references' => $ref)); } if (preg_match('/\\nmessageid:(.*)\\n/i', $m['headers_data'], $match)) { $mid = str_replace(array('<', '>'), '', trim($match[1])); Utils_RecordBrowserCommon::update_record('rc_mails', $m['id'], array('message_id' => $mid)); } } foreach ($mails as $m) { CRM_RoundcubeCommon::create_thread($m['id']); }
public function uninstall() { Base_AclCommon::delete_permission('Attachments - view full download history'); $ret = true; Variable::delete('utils_attachments_google_user'); Variable::delete('utils_attachments_google_pass'); DB::DropTable('utils_attachment_googledocs'); $ret &= DB::DropTable('utils_attachment_download'); $ret &= DB::DropTable('utils_attachment_file'); $ret &= DB::DropTable('utils_attachment_local'); Utils_RecordBrowserCommon::uninstall_recordset('utils_attachment'); Base_ThemeCommon::uninstall_default_theme($this->get_type()); return $ret; }
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>"; }
public static function delete_addon($table) { Utils_RecordBrowserCommon::delete_addon($table, 'CRM/Tasks', 'addon'); }
public static function mobile_rb_delete($tab, $id) { if (!isset($_GET['del_ok'])) { print '<a ' . (IPHONE ? 'class="button green" ' : '') . ' href="mobile.php?' . http_build_query($_GET) . '&del_ok=0">' . __('Cancel deletion') . '</a>'; print '<a ' . (IPHONE ? 'class="button red" ' : '') . ' href="mobile.php?' . http_build_query($_GET) . '&del_ok=1">' . __('Delete') . '</a>'; } else { if ($_GET['del_ok']) { Utils_RecordBrowserCommon::delete_record($tab, $id); } return 2; return false; } return true; }
$limit_info = ''; if (is_array($limit)) { $offset = $limit['offset']; $per_page = $limit['numrows']; $start = $offset + 1; $end = $offset + $per_page; $total = Utils_RecordBrowserCommon::get_records_count($tab, $crits, $admin, $order); if ($end > $total) $end = $total; $limit_info = __('Records %s to %s of %s', array($start, $end, $total)) . "\n"; } $tcpdf = Libs_TCPDFCommon::new_pdf(); $filters = implode(' ',Utils_RecordBrowserCommon::crits_to_words($tab, $crits)); $filters = strip_tags($filters); $filters = str_replace(' ', ' ', $filters); $filters = str_replace(' and ', "\n", $filters); $filters = str_replace(' is equal to', ':', $filters); $subject = $limit_info . $filters; Libs_TCPDFCommon::prepare_header($tcpdf, _V(DB::GetOne('SELECT caption FROM recordbrowser_table_properties WHERE tab=%s', array($tab))), $subject, false); Libs_TCPDFCommon::add_page($tcpdf); Libs_TCPDFCommon::SetFont($tcpdf, Libs_TCPDFCommon::$default_font, '', 6); $html = Libs_TCPDFCommon::stripHTML(str_replace(array('<br>',' '),array('<br/>',' '),$html)); Libs_TCPDFCommon::writeHTML($tcpdf, $html, false); $buffer = Libs_TCPDFCommon::output($tcpdf);