Ejemplo n.º 1
0
		$aContext[] = 	array(
			"ICON" => "btn_delete",
			"TEXT"=>GetMessage("MAIN_ADMIN_MENU_DELETE"),
			"ONCLICK"	=> "javascript:if(confirm('".GetMessage("CONFIRM_DEL_MESSAGE")."'))window.location='trigger_events.php?action=delete&ID[]=".CUtil::JSEscape($ID)."&lang=".LANG."&".bitrix_sessid_get()."';",
		);
	}
}
$context = new CAdminContextMenu($aContext);
$context->Show();

//Defaults
$f_SORT = "10";

if (strlen($ID) > 0 && !$bVarsFromForm)
{
	$result = CFTriggerEvents::GetByID($ID);
	//echo "<Pre>";print_R($result);echo "</pre>";die;
	$f_NAME = $result["NAME"];
	$f_SORT = $result["SORT"] ;
	$f_EVENT_TYPE = $result["EVENT_TYPE"] ;
	$f_ADDITIONAL_PROPS = unserialize($result["ADDITIONAL_PROPS"]);
	$f_CONDITIONS = unserialize($result["CONDITIONS"]);
	$arDiscount['CONDITIONS'] = $result["CONDITIONS"];
	//echo "<pre>";print_r($f_CONDITIONS);echo "</pre>";
}

if(intval($_REQUEST["EVENT_TYPE"])){
	$EVENT_TYPE = $_REQUEST["EVENT_TYPE"];	
}elseif(intval($f_EVENT_TYPE)){
	$EVENT_TYPE = $f_EVENT_TYPE;
}elseif(!empty($arEventTypes) && intval(key($arEventTypes))){
Ejemplo n.º 2
0
# Bitrix: SiteManager                        #
# Copyright (c) 2002-2009 Bitrix             #
# http://www.bitrix.ru                       #
# mailto:admin@bitrix.ru                     #
##############################################
*/
define("STOP_STATISTICS", true);

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fevent/include.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fevent/prolog.php");

if(!($USER->CanDoOperation('view_subordinate_users') || $USER->CanDoOperation('view_all_users')))
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

$arEvent = CFTriggerEvents::GetByID($ID);
if($arEvent)
	$res = '[<a title="'.GetMessage("MAIN_EDIT_USER_PROFILE").'" class="tablebodylink" href="/bitrix/admin/event_edit.php?ID='.$arEvent["ID"].'&lang='.LANG.'">'.$arEvent["ID"].'</a>] ('.htmlspecialcharsbx($arEvent["NAME"]).')';
else
	$res = "&nbsp;".GetMessage("MAIN_NOT_FOUND");

require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_popup_admin.php");

$strName = preg_replace("/[^a-z0-9_\\[\\]:]/i", "", $_REQUEST["strName"]);
?>
<script type="text/javascript">
if(window.parent.document.getElementById("div_<?php 
echo $strName;
?>
"))
	window.parent.document.getElementById("div_<?php 
Ejemplo n.º 3
0
	function GetTrigger($trigger)
	{
		$arRes = CFTriggerEvents::GetByID($trigger);
		return $arRes;
	}