$running_hours = $running_tmp->format('%h'); $running = ''; if ($running_days) { $running .= '<span>' . $running_days . '</span> ' . plural_form($running_days, get_plural_messages('ABTEST_DURATION_DAYS1_')); } if ($running_hours) { $running .= ' <span>' . $running_hours . '</span> ' . plural_form($running_hours, get_plural_messages('ABTEST_DURATION_HOURS_')); } else { if (!$running_days) { $running .= getMessage('ABTEST_DURATION_HOURS_0'); } } if ($abtest['DURATION']) { $running .= ' ' . getMessage('ABTEST_DURATION_OF') . ' <span>' . $abtest['DURATION'] . ' </span>'; if ($running_hours || !$running_days) { $running .= ' ' . plural_form($abtest['DURATION'], get_plural_messages('ABTEST_DURATION_DAYS2_')); } } ?> <span class="ab-test-info"><?php echo getMessage('ABTEST_DURATION2'); ?> : <?php echo $running; ?> </span> <?php } } ?>
<div class="stat-item-container item-test-info"> <div class="adm-input-wrap adm-input-help-icon-wrap"> <a class="adm-input-help-icon" href="#math-hint"></a> </div> <span class="ab-test-info" style="padding: 0px; color: <?php echo $math['pwr'] ? '#729e00' : '#c70000'; ?> ; font-weight: bold; "> • <?php echo getMessage($math['pwr'] ? 'ABTEST_MATH_POWER_YES' : 'ABTEST_MATH_POWER_NO'); ?> <?php if (!$math['pwr'] && $estDays) { ?> (<?php echo str_replace(array('#NUM#', '#UNIT#'), array($estDays, plural_form($estDays, get_plural_messages('ABTEST_DURATION_DAYS1_'))), getMessage('ABTEST_DURATION_EST')); ?> ) <?php } ?> </span> <sup>1</sup><br> <span class="ab-test-info" style="padding: 0px; color: <?php echo $math['sgn'] ? '#729e00' : '#c70000'; ?> ; font-weight: bold; "> • <?php echo getMessage($math['sgn'] ? 'ABTEST_MATH_SIGNIFICANCE_YES' : 'ABTEST_MATH_SIGNIFICANCE_NO'); ?> </span> <sup>2</sup> </div>
} $user_name = CUser::formatName(CSite::getNameFormat(), array('TITLE' => $abtest['USER_TITLE'], 'NAME' => $abtest['USER_NAME'], 'SECOND_NAME' => $abtest['USER_SECOND_NAME'], 'LAST_NAME' => $abtest['USER_LAST_NAME'], 'LOGIN' => $abtest['USER_LOGIN']), true, true); $status = '<table style="width: 100%; border-spacing: 0px; "><tr>'; $status .= '<td style="width: 1px; padding: 0px; vertical-align: top; "><img src="/bitrix/images/abtest/ab-test-on.gif"></td>'; $status .= '<td style="padding: 0px 10px; vertical-align: top; ">'; $status .= '<span style="white-space: nowrap; color: #729e00; font-weight: bold; ">' . getMessage('ABTEST_STATE_STARTED') . '</span><br>'; $status .= '<span style="white-space: nowrap; ">' . getMessage('ABTEST_START_DATE') . ': ' . $start_date . ' / ' . getMessage('ABTEST_DURATION') . ': ' . $running . '</span><br>'; $status .= '<span style="white-space: nowrap; ">' . getMessage('ABTEST_STARTED_BY') . ': <a href="/bitrix/admin/user_edit.php?ID=' . $abtest['USER_ID'] . '&lang=' . LANG . '">' . $user_name . '</a></span>'; $status .= '</td>'; if ($isAdmin) { $status .= '<td style="width: 1px; padding: 0px; vertical-align: top; "><span class="adm-btn" onclick="if (confirm(\'' . CUtil::JSEscape(getMessage('ABTEST_STOP_CONFIRM')) . '\')) ' . $lAdmin->actionDoGroup($abtest['ID'], 'stop') . '">' . getMessage('ABTEST_BTN_STOP') . '</span></td>'; } $status .= '</tr></table>'; } else { $stop_date = $abtest['STOP_DATE'] ? $abtest['STOP_DATE']->format(Bitrix\Main\Type\Date::convertFormatToPhp($arLang['FORMAT_DATE'])) : false; $duration = $abtest['DURATION'] ? $abtest['DURATION'] . ' ' . plural_form($abtest['DURATION'], get_plural_messages('ABTEST_DURATION_DAYS1_')) : false; $user_name = $abtest['USER_ID'] ? CUser::formatName(CSite::getNameFormat(), array('TITLE' => $abtest['USER_TITLE'], 'NAME' => $abtest['USER_NAME'], 'SECOND_NAME' => $abtest['USER_SECOND_NAME'], 'LAST_NAME' => $abtest['USER_LAST_NAME'], 'LOGIN' => $abtest['USER_LOGIN']), true, true) : false; $status = '<table style="width: 100%; border-spacing: 0px; "><tr>'; $status .= '<td style="width: 1px; padding: 0px; vertical-align: top; "><img src="/bitrix/images/abtest/ab-test-off.gif"></td>'; $status .= '<td style="padding: 0px 10px; vertical-align: top; ">'; $status .= '<span style="white-space: nowrap; font-weight: bold; ">' . getMessage('ABTEST_STATE_STOPPED') . '</span><br>'; if ($stop_date || $duration) { $status .= '<span style="white-space: nowrap; ">' . ($stop_date ? getMessage('ABTEST_STOP_DATE') . ': ' . $stop_date : '') . ($stop_date && $duration ? ' / ' : '') . ($duration ? getMessage('ABTEST_DURATION') . ': ' . $duration : '') . '</span><br>'; } if ($user_name) { $status .= '<span style="white-space: nowrap; ">' . getMessage('ABTEST_STOPPED_BY') . ': <a href="/bitrix/admin/user_edit.php?ID=' . $abtest['USER_ID'] . '&lang=' . LANG . '">' . $user_name . '</a></span>'; } $status .= '</td>'; if ($isAdmin) { if ($abtest['ENABLED'] == 'T') { $action = $lAdmin->actionRedirect('abtest_edit.php?ID=' . $abtest['ID'] . '&lang=' . LANG);