当前位置: 首页>>代码示例>>PHP>>正文


PHP CUtil::addslashes方法代码示例

本文整理汇总了PHP中CUtil::addslashes方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtil::addslashes方法的具体用法?PHP CUtil::addslashes怎么用?PHP CUtil::addslashes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUtil的用法示例。


在下文中一共展示了CUtil::addslashes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __CrmFieldMultiEditRenderItem

    function __CrmFieldMultiEditRenderItem($item, $mnemonic, $typeID, $referenceData, $editorID)
    {
        $itemID = isset($item['ID']) ? $item['ID'] : '';
        $itemVal = isset($item['VALUE']) ? $item['VALUE'] : '';
        ?>
<div class="bx-crm-edit-fm-item">
		<input type="text" class="bx-crm-edit-input" name="<?php 
        echo htmlspecialcharsbx($mnemonic);
        ?>
[<?php 
        echo htmlspecialcharsbx($typeID);
        ?>
][<?php 
        echo htmlspecialcharsbx($itemID);
        ?>
][VALUE]" value="<?php 
        echo htmlspecialcharsbx($itemVal);
        ?>
"><?php 
        echo SelectBoxFromArray(CUtil::JSEscape($mnemonic) . '[' . htmlspecialcharsbx($typeID) . '][' . htmlspecialcharsbx($itemID) . '][VALUE_TYPE]', $referenceData, isset($item['VALUE_TYPE']) ? $item['VALUE_TYPE'] : '', '', "class='bx-crm-edit-input bx-crm-edit-input-small'");
        ?>
<div class="delete-action" onclick="BX.CrmFieldMultiEditor.items['<?php 
        echo CUtil::addslashes($editorID);
        ?>
'].deleteItem('<?php 
        echo CUtil::addslashes($itemID);
        ?>
');" title="<?php 
        echo GetMessage('CRM_STATUS_LIST_DELETE');
        ?>
"></div>
		</div><?php 
    }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:33,代码来源:template.php

示例2: PageParams

function PageParams($bUrlEncode = true)
{
	$amp = $bUrlEncode ? '&amp;' : '&';
	return
		'component_name='.urlencode(CUtil::addslashes($_GET["component_name"])).
		$amp.'component_template='.urlencode(CUtil::addslashes($_GET["component_template"])).
		$amp.'template_id='.urlencode(CUtil::addslashes($_GET["template_id"])).
		$amp.'lang='.urlencode(CUtil::addslashes(LANGUAGE_ID)).
		$amp.'src_path='.urlencode(CUtil::addslashes($_GET["src_path"])).
		$amp.'src_line='.intval($_GET["src_line"]).
		$amp.'src_page='.urlencode(CUtil::addslashes($_GET["src_page"])).
		$amp.'src_site='.urlencode(CUtil::addslashes($_GET["src_site"]));
}
开发者ID:nProfessor,项目名称:Mytb,代码行数:13,代码来源:component_props2.php

示例3: intVal

	if (<?php 
echo intVal($GLOBALS["USER"]->GetId());
?>
 > 0)
	{
		var TID = CPHttpRequest.InitThread();
		CPHttpRequest.SetAction(TID, function(data){window.location.reload(true);})
		CPHttpRequest.Send(TID, '/bitrix/components/bitrix/photogallery.detail.list/user_settings.php', {"picture_sight":obj.value, "sessid":'<?php 
echo bitrix_sessid();
?>
'});
	}
	else
	{
		jsUtils.Redirect([], '<?php 
echo CUtil::addslashes($GLOBALS["APPLICATION"]->GetCurPageParam("PICTURES_SIGHT=#pictures_sight#", array("PICTURES_SIGHT", "sessid"), false));
?>
'.replace('#pictures_sight#', obj.value));
	}
}
function HideDescription(id)
{
	if (document.getElementById('item_' + id))
		document.getElementById('item_' + id).style.display = 'none';
}
function ShowDescription(id)
{
	if (document.getElementById('item_' + id))
		document.getElementById('item_' + id).style.display = 'block';
}
function SelectAll(oObj)
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例4: GetMessage

            ?>
</td>
				</tr>
<?php 
        }
        ?>
			</table>
		</div>
<?php 
    }
}
if (substr($_REQUEST['backurl'], 0, 1) != "/") {
    $_REQUEST['backurl'] = "/" . $_REQUEST['backurl'];
}
?>
	</div>
	<div class="bx-sonet-profile-edit-buttons">
		<input type="submit" name="submit" value="<?php 
echo GetMessage('SOCNET_SUPE_TPL_SUBMIT');
?>
" />
		<input type="button" name="cancel" value="<?php 
echo GetMessage('SOCNET_SUPE_TPL_CANCEL');
?>
" onclick="location.href = '<?php 
echo htmlspecialcharsbx(CUtil::addslashes($_REQUEST['backurl'] ? $_REQUEST['backurl'] : CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arParams["ID"]))));
?>
'" />
	</div>
</div>
</form>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例5: GetMessage

		<td><?echo GetMessage("user_sett_common_set")?></td>
		<td><input type="checkbox" name="default" value="Y"></td>
	</tr>
<?endif;?>
<?
$tabControl->BeginNextTab();
?>
	<tr>
		<td colspan="2"><a href="javascript:if(confirm('<?echo CUtil::addslashes(GetMessage("user_sett_del_pers_conf"))?>'))window.location='user_settings.php?action=clear&lang=<?echo LANG?>&<?echo freetrix_sessid_get()?>&tabControl_active_tab=edit2';"><?echo GetMessage("user_sett_del_pers1")?></a></td>
	</tr>
<?if($USER->CanDoOperation('edit_other_settings')):?>
	<tr>
		<td colspan="2"><a href="javascript:if(confirm('<?echo CUtil::addslashes(GetMessage("user_sett_del_common_conf"))?>'))window.location='user_settings.php?action=clear_all&lang=<?echo LANG?>&<?echo freetrix_sessid_get()?>&tabControl_active_tab=edit2';"><?echo GetMessage("user_sett_del_common1")?></a></td>
	</tr>
	<tr>
		<td colspan="2"><a href="javascript:if(confirm('<?echo CUtil::addslashes(GetMessage("user_sett_del_user_conf"))?>'))window.location='user_settings.php?action=clear_all_user&lang=<?echo LANG?>&<?echo freetrix_sessid_get()?>&tabControl_active_tab=edit2';"><?echo GetMessage("user_sett_del_user1")?></a></td>
	</tr>
<?endif;?>

<?
$tabControl->Buttons();
?>
<input<?if(!$editable) echo " disabled"?> type="submit" name="apply" value="<?echo GetMessage("admin_lib_edit_apply")?>" title="<?echo GetMessage("admin_lib_edit_apply_title")?>" class="adm-btn-save">
<?
$tabControl->End();
$tabControl->ShowWarnings("form1", $message);
?>
</form>

<?
require_once ($_SERVER["DOCUMENT_ROOT"].FX_ROOT."/modules/main/include/epilog_admin.php");
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:user_settings.php

示例6: is_array

    die;
}
//************************* Input params***************************************************************
//************************* BASE **********************************************************************
$arParams["FILE"] = is_array($arParams["FILE"]) ? $arParams["FILE"] : intVal($arParams["FILE"]);
//************************* ADDITIONAL ****************************************************************
$arParams["SHOW_MODE"] = in_array($arParams["SHOW_MODE"], array("LINK", "THUMB", "FULL", "RSS")) ? $arParams["SHOW_MODE"] : "FULL";
$arParams["MAX_FILE_SIZE"] = intVal($arParams["MAX_FILE_SIZE"] > 0 ? $arParams["MAX_FILE_SIZE"] : 100) * 1024 * 1024;
//$arParams["SIZE"] user data in img tag <img width=... height=...>
if (!is_array($arParams["MAX_SIZE"])) {
    $arParams["MAX_SIZE"] = ($arParams["WIDTH"] > 0 ? array("width" => $arParams["WIDTH"]) : array()) + ($arParams["HEIGHT"] > 0 ? array("height" => $arParams["HEIGHT"]) : array());
}
//$arParams["HTML_SIZE"] html resize for image. This is helpful for disk space economy.
$arParams["CONVERT"] = $arParams["CONVERT"] == "N" ? "N" : "Y";
$arParams["FAMILY"] = trim($arParams["FAMILY"]);
$arParams["FAMILY"] = CUtil::addslashes(empty($arParams["FAMILY"]) ? "FORUM" : $arParams["FAMILY"]);
$arParams["RETURN"] = $arParams["RETURN"] == "Y" || $arParams["RETURN"] == "ARRAY" ? $arParams["RETURN"] : "N";
//$arParams["SHOW_LINK"] = ($arParams["SHOW_LINK"] == "Y" ? "Y" : "N");
$arParams["ADDITIONAL_URL"] = htmlspecialcharsEx(trim($arParams["ADDITIONAL_URL"]));
$arParams["SERVER_NAME"] = defined("SITE_SERVER_NAME") && strLen(SITE_SERVER_NAME) > 0 ? SITE_SERVER_NAME : COption::GetOptionString("main", "server_name");
$arParams["NAME_TEMPLATE"] = str_replace(array("#NOBR#", "#/NOBR#"), "", !!$arParams["NAME_TEMPLATE"] ? $arParams["NAME_TEMPLATE"] : CSite::GetDefaultNameFormat());
// *************************/Input params***************************************************************
// ************************* Default params*************************************************************
$arResult["FILE"] = $arParams["FILE"];
if (!is_array($arParams["FILE"]) && intVal($arParams["FILE"]) > 0) {
    $arResult["FILE"] = CFile::GetFileArray($arParams["FILE"]);
}
$arResult["FILE"]["~SRC"] = $arResult["FILE"]["SRC"];
if (intVal($arResult["FILE"]["ID"]) > 0) {
    $arResult["FILE"]["SRC"] = "/bitrix/components/bitrix/forum.interface/show_file.php?fid=" . htmlspecialcharsbx($arResult["FILE"]["ID"]) . (!empty($arParams["ADDITIONAL_URL"]) ? "&" . $arParams["ADDITIONAL_URL"] : "");
}
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例7: GetMessage

echo GetMessage("MAIN_OPT_SAVE_TITLE");
?>
">
<?endif?>
	<input type="submit" name="Apply" value="<?php 
echo GetMessage("MAIN_OPT_APPLY");
?>
" title="<?php 
echo GetMessage("MAIN_OPT_APPLY_TITLE");
?>
">
<?if($_REQUEST["back_url_settings"] <> ''):?>
	<input type="button" name="Cancel" value="<?php 
echo GetMessage("MAIN_OPT_CANCEL");
?>
" title="<?php 
echo GetMessage("MAIN_OPT_CANCEL_TITLE");
?>
" onclick="window.location='<?echo htmlspecialcharsbx(CUtil::addslashes($_REQUEST["back_url_settings"]))?>'">
	<input type="hidden" name="back_url_settings" value="<?php 
echo htmlspecialcharsbx($_REQUEST["back_url_settings"]);
?>
">
<?endif?>
	<input type="submit" name="RestoreDefaults" title="<?echo GetMessage("MAIN_HINT_RESTORE_DEFAULTS")?>" onclick="return confirm('<?echo AddSlashes(GetMessage("MAIN_HINT_RESTORE_DEFAULTS_WARNING"))?>')" value="<?echo GetMessage("MAIN_RESTORE_DEFAULTS")?>">
	<?php 
echo bitrix_sessid_post();
?>
<?$tabControl->End();?>
</form>
开发者ID:nProfessor,项目名称:Mytb,代码行数:30,代码来源:options.php

示例8: GetPanelHtml

    function GetPanelHtml()
    {
        global $USER, $APPLICATION, $adminPage;
        if ($APPLICATION->ShowPanel === false || !$USER->IsAuthorized() && $APPLICATION->ShowPanel !== true) {
            return "";
        }
        CTopPanel::InitPanelIcons();
        $arPanelButtons =& $APPLICATION->arPanelButtons;
        $bShowPanel = false;
        foreach ($arPanelButtons as $arValue) {
            if (trim($arValue["HREF"]) != "" || is_array($arValue["MENU"]) && !empty($arValue["MENU"])) {
                //we have at least one button to show
                $bShowPanel = true;
                break;
            }
        }
        if ($bShowPanel == false) {
            $bShowPanel = self::IsShownForUser();
        }
        if ($bShowPanel == false && $APPLICATION->ShowPanel !== true) {
            return "";
        }
        $APPLICATION->PanelShowed = true;
        if (isset($_GET["back_url_admin"]) && $_GET["back_url_admin"] != "" && strpos($_GET["back_url_admin"], "/") === 0) {
            $_SESSION["BACK_URL_ADMIN"] = $_GET["back_url_admin"];
        }
        $aUserOpt = CUserOptions::GetOption("admin_panel", "settings");
        $aUserOptGlobal = CUserOptions::GetOption("global", "settings");
        $toggleModeSet = false;
        if (isset($_GET["freetrix_include_areas"]) && $_GET["freetrix_include_areas"] != "") {
            $APPLICATION->SetShowIncludeAreas($_GET["freetrix_include_areas"] == "Y");
            $toggleModeSet = true;
        }
        $params = DeleteParam(array("freetrix_include_areas", "freetrix_show_mode", "back_url_admin"));
        $href = $APPLICATION->GetCurPage();
        $hrefEnc = htmlspecialcharsbx($href);
        $toggleModeDynamic = $aUserOptGlobal['panel_dynamic_mode'] == 'Y';
        $toggleMode = $toggleModeDynamic && !$toggleModeSet ? $aUserOpt['edit'] == 'on' : $APPLICATION->GetShowIncludeAreas() == 'Y';
        //Save if changed
        $old_edit = $aUserOpt['edit'];
        $aUserOpt['edit'] = $toggleMode ? 'on' : 'off';
        if ($old_edit !== $aUserOpt['edit']) {
            CUserOptions::SetOption('admin_panel', 'settings', $aUserOpt);
        }
        $toggleModeLink = $hrefEnc . '?freetrix_include_areas=' . ($toggleMode ? 'N' : 'Y') . ($params != "" ? "&amp;" . htmlspecialcharsbx($params) : "");
        $result = CTopPanel::ShowPanelScripts(true);
        $result .= '
	<!--[if lte IE 7]>
	<style type="text/css">#bx-panel {display:none !important;}</style>
	<div id="bx-panel-error">' . GetMessage("top_panel_browser") . '</div><![endif]-->
	<script type="text/javascript">BX.admin.dynamic_mode=' . ($toggleModeDynamic ? 'true' : 'false') . '; BX.admin.dynamic_mode_show_borders = ' . ($toggleMode ? 'true' : 'false') . ';</script>
	<div style="display:none; overflow:hidden;" id="bx-panel-back"></div>
	<div id="bx-panel"' . ($aUserOpt["collapsed"] == "on" ? ' class="bx-panel-folded"' : '') . '>
		<div id="bx-panel-top">
			<div id="bx-panel-top-gutter"></div>
			<div id="bx-panel-tabs">
	';
        $result .= '
				<a id="bx-panel-menu" href="" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_start_menu_tooltip_title'), GetMessage('top_panel_start_menu_tooltip')) . '><span id="bx-panel-menu-icon"></span><span id="bx-panel-menu-text">' . GetMessage("top_panel_menu") . '</span></a><a id="bx-panel-view-tab"><span>' . GetMessage("top_panel_site") . '</span></a><a id="bx-panel-admin-tab" href="' . (isset($_SESSION["BACK_URL_ADMIN"]) && $_SESSION["BACK_URL_ADMIN"] != "" ? htmlspecialcharsbx($_SESSION["BACK_URL_ADMIN"]) . (strpos($_SESSION["BACK_URL_ADMIN"], "?") !== false ? "&amp;" : "?") : '/freetrix/admin/index.php?lang=' . LANGUAGE_ID . '&amp;') . 'back_url_pub=' . urlencode($href . ($params != "" ? "?" . $params : "")) . '"><span>' . GetMessage("top_panel_admin") . '</span></a>';
        $back_url = CUtil::JSUrlEscape(CUtil::addslashes($href . ($params != "" ? "?" . $params : "")));
        $arStartMenuParams = array('DIV' => 'bx-panel-menu', 'ACTIVE_CLASS' => 'bx-pressed', 'MENU_URL' => '/freetrix/admin/get_start_menu.php?lang=' . LANGUAGE_ID . '&back_url_pub=' . urlencode($back_url) . '&' . freetrix_sessid_get(), 'MENU_PRELOAD' => $aUserOptGlobal["start_menu_preload"] == 'Y');
        $result .= '<script type="text/javascript">BX.message({MENU_ENABLE_TOOLTIP: ' . ($aUserOptGlobal['start_menu_title'] != 'N' ? 'true' : 'false') . '}); new BX.COpener(' . CUtil::PhpToJsObject($arStartMenuParams) . ');</script>';
        $hkInstance = CHotKeys::getInstance();
        $Execs = $hkInstance->GetCodeByClassName("top_panel_menu", GetMessage("top_panel_menu"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("top_panel_admin", GetMessage("top_panel_admin"));
        $result .= $hkInstance->PrintJSExecs($Execs);
        if ($USER->CanDoOperation("cache_control")) {
            $result .= '<a id="bx-panel-clear-cache" href="" onclick="BX.clearCache(); return false;"><span id="bx-panel-clear-cache-icon"></span><span id="bx-panel-clear-cache-text">' . GetMessage("top_panel_cache_new_tooltip_title") . '</span></a>';
        }
        $result .= '
			</div>
			<div id="bx-panel-userinfo">
	';
        $bCanProfile = $USER->CanDoOperation('view_own_profile') || $USER->CanDoOperation('edit_own_profile');
        $userName = CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $USER->GetFirstName(), "LAST_NAME" => $USER->GetLastName(), "SECOND_NAME" => $USER->GetSecondName(), "LOGIN" => $USER->GetLogin()), $bUseLogin = true, $bHTMLSpec = true);
        if ($bCanProfile) {
            $result .= '<a href="/freetrix/admin/user_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $USER->GetID() . '" id="bx-panel-user" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_profile_tooltip')) . '><span id="bx-panel-user-icon"></span><span id="bx-panel-user-text">' . $userName . '</span></a>';
        } else {
            $result .= '<a id="bx-panel-user"><span id="bx-panel-user-icon"></span><span id="bx-panel-user-text">' . $userName . '</span></a>';
        }
        $result .= '<a href="' . $hrefEnc . '?logout=yes' . htmlspecialcharsbx(($s = DeleteParam(array("logout"))) == "" ? "" : "&" . $s) . '" id="bx-panel-logout" ' . CTopPanel::AddAttrHint(GetMessage('top_panel_logout_tooltip') . $hkInstance->GetTitle("bx-panel-logout", true)) . '>' . GetMessage("top_panel_logout") . '</a>';
        $toggleCaptionOn = '<span id="bx-panel-toggle-caption-mode-on">' . GetMessage("top_panel_on") . '</span>';
        $toggleCaptionOff = '<span id="bx-panel-toggle-caption-mode-off">' . GetMessage("top_panel_off") . '</span>';
        $toggleCaptions = $toggleMode ? $toggleCaptionOn . $toggleCaptionOff : $toggleCaptionOff . $toggleCaptionOn;
        $toogle = '<a href="' . $toggleModeLink . '" id="bx-panel-toggle" class="bx-panel-toggle' . ($toggleMode ? '-on' : '-off') . '"' . ($toggleModeDynamic ? '' : ' ' . CTopPanel::AddAttrHint(GetMessage("top_panel_edit_mode_new_tooltip_title"), GetMessage('top_panel_toggle_tooltip') . $hkInstance->GetTitle("bx-panel-small-toggle", true))) . '><span id="bx-panel-switcher-gutter-left"></span><span id="bx-panel-toggle-indicator"><span id="bx-panel-toggle-icon"></span><span id="bx-panel-toggle-icon-overlay"></span></span><span class="bx-panel-break"></span><span id="bx-panel-toggle-caption">' . GetMessage("top_panel_edit_mode_new") . '</span><span class="bx-panel-break"></span><span id="bx-panel-toggle-caption-mode">' . $toggleCaptions . '</span><span id="bx-panel-switcher-gutter-right"></span></a>';
        if ($aUserOpt["collapsed"] == "on") {
            $result .= $toogle;
        }
        $result .= '<a href="" id="bx-panel-expander" ' . CTopPanel::AddAttrHint(GetMessage("top_panel_expand_tooltip_title"), GetMessage("top_panel_expand_tooltip") . $hkInstance->GetTitle("bx-panel-expander", true)) . '><span id="bx-panel-expander-text">' . GetMessage("top_panel_expand") . '</span><span id="bx-panel-expander-arrow"></span></a>';
        if ($hkInstance->IsActive()) {
            $result .= '<a id="bx-panel-hotkeys" href="javascript:void(0)" onclick="BXHotKeys.ShowSettings();" ' . CTopPanel::AddAttrHint(GetMessage("HK_PANEL_TITLE") . $hkInstance->GetTitle("bx-panel-hotkeys", true)) . '></a>';
        }
        $result .= '<a href="javascript:void(0)" id="bx-panel-pin"' . ($aUserOpt['fix'] == 'on' ? ' class="bx-panel-pin-fixed"' : '') . ' ' . CTopPanel::AddAttrHint(GetMessage('top_panel_pin_tooltip')) . '></a>';
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-logout", GetMessage('top_panel_logout_tooltip'));
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-small-toggle", GetMessage("top_panel_edit_mode_new_tooltip_title"), 'location.href="' . $href . '?freetrix_include_areas=' . ($toggleMode ? 'N' : 'Y') . ($params != "" ? "&" . $params : "") . '";');
        $result .= $hkInstance->PrintJSExecs($Execs);
        $Execs = $hkInstance->GetCodeByClassName("bx-panel-expander", GetMessage("top_panel_expand_tooltip_title") . "/" . GetMessage("top_panel_collapse_tooltip_title"));
        $result .= $hkInstance->PrintJSExecs($Execs);
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:open_bx,代码行数:101,代码来源:top_panel.php

示例9: TxtToHTML

function TxtToHTML(
	$str,										// текст для преобразования
	$bMakeUrls				= true,				// true - преобразовавыть URL в <a href="URL">URL</a>
	$iMaxStringLen			= 0,				// максимальная длина фразы без пробелов или символов перевода каретки
	$QUOTE_ENABLED			= "N",				// Y - преобразовать <QUOTE>...</QUOTE> в рамку цитаты
	$NOT_CONVERT_AMPERSAND	= "Y",				// Y - не преобразовывать символ "&" в "&amp;"
	$CODE_ENABLED			= "N",				// Y - преобразовать <CODE>...</CODE> в readonly textarea
	$BIU_ENABLED			= "N",				// Y - преобразовать <B>...</B> и т.д. в соответствующие HTML тэги
	$quote_table_class		= "quotetable",		// css класс на таблицу цитаты
	$quote_head_class		= "tdquotehead",	// css класс на первую TD таблицы цитаты
	$quote_body_class		= "tdquote",		// css класс на вторую TD таблицы цитаты
	$code_table_class		= "codetable",		// css класс на таблицу кода
	$code_head_class		= "tdcodehead",		// css класс на первую TD таблицы кода
	$code_body_class		= "tdcodebody",		// css класс на вторую TD таблицы кода
	$code_textarea_class	= "codetextarea",	// css класс на textarea в таблице кода
	$link_class				= "txttohtmllink",	// css класс на ссылках
	$arUrlEvent				= array(),			// массив в нем если заданы ключи EVENT1, EVENT2, EVENT3 то ссылки будут через
												// $arUrlEvent["SCRIPT"] (по умолчанию равен "/bitrix/redirect.php")
	$link_target			= "_self"			// tagret открытия страницы
	)
{
	global $QUOTE_ERROR, $QUOTE_OPENED, $QUOTE_CLOSED;
	$QUOTE_ERROR = $QUOTE_OPENED = $QUOTE_CLOSED = 0;

	$str = delete_special_symbols($str);

	//echo "\n<br>=====================\n<br><pre>".htmlspecialcharsbx($str)."</pre>\n<br>=======================\n<br>";

	// вставим спецсимвол chr(2) там где в дальнейшем необходимо вставить пробел
	if($iMaxStringLen>0)
		$str = InsertSpaces($str, $iMaxStringLen, chr(2), true);

	// \ => chr(8)
	$str = str_replace("\\", chr(8), $str); // спецсимвол заменяющий слэш "\"

	// <quote>...</quote> => [quote]...[/quote]
	if ($QUOTE_ENABLED=="Y")
		$str = preg_replace("#(?:<|\[)(/?)quote(.*?)(?:>|\])#is", " [\\1quote]", $str);

	// <code>...</code> => [code]...[/code]
	// \n => chr(4)
	// \r => chr(5)
	if ($CODE_ENABLED=="Y")
	{
		$str = preg_replace("#<code(\s+[^>]*>|>)(.+?)</code(\s+[^>]*>|>)#is", "[code]\\2[/code]", $str);
		$str = preg_replace("#\[code(\s+[^\]]*\]|\])(.+?)\[/code(\s+[^\]]*\]|\])#ies", "convert_code_tag_for_html_before('\\2')", $str);
	}

	// <b>...</b> => [b]...[/b]
	// <i>...</i> => [i]...[/i]
	// <u>...</u> => [u]...[/u]
	if ($BIU_ENABLED=="Y")
	{
		$str = preg_replace("#<b(\s+[^>]*>|>)(.+?)</b(\s+[^>]*>|>)#is", "[b]\\2[/b]", $str);
		$str = preg_replace("#<i(\s+[^>]*>|>)(.+?)</i(\s+[^>]*>|>)#is", "[i]\\2[/i]", $str);
		$str = preg_replace("#<u(\s+[^>]*>|>)(.+?)</u(\s+[^>]*>|>)#is", "[u]\\2[/u]", $str);
	}

	// URL => chr(1).URL."/".chr(1)
	// EMail => chr(3).E-Mail.chr(3)
	if($bMakeUrls)
	{
		//hide @ from next regexp with chr(11)
		$str = preg_replace("#((http|https|ftp):\/\/[a-z:@,.'/\#\%=~\\&?*+\[\]_0-9\x01-\x08-]+)#ies", "extract_url(str_replace('@', chr(11), '\\1'))", $str);
		$str = preg_replace("#(([=_\.'0-9a-z+~\x01-\x08-]+)@([_0-9a-z\x01-\x08-]+\.)+[a-z]{2,10})#is", chr(3)."\\1".chr(3), $str);
		//replace back to @
		$str = str_replace(chr(11), '@', $str);
	}

	// конвертация критичных символов
	if ($NOT_CONVERT_AMPERSAND!="Y") $str = str_replace("&", "&amp;", $str);
	static $search=array("<",">","\"","'","%",")","(","+");
	static $replace=array("&lt;","&gt;","&quot;","&#39;","&#37;","&#41;","&#40;","&#43;");
	$str = str_replace($search, $replace, $str);

	// chr(1).URL."/".chr(1) => <a href="URL">URL</a>
	// chr(3).E-Mail.chr(3) => <a href="mailto:E-Mail">E-Mail</a>
	if($bMakeUrls)
	{
		$event1 = $arUrlEvent["EVENT1"];
		$event2 = $arUrlEvent["EVENT2"];
		$event3 = $arUrlEvent["EVENT3"];
		$script = $arUrlEvent["SCRIPT"];
		$str = preg_replace("#\x01([^\n\x01]+?)/\x01#ies", "convert_to_href('\\1', '".CUtil::addslashes($link_class)."', '".CUtil::addslashes($event1)."', '".CUtil::addslashes($event2)."', '".CUtil::addslashes($event3)."', '".CUtil::addslashes($script)."', '".CUtil::addslashes($link_target)."')", $str);
		$str = preg_replace("#\x03([^\n\x03]+?)\x03#ies", "convert_to_mailto('\\1', '".CUtil::addslashes($link_class)."')", $str);
	}

	$str = str_replace("\r\n", "\n", $str);
	$str = str_replace("\n", "<br />\n", $str);
	$str = preg_replace("# {2}#", "&nbsp;&nbsp;", $str);
	$str = preg_replace("#\t#", "&nbsp;&nbsp;&nbsp;&nbsp;", $str);

	// chr(2) => " "
	if($iMaxStringLen>0)
		$str = str_replace(chr(2), "<wbr>", $str);

	// [quote]...[/quote] => <table>...</table>
	if ($QUOTE_ENABLED=="Y")
		$str = preg_replace("#(\[quote(.*?)\](.*)\[/quote(.*?)\])#ies", "convert_quote_tag('\\1', '".CUtil::addslashes($quote_table_class)."', '".CUtil::addslashes($quote_head_class)."', '".CUtil::addslashes($quote_body_class)."')", $str);

//.........这里部分代码省略.........
开发者ID:nProfessor,项目名称:Mytb,代码行数:101,代码来源:tools.php

示例10:

        echo CUtil::JSEscape(GetMessage("interface_grid_sort_asc"));
        ?>
', 'ONCLICK':'bxGrid_<?php 
        echo $arParams["GRID_ID"];
        ?>
.Sort(\'<?php 
        echo CUtil::addslashes($header["sort_url"]);
        ?>
\', \'desc\')', 'ICONCLASS':'grid-sort-asc'}, {'TEXT': '<?php 
        echo CUtil::JSEscape(GetMessage("interface_grid_sort_desc"));
        ?>
', 'ONCLICK':'bxGrid_<?php 
        echo $arParams["GRID_ID"];
        ?>
.Sort(\'<?php 
        echo CUtil::addslashes($header["sort_url"]);
        ?>
\', \'asc\')', 'ICONCLASS':'grid-sort-desc'}, {'TEXT': '<?php 
        echo CUtil::JSEscape(GetMessage("interface_grid_hide_col"));
        ?>
', 'ONCLICK':'bxGrid_<?php 
        echo $arParams["GRID_ID"];
        ?>
.HideColumn(\'<?php 
        echo CUtil::JSEscape($id);
        ?>
\')', 'DISABLED':<?php 
        echo $USER->IsAuthorized() ? 'false' : 'true';
        ?>
}]"
			title="<?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例11: __build_item_info


//.........这里部分代码省略.........
                $downloadUrl .= (strpos($downloadUrl, "?") === false ? "?" : "&") . "ncc=1&force_download=1";
                $viewerUrl = CUtil::JSEscape(($GLOBALS['APPLICATION']->IsHTTPS() ? 'https' : 'http') . '://' . str_replace("//", "/", $_SERVER['HTTP_HOST'] . "/" . $res["URL"]["THIS"])) . '?showInViewer=1';
                $arActions['preview_launch'] = array('type' => 'onlyedit', 'src' => $viewerUrl, 'download' => $downloadUrl, 'history' => CHTTP::urlAddParams($res['URL']['VIEW'], array('webdavForm' . $res['IBLOCK_ID'] . '_active_tab' => 'tab_history')), 'edit' => $res['LOCK_STATUS'] == 'green' && CWebDavEditDocGoogle::isEditable($res["FILE_EXTENTION"]) && $res['E_RIGHTS']['element_edit'] ? $editInUrl : '', 'askConvert' => CWebDavEditDocGoogle::isNeedConvertExtension($res["FILE_EXTENTION"]), 'title' => $res['NAME'], 'owner' => CUser::FormatName(CSite::GetNameFormat(false), array('LOGIN' => $res['CREATED_BY']['LOGIN'], 'NAME' => $res['CREATED_BY']['NAME'], 'SECOND_NAME' => $res['CREATED_BY']['SECOND_NAME'], 'LAST_NAME' => $res['CREATED_BY']['LAST_NAME']), true, false), 'size' => CFile::FormatSize($res['PROPERTY_WEBDAV_SIZE_VALUE']), 'dateModify' => FormatDate('FULL', MakeTimeStamp($res["TIMESTAMP_X"])), 'tooBigSizeMsg' => true, 'inPersonalLib' => $isUserLib && $res['LOCK_STATUS'] == 'green' && $res['E_RIGHTS']['element_edit'] ? '1' : '', 'externalId' => $isUserLib ? "st{$rootDataForCurrentUser['IBLOCK_ID']}|{$rootDataForCurrentUser['SECTION_ID']}|f{$res['ID']}" : '', 'relativePath' => $res['PATH']);
            } elseif (CFile::IsImage($res['NAME'])) {
                $downloadUrl = CUtil::JSEscape($res["URL"]["~DOWNLOAD"]);
                $downloadUrl .= (strpos($downloadUrl, "?") === false ? "?" : "&") . "ncc=1&force_download=1";
                $arActions['preview_launch'] = array('type' => 'image', 'src' => $downloadUrl, 'download' => $downloadUrl, 'title' => $res['NAME']);
            } else {
                $downloadUrl = CUtil::JSEscape($res["URL"]["~DOWNLOAD"]);
                $downloadUrl .= (strpos($downloadUrl, "?") === false ? "?" : "&") . "ncc=1&force_download=1";
                $arActions['preview_launch'] = array('type' => 'unknown', 'src' => $downloadUrl, 'download' => $downloadUrl, 'title' => $res['NAME'], 'owner' => CUser::FormatName(CSite::GetNameFormat(false), array('LOGIN' => $res['CREATED_BY']['LOGIN'], 'NAME' => $res['CREATED_BY']['NAME'], 'SECOND_NAME' => $res['CREATED_BY']['SECOND_NAME'], 'LAST_NAME' => $res['CREATED_BY']['LAST_NAME']), true, false), 'size' => CFile::FormatSize($res['PROPERTY_WEBDAV_SIZE_VALUE']), 'dateModify' => FormatDate('FULL', MakeTimeStamp($res["TIMESTAMP_X"])), 'tooBigSizeMsg' => $allowExtDocServices && CWebDavTools::allowPreviewFile($res["FILE_EXTENTION"], $res['PROPERTY_WEBDAV_SIZE_VALUE'], false), 'inPersonalLib' => $isUserLib && $res['LOCK_STATUS'] == 'green' && $res['E_RIGHTS']['element_edit'] ? '1' : '', 'externalId' => $isUserLib ? "st{$rootDataForCurrentUser['IBLOCK_ID']}|{$rootDataForCurrentUser['SECTION_ID']}|f{$res['ID']}" : '', 'relativePath' => $res['PATH']);
            }
            $downloadUrl = CUtil::JSEscape($res["URL"]["~DOWNLOAD"]);
            $downloadUrl .= (strpos($downloadUrl, "?") === false ? "?" : "&") . "ncc=1&force_download=1";
            $arActions["element_download"] = array("ICONCLASS" => "element_download", "TITLE" => GetMessage("WD_DOWNLOAD_ELEMENT"), "TEXT" => GetMessage("WD_DOWNLOAD"), "ONCLICK" => "window.location.href = '" . $downloadUrl . "';", "DEFAULT" => false);
            if ($arParams["PERMISSION"] >= "U") {
                $urlT = CUtil::JSEscape(($GLOBALS['APPLICATION']->IsHTTPS() ? 'https' : 'http') . '://' . str_replace("//", "/", $_SERVER['HTTP_HOST'] . "/" . $res["URL"]["THIS"]));
                $arActions["copy_ext_link"] = array("ICONCLASS" => "element_ext_link", "TITLE" => GetMessage("WD_COPY_EXT_LINK_TITLE"), "TEXT" => GetMessage("WD_COPY_EXT_LINK"), "ONCLICK" => CWebDavExtLinks::InsertDialogCallText($urlT));
            }
            if ($res["SHOW"]["UNDELETE"] == "Y") {
                $arActions["element_undelete"] = array("ICONCLASS" => "element_download", "TITLE" => GetMessage("WD_UNDELETE_ELEMENT"), "TEXT" => GetMessage("WD_UNDELETE"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape(WDAddPageParams($res["URL"]["~UNDELETE"], array("edit" => "Y", "sessid" => bitrix_sessid()), false)) . "');", "DEFAULT" => false);
            }
            if ($arParams["PERMISSION"] >= "U") {
                if ($res["SHOW"]["LOCK"] == "Y" || $res["SHOW"]["UNLOCK"] == "Y") {
                    $arActions["element_upload"] = array("ICONCLASS" => "element_edit", "TITLE" => GetMessage("WD_UPLOAD_ELEMENT"), "TEXT" => GetMessage("WD_UPLOAD"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($res["URL"][$arParams["OBJECT"]->Type == "folder" ? "EDIT" : "~VIEW"] . '#upload') . "');");
                }
                if ($ob->Type == "iblock" && $res["SHOW"]["UNLOCK"] == "Y") {
                    $arActions["element_unlock"] = array("ICONCLASS" => "element_unlock", "TITLE" => GetMessage("WD_UNLOCK_ELEMENT"), "TEXT" => GetMessage("WD_UNLOCK"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($res["URL"]["~UNLOCK"]) . "');");
                }
                if ($ob->Type == "iblock" && $res["SHOW"]["LOCK"] == "Y") {
                    $arActions["element_lock"] = array("ICONCLASS" => "element_unlock", "TITLE" => GetMessage("WD_LOCK_ELEMENT"), "TEXT" => GetMessage("WD_LOCK"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($res["URL"]["~LOCK"]) . "');");
                }
                if (($res["SHOW"]["LOCK"] == "Y" || $res["SHOW"]["UNLOCK"] == "Y") && in_array($res["FILE_EXTENTION"], $arOfficeExtensions)) {
                    $arActions["element_edit_office"] = array("ICONCLASS" => "element_edit", "TITLE" => GetMessage("WD_EDIT_MSOFFICE"), "TEXT" => GetMessage("WD_EDIT_MSOFFICE_MENU"), "OFFICECHECK" => true, "DISABLED" => !($bShowWebdav && $res["SHOW"]["EDIT"] == "Y"), "ONCLICK" => 'return EditDocWithProgID(\'' . CUtil::addslashes($res["URL"]["~THIS"]) . '\');');
                }
            }
            $arActions["element_view"] = array("ICONCLASS" => "element_view", "TITLE" => GetMessage("WD_VIEW_ELEMENT"), "TEXT" => GetMessage($res["~TYPE"] == "FILE" ? "WD_PROPERTIES" : "WD_VIEW"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($res["URL"][$res["~TYPE"] == "FILE" ? "EDIT" : "~VIEW"]) . "');");
            if ($arParams["USE_COMMENTS"] == "Y" && IsModuleInstalled("forum")) {
                $arActions["element_comment"] = array("ICONCLASS" => "element_comment", "TITLE" => GetMessage("WD_ELEMENT_COMMENT_NAME"), "TEXT" => GetMessage("WD_ELEMENT_COMMENT_TITLE"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($res["URL"]["~VIEW"] . "?webdavForm" . $arParams["IBLOCK_ID"] . "_active_tab=tab_comments") . "');");
            }
            if ($arParams["PERMISSION"] >= "U") {
                $arActions["copy_link"] = array("ICONCLASS" => "element_download", "TITLE" => GetMessage("WD_COPY_LINK_TITLE"), "TEXT" => GetMessage("WD_COPY_LINK"), "ONCLICK" => "WDCopyLinkDialog('" . CUtil::JSEscape(($GLOBALS['APPLICATION']->IsHTTPS() ? 'https' : 'http') . '://' . str_replace("//", "/", $_SERVER['HTTP_HOST'] . "/" . $res["URL"]["THIS"])) . "')");
                /*
                $urlT = CUtil::JSEscape(($GLOBALS['APPLICATION']->IsHTTPS() ? 'https' : 'http').'://'.str_replace("//", "/", $_SERVER['HTTP_HOST']."/".$res["URL"]["THIS"]));
                $arActions["copy_ext_link"] = array(
                	"ICONCLASS" => "element_download",
                	"TITLE" => GetMessage("WD_COPY_EXT_LINK_TITLE"),
                	"TEXT" => GetMessage("WD_COPY_EXT_LINK"),
                	"ONCLICK" => CWebDavExtLinks::InsertDialogCallText($urlT)
                );
                */
                if ($res["SHOW"]["HISTORY"] == "Y") {
                    $arActions["element_history"] = array("ICONCLASS" => "element_history" . ($res["SHOW"]["BP"] == "Y" ? " bizproc_history" : ""), "TITLE" => GetMessage("WD_HIST_ELEMENT_ALT"), "TEXT" => GetMessage("WD_HIST_ELEMENT"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($res["URL"]["~VIEW"] . "?webdavForm" . $arParams["IBLOCK_ID"] . "_active_tab=tab_history") . "');");
                }
                if ($res["SHOW"]["LOCK"] == "Y" || $res["SHOW"]["UNLOCK"] == "Y") {
                    if ($res["SHOW"]["BP_VIEW"] == "Y") {
                        $arActionsBpTmp[] = array("ICONCLASS" => "bizproc_document", "TITLE" => GetMessage("IBLIST_A_BP_H"), "TEXT" => GetMessage("IBLIST_A_BP_H"), "ONCLICK" => "jsUtils.Redirect([], '" . CUtil::JSEscape($res["URL"]["~BP"]) . "');");
                    }
                    if ($res["SHOW"]["BP_START"] == "Y" && is_array($arParams["TEMPLATES"])) {
                        $arr = array();
                        foreach ($arParams["TEMPLATES"] as $key => $arWorkflowTemplate) {
                            if (!CBPDocument::CanUserOperateDocument(CBPCanUserOperateOperation::StartWorkflow, $GLOBALS["USER"]->GetID(), $res["DOCUMENT_ID"], array("UserGroups" => $res["USER_GROUPS"], "DocumentStates" => $res["~arDocumentStates"], "WorkflowTemplateList" => $arTemplates, "WorkflowTemplateId" => $arWorkflowTemplate["ID"]))) {
                                continue;
                            }
                            $url = $res["URL"]["~BP_START"];
                            $url .= (strpos($url, "?") === false ? "?" : "&") . "workflow_template_id=" . $arWorkflowTemplate["ID"] . '&' . bitrix_sessid_get();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:67,代码来源:functions.php

示例12: _MakeJson

 static function _MakeJson($arData, $bWS, $bSkipTilda)
 {
     static $aSearch = array("\r", "\n");
     if (is_array($arData)) {
         if ($arData == array_values($arData)) {
             foreach ($arData as $key => $value) {
                 if (is_array($value)) {
                     $arData[$key] = self::_MakeJson($value, $bWS, $bSkipTilda);
                 } elseif (is_bool($value)) {
                     if ($value === true) {
                         $arData[$key] = "true";
                     } else {
                         $arData[$key] = "false";
                     }
                 } elseif (is_integer($value)) {
                     $res .= $value;
                 } else {
                     if (preg_match("#['\"\\n\\r<\\\\]#", $value)) {
                         $arData[$key] = "\"" . CUtil::JSEscape($value) . "\"";
                     } else {
                         $arData[$key] = "\"" . $value . "\"";
                     }
                 }
             }
             return '[' . implode(',', $arData) . ']';
         }
         $sWS = ',' . ($bWS ? "\n" : '');
         $res = ($bWS ? "\n" : '') . '{';
         $first = true;
         foreach ($arData as $key => $value) {
             if ($bSkipTilda && substr($key, 0, 1) == '~') {
                 continue;
             }
             if ($first) {
                 $first = false;
             } else {
                 $res .= $sWS;
             }
             if (preg_match("#['\"\\n\\r<\\\\]#", $key)) {
                 $res .= "\"" . str_replace($aSearch, '', CUtil::addslashes($key)) . "\":";
             } else {
                 $res .= "\"" . $key . "\":";
             }
             if (is_array($value)) {
                 $res .= self::_MakeJson($value, $bWS, $bSkipTilda);
             } elseif (is_bool($value)) {
                 if ($value === true) {
                     $res .= "true";
                 } else {
                     $res .= "false";
                 }
             } elseif (is_integer($value)) {
                 $res .= $value;
             } else {
                 if (preg_match("#['\"\\n\\r<\\\\]#", $value)) {
                     $res .= "\"" . CUtil::JSEscape($value) . "\"";
                 } else {
                     $res .= "\"" . $value . "\"";
                 }
             }
         }
         $res .= ($bWS ? "\n" : '') . '}';
         return $res;
     } elseif (is_bool($arData)) {
         if ($arData === true) {
             return 'true';
         } else {
             return 'false';
         }
     } elseif (is_integer($value)) {
         return $value;
     } else {
         if (preg_match("#['\"\\n\\r<\\\\]#", $arData)) {
             return "\"" . CUtil::JSEscape($arData) . "'";
         } else {
             return "\"" . $arData . "\"";
         }
     }
 }
开发者ID:vim84,项目名称:b-markt,代码行数:79,代码来源:pull_push.php

示例13: htmlspecialcharsex

				{
					if($arRightSet["IS_INHERITED"] <> "Y")
					{
					?>
					<tr>
						<td style="width:40%!important; text-align:right; vertical-align:middle"><?echo htmlspecialcharsex($arNames[$arRightSet["GROUP_CODE"]]["provider"]." ".$arNames[$arRightSet["GROUP_CODE"]]["name"])?>:</td>
						<td align="left">
							<input type="hidden" name="<?echo $html_var_name?>[][RIGHT_ID]" value="<?echo htmlspecialcharsbx($RIGHT_ID)?>">
							<input type="hidden" name="<?echo $html_var_name?>[][GROUP_CODE]" value="<?echo htmlspecialcharsbx($arRightSet["GROUP_CODE"])?>">
							<select name="<?echo $html_var_name?>[][TASK_ID]" style="vertical-align:middle">
							<?foreach($arPossibleRights as $value => $title):?>
								<option value="<?echo htmlspecialcharsbx($value)?>" <?if($value == $arRightSet["TASK_ID"]) echo "selected"?>><?echo htmlspecialcharsex($title)?></option>
							<?endforeach?>
							</select>
							<a href="javascript:void(0);" onclick="JCIBlockAccess.DeleteRow(this, '<?php 
echo htmlspecialcharsbx(CUtil::addslashes($arRightSet["GROUP_CODE"]));
?>
', '<?php 
echo CUtil::JSEscape($variable_name);
?>
')" class="access-delete"></a>
							<?if($bDefault):?>
								<span title="<?echo GetMessage("IBLOCK_AT_OVERWRITE_TIP")?>"><?
								if(
									is_array($arRightSet["OVERWRITED"])
									&& $arRightSet["OVERWRITED"][0] > 0
									&& $arRightSet["OVERWRITED"][1] > 0
								)
								{
									?>
									<br><input name="<?echo $html_var_name?>[][DO_CLEAN]" value="Y" type="checkbox"><?echo GetMessage("IBLOCK_AT_OVERWRITE_1")?> (<?echo intval($arRightSet["OVERWRITED"][0]+$arRightSet["OVERWRITED"][1])?>)
开发者ID:ASDAFF,项目名称:trigger-module,代码行数:31,代码来源:admin_tools.php

示例14: LearningShowRights


//.........这里部分代码省略.........
            $arBaseNames = $access->GetNames(array_keys($arBaseRights));
            foreach ($arBaseRights as $symbol => $taskId) {
                if ($taskId <= 0) {
                    continue;
                }
                ?>
					<tr valign="top">
						<td align="right"><?php 
                echo htmlspecialcharsex($arBaseNames[$symbol]['provider'] . ' ' . $arBaseNames[$symbol]['name']);
                ?>
:&nbsp;</td>
						<td align="left">
							<?php 
                echo htmlspecialcharsex(CLearnAccess::GetNameForTask($taskId));
                ?>
						</td>
					</tr>
					<?php 
            }
        }
        $arNames = $access->GetNames(array_keys($arActualRights));
        foreach ($arActualRights as $symbol => $taskId) {
            if ($taskId <= 0) {
                continue;
            }
            ?>
				<tr valign="top">
					<td align="right">
						<div style="padding-top:8px;">
						<span href="javascript:void(0);" 
							onclick="LearningJSRightsAccess.DeleteRow(
								this, 
								'<?php 
            echo htmlspecialcharsbx(CUtil::addslashes($symbol));
            ?>
', 
								'<?php 
            echo CUtil::JSEscape($html_var_name);
            ?>
')" 
							class="access-delete"
							style="position:relative; top:1px; margin-right:3px;"
						></span><?php 
            if (strlen($arNames[$symbol]['provider'])) {
                echo htmlspecialcharsex($arNames[$symbol]['provider'] . ' ' . $arNames[$symbol]['name']);
            } else {
                echo htmlspecialcharsex($arNames[$symbol]['name']);
            }
            ?>
:&nbsp;
					</div>
					</td>
					<td align="left">
						<?php 
            if ($readOnly) {
                echo htmlspecialcharsex(CLearnAccess::GetNameForTask($taskId));
            } else {
                ?>
						<input type="hidden" name="<?php 
                echo $html_var_name;
                ?>
[][GROUP_CODE]" value="<?php 
                echo htmlspecialcharsbx($symbol);
                ?>
">
						<div style="min-width:720px;">
开发者ID:Satariall,项目名称:izurit,代码行数:67,代码来源:clearnrenderrightsedit.php

示例15: array

            }
        }
    }
    if (!$bizProcIndex) {
        $arTab2Fields[] = array("id" => "BIZPROC_NO", "name" => GetMessage("CT_BLEE_BIZPROC_NA_LABEL"), "type" => "label", "value" => GetMessage("CT_BLEE_BIZPROC_NA"));
    }
    $custom_html .= '<input type="hidden" name="bizproc_index" value="' . $bizProcIndex . '">';
    if ($arResult["ELEMENT_ID"]) {
        $bStartWorkflowPermission = CBPDocument::CanUserOperateDocument(CBPCanUserOperateOperation::StartWorkflow, $USER->GetID(), BizProcDocument::getDocumentComplexId($arParams["IBLOCK_TYPE_ID"], $arResult["ELEMENT_ID"]), array("AllUserGroups" => $arCurrentUserGroups, "DocumentStates" => $arDocumentStates, "WorkflowId" => $arDocumentState["TEMPLATE_ID"]));
        if ($bStartWorkflowPermission) {
            $arTab2Fields[] = array("id" => "BIZPROC_NEW", "name" => GetMessage("CT_BLEE_BIZPROC_NEW"), "type" => "section");
            $backUrl = CHTTP::urlAddParams($APPLICATION->GetCurPageParam("", array($arResult["FORM_ID"] . "_active_tab")), array($arResult["FORM_ID"] . "_active_tab" => "tab_bp"));
            $url = CHTTP::urlAddParams(str_replace(array("#list_id#", "#section_id#", "#element_id#", "#group_id#"), array($arResult["IBLOCK_ID"], intval($arResult["SECTION_ID"]), $arResult["ELEMENT_ID"], $arParams["SOCNET_GROUP_ID"]), $arParams["~BIZPROC_WORKFLOW_START_URL"]), array("back_url" => $backUrl, "sessid" => bitrix_sessid()), array("skip_empty" => true, "encode" => true));
            $arTab2Fields[] = array("id" => "BIZPROC_NEW_START", "name" => GetMessage("CT_BLEE_BIZPROC_START"), "type" => "custom", "colspan" => true, "value" => '<a href="' . htmlspecialcharsbx($url) . '">' . GetMessage("CT_BLEE_BIZPROC_START") . '</a>');
        }
    }
    $arTabs[] = array("id" => "tab_bp", "name" => GetMessage("CT_BLEE_BIZPROC_TAB"), "icon" => "", "fields" => $arTab2Fields);
}
if (isset($arResult["RIGHTS"])) {
    ob_start();
    IBlockShowRights('element', $arResult["IBLOCK_ID"], $arResult["ELEMENT_ID"], "", "RIGHTS", $arResult["TASKS"], $arResult["RIGHTS"], true, $arResult["ELEMENT_ID"] <= 0, $arResult["SELECTED"], $arResult["HIGHLIGHT"]);
    $rights_html = ob_get_contents();
    ob_end_clean();
    $rights_fields = array(array("id" => "RIGHTS", "name" => GetMessage("CT_BLEE_ACCESS_RIGHTS"), "type" => "custom", "colspan" => true, "value" => $rights_html));
    $arTabs[] = array("id" => "tab_rights", "name" => GetMessage("CT_BLEE_TAB_ACCESS"), "icon" => "", "fields" => $rights_fields);
}
$custom_html .= '<input type="hidden" name="action" id="action" value="">';
if (!$arParams["CAN_EDIT"]) {
    $custom_html .= '<input type="button" value="' . GetMessage("CT_BLEE_FORM_CANCEL") . '" name="cancel" onclick="window.location=\'' . htmlspecialcharsbx(CUtil::addslashes($arResult["~LIST_SECTION_URL"])) . '\'" title="' . GetMessage("CT_BLEE_FORM_CANCEL_TITLE") . '" />';
}
$APPLICATION->IncludeComponent("bitrix:main.interface.form", "", array("FORM_ID" => $arResult["FORM_ID"], "TABS" => $arTabs, "BUTTONS" => array("standard_buttons" => $arParams["CAN_EDIT"], "back_url" => $arResult["~LIST_SECTION_URL"], "custom_html" => $custom_html), "DATA" => $arResult["FORM_DATA"], "SHOW_SETTINGS" => "N", "THEME_GRID_ID" => $arResult["GRID_ID"]), $component, array("HIDE_ICONS" => "Y"));
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php


注:本文中的CUtil::addslashes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。