var fId = BX('task-new-item-deadline'); BX.removeClass(fId.parentNode.parentNode, 'webform-field-textbox-empty'); } }); " /> </td> <td class="task-new-item-responsible"><label for="task-new-item-responsible"><?php echo GetMessage("TASKS_RESPONSIBLE"); ?> </label><input type="text" id="task-new-item-responsible" class="task-new-item-textbox" value="<?php echo tasksFormatName($userName, $userLastName, $userLogin, $userSecondName, $arParams["NAME_TEMPLATE"]); ?> " /><input type="hidden" name="task-new-item-responsible-hidden" id="task-new-item-responsible-hidden" value="<?php echo $arParams["USER_ID"]; ?> " /></td> </tr> </table> </form> </td> </tr> <?php
} $res["AUTHOR_PHOTO"] = $arAvatars[$res["AUTHOR_ID"]]; /************** Author info/*************************************** */ // For quote JS $res["FOR_JS"]["AUTHOR_NAME"] = Cutil::JSEscape($res["AUTHOR_NAME"]); $res["FOR_JS"]["POST_MESSAGE_TEXT"] = Cutil::JSEscape(htmlspecialcharsbx($res["POST_MESSAGE_TEXT"])); $res["FOR_JS"]["POST_MESSAGE"] = Cutil::JSEscape(htmlspecialcharsbx($res["~POST_MESSAGE"])); // Forum store name of author permamently // When name of author changes => in comments we see old name // So, we just get dynamically name on every request (except cache) $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY'] = false; $rc = CUser::GetByID($res['AUTHOR_ID']); if ($arDynName = $rc->Fetch()) { $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY'] = array('LOGIN' => $arDynName['LOGIN'], 'NAME' => $arDynName['NAME'], 'SECOND_NAME' => $arDynName['SECOND_NAME'], 'LAST_NAME' => $arDynName['LAST_NAME']); } $res["FOR_JS"]["AUTHOR_DYNAMIC_NAME"] = Cutil::JSEscape(tasksFormatName($res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['NAME'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['LAST_NAME'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['LOGIN'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['SECOND_NAME'], $arParams['NAME_TEMPLATE'], true)); $arMessages[$res["ID"]] = $res; } } /* * ************ Attach files ************************************** */ if (!empty($arMessages)) { $res = array_keys($arMessages); $arFilter = array("FORUM_ID" => $arParams["FORUM_ID"], "TOPIC_ID" => $arResult["FORUM_TOPIC_ID"], "APPROVED" => "Y", ">MESSAGE_ID" => intVal(min($res)) - 1, "<MESSAGE_ID" => intVal(max($res)) + 1); $db_files = CForumFiles::GetList(array("MESSAGE_ID" => "ASC"), $arFilter); if ($db_files && ($res = $db_files->Fetch())) { do { $res["SRC"] = CFile::GetFileSRC($res); if ($arMessages[$res["MESSAGE_ID"]]["~ATTACH_IMG"] == $res["FILE_ID"]) { // attach for custom $arMessages[$res["MESSAGE_ID"]]["~ATTACH_FILE"] = $res; $arMessages[$res["MESSAGE_ID"]]["ATTACH_IMG"] = CFile::ShowFile($res["FILE_ID"], 0, $arParams["IMAGE_SIZE"], $arParams["IMAGE_SIZE"], true, "border=0", false);
<div class="task-detail-info-users-list" id="task-detail-auditors"> <?php if ($arResult["TASK"]["AUDITORS"]) { $rsAuditors = CUser::GetList($b = "LOGIN", $o = "ASC", array("ID" => implode("|", $arResult["TASK"]["AUDITORS"]))); while ($arAuditor = $rsAuditors->GetNext()) { $htmlId = ' id="task-detail-info-user-auditor-' . (int) $arAuditor['ID'] . '-container" '; ?> <div class="task-detail-info-user" <?php echo $htmlId; ?> > <div class="task-detail-info-user-name"><a href="<?php echo CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_PROFILE"], array("user_id" => $arAuditor["ID"])); ?> "><?php echo tasksFormatName($arAuditor["NAME"], $arAuditor["LAST_NAME"], $arAuditor["LOGIN"], $arAuditor["SECOND_NAME"], $arParams["NAME_TEMPLATE"], false); ?> </a></div> <?php if ($arAuditor["WORK_POSITION"]) { ?> <div class="task-detail-info-user-position"><?php echo $arAuditor["WORK_POSITION"]; } else { ?> <div class="task-detail-info-user-position-empty"><?php } ?> </div> </div> <?php
') no-repeat center center;"<?php } ?> ></div> <?php if (intval($res["AUTHOR_ID"]) > 0 && !empty($res["AUTHOR_URL"])) { ?> <a class="task-comments-author" href="<?php echo $res["AUTHOR_URL"]; ?> "><?php echo tasksFormatName($res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['NAME'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['LAST_NAME'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['LOGIN'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['SECOND_NAME'], $arParams['NAME_TEMPLATE'], true); ?> </a><?php } else { echo tasksFormatName($res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['NAME'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['LAST_NAME'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['LOGIN'], $res['AUTHOR_DYNAMIC_NAME_AS_ARRAY']['SECOND_NAME'], $arParams['NAME_TEMPLATE'], true); } ?> <span class="task-comments-date"><?php echo $res["POST_DATE"]; ?> </span> <?php if ($arParams["SHOW_RATING"] == "Y") { ?> <div class="task-comments-rating rating_vote_graphic"> <?php $arRatingParams = array("ENTITY_TYPE_ID" => "FORUM_POST", "ENTITY_ID" => $res["ID"], "OWNER_ID" => $res["AUTHOR_ID"], "PATH_TO_USER_PROFILE" => strlen($arParams["PATH_TO_USER"]) > 0 ? $arParams["PATH_TO_USER"] : $arParams["~URL_TEMPLATES_PROFILE_VIEW"]); if (!isset($res['RATING'])) { $res['RATING'] = array("USER_VOTE" => 0, "USER_HAS_VOTED" => 'N', "TOTAL_VOTES" => 0, "TOTAL_POSITIVE_VOTES" => 0, "TOTAL_NEGATIVE_VOTES" => 0, "TOTAL_VALUE" => 0); }