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


PHP RandString函数代码示例

本文整理汇总了PHP中RandString函数的典型用法代码示例。如果您正苦于以下问题:PHP RandString函数的具体用法?PHP RandString怎么用?PHP RandString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: prepareParams

 private function prepareParams(&$arParams)
 {
     if (strlen($arParams["FORM_ID"]) <= 0) {
         $arParams["FORM_ID"] = "POST_FORM_" . RandString(3);
     }
     $arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? \CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), "", $arParams["NAME_TEMPLATE"]);
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:7,代码来源:class.php

示例2: getData

 public static function getData($SITE_ID = SITE_ID, $bFull = false)
 {
     global $USER, $CACHE_MANAGER;
     $obCache = new CPHPCache();
     $today = ConvertTimeStamp();
     $cache_dir = '/intranet/planner/' . $USER->GetID();
     $cache_id = 'intranet|planner|' . $USER->GetID() . '|' . $SITE_ID . '|' . intval($bFull) . '|' . $today . '|' . FORMAT_DATETIME . '|' . FORMAT_DATE . '|' . LANGUAGE_ID;
     $arData = null;
     if ($obCache->InitCache(self::CACHE_TTL, $cache_id, $cache_dir)) {
         $arData = $obCache->GetVars();
         if (is_array($arData['SCRIPTS'])) {
             foreach ($arData['SCRIPTS'] as $key => $script) {
                 if (is_array($script)) {
                     $arData['SCRIPTS'][$key] = self::JS_CORE_EXT_RANDOM_NAME . RandString(5);
                     CJSCore::RegisterExt($arData['SCRIPTS'][$key], $script);
                 }
             }
         }
     } else {
         // cache expired or there's no cache
         $obCache->StartDataCache();
         $arData = array('SCRIPTS' => array(), 'STYLES' => array(), 'DATA' => array());
         $CACHE_MANAGER->StartTagCache($cache_dir);
         $CACHE_MANAGER->RegisterTag(self::CACHE_TAG . $USER->GetID());
         $events = GetModuleEvents("intranet", "OnPlannerInit");
         while ($arEvent = $events->Fetch()) {
             $arEventData = ExecuteModuleEventEx($arEvent, array(array('SITE_ID' => SITE_ID, 'FULL' => $bFull)));
             if (is_array($arEventData)) {
                 if (is_array($arEventData['SCRIPTS'])) {
                     $arData['SCRIPTS'] = array_merge($arData['SCRIPTS'], $arEventData['SCRIPTS']);
                 }
                 if (is_array($arEventData['STYLES'])) {
                     $arData['STYLES'] = array_merge($arData['STYLES'], $arEventData['STYLES']);
                 }
                 if (is_array($arEventData['DATA'])) {
                     $arData['DATA'] = array_merge($arData['DATA'], $arEventData['DATA']);
                 }
             }
         }
         $arCacheData = $arData;
         if (is_array($arCacheData['SCRIPTS'])) {
             foreach ($arCacheData['SCRIPTS'] as $key => $script) {
                 if (CJSCore::IsExtRegistered($script)) {
                     $arCacheData['SCRIPTS'][$key] = CJSCore::getExtInfo($script);
                 }
             }
         }
         $CACHE_MANAGER->EndTagCache();
         $obCache->EndDataCache($arCacheData);
     }
     return $arData;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:52,代码来源:planner.php

示例3: floatval

if (!defined('FX_GMAP_SCRIPT_LOADED'))
{
	CUtil::InitJSCore();

	if ($arParams['DEV_MODE'] != 'Y')
	{
		$scheme = (CMain::IsHTTPS() ? "https" : "http");
		$APPLICATION->AddHeadString('<script src="'.$scheme.'://maps.google.com/maps/api/js?sensor=false&language='.LANGUAGE_ID.'" charset="utf-8"></script>');

		define('FX_GMAP_SCRIPT_LOADED', 1);
	}
}

$arParams['MAP_ID'] =
	(strlen($arParams["MAP_ID"])<=0 || !preg_match("/^[A-Za-z_][A-Za-z01-9_]*$/", $arParams["MAP_ID"])) ?
	'MAP_'.RandString() : $arParams['MAP_ID'];

$arParams['INIT_MAP_LON'] = floatval($arParams['INIT_MAP_LON']);
$arParams['INIT_MAP_LON'] = $arParams['INIT_MAP_LON'] ? $arParams['INIT_MAP_LON'] : 37.64;
$arParams['INIT_MAP_LAT'] = floatval($arParams['INIT_MAP_LAT']);
$arParams['INIT_MAP_LAT'] = $arParams['INIT_MAP_LAT'] ? $arParams['INIT_MAP_LAT'] : 55.76;
$arParams['INIT_MAP_SCALE'] = intval($arParams['INIT_MAP_SCALE']);
$arParams['INIT_MAP_SCALE'] = $arParams['INIT_MAP_SCALE'] ? $arParams['INIT_MAP_SCALE'] : 10;

//echo '<pre>'; print_r($arParams); echo '</pre>';

$arResult['ALL_MAP_TYPES'] = array('NORMAL' => 'ROADMAP', 'SATELLITE', 'HYBRID', 'TERRAIN');
$arResult['ALL_MAP_OPTIONS'] = array(
	'ENABLE_SCROLL_ZOOM' => 'scrollwheel: #true#',
	'ENABLE_DBLCLICK_ZOOM' => 'disableDoubleClickZoom: #false#',
	'ENABLE_DRAGGING' => 'draggable: #true#',
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:component.php

示例4: exit

<?php

!function_exists('adminmsg') && exit('Forbidden');
$basename = "{$admin_file}?adminjob=userpay";
if (!$_POST['action']) {
    include_once D_P . 'data/bbscache/ol_config.php';
    !$ol_paypalcode && ($ol_paypalcode = RandString('40'));
    ifcheck($ol_onlinepay, 'onlinepay');
    include PrintEot('userpay');
    exit;
} else {
    InitGP(array('userpay'), 'P');
    !$userpay['ol_paypalcode'] && ($userpay['ol_paypalcode'] = RandString('40'));
    foreach ($userpay as $key => $value) {
        setConfig($key, $value);
    }
    updatecache_ol();
    adminmsg('operate_success');
}
function RandString($len)
{
    $rand = '1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM';
    mt_srand((double) microtime() * 1000000);
    for ($i = 0; $i < $len; $i++) {
        $code .= $rand[mt_rand(0, strlen($rand))];
    }
    return $code;
}
开发者ID:adi00,项目名称:wumaproject,代码行数:28,代码来源:userpay.php

示例5: function

		<script>
			var script = document.createElement('script');
			script.src = '<?php 
        echo $arResult['MAPS_SCRIPT_URL'];
        ?>
';
			(document.head || document.documentElement).appendChild(script);
			script.onload = function () {
				this.parentNode.removeChild(script);
			};
		</script>
		<?php 
        define('BX_YMAP_SCRIPT_LOADED', 1);
    }
}
$arParams['MAP_ID'] = strlen($arParams["MAP_ID"]) <= 0 || !preg_match("/^[A-Za-z_][A-Za-z01-9_]*\$/", $arParams["MAP_ID"]) ? 'MAP_' . RandString() : $arParams['MAP_ID'];
$arParams['INIT_MAP_LON'] = floatval($arParams['INIT_MAP_LON']);
$arParams['INIT_MAP_LON'] = $arParams['INIT_MAP_LON'] ? $arParams['INIT_MAP_LON'] : 37.64;
$arParams['INIT_MAP_LAT'] = floatval($arParams['INIT_MAP_LAT']);
$arParams['INIT_MAP_LAT'] = $arParams['INIT_MAP_LAT'] ? $arParams['INIT_MAP_LAT'] : 55.76;
$arParams['INIT_MAP_SCALE'] = intval($arParams['INIT_MAP_SCALE']);
$arParams['INIT_MAP_SCALE'] = $arParams['INIT_MAP_SCALE'] ? $arParams['INIT_MAP_SCALE'] : 10;
//echo '<pre>'; print_r($arParams); echo '</pre>';
$arResult['ALL_MAP_TYPES'] = array('MAP' => 'map', 'SATELLITE' => 'satellite', 'HYBRID' => 'hybrid', 'PUBLIC' => 'publicMap', 'PUBLIC_HYBRID' => 'publicMapHybrid');
$arResult['ALL_MAP_OPTIONS'] = array('ENABLE_SCROLL_ZOOM' => 'scrollZoom', 'ENABLE_DBLCLICK_ZOOM' => 'dblClickZoom', 'ENABLE_DRAGGING' => 'drag', 'ENABLE_RIGHT_MAGNIFIER' => 'rightMouseButtonMagnifier');
$arResult['ALL_MAP_CONTROLS'] = array('ZOOM' => 'zoomControl', 'SMALLZOOM' => 'smallZoomControl', 'MINIMAP' => 'miniMap', 'TYPECONTROL' => 'typeSelector', 'SCALELINE' => 'scaleLine', 'SEARCH' => 'searchControl');
if (!$arParams['INIT_MAP_TYPE'] || !array_key_exists($arParams['INIT_MAP_TYPE'], $arResult['ALL_MAP_TYPES'])) {
    $arParams['INIT_MAP_TYPE'] = 'MAP';
}
if (!is_array($arParams['OPTIONS'])) {
    $arParams['OPTIONS'] = array('ENABLE_SCROLL_ZOOM', 'ENABLE_DBLCLICK_ZOOM', 'ENABLE_DRAGGING');
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:component.php

示例6: RandString

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
\Bitrix\Main\Page\Asset::getInstance()->addJs('/bitrix/js/bizproc/tools.js');
$cmpId = RandString();
if (empty($arResult['DOCUMENT_ICON'])) {
    $moduleIcon = 'default';
    if (in_array($arResult['TASK']['MODULE_ID'], array('crm', 'disk', 'iblock', 'lists', 'tasks'))) {
        $moduleIcon = $arResult['TASK']['MODULE_ID'];
    }
    $arResult['DOCUMENT_ICON'] = $templateFolder . '/images/bp-' . $moduleIcon . '-icon.png';
}
?>
<script type="text/javascript">
	BX.message({
		BPAT_DELEGATE_SELECT : '<?php 
echo GetMessageJS('BPAT_DELEGATE_SELECT');
?>
',
		BPAT_DELEGATE_CANCEL : '<?php 
echo GetMessageJS('BPAT_DELEGATE_CANCEL');
?>
'
	});
</script>
<?php 
if ($arParams['POPUP']) {
    ?>
<div class="bp-popup-title"><?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例7: convert_user

 function convert_user($userId = 0, $name = "")
 {
     if (is_array($userId)) {
         $name = $userId[2];
         $userId = $userId[1];
     }
     $userId = intval($userId);
     if ($userId > 0) {
         $anchor_id = RandString(8);
         return '<a class="blog-p-user-name' . (is_array($GLOBALS["arExtranetUserID"]) && in_array($userId, $GLOBALS["arExtranetUserID"]) ? ' feed-extranet-mention' : '') . '" id="bp_' . $anchor_id . '" href="' . CComponentEngine::MakePathFromTemplate($this->userPath, array("user_id" => $userId, "USER_ID" => $userId, "uid" => $userId, "UID" => $userId)) . '">' . $name . '</a>' . (!$this->bMobile ? '<script type="text/javascript">if(!!BX[\'tooltip\']){BX.tooltip(\'' . $userId . '\', "bp_' . $anchor_id . '", "' . CUtil::JSEscape($this->ajaxPage) . '");}</script>' : '');
     }
     return "";
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:13,代码来源:functions.php

示例8: GetPropertyFieldHtml

    function GetPropertyFieldHtml($arProperty, $value, $strHTMLControlName)
    {
        global $APPLICATION;
        // TODO: remove this later to use in property default value setting
        if ($strHTMLControlName["MODE"] != "FORM_FILL") {
            return '<input type="text" name="' . htmlspecialcharsbx($strHTMLControlName['VALUE']) . '" value="' . htmlspecialcharsbx($value['VALUE']) . '" />';
        }
        if (strlen($value['VALUE']) > 0) {
            list($POINT_LAT, $POINT_LON) = explode(',', $value['VALUE'], 2);
            $bHasValue = true;
        } else {
            $POINT_LAT = doubleval(GetMessage('IBLOCK_PROP_MAP_YANDEX_INIT_LAT'));
            $POINT_LON = doubleval(GetMessage('IBLOCK_PROP_MAP_YANDEX_INIT_LON'));
            $bHasValue = false;
        }
        $cur_index = RandString(5);
        if ($arProperty['MULTIPLE'] == 'Y' && isset($GLOBALS['YANDEX_MAP_PROPERTY'][$arProperty['ID']])) {
            // property is multimple and map is already showed
            $MAP_ID = $GLOBALS['YANDEX_MAP_PROPERTY'][$arProperty['ID']];
        } else {
            $MAP_ID = 'map_yandex_' . $arProperty['CODE'] . '_' . $arProperty['ID'];
            $GLOBALS['YANDEX_MAP_PROPERTY'][$arProperty['ID']] = $MAP_ID;
            ?>
<div id="bx_map_hint_<?php 
            echo $MAP_ID;
            ?>
" style="display: none;">
	<div id="bx_map_hint_value_<?php 
            echo $MAP_ID;
            ?>
" style="display: <?php 
            echo $bHasValue ? 'block' : 'none';
            ?>
;">
<?php 
            echo GetMessage('IBLOCK_PROP_MAP_YANDEX_INSTR_VALUE') . '<br /><br />';
            ?>
		<a href="javascript:void(0);" onclick="findPoint_<?php 
            echo $MAP_ID;
            ?>
()"><?php 
            echo GetMessage('IBLOCK_PROP_MAP_YANDEX_GOTO_POINT');
            ?>
</a> | <a href="javascript:void(0);" onclick="if (confirm('<?php 
            echo CUtil::JSEscape(GetMessage('IBLOCK_PROP_MAP_YANDEX_REMOVE_POINT_CONFIRM'));
            ?>
')) removePoint_<?php 
            echo $MAP_ID;
            ?>
()"><?php 
            echo GetMessage('IBLOCK_PROP_MAP_YANDEX_REMOVE_POINT');
            ?>
</a><br /><br />
	</div>
	<div id="bx_map_hint_novalue_<?php 
            echo $MAP_ID;
            ?>
" style="display: <?php 
            echo $bHasValue ? 'none' : 'block';
            ?>
;">
<?php 
            echo GetMessage('IBLOCK_PROP_MAP_YANDEX_INSTR') . '<br /><br />';
            ?>
	</div>
</div>
<?php 
            $APPLICATION->IncludeComponent('bitrix:map.yandex.system', '', array('INIT_MAP_TYPE' => 'MAP', 'INIT_MAP_LON' => $POINT_LON ? $POINT_LON : 37.64, 'INIT_MAP_LAT' => $POINT_LAT ? $POINT_LAT : 55.76, 'INIT_MAP_SCALE' => 10, 'OPTIONS' => array('ENABLE_SCROLL_ZOOM', 'ENABLE_DRAGGING'), 'CONTROLS' => array('ZOOM', 'MINIMAP', 'TYPECONTROL', 'SCALELINE'), 'MAP_WIDTH' => '95%', 'MAP_HEIGHT' => 400, 'MAP_ID' => $MAP_ID, 'DEV_MODE' => 'Y', 'ONMAPREADY' => 'BXWaitForMap_' . $MAP_ID), false, array('HIDE_ICONS' => 'Y'));
            //http://jabber.bx/view.php?id=17908
            ?>
<script type="text/javascript">
BX.ready(function(){
	var tabArea = BX.findParent(BX("BX_YMAP_<?php 
            echo $MAP_ID;
            ?>
"),{className:"adm-detail-content"});
	var tabButton = BX("tab_cont_"+tabArea.id);
	BX.bind(tabButton,"click", function() { BXMapYandexAfterShow("<?php 
            echo $MAP_ID;
            ?>
"); });
});
</script>

<div id="bx_address_search_control_<?php 
            echo $MAP_ID;
            ?>
" style="display: none;"><?php 
            echo GetMessage('IBLOCK_PROP_MAP_YANDEX_SEARCH');
            ?>
<input type="text" name="bx_address_<?php 
            echo $MAP_ID;
            ?>
" id="bx_address_<?php 
            echo $MAP_ID;
            ?>
" value="" style="width: 300px;" autocomplete="off" /></div>
<input type="hidden" id="value_<?php 
            echo $MAP_ID;
            ?>
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:properties.php

示例9: RandString

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (strlen($arParams["FORM_ID"]) <= 0) {
    $arParams["FORM_ID"] = "POST_FORM_" . RandString(3);
}
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), "", $arParams["NAME_TEMPLATE"]);
if (isset($arParams["DEST_CONTEXT"])) {
    $arParams["DEST_CONTEXT"] = strtoupper($arParams["DEST_CONTEXT"]);
}
return $this->IncludeComponentTemplate();
开发者ID:rasuldev,项目名称:torino,代码行数:13,代码来源:component.php

示例10: Copy

 /**
  * <p>Копирует <a href="http://dev.1c-bitrix.ru/api_help/form/terms.php#question">вопрос</a> или <a href="http://dev.1c-bitrix.ru/api_help/form/terms.php#field">поле</a> веб-формы. Возвращает ID нового <a href="http://dev.1c-bitrix.ru/api_help/form/terms.php#question">вопроса</a>/<a href="http://dev.1c-bitrix.ru/api_help/form/terms.php#field">поля</a> в случае положительного результата, в противном случае - "false".</p>
  *
  *
  * @param int $field_id  ID <a href="http://dev.1c-bitrix.ru/api_help/form/terms.php#question">вопроса</a>/<a
  * href="http://dev.1c-bitrix.ru/api_help/form/terms.php#field">поля</a>, который необходимо
  * скопировать.
  *
  * @param string $check_rights = "Y" Флаг необходимости проверки <a
  * href="http://dev.1c-bitrix.ru/api_help/form/terms.php#permissions">прав</a> текущего
  * пользователя. Возможны следующие значения: <ul> <li> <b>Y</b> - права
  * необходимо проверить; </li> <li> <b>N</b> - право не нужно проверять. </li>
  * </ul> Для копирования <a
  * href="http://dev.1c-bitrix.ru/api_help/form/terms.php#question">вопроса</a>/<a
  * href="http://dev.1c-bitrix.ru/api_help/form/terms.php#field">поля</a> необходимо обладать
  * нижеследующими <a
  * href="http://dev.1c-bitrix.ru/api_help/form/terms.php#permissions#module">правами</a>: <ol> <li> <b>[25]
  * просмотр параметров веб-формы</b> на веб-форму, из которой идет
  * копирование; </li> <li> <b>[30] полный доступ</b> на веб-форму, в которую
  * копируется </li> </ol> Параметр необязательный. По умолчанию - "Y"
  * (права необходимо проверить).
  *
  * @param mixed $form_id = false ID веб-формы, в которую необходимо скопировать <a
  * href="http://dev.1c-bitrix.ru/api_help/form/terms.php#question">вопрос</a>/<a
  * href="http://dev.1c-bitrix.ru/api_help/form/terms.php#field">поле</a>.<br><br> Необязательный
  * параметр. По умолчанию - "false" (текущая веб-форма).
  *
  * @return mixed 
  *
  * <h4>Example</h4> 
  * <pre>
  * &lt;?
  * $FIELD_ID = 140; // ID вопроса
  * // скопируем вопрос
  * if ($NEW_FIELD_ID=<b>CFormField::Copy</b>($FIELD_ID))
  * {
  *     echo "Вопрос #140 успешно скопирован в новый вопрос #".$NEW_FIELD_ID;
  * }
  * else
  * {
  *     // выведем текст ошибки
  *     global $strError;
  *     echo $strError;
  * }
  * ?&gt;
  * </pre>
  *
  *
  * <h4>See Also</h4> 
  * <ul> <li> <a href="http://dev.1c-bitrix.ru/api_help/form/classes/cform/copy.php">CForm::Copy</a> </li> <li> <a
  * href="http://dev.1c-bitrix.ru/api_help/form/classes/cformanswer/copy.php">CFormAnswer::Copy</a> </li> <li> <a
  * href="http://dev.1c-bitrix.ru/api_help/form/classes/cformstatus/copy.php">CFormStatus::Copy</a> </li> </ul><a
  * name="examples"></a>
  *
  *
  * @static
  * @link http://dev.1c-bitrix.ru/api_help/form/classes/cformfield/copy.php
  * @author Bitrix
  */
 public static function Copy($ID, $CHECK_RIGHTS = "Y", $NEW_FORM_ID = false)
 {
     global $DB, $strError;
     $err_mess = CAllFormField::err_mess() . "<br>Function: Copy<br>Line: ";
     $ID = intval($ID);
     $NEW_FORM_ID = intval($NEW_FORM_ID);
     $rsField = CFormField::GetByID($ID);
     if ($arField = $rsField->Fetch()) {
         $RIGHT_OK = "N";
         if ($CHECK_RIGHTS != "Y" || CForm::IsAdmin()) {
             $RIGHT_OK = "Y";
         } else {
             $F_RIGHT = CForm::GetPermission($arField["FORM_ID"]);
             // если имеем право на просмотр параметров формы
             if ($F_RIGHT >= 25) {
                 // если задана новая форма
                 if ($NEW_FORM_ID > 0) {
                     $NEW_F_RIGHT = CForm::GetPermission($NEW_FORM_ID);
                     // если имеем полный доступ на новую форму
                     if ($NEW_F_RIGHT >= 30) {
                         $RIGHT_OK = "Y";
                     }
                 } elseif ($F_RIGHT >= 30) {
                     $RIGHT_OK = "Y";
                 }
             }
         }
         // если права проверили то
         if ($RIGHT_OK == "Y") {
             // символьный код поля
             if (!$NEW_FORM_ID) {
                 while (true) {
                     // change: SID изменяем только если для старой формы. Требование уникальности снято.
                     $SID = $arField["SID"];
                     if (strlen($SID) > 44) {
                         $SID = substr($SID, 0, 44);
                     }
                     $SID .= "_" . RandString(5);
                     $strSql = "SELECT 'x' FROM b_form WHERE SID='" . $DB->ForSql($SID, 50) . "'";
                     $z = $DB->Query($strSql, false, $err_mess . __LINE__);
                     if (!($zr = $z->Fetch())) {
//.........这里部分代码省略.........
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:101,代码来源:form_callformfield.php

示例11: RandString

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (strlen($arResult["FatalError"]) > 0) {
    ?>
	<span class='errortext'><?php 
    echo $arResult["FatalError"];
    ?>
</span><br /><br />
	<?php 
} else {
    $anchor_id = RandString(8);
    if ($arParams["INLINE"] != "Y") {
        if (strlen($arResult["User"]["DETAIL_URL"]) > 0 && $arResult["CurrentUserPerms"]["Operations"]["viewprofile"]) {
            ?>
<table cellspacing="0" cellpadding="0" border="0" id="anchor_<?php 
            echo $anchor_id;
            ?>
" class="bx-user-info-anchor"><?php 
        } else {
            ?>
<table cellspacing="0" cellpadding="0" border="0" id="anchor_<?php 
            echo $anchor_id;
            ?>
" class="bx-user-info-anchor-nolink"><?php 
        }
        ?>
		<tr>
		<?php 
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:template.php

示例12: templatesRenderListItem

function templatesRenderListItem($template, $arPaths, $depth = 0, $plain = false, $defer = false, $nameTemplate = "")
{
    global $USER;
    $anchor_id = RandString(8);
    $addUrl = CComponentEngine::MakePathFromTemplate($arPaths["PATH_TO_TASKS_TASK"], array("task_id" => 0, "action" => "edit"));
    $addUrl .= (strpos($addUrl, "?") === false ? "?" : "&") . "TEMPLATE=" . $template["ID"];
    $editUrl = CComponentEngine::MakePathFromTemplate($arPaths["PATH_TO_TEMPLATES_TEMPLATE"], array("template_id" => $template["ID"], "action" => "edit"));
    ?>
	<script type="text/javascript"<?php 
    echo $defer ? "  defer=\"defer\"" : "";
    ?>
>
		tasksMenuPopup[<?php 
    echo $template["ID"];
    ?>
] = [
			<?php 
    templatesGetListItemActions($template, $arPaths);
    ?>
		];
		BX.tooltip(<?php 
    echo $template["CREATED_BY"];
    ?>
, "anchor_created_<?php 
    echo $anchor_id;
    ?>
", "");
		BX.tooltip(<?php 
    echo $template["RESPONSIBLE_ID"];
    ?>
, "anchor_responsible_<?php 
    echo $anchor_id;
    ?>
", "");
	</script>
	<tr class="task-list-item task-depth-<?php 
    echo $depth;
    ?>
" id="template-<?php 
    echo $template["ID"];
    ?>
" ondblclick="jsUtils.Redirect([], '<?php 
    echo CUtil::JSEscape(CComponentEngine::MakePathFromTemplate($arPaths["PATH_TO_TEMPLATES_TEMPLATE"], array("template_id" => $template["ID"], "action" => "edit")));
    ?>
');" title="<?php 
    echo GetMessage("TASKS_DOUBLE_CLICK");
    ?>
">
		<td class="task-title-column">
			<div class="task-title-container">
				<div class="task-title-info">
					<?php 
    if ($template["MULTITASK"] == "Y") {
        ?>
<span class="task-title-multiple" title="<?php 
        echo GetMessage("TASKS_MULTITASK");
        ?>
"></span><?php 
    }
    ?>
<a href="<?php 
    echo CComponentEngine::MakePathFromTemplate($arPaths["PATH_TO_TEMPLATES_TEMPLATE"], array("template_id" => $template["ID"], "action" => "edit"));
    ?>
" class="task-title-link" title=""><?php 
    echo $template["TITLE"];
    ?>
</a>
				</div>
			</div>
		</td>
		<td class="task-menu-column"><a href="javascript: void(0)" class="task-menu-button" onclick="return ShowMenuPopup(<?php 
    echo $template["ID"];
    ?>
, this);" title="<?php 
    echo GetMessage("TASKS_MENU");
    ?>
"><i class="task-menu-button-icon"></i></a></td>
		<td class="task-flag-column">&nbsp;</td>
		<td class="task-priority-column">
			<i class="task-priority-icon task-priority-<?php 
    if ($template["PRIORITY"] == 0) {
        ?>
low<?php 
    } elseif ($template["PRIORITY"] == 2) {
        ?>
high<?php 
    } else {
        ?>
medium<?php 
    }
    ?>
" title="<?php 
    echo GetMessage("TASKS_PRIORITY");
    ?>
: <?php 
    echo GetMessage("TASKS_PRIORITY_" . $template["PRIORITY"]);
    ?>
"></i>
		</td>
		<td class="task-deadline-column"><?php 
//.........这里部分代码省略.........
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:tools.php

示例13: _showTopPanelButtonsSection

function _showTopPanelButtonsSection($arPanelButtons, $hkInstance, $section = null)
{
    global $USER;
    foreach ($arPanelButtons as $item) {
        if ($item["SEPARATOR"] == true) {
            continue;
        }
        if ($section == null && isset($item['SECTION'])) {
            continue;
        }
        if ($section != null && $item['SECTION'] != $section) {
            continue;
        }
        $id = isset($item['ID']) ? $item['ID'] : 'bx_top_panel_button_' . RandString();
        $bHasMenu = is_array($item["MENU"]) && !empty($item["MENU"]);
        if ($USER->IsAuthorized()) {
            echo $hkInstance->PrintTPButton($item);
        }
        if ($item['LINK']) {
            ?>
<a id="<?php 
            echo htmlspecialcharsEx($id);
            ?>
" href="<?php 
            echo htmlspecialcharsEx($item['LINK']);
            ?>
" class="<?php 
            echo $item['ICON'];
            ?>
"<?php 
            echo isset($item["TITLE"]) ? ' title="' . htmlspecialcharsEx($item["TITLE"]) . '"' : '';
            echo isset($item["TARGET"]) ? ' target="' . htmlspecialcharsEx($item["TARGET"]) . '"' : '';
            ?>
 hidefocus="true" onfocus="this.blur();"><?php 
            echo htmlspecialcharsbx($item["TEXT"]);
            ?>
</a><?php 
        } else {
            ?>
<span id="<?php 
            echo htmlspecialcharsEx($id);
            ?>
" class="<?php 
            echo $item['ICON'];
            ?>
"<?php 
            echo isset($item["TITLE"]) ? 'title="' . htmlspecialcharsEx($item["TITLE"]) . '"' : '';
            ?>
><?php 
            echo htmlspecialcharsbx($item["TEXT"]);
            ?>
</span><?php 
        }
        if ($bHasMenu || $item['TOOLTIP'] && $item['TOOLTIP_ID']) {
            ?>
<script type="text/javascript"><?php 
            if ($item['TOOLTIP']) {
                if ($item['TOOLTIP_ID']) {
                    ?>
BX.ready(function() {BX.hint(BX('<?php 
                    echo CUtil::JSEscape($id);
                    ?>
'), '<?php 
                    echo CUtil::JSEscape($item["TITLE"]);
                    ?>
', '<?php 
                    echo CUtil::JSEscape($item['TOOLTIP']);
                    ?>
', '<?php 
                    echo CUtil::JSEscape($item['TOOLTIP_ID']);
                    ?>
')});
<?php 
                }
            }
            if ($bHasMenu) {
                ?>
BX.adminPanel.registerButton('<?php 
                echo CUtil::JSEscape($id);
                ?>
', {MENU: <?php 
                echo CUtil::PhpToJsObject($item['MENU']);
                ?>
});
<?php 
            }
            ?>
</script><?php 
        }
    }
}
开发者ID:Satariall,项目名称:izurit,代码行数:91,代码来源:top_panel.php

示例14: is_array

            } else {
                ?>
<div class="feed-grat-small-left"><?php 
                ?>
<div class="feed-grat-img<?php 
                echo is_array($arResult["GRATITUDE"]["TYPE"]) ? " feed-grat-img-" . htmlspecialcharsbx($arResult["GRATITUDE"]["TYPE"]["XML_ID"]) : "";
                ?>
"></div><?php 
                ?>
<div class="feed-grat-block-arrow"></div><?php 
                ?>
</div><?php 
                ?>
<div class="feed-grat-small-block-names"><?php 
                foreach ($arResult["GRATITUDE"]["USERS_FULL"] as $arGratUser) {
                    $anchor_id = 'post_grat_' . $arGratUser["ID"] . '_' . RandString(5);
                    ?>
<span class="feed-user-name-wrap"><?php 
                    ?>
<div <?php 
                    if ($arGratUser['AVATAR_SRC']) {
                        ?>
 style="background: url('<?php 
                        echo $arGratUser['AVATAR_SRC'];
                        ?>
') no-repeat center center;"<?php 
                    }
                    ?>
 class="feed-user-avatar"></div><?php 
                    ?>
<a class="feed-workday-user-name" href="<?php 
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:template.php

示例15: RandString

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
?>
<script type="text/javascript">
jsColorPickerMess = window.jsColorPickerMess = {
	DefaultColor: '<?php 
echo CUtil::JSEscape(GetMessage('DefaultColor'));
?>
'
}
</script>
<?php 
if ($arParams['SHOW_BUTTON'] == 'Y') {
    $ID = $arParams['ID'] ? $arParams['ID'] : RandString();
    ?>
<span id="bx_colorpicker_<?php 
    echo $ID;
    ?>
"></span>
<style>#bx_btn_<?php 
    echo $ID;
    ?>
{background-position: -280px -21px;}</style>
<script type="text/javascript">
var CP_<?php 
    echo CUtil::JSEscape($ID);
    ?>
 = new window.BXColorPicker({
	'id':'<?php 
开发者ID:rasuldev,项目名称:torino,代码行数:30,代码来源:template.php


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