예제 #1
0
        if ($F_RIGHT >= 30) {
            $aMenu[] = array("TEXT" => GetMessage("FORM_DELETE_RESULTS"), "TITLE" => GetMessage("FORM_DELETE_RESULTS_TITLE"), "ICON" => "btn_delete", "LINK" => "javascript:if(confirm('" . GetMessage("FORM_CONFIRM_DELETE_RESULTS") . "'))window.location='form_edit.php?ID=" . $ID . "&reset_id=" . $ID . "&" . bitrix_sessid_get() . "&lang=" . LANGUAGE_ID . "';");
        }
        if (CForm::IsAdmin()) {
            $aMenu[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("FORM_DELETE_TEXT"), "TITLE" => GetMessage("FORM_DELETE_TITLE"), "LINK" => "javascript:if(confirm('" . GetMessage("FORM_CONFIRM_DELETE") . "'))window.location='form_list.php?action=delete&ID=" . $ID . "&" . bitrix_sessid_get() . "&lang=" . LANGUAGE_ID . "';");
        }
    }
    if (count($aMenu) > 0) {
        $context = new CAdminContextMenu($aMenu);
        $context->Show();
    }
}
// (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1)
$FORM = new CFormOutput();
//initialize&check form
$FORM->Init(array("WEB_FORM_ID" => $ID), true);
if ($strError) {
    $aMsg = array();
    $arrErr = explode("<br>", $strError);
    reset($arrErr);
    while (list(, $err) = each($arrErr)) {
        $aMsg[]['text'] = $err;
    }
    $e = new CAdminException($aMsg);
    $GLOBALS["APPLICATION"]->ThrowException($e);
    $message = new CAdminMessage(GetMessage("FORM_ERROR_SAVE"), $e);
    echo $message->Show();
}
echo ShowNote($strNote);
if ($bEditTemplate) {
    ?>
예제 #2
0
	"EDIT_URL" => "result_edit.php",
	"CHAIN_ITEM_TEXT" => "Forms List",
	"CHAIN_ITEM_LINK" => "result_list.php?WEB_FORM_ID=".$_REQUEST["WEB_FORM_ID"]
));

Parameters:

$WEB_FORM_ID		- web-form ID
$LIST_URL			- page URL for redirecting user after "Save" button press (if empty, there is no redirecting)
$EDIT_URL			- page URL for redirecting user after "Apply" button press (if empty, there is no redirecting)
$CHAIN_ITEM_TEXT	- additional item name in the navigation chain (if empty, no item is added)
$CHAIN_ITEM_LINK	- additional item link in the navigation chain

***********************************************************************/
global $USER, $APPLICATION;
$APPLICATION->SetTemplateCSS("form/form.css");
if (CModule::IncludeModule("form")) {
    IncludeTemplateLangFile(__FILE__);
    // create form output class
    $FORM = new CFormOutput();
    //initialize&check form
    if ($FORM->Init($arParams)) {
        // output form
        $FORM->Out();
    } else {
        echo ShowError(GetMessage($FORM->ShowErrorMsg()));
    }
} else {
    echo ShowError(GetMessage("FORM_MODULE_NOT_INSTALLED"));
}
//endif (CModule::IncludeModule("form"));