本文整理汇总了PHP中CLang::GetList方法的典型用法代码示例。如果您正苦于以下问题:PHP CLang::GetList方法的具体用法?PHP CLang::GetList怎么用?PHP CLang::GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLang
的用法示例。
在下文中一共展示了CLang::GetList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$MAP_COUNTER = count($arrMAP);
reset($arrMAP);
if (is_array($arrMAP) && count($arrMAP) > 0) {
foreach ($arrMAP as $arM) {
if (is_array($arM) && count($arM) > 0) {
reset($arM);
foreach ($arM as $ar) {
if ($ar["IS_DIR"] == "Y") {
$strFolders .= "," . $ar["ID"];
}
}
}
}
}
} else {
$sl = @CLang::GetList();
while ($slr = $sl->Fetch()) {
if ($slr["LID"] == LANG) {
$lang_dir = $slr["DIR"];
break;
}
}
$i = 0;
if (is_array($arrMainMenu) && count($arrMainMenu) > 0) {
foreach ($arrMainMenu as $mmenu) {
$main_menu = $lang_dir . "." . trim($mmenu) . ".menu.php";
if (file_exists($_SERVER["DOCUMENT_ROOT"] . $main_menu)) {
$aMenuLinks = array();
include $_SERVER["DOCUMENT_ROOT"] . $main_menu;
foreach ($aMenuLinks as $aMenu) {
if (count($aMenu) > 4) {
示例2: GetMessage
<?if($ID>0):?>
<tr>
<td><?echo GetMessage("MAIL_MBOX_EDT_ID")?></td>
<td><?echo $str_ID?></td>
</tr>
<?endif?>
<?if(strlen($str_TIMESTAMP_X)>0):?>
<tr>
<td><?echo GetMessage("MAIL_MBOX_EDT_DATECH")?></td>
<td><?echo $str_TIMESTAMP_X?></td>
</tr>
<? endif; ?>
<tr>
<td width="40%"><?echo GetMessage("MAIL_MBOX_EDT_LANG")?> </td>
<td width="60%">
<?$l = CLang::GetList($lby="sort", $lorder="asc");?>
<select name="LID">
<?
ClearVars("l_");
while($l->ExtractFields("l_")):
?><option value="<?echo $l_LID?>"<?if($str_LID==$l_LID)echo " selected"?>><?echo $l_NAME?></option><?
endwhile;
?>
</select>
</td>
</tr>
<tr>
<td><?echo GetMessage("MAIL_MBOX_EDT_ACT")?></td>
<td><input type="checkbox" name="ACTIVE" value="Y"<?if($str_ACTIVE=="Y")echo " checked"?>></td>
</tr>
<tr class="adm-detail-required-field">
示例3: GetMessage
</tr>
<tr>
<td nowrap><?php
echo GetMessage("MAIL_MBOX_ADM_FILT_LANG");
?>
:</td>
<td nowrap>
<select name="find_lid">
<option value=""><?php
echo GetMessage("MAIL_MBOX_ADM_FILT_ANY");
?>
</option>
<?php
ClearVars("l_");
$l = CLang::GetList($b = "sort", $o = "asc", array("VISIBLE" => "Y"));
while ($l->ExtractFields("l_")) {
?>
<option value="<?php
echo $l_LID;
?>
"<?php
if ($find_lid == $l_LID) {
echo " selected";
}
?>
><?php
echo $l_NAME;
?>
</option><?php
}
示例4: GetMessage
echo $str_CODE;
?>
" >
</td>
</tr>
<tr class="adm-detail-required-field">
<td class="adm-detail-valign-top"><?php
echo GetMessage("IB_E_SITES");
?>
</td>
<td>
<?php
if ('O' == $str_CATALOG_TYPE) {
?>
<div class="adm-list"><?php
$l = CLang::GetList($by = "sort", $order = "asc");
$arLidValue = $str_LID;
if (!is_array($arLidValue)) {
$arLidValue = array($arLidValue);
}
while ($l_arr = $l->Fetch()) {
?>
<div class="adm-list-item">
<div class="adm-list-control"><input type="checkbox" name="LID_SHOW[]" value="<?php
echo htmlspecialcharsex($l_arr["LID"]);
?>
" id="<?php
echo htmlspecialcharsex($l_arr["LID"]);
?>
" class="typecheckbox"<?php
echo in_array($l_arr["LID"], $arLidValue) ? ' checked' : '';
示例5: Delete
function Delete($ID)
{
/** @global CMain $APPLICATION */
global $APPLICATION, $DB;
$b = "";
$o = "";
$db_res = CLang::GetList($b, $o, array("LANGUAGE_ID" => $ID));
if ($db_res->Fetch()) {
return false;
}
foreach (GetModuleEvents("main", "OnBeforeLanguageDelete", true) as $arEvent) {
if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
$err = GetMessage("MAIN_BEFORE_DEL_ERR") . ' ' . $arEvent['TO_NAME'];
if ($ex = $APPLICATION->GetException()) {
$err .= ': ' . $ex->GetString();
}
$APPLICATION->throwException($err);
return false;
}
}
foreach (GetModuleEvents("main", "OnLanguageDelete", true) as $arEvent) {
ExecuteModuleEventEx($arEvent, array($ID));
}
return $DB->Query("DELETE FROM b_language WHERE LID='" . $DB->ForSQL($ID, 2) . "'", true);
}
示例6: GetMessage
<tr>
<td><?echo GetMessage("SALE_F_TRACKING_NUMBER");?>:</td>
<td>
<input type="text" name="filter_tracking_number" value="<?echo htmlspecialcharsEx($filter_tracking_number)?>" size="10">
</td>
</tr>
<tr>
<td><?echo GetMessage("SALE_F_LANG_CUR");?>:</td>
<td>
<select name="filter_lang">
<option value=""><?php
echo htmlspecialcharsex(GetMessage("SALE_F_ALL"));
?>
</option>
<?
$dbSitesList = CLang::GetList(($b1="sort"), ($o1="asc"));
while ($arSitesList = $dbSitesList->Fetch())
{
if (!in_array($arSitesList["LID"], $arAccessibleSites)
&& $saleModulePermissions < "W")
continue;
?><option value="<?php
echo htmlspecialcharsbx($arSitesList["LID"]);
?>
"<?if ($arSitesList["LID"] == $filter_lang) echo " selected";?>>[<?php
echo htmlspecialcharsex($arSitesList["LID"]);
?>
] <?php
echo htmlspecialcharsex($arSitesList["NAME"]);
?>
示例7: InstallFiles
function InstallFiles($arParams = array())
{
global $DB;
if ($_ENV["COMPUTERNAME"] != 'BX') {
//Admin files
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/admin", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/admin", false);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/images", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/images/learning", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/public/js", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/js", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js", true, true);
//Theme
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/themes", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/themes", true, true);
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/components", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components", True, True);
}
//copy public scripts
$arSITE_ID = array();
$sites = CLang::GetList($by, $order, array("ACTIVE" => "Y"));
while ($site = $sites->Fetch()) {
if ($_REQUEST["copy_" . $site["LID"]] == "Y" && !empty($_REQUEST["path_" . $site["LID"]])) {
$arSITE_ID[] = $site["LID"];
$DOC_ROOT = strlen($site["DOC_ROOT"]) <= 0 ? $_SERVER["DOCUMENT_ROOT"] : $site["DOC_ROOT"];
$ldir = $site['LANGUAGE_ID'] == 'ru' ? 'ru' : 'en';
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/public/site/{$ldir}/", $DOC_ROOT . $_REQUEST["path_" . $site["LID"]], true, true);
}
}
if (!file_exists($_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/learning/")) {
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/public/template/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/learning/", true, true);
}
if (!empty($arSITE_ID)) {
if (strlen($_REQUEST["template_id"]) <= 0) {
$_REQUEST["template_id"] = "learning";
}
//Copy Template
CopyDirFiles($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/learning/install/public/template/", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/templates/" . $_REQUEST["template_id"] . "/", true, true);
foreach ($arSITE_ID as $SITE_ID) {
$path = $_REQUEST["path_" . $SITE_ID];
if (strlen($path) <= 0) {
continue;
}
if (substr($path, -1, 1) != "/") {
$path .= "/";
}
$cond = "CSite::InDir('" . $path . "course/')";
$DB->Query("INSERT INTO b_site_template(SITE_ID, " . CMain::__GetConditionFName() . ", SORT, TEMPLATE) " . "VALUES('" . $DB->ForSQL($SITE_ID) . "', '" . $DB->ForSQL($cond, 255) . "', '100', '" . $DB->ForSQL(trim($_REQUEST["template_id"]), 255) . "')", true);
}
}
return true;
}
示例8: GetMessage
}
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("SALE_F_LANG");
?>
:</td>
<td>
<script language="JavaScript">
var arLang = new Array();
var arCurr = new Array();
<?php
$db_extras = CLang::GetList($b = "name", $o = "asc");
$i = 0;
while ($extras = $db_extras->Fetch()) {
echo "arLang[" . $i . "]='" . $extras["LID"] . "';";
echo "arCurr[" . $i . "]='" . CSaleLang::GetLangCurrency($extras["LID"]) . "';";
$i++;
}
?>
function LangChange()
{
filter_lang = eval("document.find_form.filter_lang");
filter_order_price_from = eval("document.find_form.filter_order_price_from");
filter_order_price_to = eval("document.find_form.filter_order_price_to");
f_currency = eval("document.find_form.f_currency");
示例9: GetMessage
<option value=""><?echo GetMessage("SALE_ALL")?></option>
<?$db_vars = CSaleLocation::GetList(Array("SORT"=>"ASC", "COUNTRY_NAME_LANG"=>"ASC", "CITY_NAME_LANG"=>"ASC"), array(), LANG)?>
<?while ($vars = $db_vars->Fetch()):?>
<option value="<?echo $vars["ID"]?>"<?if (IntVal($vars["ID"])==IntVal($filter_location)) echo " selected"?>><?echo htmlspecialcharsbx($vars["COUNTRY_NAME"]." - ".$vars["CITY_NAME"])?></option>
<?endwhile;?>
</select>
</td>
</tr>
<tr>
<td><?echo GetMessage("SALE_F_LANG");?>:</td>
<td>
<script language="JavaScript">
var arLang = new Array();
var arCurr = new Array();
<?
$db_extras = CLang::GetList(($b="name"), ($o="asc"));
$i = 0;
while ($extras = $db_extras->Fetch())
{
echo "arLang[".$i."]='".$extras["LID"]."';";
echo "arCurr[".$i."]='".CSaleLang::GetLangCurrency($extras["LID"])."';";
$i++;
}
?>
function LangChange()
{
filter_lang = eval("document.find_form.filter_lang");
filter_order_price_from = eval("document.find_form.filter_order_price_from");
filter_order_price_to = eval("document.find_form.filter_order_price_to");
f_currency = eval("document.find_form.f_currency");
示例10: CheckFields
function CheckFields($ACTION, &$arFields)
{
if (is_set($arFields, "LANG") || $ACTION == "ADD") {
for ($i = 0; $i < count($arFields["LANG"]); $i++) {
if (!is_set($arFields["LANG"][$i], "LID") || strLen($arFields["LANG"][$i]["LID"]) <= 0) {
return false;
}
if (!is_set($arFields["LANG"][$i], "NAME") || strLen($arFields["LANG"][$i]["NAME"]) <= 0) {
return false;
}
}
$db_lang = CLang::GetList($b = "sort", $o = "asc");
while ($arLang = $db_lang->Fetch()) {
$bFound = False;
for ($i = 0; $i < count($arFields["LANG"]); $i++) {
if ($arFields["LANG"][$i]["LID"] == $arLang["LID"]) {
$bFound = True;
}
}
if (!$bFound) {
return false;
}
}
}
return True;
}
示例11: array
if($isAdmin)
$arActions[] = array("ICON"=>"delete", "TEXT"=>GetMessage("MURL_DELETE"), "ACTION"=>"if(confirm('".GetMessage("MURL_DELETE_CONF")."')) ".$lAdmin->ActionDoGroup(UrlEncode($arResult["CONDITION"]), "delete"));
$row->AddActions($arActions);
}
// показ формы с кнопками добавления, ...
$lAdmin->AddGroupActionTable(
array(
"delete" => true,
)
);
$arDDMenu = array();
$dbRes = CLang::GetList(($b="sort"), ($o="asc"));
while(($arRes = $dbRes->Fetch()))
{
$arDDMenu[] = array(
"TEXT" => htmlspecialcharsbx("[".$arRes["LID"]."] ".$arRes["NAME"]),
"ACTION" => "window.location = 'urlrewrite_edit.php?lang=".urlencode(LANG)."&site_id=".urlencode($arRes["LID"])."';"
);
}
$aContext = array(
array(
"TEXT" => GetMessage("MURL_NEW"),
"TITLE" => GetMessage("MURL_NEW_TITLE"),
"ICON" => "btn_new",
"MENU" => $arDDMenu
),
示例12: foreach
$saveValue .= $SELECTED_FIELDS[$i];
}
} else {
$saveValue = "ID,USER,PAY_SYSTEM,PRICE,STATUS,PAYED,PS_STATUS,CANCELED,BASKET";
}
COption::SetOptionString("sale", "order_list_fields", $saveValue);
//SAVE SHOP LIST SITE
foreach ($siteList as $val) {
COption::RemoveOption("sale", "SHOP_SITE_" . $val["ID"]);
}
if (isset(${"SHOP_SITE"}) and is_array(${"SHOP_SITE"})) {
foreach (${"SHOP_SITE"} as $key => $val) {
COption::SetOptionString("sale", "SHOP_SITE_" . $val, $val);
}
}
$db_result_lang = CLang::GetList($by1 = "sort", $order1 = "asc");
while ($db_result_lang_array = $db_result_lang->Fetch()) {
$valCurrency = Trim(${"CURRENCY_" . $db_result_lang_array["LID"]});
unset($arFields);
$arFields["LID"] = $db_result_lang_array["LID"];
if (strlen($valCurrency) <= 0) {
$valCurrency = false;
}
$arFields["CURRENCY"] = $valCurrency;
if ($arRes = CSaleLang::GetByID($db_result_lang_array["LID"])) {
if ($valCurrency !== false) {
CSaleLang::Update($db_result_lang_array["LID"], $arFields);
} else {
CSaleLang::Delete($db_result_lang_array["LID"]);
}
} else {
示例13: CLang
}
$DB->Commit();
break;
case "activate":
case "deactivate":
$ob = new CLang();
$arFields = array("ACTIVE" => $_REQUEST['action'] == "activate" ? "Y" : "N");
if (!$ob->Update($ID, $arFields)) {
$lAdmin->AddGroupError(GetMessage("EDIT_ERROR") . $ob->LAST_ERROR, $ID);
}
break;
}
}
}
$APPLICATION->SetTitle(GetMessage("TITLE"));
$langs = CLang::GetList($by, $order, array());
$rsData = new CAdminResult($langs, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES"), false));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "ACTIVE", "content" => GetMessage('ACTIVE'), "sort" => "active", "default" => true), array("id" => "SORT", "content" => GetMessage('SORT'), "sort" => "sort", "default" => true), array("id" => "NAME", "content" => GetMessage("NAME"), "sort" => "name", "default" => true), array("id" => "DIR", "content" => GetMessage("DIR"), "sort" => "dir", "default" => true), array("id" => "DEF", "content" => GetMessage("DEF"), "sort" => "def", "default" => true)));
while ($arRes = $rsData->NavNext(true, "f_")) {
$row =& $lAdmin->AddRow($f_ID, $arRes, "site_edit.php?LID=" . urlencode($arRes['ID']) . "&lang=" . LANGUAGE_ID, GetMessage("SITE_EDIT"));
$row->AddViewField("ID", '<a href="site_edit.php?lang=' . LANGUAGE_ID . '&LID=' . urlencode($arRes['ID']) . '" title="' . GetMessage("SITE_EDIT_TITLE") . '">' . $f_ID . '</a>');
$row->AddCheckField("ACTIVE");
$row->AddInputField("SORT");
$row->AddInputField("NAME");
$row->AddInputField("DIR");
$row->AddCheckField("DEF");
$arActions = array();
$arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("CHANGE"), "ACTION" => $lAdmin->ActionRedirect("site_edit.php?LID=" . urlencode($arRes['ID'])), "DEFAULT" => true);
if ($isAdmin) {
示例14: htmlspecialcharsex
</tr>
<tr>
<td><?php
echo Loc::getMessage("SALE_F_LANG_CUR");
?>
:</td>
<td>
<select name="filter_lang">
<option value=""><?php
echo htmlspecialcharsex(Loc::getMessage("SALE_F_ALL"));
?>
</option>
<?php
$b1 = "SORT";
$o1 = "ASC";
$dbSitesList = CLang::GetList($b1, $o1);
while ($arSitesList = $dbSitesList->Fetch()) {
if (!in_array($arSitesList["LID"], $arAccessibleSites) && $saleModulePermissions < "W") {
continue;
}
?>
<option value="<?php
echo htmlspecialcharsbx($arSitesList["LID"]);
?>
"<?php
if ($arSitesList["LID"] == $filter_lang) {
echo " selected";
}
?>
>[<?php
echo htmlspecialcharsex($arSitesList["LID"]);
示例15: CheckFields
public static function CheckFields($ACTION, &$arFields)
{
if (is_set($arFields, "LANG") || $ACTION == "ADD") {
foreach ($arFields["LANG"] as $val) {
if (!is_set($val, "LID") || empty($val["LID"])) {
return false;
}
if (!is_set($val, "NAME") || empty($val["NAME"])) {
return false;
}
}
$db_lang = CLang::GetList($b = "sort", $o = "asc");
while ($arLang = $db_lang->Fetch()) {
$bFound = false;
foreach ($arFields["LANG"] as $val) {
$bFound = $bFound ? $bFound : $val["LID"] == $arLang["LID"];
}
if (!$bFound) {
return false;
}
}
}
return True;
}