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


PHP CRatings::GetRatingObjects方法代码示例

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


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

示例1: __CheckFields

 public static function __CheckFields($arFields)
 {
     $aMsg = array();
     if (is_set($arFields, "NAME") && trim($arFields["NAME"]) == "") {
         $aMsg[] = array("id" => "NAME", "text" => GetMessage("RATING_GENERAL_ERR_NAME"));
     }
     if (is_set($arFields, "ACTIVE") && !($arFields["ACTIVE"] == 'Y' || $arFields["ACTIVE"] == 'N')) {
         $aMsg[] = array("id" => "ACTIVE", "text" => GetMessage("RATING_GENERAL_ERR_ACTIVE"));
     }
     if (is_set($arFields, "ENTITY_ID")) {
         $arObjects = CRatings::GetRatingObjects();
         if (!in_array($arFields['ENTITY_ID'], $arObjects)) {
             $aMsg[] = array("id" => "ENTITY_ID", "text" => GetMessage("RATING_GENERAL_ERR_ENTITY_ID"));
         }
     }
     if (is_set($arFields, "CALCULATION_METHOD") && trim($arFields["CALCULATION_METHOD"]) == "") {
         $aMsg[] = array("id" => "CALCULATION_METHOD", "text" => GetMessage("RATING_GENERAL_ERR_CAL_METHOD"));
     }
     if (!empty($aMsg)) {
         $e = new CAdminException($aMsg);
         $GLOBALS["APPLICATION"]->ThrowException($e);
         return false;
     }
     return true;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:25,代码来源:ratings.php

示例2: htmlspecialcharsbx

	<input type="hidden" name="action" value="" id="action">
<?php 
if ($_REQUEST["addurl"] != "") {
    ?>
	<input type="hidden" name="addurl" value="<?php 
    echo htmlspecialcharsbx($_REQUEST["addurl"]);
    ?>
">
<?php 
}
$tabControl->EndEpilogContent();
$tabControl->Begin();
$tabControl->BeginNextFormTab();
$tabControl->AddEditField("NAME", GetMessage('RATING_EDIT_FRM_NAME'), true, array("size" => 54, "maxlength" => 255), $str_NAME);
$tabControl->BeginCustomField("ENTITY_ID", GetMessage('RATING_EDIT_FRM_TYPE_ID'), true);
$arObjects = CRatings::GetRatingObjects();
?>
	<tr style="<?php 
echo count($arObjects) > 1 ? '' : 'display:none';
?>
" class="adm-detail-required-field">
		<td><?php 
echo GetMessage("RATING_EDIT_FRM_TYPE_ID");
?>
</td>
		<td><?php 
echo SelectBoxFromArray("ENTITY_ID", array('reference_id' => $arObjects, 'reference' => $arObjects), $str_ENTITY_ID, "", "onChange=\"jsTypeChanged('rating_form')\"");
?>
</td>
	</tr>
<?php 
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:rating_edit.php


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