Esempio n. 1
0
		if (intval($arResult["arResultData"]["USER_ID"])>0)
		{
			$rsUser = CUser::GetByID($arResult["arResultData"]["USER_ID"]);
			$arUser = $rsUser->Fetch();

			$arResult["RESULT_USER_ID"] = $arResult["arResultData"]["USER_ID"];
			$arResult["RESULT_USER_LOGIN"] = $arUser["LOGIN"];
			$arResult["RESULT_USER_EMAIL"] = $arUser["USER_EMAIL"];
			$arResult["RESULT_USER_FIRST_NAME"] = $arUser["NAME"];
			$arResult["RESULT_USER_LAST_NAME"] = $arUser["LAST_NAME"];
			$arResult["RESULT_USER_SECOND_NAME"] = $arUser["SECOND_NAME"];
		}

		$arResult["isResultStatusChangeAccess"] = in_array("EDIT", $arResult["arrRESULT_PERMISSION"]) ? "Y" : "N";

		$arResult["RESULT_STATUS_FORM"] = $arResult["isResultStatusChangeAccess"] == "Y" ? SelectBox("status_".$arResult["WEB_FORM_NAME"], CFormStatus::GetDropdown($arParams["WEB_FORM_ID"], array("MOVE"), $arResult["RESULT_USER_ID"]), " ", "", "") : "";

		// define variables to assign
		$arResult = array_merge(
			$arResult,
			array(
				"RESULT_ID" => $arParams["RESULT_ID"],
				"WEB_FORM_ID" => $arParams["WEB_FORM_ID"],

				"RESULT_STATUS" => "<span class='".$arResult["arResultData"]["STATUS_CSS"]."'>".$arResult["arResultData"]["STATUS_TITLE"]."</span>",

				"RESULT_USER_AUTH" => $arResult["arResultData"]["USER_AUTH"] == "Y" ? "Y" : "N",

				"RESULT_DATE_CREATE" => $arResult["arResultData"]["DATE_CREATE"],
				"RESULT_TIMESTAMP_X" => $arResult["arResultData"]["TIMESTAMP_X"],
 public function ShowResultStatusForm()
 {
     if ($this->isResultStatusChangeAccess()) {
         return SelectBox("status_" . $this->arForm["SID"], CFormStatus::GetDropdown($this->WEB_FORM_ID, array("MOVE"), $this->arResult["USER_ID"]), " ", "", "");
     } else {
         return "";
     }
 }
Esempio n. 3
0
     if ($RESULT_ID > 0) {
         if (intval($arrResult["USER_ID"]) > 0) {
             $rsUser = CUser::GetByID($arrResult["USER_ID"]);
         }
     } else {
         $rsUser = CUser::GetByID($USER->GetID());
     }
 } else {
     $rsUser = CUser::GetByID($arrVALUES["USER_ID"]);
 }
 if (null != $rsUser) {
     $arUser = $rsUser->Fetch();
 }
 $RESULT_STATUS_FORM = '';
 if ($EDIT_STATUS == 'Y' && $bResultStatusChangeAccess) {
     $dbStatusList = CFormStatus::GetDropdown($WEB_FORM_ID, array("MOVE"), $arUser['ID']);
     if ($RESULT_ID > 0) {
         $RESULT_STATUS_FORM .= '<input type="radio" value="NOT_REF" id="status_' . $arForm['SID'] . '_NOT_REF" name="status_' . $arForm['SID'] . '" checked="checked" /><label for="status_' . $arForm['SID'] . '_NOT_REF">' . GetMessage('FORM_RESULT_EDIT_STATUS_DONTCHANGE') . '</label><br />';
         $i = 1;
     } else {
         $i = 0;
     }
     while ($arStatus = $dbStatusList->Fetch()) {
         $arStatus['REFERENCE'] = str_replace('[' . $arStatus['REFERENCE_ID'] . ']', '[<a href="/bitrix/admin/form_status_edit.php?lang=' . LANG . '&WEB_FORM_ID=' . $WEB_FORM_ID . '&ID=' . $arStatus['REFERENCE_ID'] . '">' . $arStatus['REFERENCE_ID'] . '</a>]', htmlspecialcharsEx($arStatus['REFERENCE']));
         $RESULT_STATUS_FORM .= '<input type="radio" value="' . $arStatus['REFERENCE_ID'] . '" id="status_' . $arForm['SID'] . '_' . $arStatus['REFERENCE_ID'] . '" name="status_' . $arForm['SID'] . '" ' . ($RESULT_ID <= 0 && $i++ == 0 ? 'checked="checked"' : '') . ' /><label for="status_' . $arForm['SID'] . '_' . $arStatus['REFERENCE_ID'] . '">' . $arStatus['REFERENCE'] . '</label><br />';
     }
 }
 // start form output
 echo ShowError($strError);
 $tabControl = new CAdminTabControl("tabControl", $arTabs);
 $tabControl->Begin();
Esempio n. 4
0
</td>
									<?php 
                    if (in_array("EDIT", $arrRESULT_PERMISSION) && $F_RIGHT >= 25) {
                        ?>
										<td><font class="smalltext"><?php 
                        echo GetMessage("FORM_CHANGE_TO");
                        ?>
</font></td>
										<td><input type="hidden" name="STATUS_PREV_<?php 
                        echo $GLOBALS["f_ID"];
                        ?>
" value="<?php 
                        echo $GLOBALS["f_STATUS_ID"];
                        ?>
"><?php 
                        echo SelectBox("STATUS_" . $GLOBALS["f_ID"], CFormStatus::GetDropdown($WEB_FORM_ID, array("MOVE"), $GLOBALS["f_USER_ID"]), " ", "", "class='inputselect'");
                        ?>
</td>
									<?php 
                    }
                    // endif (in_array("EDIT",$arrRESULT_PERMISSION) && $F_RIGHT>=25);
                    ?>
									</tr>
									<?php 
                }
                // endif ($SHOW_STATUS == "Y")
                ?>
								</table>
							</td>
						</tr>
						<?php 
Esempio n. 5
0
            }
        }
        reset($arResult["arrFORM_FILTER"]);
        foreach ($arResult["arrFORM_FILTER"] as $f_sid => $arrF) {
            foreach ($arrF as $key => $arr) {
                if (strlen($arrF["FILTER_TITLE"]) <= 0) {
                    $title = $arrF["TITLE_TYPE"] == "html" ? strip_tags($arrF["TITLE"]) : htmlspecialcharsbx($arrF["TITLE"]);
                    $arrResult["arrFORM_FILTER"][$f_sid][$key]["FILTER_TITLE"] = TruncateText($title, 100);
                } else {
                    $arrResult["arrFORM_FILTER"][$f_sid][$key]["FILTER_TITLE"] = htmlspecialcharsbx($arrF["FILTER_TITLE"]);
                }
            }
        }
        $arParams["by"] = htmlspecialcharsbx($arParams["by"]);
        $arParams["order"] = htmlspecialcharsbx($arParams["order"]);
        $arResult["res_counter"] = intval($arResult["res_counter"]);
        $arrPermissions = array("MOVE", "VIEW");
        foreach ($arrPermissions as $perm) {
            $rsStatuses = CFormStatus::GetDropdown($arParams["WEB_FORM_ID"], array($perm));
            $arResult["arStatuses_" . $perm] = array();
            while ($arStatus = $rsStatuses->Fetch()) {
                $arResult["arStatuses_" . $perm][] = array("REFERENCE_ID" => htmlspecialcharsbx($arStatus["REFERENCE_ID"]), "REFERENCE" => htmlspecialcharsbx($arStatus["REFERENCE"]));
            }
        }
        $this->IncludeComponentTemplate();
    } else {
        echo ShowError(GetMessage("FORM_INCORRECT_FORM_ID"));
    }
} else {
    echo ShowError(GetMessage("FORM_MODULE_NOT_INSTALLED"));
}
Esempio n. 6
0
 function GetStatusDropdown($WEB_FORM_ID, $PERMISSION = "MOVE", $OWNER_ID = 0)
 {
     return CFormStatus::GetDropdown($WEB_FORM_ID, $PERMISSION, $OWNER_ID);
 }
Esempio n. 7
0
</td>
	</tr>
	<?php 
        }
        ?>

	<?php 
        if (!$bSimple) {
            ?>
		<tr>
			<td><?php 
            echo GetMessage("FORM_F_STATUS");
            ?>
</td>
			<td><?php 
            echo SelectBox("find_status", CFormStatus::GetDropdown($WEB_FORM_ID, array("VIEW")), GetMessage("FORM_ALL"), htmlspecialcharsbx($find_status));
            ?>
</td>
		</tr>
		<tr>
			<td>
				<?php 
            echo GetMessage("FORM_F_STATUS_ID");
            ?>
</td>
			<td><?php 
            echo CForm::GetTextFilter("status_id");
            ?>
</td>
		</tr>
	<?php