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


PHP CForumNew::GetList方法代码示例

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


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

示例1: LocalRedirect

        } else {
            LocalRedirect("forum_edit.php?lang=" . LANG . "&ID=" . $ID);
        }
    }
}
/********************************************************************
				/Action
********************************************************************/
$APPLICATION->SetTitle($ID > 0 ? str_replace("#ID#", $ID, GetMessage("FE_PAGE_TITLE1")) : GetMessage("FE_PAGE_TITLE2"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
/********************************************************************
				Data
********************************************************************/
$arForum = array("NAME" => "", "DESCRIPTION" => "", "FORUM_GROUP_ID" => "", "GROUP_ID" => "", "SITES" => array(), "PATH2FORUM_MESSAGE" => "/" . SITE_DIR . "/forum/message.php?FID=#FORUM_ID#&TID=#TOPIC_ID#&MID=#MESSAGE_ID#", "MODERATION" => "N", "ACTIVE" => "Y", "INDEXATION" => "Y", "DEDUPLICATION" => "Y", "SORT" => 150, "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_VIDEO" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_TABLE" => "Y", "ALLOW_ALIGN" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "N", "ALLOW_TOPIC_TITLED" => "N", "ALLOW_NL2BR" => "N", "ALLOW_MOVE_TOPIC" => "N", "ALLOW_SIGNATURE" => "Y", "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "");
if ($ID > 0) {
    $db_res = CForumNew::GetList(array(), array("ID" => $ID));
    $arForum = $db_res->Fetch();
    $arForum["SITES"] = CForumNew::GetSites($ID);
    $arForum["GROUP_ID"] = CForumNew::GetAccessPermissions($ID, "TWO");
}
if ($bVarsFromForm) {
    $arForum = $arFields;
}
if (!function_exists("__recursive_htmlspecialcharsbx")) {
    function __recursive_htmlspecialcharsbx(&$res)
    {
        if (is_array($res)) {
            foreach ($res as $key => $val) {
                $res[$key] = __recursive_htmlspecialcharsbx($val);
            }
        } elseif (is_string($res)) {
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:forum_edit.php

示例2: while

 while ($arRes = $rsData->NavNext(true, "f_")) {
     $row =& $lAdmin->AddRow($f_ID, $arRes);
     $row->AddEditField("SITE_ID", CLang::SelectBox("FIELDS[" . $f_ID . "][SITE_ID]", $f_SITE_ID, "", "BoxUpdateNew('param1'," . $f_ID . ")"));
     $row->AddViewField("SITE_ID", "[" . $f_SITE_ID . "] " . htmlspecialcharsbx(CSearchCustomRank::__GetParam($lang, $f_SITE_ID)));
     $row->AddSelectField("MODULE_ID", CSearchCustomRank::ModulesList(), array("OnChange" => "BoxUpdateNew('param1'," . $f_ID . ")"));
     $strPARAM1 = '<select name="FIELDS[' . $f_ID . '][PARAM1]" OnChange="BoxUpdateNew(\'param1\', ' . $f_ID . ')">' . '<option value="">' . GetMessage("customrank_no") . '</option>';
     if ($f_MODULE_ID == "iblock" && CModule::IncludeModule("iblock")) {
         $rs = CIBlockType::GetList(array("sort" => "asc"), array("ACTIVE" => "Y"));
         while ($ar = $rs->Fetch()) {
             if ($arIBType = CIBlockType::GetByIDLang($ar["ID"], LANG)) {
                 $strPARAM1 .= '<option value="' . htmlspecialcharsbx($ar["ID"]) . '" ' . ($ar["ID"] == $f_PARAM1 ? " selected" : "") . '>' . htmlspecialcharsbx("[" . $ar["ID"] . "] " . $arIBType["~NAME"]) . '</option>';
             }
         }
         $strPARAM1 .= '</select>';
     } elseif ($f_MODULE_ID == "forum" && CModule::IncludeModule("forum")) {
         $rs = CForumNew::GetList(array("sort" => "asc"), array("LID" => $f_SITE_ID));
         while ($ar = $rs->Fetch()) {
             $strPARAM1 .= '<option value="' . htmlspecialcharsbx($ar["ID"]) . '" ' . ($ar["ID"] == $f_PARAM1 ? " selected" : "") . '>' . htmlspecialcharsbx("[" . $ar["ID"] . "] " . $ar["NAME"]) . '</option>';
         }
         $strPARAM1 .= '</select>';
     } else {
         $strPARAM1 = '&nbsp;<input type="hidden" name="FIELDS[' . $f_ID . '][PARAM1]" value="">';
     }
     $row->AddEditField("PARAM1", '<div id="PARAM1[' . $f_ID . ']_result_div">' . $strPARAM1 . '</div>');
     $f_PARAM1_NAME = "[" . $f_PARAM1 . "] " . CSearchCustomRank::__GetParam($lang, $f_SITE_ID, $f_MODULE_ID, $f_PARAM1);
     $row->AddViewField("PARAM1", $f_PARAM1 == "" ? "&nbsp;" : $f_PARAM1_NAME);
     $strPARAM2 = '<select name="FIELDS[' . $f_ID . '][PARAM2]" OnChange="BoxUpdateNew(\'param2\', ' . $f_ID . ')">' . '<option value="">' . GetMessage("customrank_no") . '</option>';
     if ($f_MODULE_ID == "iblock" && CModule::IncludeModule("iblock")) {
         $rs = CIBlock::GetList(array("SORT" => "ASC"), array("TYPE" => $f_PARAM1, "LID" => $f_SITE_ID));
         while ($ar = $rs->Fetch()) {
             $strPARAM2 .= '<option value="' . htmlspecialcharsbx($ar["ID"]) . '" ' . ($ar["ID"] == $f_PARAM2 ? " selected" : "") . '>' . htmlspecialcharsbx("[" . $ar["ID"] . "] " . $ar["NAME"]) . '</option>';
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:search_customrank_admin.php

示例3: Delete

 function Delete($ID)
 {
     global $DB;
     $ID = intVal($ID);
     $aMsg = array();
     $res = CForumGroup::GetByIDEx($ID, LANGUAGE_ID);
     if (!$res) {
         return true;
     }
     $db_res = CForumGroup::GetList(array(), array("PARENT_ID" => $ID));
     if ($db_res->Fetch()) {
         $aMsg[] = array("id" => 'FORUM_GROUP_GROUPS', "text" => str_replace(array("#GROUP_NAME#", "#GROUP_ID#"), array($res["NAME"], $ID), GetMessage("FG_ERROR_CONTENT_GROUP")));
     }
     $db_res = CForumNew::GetList(array(), array("FORUM_GROUP_ID" => $ID));
     if ($db_res->Fetch()) {
         $aMsg[] = array("id" => 'FORUM_GROUP_FORUMS', "text" => str_replace(array("#GROUP_NAME#", "#GROUP_ID#"), array($res["NAME"], $ID), GetMessage("FG_ERROR_CONTENT_FORUM")));
     }
     if (!empty($aMsg)) {
         $e = new CAdminException(array_reverse($aMsg));
         $GLOBALS["APPLICATION"]->ThrowException($e);
         return false;
     }
     if (CACHED_b_forum_group !== false) {
         $GLOBALS["CACHE_MANAGER"]->CleanDir("b_forum_group");
     }
     $DB->Query("DELETE FROM b_forum_group_lang WHERE FORUM_GROUP_ID = " . $ID, true);
     $DB->Query("DELETE FROM b_forum_group WHERE ID = " . $ID, true);
     CAllForumGroup::Resort();
     return true;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:30,代码来源:forum_new.php

示例4: GetForumIdByXMLID

 /**
  * @access private
  *
  * @param $XML_ID
  * @throws TasksException
  * @return integer
  */
 protected static function GetForumIdByXMLID($XML_ID)
 {
     if (!(IsModuleInstalled('forum') && CModule::IncludeModule('forum'))) {
         throw new TasksException();
     }
     $arOrder = array();
     $arFilter = array('XML_ID' => $XML_ID);
     /** @noinspection PhpDynamicAsStaticMethodCallInspection */
     $rc = CForumNew::GetList($arOrder, $arFilter);
     $arForum = $rc->Fetch();
     // ambiguous exception here
     if (!isset($arForum['ID'])) {
         throw new TasksException('Forum not found');
     }
     return (int) $arForum['ID'];
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:23,代码来源:tasktools.php

示例5: array

        $arFieldsParams = array("SHOW_VOTE" => "Y", "VOTE_CHANNEL_ID" => $res["ID"], "VOTE_GROUP_ID" => 0);
        //Registered users group
        $dbResult = CGroup::GetList($by, $order, array("STRING_ID" => "REGISTERED_USERS"));
        if ($dbResult && ($res = $dbResult->Fetch())) {
            $arFieldsParams["VOTE_GROUP_ID"] = $res["ID"];
        }
        $db_res = CVote::GetList($by, $order, array("CHANNEL_ID" => $arFieldsParams["VOTE_CHANNEL_ID"]), $is_filtered);
        if ($db_res && ($res = $db_res->Fetch())) {
            $arFieldsParams["VOTE_ID"] = intVal($res["ID"]);
        }
    }
}
// Forums
$arForums = array();
$arReplaceForums = array();
$db_res = CForumNew::GetList(array(), array("SITE_ID" => $SITE_ID));
if ($db_res && ($res = $db_res->Fetch())) {
    do {
        $arForums[$res["ID"]] = $res["NAME"];
    } while ($res = $db_res->Fetch());
}
// Forum № 1
if (in_array(GetMessage("F_FORUM_1_NAME"), $arForums)) {
    foreach ($arForums as $key => $val) {
        if ($val == GetMessage("F_FORUM_1_NAME")) {
            $arReplaceForums[] = $key;
        }
    }
} else {
    $arFields = array("NAME" => GetMessage("F_FORUM_1_NAME"), "DESCRIPTION" => GetMessage("F_FORUM_1_DECRIPTION"), "SORT" => 100, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "N", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroup["PUBLIC"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "Y", "SITES" => array($SITE_ID => "/communication/forum/messages/forum#FID#/message#MID#/#TITLE_SEO#"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "M", "4" => "A", "5" => "A", "11" => "A", "15" => "A", "16" => "A", "17" => "A", "18" => "A", "19" => "Q", "20" => "A"));
    $FID = CForumNew::Add($arFields);
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:index.php

示例6: array

        ?>
" size="40">
				</font></td>
			</tr>
			<tr>
				<td class="forumbody" align="right"><font class="forumheadtext">Искать в форуме:</font></td>
				<td class="forumbody"><font class="forumbodytext">
					<select name="FORUM_ID">
						<option value="0">Все форумы</option>
						<?php 
        $arFilter = array("SITE_ID" => SITE_ID);
        if (!$USER->IsAdmin()) {
            $arFilter["PERMS"] = array($USER->GetGroups(), 'A');
            $arFilter["ACTIVE"] = "Y";
        }
        $db_Forum = CForumNew::GetList(array("SORT" => "ASC", "NAME" => "ASC"), $arFilter);
        while ($ar_Forum = $db_Forum->Fetch()) {
            ?>
<option value="<?php 
            echo $ar_Forum["ID"];
            ?>
"<?php 
            if (IntVal($ar_Forum["ID"]) == IntVal($FORUM_ID)) {
                echo " selected";
            }
            ?>
><?php 
            echo $ar_Forum["NAME"];
            ?>
</option><?php 
        }
开发者ID:,项目名称:,代码行数:31,代码来源:

示例7: AddFilterParams

 function AddFilterParams(&$arComponentParameters, $arCurrentValues, $name, $parent, $MULTIPLE = "Y")
 {
     $arComponentParameters["PARAMETERS"][$name] = array("PARENT" => $parent, "NAME" => GetMessage("SEARCH_CP_WHERE_FILTER"), "TYPE" => "LIST", "MULTIPLE" => $MULTIPLE, "VALUES" => CSearchParameters::GetFilterDropDown(true), "DEFAULT" => "all", "REFRESH" => "Y");
     if (!is_array($arCurrentValues[$name]) && strlen($arCurrentValues[$name]) > 0) {
         $arCurrentValues[$name] = array($arCurrentValues[$name]);
     }
     if (is_array($arCurrentValues[$name])) {
         foreach ($arCurrentValues[$name] as $strFILTER) {
             if ($strFILTER == "main") {
                 $arComponentParameters["PARAMETERS"][$name . "_" . $strFILTER] = array("PARENT" => $parent, "NAME" => GetMessage("SEARCH_CP_URL"), "TYPE" => "STRING", "MULTIPLE" => $MULTIPLE, "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "");
             } elseif ($strFILTER == "forum") {
                 $arrFILTER = array();
                 if (CModule::IncludeModule("forum")) {
                     $arrFILTER["all"] = GetMessage("SEARCH_CP_ALL");
                     $rsForum = CForumNew::GetList();
                     while ($arForum = $rsForum->Fetch()) {
                         $arrFILTER[$arForum["ID"]] = $arForum["NAME"];
                     }
                 }
                 $arComponentParameters["PARAMETERS"][$name . "_" . $strFILTER] = array("PARENT" => $parent, "NAME" => GetMessage("SEARCH_CP_FORUM"), "TYPE" => "LIST", "MULTIPLE" => $MULTIPLE, "VALUES" => $arrFILTER, "ADDITIONAL_VALUES" => "N", "DEFAULT" => "all");
             } elseif (strpos($strFILTER, "iblock_") === 0) {
                 $arrFILTER = array();
                 if (CModule::IncludeModule("iblock")) {
                     $arrFILTER["all"] = GetMessage("SEARCH_CP_ALL");
                     $rsIBlock = CIBlock::GetList(array("SORT" => "ASC"), array("TYPE" => substr($strFILTER, 7)));
                     while ($arIBlock = $rsIBlock->Fetch()) {
                         $arrFILTER[$arIBlock["ID"]] = $arIBlock["NAME"];
                     }
                 }
                 $arComponentParameters["PARAMETERS"][$name . "_" . $strFILTER] = array("PARENT" => $parent, "NAME" => GetMessage("SEARCH_CP_IBLOCK_TYPE", array("#TYPE_ID#" => $strFILTER)), "TYPE" => "LIST", "MULTIPLE" => $MULTIPLE, "VALUES" => $arrFILTER, "ADDITIONAL_VALUES" => "N", "DEFAULT" => "all");
             } elseif ($strFILTER == "blog") {
                 $arrFILTER = array();
                 if (CModule::IncludeModule("blog")) {
                     $arrFILTER["all"] = GetMessage("SEARCH_CP_ALL");
                     $rsBlog = CBlog::GetList();
                     while ($arBlog = $rsBlog->Fetch()) {
                         $arrFILTER[$arBlog["ID"]] = $arBlog["NAME"];
                     }
                 }
                 $arComponentParameters["PARAMETERS"][$name . "_" . $strFILTER] = array("PARENT" => $parent, "NAME" => GetMessage("SEARCH_CP_BLOG"), "TYPE" => "LIST", "MULTIPLE" => $MULTIPLE, "VALUES" => $arrFILTER, "ADDITIONAL_VALUES" => "N", "DEFAULT" => "all");
             } elseif ($strFILTER == "socialnetwork") {
                 $arrFILTER = array();
                 if (CModule::IncludeModule("socialnetwork")) {
                     $arrFILTER["all"] = GetMessage("SEARCH_CP_ALL");
                     $rsGroup = CSocNetGroup::GetList(array("ID" => "DESC"), array(), false, false, array("ID", "NAME"));
                     while ($arGroup = $rsGroup->Fetch()) {
                         $arrFILTER[$arGroup["ID"]] = $arGroup["NAME"];
                     }
                 }
                 $arComponentParameters["PARAMETERS"][$name . "_" . $strFILTER] = array("PARENT" => $parent, "NAME" => GetMessage("SEARCH_CP_SOCIALNETWORK_GROUPS"), "TYPE" => "LIST", "MULTIPLE" => $MULTIPLE, "VALUES" => $arrFILTER, "ADDITIONAL_VALUES" => "N", "DEFAULT" => "all");
             } elseif ($strFILTER == "socialnetwork_user") {
                 $arComponentParameters["PARAMETERS"][$name . "_" . $strFILTER] = array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("SEARCH_CP_SOCIALNETWORK_USER"), "TYPE" => "STRING", "DEFAULT" => "");
             }
         }
     }
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:56,代码来源:comp_parameters.php

示例8: InitSorting

                if ($dbMessage) {
                    $dbMessage->NavPrint(GetMessage("LU_TITLE_POSTS"));
                }
                break;
            default:
                InitSorting();
                global $by, $order;
                if (!$by) {
                    $by = "NUM_POSTS";
                    $order = "DESC";
                }
                $db_res = CForumUser::GetList(array($by => $order), array("!USER_ID" => "0", "SHOW_ABC" => ""));
                if ($db_res) {
                    $db_res->NavStart($PAGE_ELEMENTS, false);
                    if ($res = $db_res->GetNext()) {
                        $db_Forums = CForumNew::GetList();
                        $Forums = array();
                        while ($res_forum = $db_Forums->Fetch()) {
                            $Forums[] = $res_forum;
                        }
                        $db_res->NavPrint(GetMessage("LU_TITLE_USER"));
                        ?>
<br><br>
					<table border="0" cellspacing="1" cellpadding="0" class="forumborder" width="100%">
					  <tr>
						<td>
						  <table width="100%" border="0" cellspacing="1" cellpadding="4">
							<tr class="forumhead">
								<td align="center" nowrap class="forumheadtext"><?php 
                        echo GetMessage("FLU_HEAD_NAME");
                        ?>
开发者ID:,项目名称:,代码行数:31,代码来源:

示例9: GetMessage

         $name = GetMessage("P_FORUM_GROUP_COMMENTS");
         $description = GetMessage("P_FORUM_GROUP_COMMENTS_DESCRIPTION");
         if ($lang != LANGUAGE_ID) {
             $arMess[$lang] = __GetMessageArray($lang);
             if (!empty($arMess[$lang]["P_FORUM_GROUP_COMMENTS"])) {
                 $name = $arMess[$lang]["P_FORUM_GROUP_COMMENTS"];
                 $description = $arMess[$lang]["P_FORUM_GROUP_COMMENTS_DESCRIPTION"];
             }
         }
         $arFields["LANG"][] = array("LID" => $lang, "NAME" => $name, "DESCRIPTION" => $description);
     }
     $iGroupId = CForumGroup::Add($arFields);
 }
 // 3.2 Add Forum
 $FID = 0;
 $db_res = CForumNew::GetList();
 if ($db_res && ($res = $db_res->Fetch())) {
     do {
         if ($res["NAME"] == GetMessage("P_FORUM_NAME")) {
             $FID = intVal($res["ID"]);
             break;
         }
     } while ($res = $db_res->Fetch());
 }
 if ($FID <= 0) {
     $arFields = array("NAME" => GetMessage("P_FORUM_NAME"), "DESCRIPTION" => GetMessage("P_FORUM_DECRIPTION"), "SORT" => 100, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "N", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "N", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $iGroupId, "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "Y", "SITES" => array($SITE_ID => "/communication/forum/messages/forum#FORUM_ID#/topic#TOPIC_ID#/message#MESSAGE_ID#/"), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array("2" => "M", "4" => "A", "5" => "A", "11" => "A", "15" => "A", "16" => "A", "17" => "A", "18" => "A", "19" => "Q", "20" => "A"));
     $FID = CForumNew::Add($arFields);
 }
 if (intVal($FID) > 0) {
     $arParams = array("USE_COMMENTS" => "Y", "COMMENTS_TYPE" => "forum", "FORUM_ID" => $FID, "BLOG_URL" => "", "PATH_TO_SMILE" => "/bitrix/images/forum/smile/");
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:index.php

示例10: foreach

            continue;
        }
        foreach ($arTopic["MESSAGES"] as $arMessage) {
            $arMessage["FORUM_ID"] = $forumID;
            $arMessage["TOPIC_ID"] = $topicID;
            $messageID = CForumMessage::Add($arMessage, false);
            if ($messageID < 1) {
                CForumTopic::Delete($topicID);
                continue 2;
            }
            CForumTopic::SetStat($topicID);
        }
    }
}
$fidParameter = "";
$dbForum = CForumNew::GetList(array(), array());
while ($arForum = $dbForum->Fetch()) {
    if ($arForum["FORUM_GROUP_ID"] != $arGroupID["HIDDEN"]) {
        $fidParameter .= $arForum["ID"] . ",";
    }
}
$fidParameter = rtrim($fidParameter, ",");
/************** Forum Replace Data *********************************/
$iForumIDPhoto = 0;
$dbRes = CForumNew::GetListEx(array(), array("SITE_ID" => WIZARD_SITE_ID, "XML_ID" => "COMMUNITY_PHOTO_COMMENTS"));
if ($arRes = $dbRes->Fetch()) {
    $iForumIDPhoto = $arRes["ID"];
}
$iForumIDForum = 0;
$dbRes = CForumNew::GetListEx(array(), array("SITE_ID" => WIZARD_SITE_ID, "XML_ID" => "COMMUNITY_USERS_AND_GROUPS"));
if ($arRes = $dbRes->Fetch()) {
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:index.php

示例11: GetFormHtml

    function GetFormHtml()
    {
        if (!CModule::IncludeModule('iblock')) {
            return '';
        }
        //name
        $libNameTpl = GetMessage("library_wizard_lib_name_val");
        $libSearchVal = -1;
        do {
            $libSearchVal++;
            $libName = $libNameTpl;
            if ($libSearchVal > 0) {
                $libName .= " (" . $libSearchVal . ")";
            }
            $dbRes = CIBlock::GetList(array(), array("NAME" => $libName));
        } while ($dbRes && ($arResLibName = $dbRes->Fetch()));
        $s = '
<tr class="section">
	<td colspan="2">' . GetMessage("library_wizard_settings") . '</td>
</tr>
<tr>
	<td class="bx-popup-label bx-width30">' . GetMessage("library_wizard_lib_name") . '</td>
	<td>
		<input type="text" name="library_TITLE" value="' . $libName . '" ' . 'onkeyup="library_CheckIBlockName(this)"' . ' style="width:90%"><div class="errortext"></div>
	</td>
	<script>
	window.library_CheckIBlockName = function(el)
	{
		var excludeChars = new RegExp("[\\\\\\\\{}/:\\*\\?|%&~]");
		var res = ""; 
		if (el.value)
		{
			if (el.value.search(excludeChars) != -1)
			{
				res = "' . CUtil::JSEscape(GetMessage("library_wizard_iblock_name_error1")) . '";
			}
		}
		el.nextSibling.innerHTML = res;

		BX("btn_popup_next").disabled = (res.length > 0);
		BX("btn_popup_finish").disabled = (res.length > 0);
	}
	</script>
</tr>
';
        //resource
        if (isset($_REQUEST['mode'])) {
            if ($_REQUEST['mode'] == 'iblock') {
                $s .= "<input type=\"hidden\" name=\"library_resource_type\" value = \"iblock\" />";
            } elseif ($_REQUEST['mode'] == 'folder') {
                $s .= "<input type=\"hidden\" name=\"library_resource_type\" value = \"folder\" />";
            }
        } else {
            $s .= '
<tr>
	<td class="bx-popup-label bx-width30">' . GetMessage("library_wizard_lib_resource") . '</td>
	<td>
<script>
window.library_BuildSelectResource = function()
{
	var el = BX("library_resource_type");
	var docroot = "' . htmlspecialcharsEx(str_replace("//", "/", $_REQUEST["path"] . "/")) . '";
	BX("library_resource_folder").style.display = (el.value == "folder" ? "":"none");
	BX("library_resource_iblock").style.display = (el.value == "iblock" ? "":"none");
	if (el.value == "folder")
		BX("bx_new_resource_folder").value = docroot + BX("bx_new_page_name").value + "_files";
}
BX( function() {
	BX.bind(BX("library_resource_type"), (BX.browser.IsIE() ? "click" : "change"), window.library_BuildSelectResource);
	window.library_BuildSelectResource();
});
</script>
	';
            $s .= '
		<select id="library_resource_type" name="library_resource_type" onclick="library_BuildSelectResource(this);" style="width:90%">
			<option value="folder"' . ($_REQUEST["library_resource_type"] == "folder" ? ' selected="selected"' : '') . '>' . GetMessage("library_wizard_lib_resource_folder") . '</option>
			<option value="iblock"' . ($_REQUEST["library_resource_type"] != "folder" ? ' selected="selected"' : '') . '>' . GetMessage("library_wizard_lib_resource_iblock") . '</option>
		</select>
';
            $s .= '	</td>
</tr>
';
        }
        //folder
        $sHide = isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'folder' ? '' : "display:none";
        $s .= '
<tbody id="library_resource_folder" style="' . $sHide . '">
<tr>
	<td class="bx-popup-label bx-width30">' . GetMessage("library_wizard_path_to_folder") . '</td>
	<td>
<script>
window.library_CheckFolderPath = function(el)
{
	var res = ""; 
	if (el.value)
	{
		if (el.value.substr(0, 1) != "/")
			res = "' . CUtil::JSEscape(GetMessage("library_wizard_path_to_folder_error1")) . '";
		else if (el.value.substr(0, 7) == "/bitrix")
			res = "' . CUtil::JSEscape(GetMessage("library_wizard_path_to_folder_error2")) . '"; 
//.........这里部分代码省略.........
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:101,代码来源:template.php

示例12: array

</option>
			</select></td>
		</tr>
	</table></td>
</tr>
<?php 
$tabControl->BeginNextTab();
?>
<tr>
<?php 
$forum_id = $arAllModuleOptions["edit_wr"]["report_forum_id"][0];
$page_path = $arAllModuleOptions["edit_wr"]["WORK_REPORT_PATH"][0];
$timeman_page_path = $arAllModuleOptions["edit_wr"]["TIMEMAN_REPORT_PATH"][0];
if (CModule::IncludeModule("forum")) {
    $arOrder = array("SORT" => "ASC", "NAME" => "ASC");
    $db_Forum = CForumNew::GetList($arOrder, array("ACTIVE" => "Y"));
    ?>
	<td valign="top" width="50%"><?php 
    echo GetMessage("WR_FORUM_COMMENT_ID");
    ?>
:</td><td valign="top" width="50%"><select name="report_forum_id">
	<option value=""><?php 
    echo GetMessage("WR_WORK_FORUM_NONE");
    ?>
</option>
	<?php 
    while ($ar_Forum = $db_Forum->Fetch()) {
        ?>
		<option value="<?php 
        echo $ar_Forum["ID"];
        ?>
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:options.php

示例13: array

    $arNewGroup = array("SORT" => $sort++, "LANG" => array());
    foreach ($arLanguages as $languageID) {
        $arMessages = CExtranetWizardServices::IncludeServiceLang("index.php", $languageID, $bReturnArray = true);
        $arNewGroup["LANG"][] = array("LID" => $languageID, "NAME" => array_key_exists($xmlID . "_GROUP_NAME", $arMessages) ? $arMessages[$xmlID . "_GROUP_NAME"] : GetMessage($xmlID . "_GROUP_NAME"), "DESCRIPTION" => array_key_exists($xmlID . "_GROUP_DESCRIPTION", $arMessages) ? $arMessages[$xmlID . "_GROUP_DESCRIPTION"] : GetMessage($xmlID . "_GROUP_DESCRIPTION"));
    }
    $arGroupID[$xmlID] = CForumGroup::Add($arNewGroup);
}
$arForums = array(array("XML_ID" => "USERS_AND_GROUPS", "NAME" => GetMessage("USERS_AND_GROUPS_EXTRANET_FORUM_NAME"), "DESCRIPTION" => GetMessage("USERS_AND_GROUPS_EXTRANET_FORUM_DESCRIPTION"), "SORT" => 101, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["HIDDEN"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array(WIZARD_EXTRANET_ADMIN_GROUP => "Y")), array("XML_ID" => "GROUPS_AND_USERS_FILES_COMMENTS", "NAME" => GetMessage("GROUPS_AND_USERS_FILES_COMMENTS_EXTRANET_NAME"), "DESCRIPTION" => GetMessage("GROUPS_AND_USERS_FILES_COMMENTS_EXTRANET_DECRIPTION"), "SORT" => 106, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["COMMENTS"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array(WIZARD_EXTRANET_GROUP => "M", WIZARD_EXTRANET_ADMIN_GROUP => "Y")), array("XML_ID" => "PHOTOGALLERY_COMMENTS", "NAME" => GetMessage("GROUPS_AND_USERS_PHOTOGALLERY_COMMENTS_EXTRANET_NAME"), "DESCRIPTION" => GetMessage("GROUPS_AND_USERS_PHOTOGALLERY_COMMENTS_EXTRANET_DECRIPTION"), "SORT" => 106, "ACTIVE" => "Y", "ALLOW_HTML" => "N", "ALLOW_ANCHOR" => "Y", "ALLOW_BIU" => "Y", "ALLOW_IMG" => "Y", "ALLOW_LIST" => "Y", "ALLOW_QUOTE" => "Y", "ALLOW_CODE" => "Y", "ALLOW_FONT" => "Y", "ALLOW_SMILES" => "Y", "ALLOW_UPLOAD" => "Y", "ALLOW_NL2BR" => "N", "MODERATION" => "N", "ALLOW_MOVE_TOPIC" => "Y", "ORDER_BY" => "P", "ORDER_DIRECTION" => "DESC", "LID" => LANGUAGE_ID, "PATH2FORUM_MESSAGE" => "", "ALLOW_UPLOAD_EXT" => "", "FORUM_GROUP_ID" => $arGroupID["COMMENTS"], "ASK_GUEST_EMAIL" => "N", "USE_CAPTCHA" => "N", "SITES" => array(WIZARD_SITE_ID => WIZARD_SITE_DIR), "EVENT1" => "forum", "EVENT2" => "message", "EVENT3" => "", "GROUP_ID" => array(WIZARD_EXTRANET_GROUP => "M", WIZARD_EXTRANET_ADMIN_GROUP => "Y")));
$default_site_id = CSite::GetDefSite();
if (strlen($default_site_id) > 0) {
    foreach ($arForums as $arForum) {
        $dbForum = CForumNew::GetList(array(), array("SITE_ID" => WIZARD_SITE_ID, "XML_ID" => $arForum["XML_ID"]));
        if ($arForumTmp = $dbForum->Fetch()) {
            continue;
        } else {
            $dbForumDefault = CForumNew::GetList(array(), array("SITE_ID" => $default_site_id, "XML_ID" => $arForum["XML_ID"]));
            if ($arForumDefault = $dbForumDefault->Fetch()) {
                $arSites = CForumNew::GetSites($arForumDefault["ID"]);
                $arSites[WIZARD_SITE_ID] = WIZARD_SITE_DIR;
                $arForumFields = array("ACTIVE" => $arForumDefault["ACTIVE"], "SITES" => $arSites);
                CForumNew::Update($arForumDefault["ID"], $arForumFields);
            } else {
                $forumID = CForumNew::Add($arForum);
            }
        }
    }
}
$UsersAndGroupsForumID = 0;
$dbRes = CForumNew::GetListEx(array(), array("SITE_ID" => WIZARD_SITE_ID, "XML_ID" => "USERS_AND_GROUPS"));
if ($arRes = $dbRes->Fetch()) {
    $UsersAndGroupsForumID = $arRes["ID"];
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:index.php

示例14: array

/************** Getting User rank **********************************/
$arResult["USER_RANK"] = "";
$arResult["USER_RANK_CODE"] = "";
$arFilter = array();
if ($arParams["SHOW_FORUM_ANOTHER_SITE"] == "N" || !CForumUser::IsAdmin()) {
    $arFilter["LID"] = SITE_ID;
}
if (!empty($arParams["FID_RANGE"])) {
    $arFilter["@ID"] = $arParams["FID_RANGE"];
}
if (!CForumUser::IsAdmin()) {
    $arFilter["PERMS"] = array($USER->GetGroups(), 'A');
    $arFilter["ACTIVE"] = "Y";
}
$arUserPerm = array();
$db_res = CForumNew::GetList(array(), $arFilter);
if ($db_res && ($res = $db_res->GetNext())) {
    $arUserGroup = CUser::GetUserGroup($arParams["UID"]);
    do {
        $arResult["FORUMS"][$res["ID"]] = $res;
        $arUserPerm[] = CForumNew::GetUserPermission($res["ID"], $arUserGroup);
    } while ($res = $db_res->GetNext());
}
rsort($arUserPerm);
$arRank = CForumUser::GetUserRank($arParams["UID"], LANGUAGE_ID);
list($arResult["USER_RANK_CODE"], $arResult["USER_RANK"]) = ForumGetUserForumStatus($arParams["UID"], $arUserPerm[0], array("Rank" => $arRank));
$arResult["SHOW_POINTS"] = "N";
$arResult["arRank"] = array_merge(is_array($arRank) ? $arRank : array(), array("NAME" => $arResult["USER_RANK"]));
if ($USER->IsAuthorized() && (CForumUser::IsAdmin() || intval($USER->GetID()) == $arParams["UID"])) {
    $arResult["SHOW_POINTS"] = "Y";
    $arResult["USER_POINTS"] = !empty($arRank["VOTES"]) ? intval($arRank["VOTES"]) : GetMessage("F_NO_VOTES");
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例15: ForumSetAllMessagesReaded

function ForumSetAllMessagesReaded($FID = false)
{
    global $USER;
    if ($FID !== false) {
        $FID = IntVal($FID);
        CForumNew::SetLabelsBeRead($FID, $USER->GetUserGroupArray());
        return true;
    }
    $arFilter = array();
    if (!CForumUser::IsAdmin()) {
        $arFilter["LID"] = LANG;
        $arFilter["PERMS"] = array($USER->GetGroups(), 'A');
        $arFilter["ACTIVE"] = "Y";
    }
    $db_Forum = CForumNew::GetList(array(), $arFilter);
    while ($ar_Forum = $db_Forum->Fetch()) {
        CForumNew::SetLabelsBeRead($ar_Forum["ID"], $USER->GetUserGroupArray());
    }
    return false;
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:20,代码来源:include.php


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