本文整理汇总了PHP中TimeDate::get_microtime_string方法的典型用法代码示例。如果您正苦于以下问题:PHP TimeDate::get_microtime_string方法的具体用法?PHP TimeDate::get_microtime_string怎么用?PHP TimeDate::get_microtime_string使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeDate
的用法示例。
在下文中一共展示了TimeDate::get_microtime_string方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processListRows
//.........这里部分代码省略.........
$fields = $aItem->get_list_view_data();
}
if (is_object($aItem)) {
// cn: bug 5349
//add item id to merge list, if the button is clicked
$mergeList[] = $aItem->id;
if (empty($module)) {
$module = $aItem->module_dir;
}
}
//ADD OFFSET TO ARRAY
$fields['OFFSET'] = $offset + $count + 1;
$fields['STAMP'] = $timeStamp;
if ($this->shouldProcess) {
$prerow = '';
if (!isset($this->data_array)) {
$prerow .= "<input onclick='sListView.check_item(this, document.MassUpdate)' type='checkbox' class='checkbox' name='mass[]' value='" . $fields['ID'] . "'>";
}
$this->xTemplate->assign('PREROW', $prerow);
$this->xTemplate->assign('CHECKALL', "<input type='checkbox' class='checkbox' name='massall' value='' onclick='sListView.check_all(document.MassUpdate, \"mass[]\", this.checked)'>");
}
if (!isset($this->data_array)) {
$tag = $aItem->listviewACLHelper();
$this->xTemplate->assign('TAG', $tag);
}
if ($oddRow) {
$ROW_COLOR = 'oddListRow';
$BG_COLOR = $odd_bg;
} else {
$ROW_COLOR = 'evenListRow';
$BG_COLOR = $even_bg;
}
$oddRow = !$oddRow;
$this->xTemplate->assign('ROW_COLOR', $ROW_COLOR);
$this->xTemplate->assign('BG_COLOR', $BG_COLOR);
if (isset($this->data_array)) {
$this->xTemplate->assign('KEY', $aVal);
$this->xTemplate->assign('VALUE', $aItem);
$this->xTemplate->assign('INDEX', $count);
} else {
//AED -- some modules do not have their additionalDetails.php established. Add a check to ensure require_once does not fail
// Bug #2786
if ($this->_additionalDetails && $aItem->ACLAccess('DetailView') && (file_exists('modules/' . $aItem->module_dir . '/metadata/additionalDetails.php') || file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'))) {
$additionalDetailsFile = 'modules/' . $aItem->module_dir . '/metadata/additionalDetails.php';
if (file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php')) {
$additionalDetailsFile = 'custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php';
}
require_once $additionalDetailsFile;
$ad_function = (empty($this->additionalDetailsFunction) ? 'additionalDetails' : $this->additionalDetailsFunction) . $aItem->object_name;
$results = $ad_function($fields);
$results['string'] = str_replace(array("'", "'"), '\\'', $results['string']);
// no xss!
if (trim($results['string']) == '') {
$results['string'] = $app_strings['LBL_NONE'];
}
$extra = " <img border='0' onmouseover=\"return overlib('" . str_replace(array("\rn", "\r", "\n"), array('', '', '<br />'), $results['string']) . "', CAPTION, '<div style=\\'float:left\\'>{$this->local_app_strings['LBL_ADDITIONAL_DETAILS']}</div><div style=\\'float: right\\'>";
if ($aItem->ACLAccess('EditView')) {
$extra .= !empty($results['editLink']) ? "<a title=\\'{$app_strings['LBL_EDIT_BUTTON']}\\' href={$results['editLink']}><img border=0 src={$this->local_image_path}edit_inline.gif></a>" : '';
}
$extra .= (!empty($results['viewLink']) ? "<a title=\\'{$app_strings['LBL_VIEW_BUTTON']}\\' href={$results['viewLink']}><img style=\\'margin-left: 2px;\\' border=0 src={$this->local_image_path}view_inline.gif></a>" : '') . "', DELAY, 200, STICKY, MOUSEOFF, 1000, WIDTH, " . (empty($results['width']) ? '300' : $results['width']) . ", CLOSETEXT, '<img border=0 style=\\'margin-left:2px; margin-right: 2px;\\' src={$this->local_image_path}close.gif></div>', " . "CLOSETITLE, '{$this->local_app_strings['LBL_ADDITIONAL_DETAILS_CLOSE_TITLE']}', CLOSECLICK, FGCLASS, 'olFgClass', " . "CGCLASS, 'olCgClass', BGCLASS, 'olBgClass', TEXTFONTCLASS, 'olFontClass', CAPTIONFONTCLASS, 'olCapFontClass', CLOSEFONTCLASS, 'olCloseFontClass');\" " . "onmouseout=\"return nd(1000);\" src='" . SugarThemeRegistry::current()->getImageURL('MoreDetail.png') . "' width=8 height=7>";
$fields[$results['fieldToAddTo']] = $extra . ' ' . $fields[$results['fieldToAddTo']] . '</a>';
}
$this->xTemplate->assign($html_varName, $fields);
$aItem->setupCustomFields($aItem->module_dir);
$aItem->custom_fields->populateAllXTPL($this->xTemplate, 'detail', $html_varName, $fields);
}
if (!isset($this->data_array) && $aItem->ACLAccess('DetailView')) {
$count++;
}
if (isset($this->data_array)) {
$count++;
}
if (!isset($this->data_array)) {
$aItem->list_view_parse_additional_sections($this->xTemplate, $xtemplateSection);
if ($this->xTemplate->exists($xtemplateSection . '.row.pro')) {
$this->xTemplate->parse($xtemplateSection . '.row.pro');
}
}
$this->xTemplate->parse($xtemplateSection . '.row');
if (isset($fields['ID'])) {
$associated_row_data[$fields['ID']] = $fields;
}
}
global $timedate;
if (empty($timedate)) {
$timedate = new TimeDate();
}
$microtime = $timedate->get_microtime_string();
$_SESSION['MAILMERGE_RECORDS'] = $mergeList;
$_SESSION['MAILMERGE_MODULE_FROM_LISTVIEW'] = $module;
if (empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') {
$_SESSION['MAILMERGE_MODULE'] = $module;
}
if ($this->process_for_popups) {
$json = getJSONobj();
$associated_javascript_data = '<script type="text/javascript">' . "\n" . 'var associated_javascript_data = ' . $json->encode($associated_row_data) . ";\n" . '</script>';
$this->xTemplate->assign('ASSOCIATED_JAVASCRIPT_DATA', $associated_javascript_data);
}
$this->xTemplate->parse($xtemplateSection);
}
示例2: processListRows
//.........这里部分代码省略.........
if (isset($this->data_array)) {
$fields = $this->data_array;
} else {
$aItem->check_date_relationships_load();
$fields = $aItem->get_list_view_data();
}
if (is_object($aItem)) {
// cn: bug 5349
//add item id to merge list, if the button is clicked
$mergeList[] = $aItem->id;
if (empty($module)) {
$module = $aItem->module_dir;
}
}
//ADD OFFSET TO ARRAY
$fields['OFFSET'] = $offset + $count + 1;
$fields['STAMP'] = $timeStamp;
if ($this->shouldProcess) {
$prerow = '';
if (!isset($this->data_array)) {
$prerow .= "<input onclick='sListView.check_item(this, document.MassUpdate)' type='checkbox' class='checkbox' name='mass[]' value='" . $fields['ID'] . "'>";
}
$this->xTemplate->assign('PREROW', $prerow);
$this->xTemplate->assign('CHECKALL', "<input type='checkbox' class='checkbox' name='massall' value='' onclick='sListView.check_all(document.MassUpdate, \"mass[]\", this.checked)'>");
}
if (!isset($this->data_array)) {
$tag = $aItem->listviewACLHelper();
$this->xTemplate->assign('TAG', $tag);
}
if ($oddRow) {
$ROW_COLOR = 'oddListRow';
$BG_COLOR = $odd_bg;
} else {
$ROW_COLOR = 'evenListRow';
$BG_COLOR = $even_bg;
}
$oddRow = !$oddRow;
$this->xTemplate->assign('ROW_COLOR', $ROW_COLOR);
$this->xTemplate->assign('BG_COLOR', $BG_COLOR);
if (isset($this->data_array)) {
$this->xTemplate->assign('KEY', $aVal);
$this->xTemplate->assign('VALUE', $aItem);
$this->xTemplate->assign('INDEX', $count);
} else {
//AED -- some modules do not have their additionalDetails.php established. Add a check to ensure require_once does not fail
// Bug #2786
if ($this->_additionalDetails && $aItem->ACLAccess('DetailView') && (file_exists('modules/' . $aItem->module_dir . '/metadata/additionalDetails.php') || file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php'))) {
$additionalDetailsFile = 'modules/' . $aItem->module_dir . '/metadata/additionalDetails.php';
if (file_exists('custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php')) {
$additionalDetailsFile = 'custom/modules/' . $aItem->module_dir . '/metadata/additionalDetails.php';
}
require_once $additionalDetailsFile;
$ad_function = (empty($this->additionalDetailsFunction) ? 'additionalDetails' : $this->additionalDetailsFunction) . $aItem->object_name;
$results = $ad_function($fields);
$results['string'] = str_replace(array("'", "'"), '\\'', $results['string']);
// no xss!
if (trim($results['string']) == '') {
$results['string'] = $app_strings['LBL_NONE'];
}
$fields[$results['fieldToAddTo']] = $fields[$results['fieldToAddTo']] . '</a>';
}
$this->xTemplate->assign($html_varName, $fields);
$aItem->setupCustomFields($aItem->module_dir);
$aItem->custom_fields->populateAllXTPL($this->xTemplate, 'detail', $html_varName, $fields);
}
if (!isset($this->data_array) && $aItem->ACLAccess('DetailView')) {
$count++;
}
if (isset($this->data_array)) {
$count++;
}
if (!isset($this->data_array)) {
$aItem->list_view_parse_additional_sections($this->xTemplate, $xtemplateSection);
if ($this->xTemplate->exists($xtemplateSection . '.row.pro')) {
$this->xTemplate->parse($xtemplateSection . '.row.pro');
}
}
$this->xTemplate->parse($xtemplateSection . '.row');
if (isset($fields['ID'])) {
$associated_row_data[$fields['ID']] = $fields;
}
}
global $timedate;
if (empty($timedate)) {
$timedate = new TimeDate();
}
$microtime = $timedate->get_microtime_string();
$_SESSION['MAILMERGE_RECORDS'] = $mergeList;
$_SESSION['MAILMERGE_MODULE_FROM_LISTVIEW'] = $module;
if (empty($_REQUEST['action']) || $_REQUEST['action'] != 'Popup') {
$_SESSION['MAILMERGE_MODULE'] = $module;
}
if ($this->process_for_popups) {
$json = getJSONobj();
$is_show_fullname = showFullName() ? 1 : 0;
$associated_javascript_data = '<script type="text/javascript">' . "\n" . 'var associated_javascript_data = ' . $json->encode($associated_row_data) . ";\n" . 'var is_show_fullname = ' . $is_show_fullname . ";\n" . '</script>';
$this->xTemplate->assign('ASSOCIATED_JAVASCRIPT_DATA', $associated_javascript_data);
}
$this->xTemplate->parse($xtemplateSection);
}