當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。