private function auth($user, $pass) { $error = ''; $t = Variable::get('host_ban_time'); if ($t > 0) { $fails = DB::GetOne('SELECT count(*) FROM user_login_ban WHERE failed_on>%d AND from_addr=%s', array(time() - $t, $_SERVER['REMOTE_ADDR'])); if ($fails >= 3) { $error = 'Host banned.'; } } if ($error === '') { $ret = Base_User_LoginCommon::check_login($user, $pass); if (!$ret) { $error = 'Login failed.'; if ($t > 0) { DB::Execute('DELETE FROM user_login_ban WHERE failed_on<=%d', array(time() - $t)); DB::Execute('INSERT INTO user_login_ban(failed_on,from_addr) VALUES(%d,%s)', array(time(), $_SERVER['REMOTE_ADDR'])); $fails = DB::GetOne('SELECT count(*) FROM user_login_ban WHERE failed_on>%d AND from_addr=%s', array(time() - $t, $_SERVER['REMOTE_ADDR'])); if ($fails >= 3) { $error .= ' Host banned.'; } } } else { $uid = Base_UserCommon::get_user_id($user); Acl::set_user($uid, true); } } return $error; }
function exportValue(&$submitValues, $assoc = false) { $val = parent::exportValue($submitValues, $assoc); $currency_field_name = '__'.str_replace(array('[',']'),'',$this->getName()).'__currency'; if(isset($submitValues[$currency_field_name])) $currency = $submitValues[$currency_field_name]; else return null; if ($assoc) { if (!isset($val[$this->getName()])) { $key = explode('[', $this->getName()); $key[1] = str_replace(']','',$key[1]); $val = $val[$key[0]][$key[1]]; } else $val = $val[$this->getName()]; } $cur = explode(Utils_CurrencyFieldCommon::get_decimal_point(), $val); if (!isset($cur[1])) $ret = $cur[0]; else { $this->dec_digits = DB::GetOne('SELECT decimals FROM utils_currency WHERE id=%d', array($currency)); $cur[1] = str_pad($cur[1], $this->dec_digits, '0'); $cur[1] = substr($cur[1], 0, $this->dec_digits); $ret = $cur[0] + (($cur[0]<0?-1:1)*$cur[1]/pow(10,$this->dec_digits)); } $ret .= '__'.$currency; if($assoc) { $val = array(); if (isset($key)) { $val[$key[0]][$key[1]] = $ret; } else $val[$this->getName()] = $ret; return $val; } else { return $ret; } }
/** * Delete contact * * @param Contact $contact * @param array $extra Extra fields * @return bool */ public function DeleteContact(Contact $contact, $extra = array()) { $this->FireEvent('BeforeDeleteContact', $contact); try { $Resp = $this->RegModule->DeleteContact($contact, $extra); $this->ValidateModuleResponse($Resp, 'DeleteContactResponse'); } catch (ProhibitedTransformException $e) { $linked_domain_cnt = $this->DB->GetOne("\r\n\t\t\t\t\tSELECT COUNT(*) FROM domains \r\n\t\t\t\t\tWHERE c_registrant = ? OR c_admin = ? OR c_billing = ? OR c_tech = ?", array($contact->CLID, $contact->CLID, $contact->CLID, $contact->CLID)); if (!$linked_domain_cnt) { $this->DBContact->Delete($contact); $this->FireEvent('ContactDeleted', $contact); return true; } throw new Exception(_('Contact couldn\'t be deleted due to linked domains')); } if ($Resp->IsFailed()) { Log::Log(sprintf('DeleteContact failed. Registry error: %s', $Resp->ErrMsg), E_USER_ERROR); throw new RegistryException($Resp->ErrMsg, $Resp->Code); } if ($Resp->Succeed()) { $this->DBContact->Delete($contact); $this->FireEvent('ContactDeleted', $contact); } else { if ($Resp->Pending()) { $this->AddPendingOperation($contact, self::OP_DELETE, $Resp->OperationId); } } return true; }
public static function allow_sending($flush = false) { static $cache = -1; if ($cache === -1 || $flush) { $cache = DB::GetOne('SELECT allow FROM base_lang_trans_contrib WHERE user_id=%d', Acl::get_user()); } return $cache; }
public function GetOneInfoByArrayKeys($Array = array()) { $DB = new DB(); $KeyInfo = array_keys($Array); $Where = '1'; foreach ($KeyInfo as $Value) { $Where .= ' and `' . $Value . '`=\'' . $Array[$Value] . '\''; } return $DB->GetOne('select * from ' . $this->TableName . ' where ' . $Where); }
public function jump_to_new_event($option, $timestamp, $timeless) { list($label, $id, $int_id) = explode('__', $option); $callback = DB::GetOne('SELECT handler_callback FROM crm_calendar_custom_events_handlers WHERE id=%d', $id); $callback = explode('::', $callback); call_user_func($callback, 'new_event', $timestamp, $timeless, $int_id, null, $this); /* if (!is_numeric($timestamp)) $timestamp = strtotime($timestamp); $x = ModuleManager::get_instance('/Base_Box|0'); if(!$x) trigger_error('There is no base box module instance',E_USER_ERROR); $x->push_main('CRM_Calendar','new_event',array($option, $timestamp, $timeless));*/ }
public function GetOneInfoByArrayKeys($Array = array()) { $DB = new DB(); $MysqlWhere = ''; foreach ($Array as $Key => $Value) { $MysqlWhere .= $Key . ' = \'' . $Value . '\' and '; } $MysqlWhere = substr($MysqlWhere, 0, -5); $MysqlWhere = trim($MysqlWhere); return $DB->GetOne('select * from ' . $this->TableName . ' where ' . $MysqlWhere); }
public function Delete($PictureID, $UserID) { $DB = new DB(); $Sql = 'SELECT Path, Title, Keywords,UserID, IsPublic FROM tbl_pictures WHERE PictureID=' . $PictureID . ' and UserID=' . $UserID; $RS = $DB->GetOne($Sql); if ($RS) { if (@unlink(DocumentRoot . $RS['Path'])) { $DB->Delete('DELETE FROM tbl_pictures WHERE PictureID=' . $PictureID); return 0; } else { return 1; } } else { return 2; } }
public static function get_my_homepage() { $clearance = Base_AclCommon::get_clearance(); $sql = 'SELECT home_page FROM base_home_page AS bhp WHERE '; $vals = array(); if ($clearance != null) { $sql .= ' NOT EXISTS (SELECT * FROM base_home_page_clearance WHERE home_page_id=bhp.id AND ' . implode(' AND ', array_fill(0, count($clearance), 'clearance!=%s')) . ')'; $vals = array_values($clearance); } else { $sql .= ' NOT EXISTS (SELECT * FROM base_home_page_clearance WHERE home_page_id=bhp.id)'; } $sql .= ' ORDER BY priority'; $page = DB::GetOne($sql, $vals); $pages = self::get_home_pages(); return isset($pages[$page]) ? $pages[$page] : array(); }
public function install() { $fields = array('name' => _M('County'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country', 'Zone'), 'extra' => false, 'QFfield_callback' => array('CRM_Contacts_CountyCommon', 'QFfield_county'), 'position' => 'Zone'); Utils_RecordBrowserCommon::new_record_field('company', $fields); $fields = array('name' => _M('County'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country', 'Zone'), 'extra' => false, 'QFfield_callback' => array('CRM_Contacts_CountyCommon', 'QFfield_county'), 'position' => 'Zone'); Utils_RecordBrowserCommon::new_record_field('contact', $fields); $fields = array('name' => _M('Home County'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Home Country', 'Home Zone'), 'extra' => false, 'QFfield_callback' => array('CRM_Contacts_CountyCommon', 'QFfield_county'), 'position' => 'Home Zone'); Utils_RecordBrowserCommon::new_record_field('contact', $fields); $hc_pos = DB::GetOne('SELECT position FROM contact_field WHERE field=\'Home City\''); $bd_pos = DB::GetOne('SELECT position FROM contact_field WHERE field=\'Birth Date\''); if ($hc_pos + 1 < $bd_pos) { DB::Execute('UPDATE contact_field SET position = position+1 WHERE position>%d AND position<%d', array($hc_pos, $bd_pos)); DB::Execute('UPDATE contact_field SET position = %d WHERE field=\'Birth Date\'', array($hc_pos)); } return true; }
public static function set_profile($prof) { if (preg_match('/^c([0-9,]+)$/', $prof, $reqs)) { $ret = $reqs[1]; if (strpos($ret, ',') === false) { $desc = CRM_ContactsCommon::contact_format_no_company($ret, true); } else { $desc = __('Custom filter'); } } elseif (is_numeric($prof)) { $cids = DB::GetAssoc('SELECT contact_id, contact_id FROM crm_filters_contacts'); $c = DB::GetCol('SELECT p.contact_id FROM crm_filters_contacts p WHERE p.group_id=%d', array($prof)); if ($c) { $ret = implode(',', $c); } else { $ret = '-1'; } $desc = DB::GetOne('SELECT name FROM crm_filters_group WHERE id=%d', array($prof)); } elseif ($prof == 'my') { $ret = CRM_FiltersCommon::get_my_profile(); $desc = __('My records'); } else { //all and undefined $ret = ''; /*$contacts = Utils_RecordBrowserCommon::get_records('contact', array(), array(), array('last_name'=>'ASC')); $contacts_select = array(); foreach($contacts as $v) $contacts_select[] = $v['id']; if($contacts_select) $ret = implode(',',$contacts_select); else $ret = '-1';*/ $desc = __('All records'); } // $this->set_module_variable('profile',$ret); $_SESSION['client']['filter_' . Acl::get_user()]['value'] = $ret; $_SESSION['client']['filter_' . Acl::get_user()]['desc'] = $desc; location(array()); }
public function edit_permissions($permission_name = null) { if ($this->is_back()) { Base_BoxCommon::pop_main(); } Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href()); Base_ThemeCommon::load_css('Base_Acl', 'edit_permissions'); $gb = $this->init_module('Utils_GenericBrowser', 'acl_editor', 'acl_editor'); $gb->set_table_columns(array(array('name' => ' ', 'width' => 20))); $sql = 'SELECT id, name FROM base_acl_permission'; $args = array(); $perm_id = null; if ($permission_name) { $sql .= ' WHERE name=%s'; $args[] = $permission_name; $perm_id = DB::GetOne('SELECT id FROM base_acl_permission WHERE name=%s', array($permission_name)); } $sql .= ' ORDER BY name ASC'; $perms = DB::GetAssoc($sql, $args); Base_ActionBarCommon::add('add', __('Add rule'), $this->create_callback_href(array($this, 'edit_rule'), array(null, $perm_id))); foreach ($perms as $p_id => $p_name) { $gb_row = $gb->get_new_row(); $gb_row->add_data(array('value' => _V($p_name), 'class' => 'Base_Acl__permission', 'attrs' => 'colspan="2"')); $gb_row->no_actions(); $perms = DB::GetAssoc('SELECT id, id FROM base_acl_rules WHERE permission_id=%d', array($p_id)); foreach ($perms as $r_id) { $clearances = DB::GetAssoc('SELECT id, clearance FROM base_acl_rules_clearance WHERE rule_id=%d', array($r_id)); $gb_row = $gb->get_new_row(); $gb_row->add_action($this->create_confirm_callback_href(__('Are you sure you want to delete this rule?'), array($this, 'delete_rule'), array($r_id)), 'delete', __('Delete Rule')); $gb_row->add_action($this->create_callback_href(array($this, 'edit_rule'), array($r_id, $p_id)), 'edit', __('Edit Rule')); $gb_row->add_data(Base_AclCommon::display_clearances($clearances)); } } $this->display_module($gb); eval_js('base_acl__initialized = false;'); }
function TopicDetail($TopicID) { $DB = new DB(); return $DB->GetOne('select * from tbl_topics where TopicID=' . $TopicID); }
public static function clear_search_index($tab) { $tab_id = DB::GetOne('SELECT id FROM recordbrowser_table_properties WHERE tab=%s', array($tab)); if ($tab_id) { DB::Execute('DELETE FROM recordbrowser_words_map WHERE tab_id=%d', array($tab_id)); DB::Execute('UPDATE ' . $tab . '_data_1 SET indexed=0'); return true; } return false; }
/** * Queues cron method to be run asap. * * @param string $module Module class name - usually $this->get_type() * @param string $method cron method name * @return boolean true - queued, false - already running */ public static function reset_cron($module, $method) { $func = $module . 'Common::' . $method; if (!is_callable(array($module . 'Common', $method))) { trigger_error('Invalid cron method: ' . $func); } $func_md5 = md5($func); $running = DB::GetOne('SELECT running FROM cron WHERE func=%s', array($func_md5)); if ($running) { return false; } DB::Execute('UPDATE cron SET last=0 WHERE func=%s', array($func_md5)); return true; }
$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); header('Content-Type: application/pdf'); header('Content-Length: '.strlen($buffer)); header('Content-disposition: inline; filename="recordset_'.$tab.'.pdf"'); print($buffer);
add_error('Invalid ID.', true); } $stmt = DB::Prepare('SELECT headline, visits, replies, author FROM {P}Topics WHERE id = ?'); $stmt = DB::Execute($stmt, array($_GET['id'])); if ($stmt->RecordCount() < 1) { $page_title = 'Non-existent topic'; add_error('There is no such topic. It may have been deleted.', true); } list($topic_headline, $topic_visits, $topic_replies, $topic_author) = $stmt->FetchRow(); update_activity('topic_trivia', $_GET['id']); $page_title = 'Trivia for topic: <a href="/topic/' . $_GET['id'] . '">' . htmlspecialchars($topic_headline) . '</a>'; $statistics = array(); $topic_watchers = DB::GetOne("SELECT count(*) FROM {P}Watchlists WHERE topic_id = " . DB::Q($_GET['id'])); $topic_readers = DB::GetOne("SELECT count(*) FROM {P}Activity WHERE action_name = 'topic' AND action_id = " . DB::Q($_GET['id'])); $topic_writers = DB::GetOne("SELECT count(*) FROM {P}Activity WHERE action_name = 'replying' AND action_id = " . DB::Q($_GET['id'])); $topic_participants = DB::GetOne("SELECT count(DISTINCT author) FROM {P}Replies WHERE parent_id = " . DB::Q($_GET['id']) . " AND author != " . DB::Q($topic_author)); // Alternatively, we could select the most recent poster_number. I'm not sure which method would be fastest. ?> <table> <tr> <th class="minimal">Total visits</th> <td><?php echo format_number($topic_visits); ?> </td> </tr> <tr class="odd"> <th class="minimal">Watchers</th> <td><?php
public static function post_install_process($val) { $comp_id = Utils_RecordBrowserCommon::new_record('company', array('company_name' => $val['cname'], 'short_name' => isset($val['sname']) ? $val['sname'] : '', 'address_1' => isset($val['address1']) ? $val['address1'] : '', 'address_2' => isset($val['address2']) ? $val['address2'] : '', 'country' => isset($val['country']) ? $val['country'] : '', 'zone' => isset($val['state']) ? $val['state'] : '', 'city' => isset($val['city']) ? $val['city'] : '', 'postal_code' => isset($val['postal']) ? $val['postal'] : '', 'phone' => isset($val['phone']) ? $val['phone'] : '', 'fax' => isset($val['fax']) ? $val['fax'] : '', 'permission' => '0', 'web_address' => isset($val['web']) ? $val['web'] : '', 'group' => array('other'))); if (Acl::is_user()) { $mail = DB::GetOne('SELECT up.mail FROM user_password up WHERE up.user_login_id=%d', array(Acl::get_user())); Utils_RecordBrowserCommon::new_record('contact', array('first_name' => $val['fname'], 'last_name' => $val['lname'], 'address_1' => isset($val['address1']) ? $val['address1'] : '', 'address_2' => isset($val['address2']) ? $val['address2'] : '', 'country' => isset($val['country']) ? $val['country'] : '', 'zone' => isset($val['state']) ? $val['state'] : '', 'city' => isset($val['city']) ? $val['city'] : '', 'postal_code' => isset($val['postal']) ? $val['postal'] : '', 'work_phone' => isset($val['phone']) ? $val['phone'] : '', 'fax' => isset($val['fax']) ? $val['fax'] : '', 'web_address' => isset($val['web']) ? $val['web'] : '', 'company_name' => $comp_id, 'login' => Acl::get_user(), 'permission' => '0', 'email' => $mail, 'group' => array('office', 'field'))); } }
public function was_applied($identifier) { return 1 == DB::GetOne('SELECT 1 FROM patches WHERE id=%s', array($identifier)); }
function GetOne() { return DB::GetOne($this); }
<?php defined("_VALID_ACCESS") || die('Direct access forbidden'); if (DB::GetOne('SELECT 1 FROM utils_attachment_field WHERE field=%s', array('Date'))) { Utils_RecordBrowserCommon::new_record_field('utils_attachment', array('name' => _M('Edited on'), 'type' => 'timestamp', 'extra' => false, 'visible' => true, 'required' => false, 'display_callback' => array('Utils_AttachmentCommon', 'display_date'), 'QFfield_callback' => array('Utils_AttachmentCommon', 'QFfield_date'), 'position' => 'Date')); DB::Execute('UPDATE utils_attachment_data_1 SET f_edited_on=f_date'); Utils_RecordBrowserCommon::delete_record_field('utils_attachment', 'Date'); Utils_RecordBrowserCommon::wipe_access('utils_attachment'); Utils_RecordBrowserCommon::add_access('utils_attachment', 'view', 'ACCESS:employee', array('(!permission' => 2, '|:Created_by' => 'USER_ID')); Utils_RecordBrowserCommon::add_access('utils_attachment', 'delete', 'ACCESS:employee', array(':Created_by' => 'USER_ID')); Utils_RecordBrowserCommon::add_access('utils_attachment', 'delete', array('ACCESS:employee', 'ACCESS:manager')); Utils_RecordBrowserCommon::add_access('utils_attachment', 'add', 'ACCESS:employee', array(), array('edited_on')); Utils_RecordBrowserCommon::add_access('utils_attachment', 'edit', 'ACCESS:employee', array('(permission' => 0, '|:Created_by' => 'USER_ID'), array('edited_on')); }
<?php defined("_VALID_ACCESS") || die('Direct access forbidden'); $modules = array('Apps_Forum', 'Apps_Gallery', 'Apps_StaticPage', 'Apps_TwisterGame', 'Base_ModuleManager', 'Libs_Lytebox', 'Tests_BookmarkBrowser', 'Utils_BookmarkBrowser', 'Tests_Lytebox', 'Tools_FontSize', 'Utils_Gallery', 'Utils_BookmarkBrowser'); foreach ($modules as $m) { if (DB::GetOne('SELECT 1 FROM modules WHERE name=%s', array($m)) && !is_dir('modules/' . str_replace('_', '/', $m))) { DB::Execute('DELETE FROM modules WHERE name=%s', array($m)); Base_ThemeCommon::uninstall_default_theme($m); ModuleManager::remove_data_dir($m); } } if (ModuleManager::is_installed('Utils_RecordBrowser_RecordPickerFS') < 0) { ModuleManager::install('Utils_RecordBrowser_RecordPickerFS', 0, false); } if (ModuleManager::is_installed('Utils_RecordBrowser_RecordPicker') < 0) { ModuleManager::install('Utils_RecordBrowser_RecordPicker'); }
public static function get_alarm($id) { $recurrence = strpos($id, '_'); if ($recurrence !== false) { $id = substr($id, 0, $recurrence); } $hndlr = DB::GetOne('SELECT id FROM crm_calendar_custom_events_handlers WHERE group_name=%s', array('Meetings')); $a = self::get($hndlr . '#' . $id); if (!$a) { return __('Private record'); } if (isset($a['timeless'])) { $date = __('Timeless event: %s', array(Base_RegionalSettingsCommon::time2reg($a['timeless'], false))); } else { $date = __('Start: %s', array(Base_RegionalSettingsCommon::time2reg($a['start'], 2))) . "\n" . __('End: %s', array(Base_RegionalSettingsCommon::time2reg($a['end'], 2))); } return $date . "\n" . __('Title: %s', array($a['title'])); }
public static function check_group_name_exists($name, $id) { if (isset($id)) { $ret = DB::GetOne('SELECT id FROM crm_filters_group WHERE id!=%d AND name=%s AND user_login_id=%d', array($id, $name, Acl::get_user())); } else { $ret = DB::GetOne('SELECT id FROM crm_filters_group WHERE name=%s AND user_login_id=%d', array($name, Acl::get_user())); } return $ret === false || $ret === null; }
public static function QFfield_related(&$form, $field, $label, $mode, $default, $desc, $rb_obj) { if (DB::GetOne('SELECT 1 FROM task_related_data_1 WHERE active=1')) { Utils_RecordBrowserCommon::QFfield_select($form, $field, $label, $mode, $default, $desc, $rb_obj); } }
public static function get_photo($contact_id) { return DB::GetOne('SELECT filename FROM ' . self::table_name . ' WHERE contact_id=%d', array($contact_id)); }
function GetProvinceCity($AreaID) { if (!$AreaID) { return false; } $DB = new DB(); $Sql = 'select AreaID from `tbl_location` where ParentAreaID=\'' . $AreaID . '\''; $Rs = $DB->GetOne($Sql); if ($Rs) { return $Rs['AreaID']; } else { return false; } }
/** * Check if: * 1. zipped package is present in data dir * 2. files in zipped package matches files in epesi installation * to compare files crc32b is used which is present in stat info of zip file * @param int $module_id * @return boolean true if files has been modified from the downloaded module */ public static function is_module_modified($module_id) { $file = DB::GetOne('SELECT file FROM epesi_store_modules WHERE module_id=%s', array($module_id)); if (!$file) { return false; } $file = self::Instance()->get_data_dir() . $file; $zip = new ZipArchive(); if ($zip->open($file) !== true) { return false; } $ret = false; for ($i = 0; $i < $zip->numFiles; $i++) { $stat = $zip->statIndex($i); if (!self::crc_file_matches($stat['name'], $stat['crc'])) { $ret = true; break; } } $zip->close(); return $ret; }
public function paste() { $group = reset($this->group); if (DB::GetOne('SELECT 1 FROM utils_attachment_local WHERE attachment=%d AND local=%s', array($_SESSION['attachment_copy']['id'], $group))) { return; } if (isset($_SESSION['attachment_cut']) && $_SESSION['attachment_cut']) { $source_group = reset($_SESSION['attachment_copy']['group']); DB::Execute('UPDATE utils_attachment_local SET local=%s,func=%s,args=%s WHERE attachment=%d AND local=%s', array($group, serialize($this->func), serialize($this->args), $_SESSION['attachment_copy']['id'], $source_group)); Utils_AttachmentCommon::new_watchdog_event($group, '+', $_SESSION['attachment_copy']['id']); Utils_AttachmentCommon::new_watchdog_event($source_group, '-', $_SESSION['attachment_copy']['id']); unset($_SESSION['attachment_cut']); unset($_SESSION['attachment_copy']); } else { DB::Execute('INSERT INTO utils_attachment_local(local,attachment,func,args) VALUES(%s,%d,%s,%s)', array($group, $_SESSION['attachment_copy']['id'], serialize($this->func), serialize($this->args))); Utils_AttachmentCommon::new_watchdog_event($group, '+', $_SESSION['attachment_copy']['id']); } }
public function get_jump_to_id_button() { $jump_to_id = DB::GetOne('SELECT jump_to_id FROM recordbrowser_table_properties WHERE tab=%s', array($this->tab)); if (!$jump_to_id) { return ''; } $link = Module::create_href_js(Utils_RecordBrowserCommon::get_record_href_array($this->tab, '__ID__')); if (isset($_REQUEST['__jump_to_RB_record'])) Base_StatusBarCommon::message(__('Record not found'), 'warning'); $link = str_replace('__ID__', '\'+this.value+\'', $link); return ' <a '.Utils_TooltipCommon::open_tag_attrs(__('Jump to record by ID')).' href="javascript:void(0);" onclick="jump_to_record_id(\''.$this->tab.'\')"><img border="0" src="'.Base_ThemeCommon::get_template_file('Utils_RecordBrowser','jump_to.png').'"></a><input type="text" id="jump_to_record_input" style="display:none;width:50px;" onkeypress="if(event.keyCode==13)'.$link.'">'; }