.

: 04.11.2014 15:35:12 | : 13.11.2016 14:43:24 | : 6298

, , , . .

, , , . : «»– ໠ . , , : , .

1.jpg

, , , .

+ . . . : GUESTBOOK_FORM. [ru] Russian. : . : #TEXT# - . , . [en] English. : Sending a message using a guestbook form. : #TEXT# - text. .

2.jpg

. + . . . . [GUESTBOOK_FORM]. : #SITE_NAME#. : #DEFAULT_EMAIL_FROM#. : #SITE_NAME#: . HTML. :

<strong> .</strong>
:
<hr />
#TEXT#
<hr />

3.jpg

, (##). #DEFAULT_EMAIL_FROM#. , , . , , : 軠 . , . E-Mail .

4.jpg

. FTP.

, , , . OnAfterIBlockElementAdd.

, FTP- . , . , : _/guest/index.php. , :

<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle(" ");
?>

:

<?
//         
AddEventHandler("iblock", "OnAfterIBlockElementAdd", Array("CGuestbook", "OnAfterIBlockElementAddHandler"));

class CGuestbook
{
    //    "OnAfterIBlockElementAdd"
    function OnAfterIBlockElementAddHandler(&$arFields)
    {
        if($arFields["IBLOCK_ID"] == 3) {
			$text = "";
			$db_props = CIBlockElement::GetProperty(3, $arFields["ID"], array("sort" => "asc"), Array("CODE"=>"TEXT"));
			if($ar_props = $db_props->Fetch()) {
				$text = $ar_props["VALUE"];
			}
			$arEventFields = array(
				"TEXT" => $text,
			);
			CEvent::Send("GUESTBOOK_FORM", SITE_ID, $arEventFields);
		}	
    }
}
?>