本文整理匯總了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;
}
示例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