Пример #1
0
<?php

define("ADMIN_MODULE_NAME", "cluster");
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/cluster/prolog.php";
IncludeModuleLangFile(__FILE__);
if (!$USER->IsAdmin()) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$sTableID = "tbl_cluster_group_list";
$oSort = new CAdminSorting($sTableID);
$lAdmin = new CAdminList($sTableID);
$arHeaders = array(array("id" => "ID", "content" => GetMessage("CLU_INDEX_GROUP_ID"), "align" => "right", "default" => true), array("id" => "NAME", "content" => GetMessage("CLU_INDEX_GROUP_NAME"), "align" => "center", "default" => true));
$lAdmin->AddHeaders($arHeaders);
$rsData = CClusterGroup::GetList();
$rsData = new CAdminResult($rsData, $sTableID);
while ($arRes = $rsData->Fetch()) {
    $row =& $lAdmin->AddRow($arRes["ID"], $arRes);
    $row->AddViewField("ID", '<a href="cluster_group_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"] . '">' . $arRes["ID"] . '</a>');
    $arActions = array(array("ICON" => "edit", "DEFAULT" => true, "TEXT" => GetMessage("CLU_INDEX_LIST_EDIT"), "ACTION" => $lAdmin->ActionRedirect('cluster_group_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"])));
    $row->AddActions($arActions);
}
$aContext = array(array("TEXT" => GetMessage("CLU_INDEX_ADD_GROUP"), "TITLE" => GetMessage("CLU_INDEX_ADD_GROUP_TITLE"), "LINK" => "cluster_group_edit.php?lang=" . LANG, "ICON" => "btn_new"));
$lAdmin->AddAdminContextMenu($aContext, false);
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("CLU_INDEX_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
if ($message) {
    echo $message->Show();
}
$lAdmin->DisplayList();
                foreach ($arID as $ID) {
                    $rs = CPerfomanceIndexComplete::GetList(array("=ID" => $ID));
                    while ($ar = $rs->Fetch()) {
                        if ($DB->Query("ALTER TABLE " . $ar["TABLE_NAME"] . " DROP INDEX " . $ar["INDEX_NAME"])) {
                            CPerfomanceIndexComplete::Delete($ID);
                        }
                    }
                }
            }
            break;
    }
}
$lAdmin->AddHeaders(array(array("id" => "BANNED", "content" => GetMessage("PERFMON_ICOMPLETE_STATUS"), "align" => "center", "default" => true), array("id" => "TABLE_NAME", "content" => GetMessage("PERFMON_ICOMPLETE_TABLE_NAME"), "default" => true), array("id" => "COLUMN_NAMES", "content" => GetMessage("PERFMON_ICOMPLETE_COLUMN_NAMES"), "default" => true), array("id" => "INDEX_NAME", "content" => GetMessage("PERFMON_ICOMPLETE_INDEX_NAME"), "default" => true)));
$cData = new CPerfomanceIndexComplete();
$rsData = $cData->GetList();
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PERFMON_ICOMPLETE_PAGE")));
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row = $lAdmin->AddRow($f_NAME, $arRes);
    $arActions = array();
    $row->AddViewField("COLUMN_NAMES", str_replace(",", "<br>", $f_COLUMN_NAMES));
    if ($f_BANNED == "N") {
        $row->AddViewField("BANNED", '<span class="adm-lamp adm-lamp-in-list adm-lamp-green" title="' . htmlspecialcharsbx(GetMessage("PERFMON_ICOMPLETE_GREEN_ALT")) . '"></span>');
        if ($isAdmin) {
            $arActions[] = array("TEXT" => GetMessage("PERFMON_ICOMPLETE_DELETE_INDEX"), "ACTION" => $lAdmin->ActionDoGroup($f_ID, 'delete_index'));
        }
    } elseif ($f_BANNED == "Y") {
        $row->AddViewField("BANNED", '<span class="adm-lamp adm-lamp-in-list adm-lamp-red" title="' . htmlspecialcharsbx(GetMessage("PERFMON_ICOMPLETE_RED_ALT")) . '"></span>');
        $row->AddViewField("INDEX_NAME", GetMessage("PERFMON_ICOMPLETE_NO_INDEX"));
        $arActions[] = array("TEXT" => GetMessage("PERFMON_ICOMPLETE_DELETE_BAN"), "ACTION" => $lAdmin->ActionDoGroup($f_ID, 'delete_ban'));
Пример #3
0
    $lAdmin->BeginPrologContent();
    CAdminMessage::ShowMessage($actionErrorMessage);
    $lAdmin->EndPrologContent();
}
$arAddHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "DOCUMENT_NAME", "content" => GetMessage("BPATL_DOCUMENT_NAME"), "default" => false, "sort" => "DOCUMENT_NAME"), array("id" => "NAME", "content" => GetMessage("BPATL_NAME"), "sort" => "NAME", "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage("BPATL_DESCR"), "default" => true, "sort" => "DESCRIPTION"), array("id" => "DESCRIPTION_FULL", "content" => GetMessage("BPATL_DESCR_FULL"), "default" => false, "sort" => "DESCRIPTION"), array("id" => "MODIFIED", "content" => GetMessage("BPATL_MODIFIED"), "sort" => "MODIFIED", "default" => true), array("id" => "OVERDUE_DATE", "content" => GetMessage("BPATL_OVERDUE_DATE"), "default" => false, "sort" => "OVERDUE_DATE"), array("id" => "WORKFLOW_STARTED", "content" => GetMessage("BPATL_STARTED"), "default" => false, "sort" => "WORKFLOW_STARTED"), array("id" => "WORKFLOW_STARTED_BY", "content" => GetMessage("BPATL_STARTED_BY"), "default" => false, "sort" => "WORKFLOW_STARTED_BY"), array("id" => "WORKFLOW_NAME", "content" => GetMessage("BPATL_WORKFLOW_NAME"), "default" => true, "sort" => "WORKFLOW_TEMPLATE_NAME"), array("id" => "WORKFLOW_STATE", "content" => GetMessage("BPATL_WORKFLOW_STATE"), "default" => true, "sort" => "WORKFLOW_STATE"));
if ($allowAdminAccess) {
    $arAddHeaders[] = array("id" => "USER", "content" => GetMessage("BPATL_USER"), "default" => true, "sort" => "USER_ID");
}
$lAdmin->AddHeaders($arAddHeaders);
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
$arSelectFields = array("ID", "WORKFLOW_ID", "ACTIVITY", "ACTIVITY_NAME", "MODIFIED", "OVERDUE_DATE", "NAME", "DESCRIPTION", "PARAMETERS", 'DOCUMENT_NAME', 'WORKFLOW_STARTED', 'WORKFLOW_STARTED_BY', 'OVERDUE_DATE', 'WORKFLOW_TEMPLATE_NAME', 'WORKFLOW_STATE');
if (in_array("USER", $arVisibleColumns) && $allowAdminAccess) {
    $arSelectFields[] = "USER_ID";
}
$dbResultList = CBPTaskService::GetList(array($by => $order), $arFilter, false, false, $arSelectFields);
$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();
$lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("BPATL_NAV")));
while ($arResultItem = $dbResultList->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID . '_' . $f_USER_ID, $arResultItem);
    $s = $allowAdminAccess ? "&uid=" . intval($arResultItem["USER_ID"]) : "";
    $row->AddField("ID", '<a href="bizproc_task.php?id=' . $f_ID . $s . '&back_url=' . urlencode($APPLICATION->GetCurPageParam("lang=" . LANGUAGE_ID, array("lang"))) . '" title="' . GetMessage("BPATL_VIEW") . '">' . $f_ID . '</a>');
    $row->AddField("NAME", $f_NAME);
    $description = $f_DESCRIPTION;
    if (strlen($description) > 100) {
        $description = substr($description, 0, 97) . "...";
    }
    $row->AddField("DESCRIPTION", $description);
    $row->AddField("DESCRIPTION_FULL", $f_DESCRIPTION);
    $row->AddField("MODIFIED", $f_MODIFIED);
    $row->AddField("WORKFLOW_NAME", $f_WORKFLOW_TEMPLATE_NAME);
Пример #4
0
			@set_time_limit(0);
			$DB->StartTransaction();
			if(!$obUserField->Delete($ID))
			{
				$DB->Rollback();
				$lAdmin->AddGroupError(GetMessage("USERTYPE_DEL_ERROR"), $ID);
			}
			$DB->Commit();
			break;
		}
	}
}


$rsData = CUserTypeEntity::GetList(array($by=>$order), $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("USERTYPE_NAV")));

$lAdmin->AddHeaders(array(
	array(
		"id" => "ID",
		"content" => "ID",
		"sort" => "ID",
		"align" => "right",
		"default" => true,
	),
	array(
		"id" => "ENTITY_ID",
		"content" => GetMessage("USERTYPE_ENTITY_ID"),
		"sort" => "ENTITY_ID",
Пример #5
0
$arSize = array();
foreach($arTmpFiles as $k=>$ar)
{
	if (preg_match('#^(.*\.(enc|tar|gz))(\.[0-9]+)?$#',$ar['NAME'],$regs))
	{
		$arParts[intval($ar['BUCKET_ID']).$regs[1]]++;
		$arSize[$regs[1]] += $ar['SIZE'];
		if (!$regs[3])
			$arFiles[] = $ar;
	}
}

$rsDirContent = new CDBResult;
$rsDirContent->InitFromArray($arFiles);
$rsDirContent->sSessInitAdd = $path;
$rsDirContent = new CAdminResult($rsDirContent, $sTableID);
$rsDirContent->NavStart(20);

// установка строки навигации
$lAdmin->NavText($rsDirContent->GetNavPrint(GetMessage("MAIN_DUMP_FILE_PAGES")));
$lAdmin->AddHeaders(array(
		array("id"=>"NAME", "content"=>GetMessage("MAIN_DUMP_FILE_NAME"), "sort"=>"name", "default"=>true),
		array("id"=>"SIZE","content"=>GetMessage("MAIN_DUMP_FILE_SIZE1"), "sort"=>"size", "default"=>true),
		$arAllBucket ? array("id"=>"PLACE","content"=>GetMessage("MAIN_DUMP_LOCATION"), "default"=>true) : null,
		array("id"=>"DATE", "content"=>GetMessage('MAIN_DUMP_FILE_TIMESTAMP'), "sort"=>"timestamp", "default"=>true)
));

while($Elem = $rsDirContent->NavNext(true, "f_"))
{
	$BUCKET_ID = intval($f_BUCKET_ID);
	$row =& $lAdmin->AddRow($BUCKET_ID.'_'.$f_NAME, $Elem);
Пример #6
0
                @set_time_limit(0);
                if (!CAgent::Delete($ID)) {
                    $lAdmin->AddGroupError(GetMessage("DELETE_ERROR"), $ID);
                }
                break;
            case "activate":
                CAgent::Update($ID, array("ACTIVE" => "Y"));
                break;
            case "deactivate":
                CAgent::Update($ID, array("ACTIVE" => "N"));
                break;
        }
    }
}
$agentList = CAgent::GetList(array($by => $order), $arFilter);
$rsData = new CAdminResult($agentList, $sTableID);
$rsData->NavStart(20);
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("MAIN_AGENT_LIST_PAGE")));
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => GetMessage("MAIN_AGENT_ID"), "sort" => "ID", "default" => true), array("id" => "MODULE_ID", "content" => GetMessage("MAIN_AGENT_MODULE_ID"), "sort" => "MODULE_ID", "default" => true), array("id" => "USER_ID", "content" => GetMessage("MAIN_AGENT_USER_ID"), "sort" => "USER_ID", "default" => true), array("id" => "SORT", "content" => GetMessage("MAIN_AGENT_SORT"), "sort" => "SORT"), array("id" => "NAME", "content" => GetMessage("MAIN_AGENT_NAME"), "sort" => "NAME", "default" => true), array("id" => "ACTIVE", "content" => GetMessage("MAIN_AGENT_ACTIVE"), "sort" => "ACTIVE", "default" => true), array("id" => "LAST_EXEC", "content" => GetMessage("MAIN_AGENT_LAST_EXEC"), "sort" => "LAST_EXEC", "default" => true), array("id" => "NEXT_EXEC", "content" => GetMessage("MAIN_AGENT_NEXT_EXEC"), "sort" => "NEXT_EXEC", "default" => true), array("id" => "AGENT_INTERVAL", "content" => GetMessage("MAIN_AGENT_INTERVAL"), "sort" => "AGENT_INTERVAL", "default" => true), array("id" => "IS_PERIOD", "content" => GetMessage("MAIN_AGENT_PERIOD"), "sort" => "IS_PERIOD")));
while ($db_res = $rsData->NavNext(true, "a_")) {
    $row =& $lAdmin->AddRow($a_ID, $db_res);
    $row->AddField("ID", $a_ID);
    $row->AddField("MODULE_ID", $a_MODULE_ID);
    $row->AddField("USER_ID", $a_USER_ID > 0 ? "<a href=\"/freetrix/admin/user_edit.php?ID=" . $a_USER_ID . "&lang=" . LANG . "\">[" . $a_USER_ID . "] " . $a_USER_NAME . " " . $a_LAST_NAME . " (" . $a_LOGIN . ")</a>" : GetMessage("MAIN_AGENT_SYSTEM_USER"));
    $row->AddInputField("SORT");
    $row->AddInputField("NAME");
    $row->AddCheckField("ACTIVE");
    $row->AddField("LAST_EXEC", $a_LAST_EXEC);
    $row->AddField("NEXT_EXEC", $a_NEXT_EXEC);
    $row->AddInputField("AGENT_INTERVAL");
    $row->AddCheckField("IS_PERIOD", $a_IS_PERIOD == "Y" ? GetMessage("MAIN_AGENT_PERIOD_YES") : GetMessage("MAIN_AGENT_PERIOD_NO"));
Пример #7
0
            $end = 6;
            break;
        case "month":
            $start = 1;
            $end = 12;
            break;
    }
    $graph_type_upper = ToUpper($graph_type);
    $ra = array();
    for ($i = $start; $i <= $end; $i++) {
        $ra[] = array("ID" => $i, "HITS" => $ar[$graph_type_upper . "_HIT_" . $i], "C_HOSTS" => $ar[$graph_type_upper . "_HOST_" . $i], "SESSIONS" => $ar[$graph_type_upper . "_SESSION_" . $i], "C_EVENTS" => $ar[$graph_type_upper . "_EVENT_" . $i], "GUESTS" => $ar[$graph_type_upper . "_GUEST_" . $i], "NEW_GUESTS" => $ar[$graph_type_upper . "_NEW_GUEST_" . $i]);
    }
    $rsData = new CDBResult();
    $rsData->InitFromArray($ra);
}
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint($arrParams[$graph_type][0]));
$arHeaders = array();
switch ($graph_type) {
    case "date":
        $arHeaders[] = array("id" => "ID", "content" => "ID", "sort" => "s_id", "align" => "right", "default" => true);
        $arHeaders[] = array("id" => "DATE_STAT", "content" => GetMessage("STAT_DATE"), "sort" => "s_date", "default" => true);
        $arHeaders[] = array("id" => "WDAY", "content" => GetMessage("STAT_WEEKDAY"), "sort" => false, "default" => true);
        break;
    case "weekday":
        $arHeaders[] = array("id" => "ID", "content" => GetMessage("STAT_WEEKDAY"), "sort" => false, "default" => true);
        break;
    case "hour":
        $arHeaders[] = array("id" => "ID", "content" => GetMessage("STAT_HOUR"), "sort" => false, "align" => "right", "default" => true);
        break;
Пример #8
0
	$by = strtoupper($by);
	if($by == "SUCCESS")
		$sort = 0;
	elseif($by == "DESCRIPTION")
		$sort = 2;
	else
		$sort = 1;
	if(strtoupper($order) == "ASC")
		$ord = 1;
	else
		$ord = -1;
	usort($arLogRecs, create_function('$a, $b', 'return strcmp($a['.$sort.'], $b['.$sort.'])*('.$ord.');'));
}

$rsData = new CAdminResult(null, $sTableID);
$rsData->InitFromArray($arLogRecs);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("update_log_nav")));

$n = 0;
while($rec = $rsData->Fetch())
{
	$row = &$lAdmin->AddRow(0, null);

	$aDate = explode(" ", htmlspecialcharsbx($rec[1]));
	$row->AddField("DATE", '<span style="white-space:nowrap">'.$aDate[0].'</span> '.$aDate[1]);

	$row->AddField("DESCRIPTION", ($rec[3]<>""? '<a href="javascript:void(0)" onClick="jsUtils.ToggleDiv(\'descr_'.$n.'\')" title="'.GetMessage("HINT_WIND_EXEC_ALT").'">'.htmlspecialcharsbx($rec[2]).'</a>' : htmlspecialcharsbx($rec[2])).'<div id="descr_'.$n.'" style="display:none;">'.$rec[3].'</div>');

	$s = "";
Пример #9
0
                        }
                    }
                } catch (Engine\YandexDirectException $e) {
                    $adminList->AddGroupError($e->getCode() . ': ' . $e->getMessage());
                }
            }
        }
    }
}
$arHeaders = array(array("id" => "ID", "content" => Loc::getMessage("SEO_CAMPAIGN_ID"), "sort" => "ID", "default" => true), array("id" => "STATUS", "content" => Loc::getMessage('SEO_CAMPAIGN_STATUS'), "default" => true), array("id" => "NAME", "content" => Loc::getMessage('SEO_CAMPAIGN_NAME'), "sort" => "NAME", "default" => true), array("id" => "XML_ID", "content" => Loc::getMessage('SEO_CAMPAIGN_XML_ID'), "sort" => "XML_ID", "default" => true), array("id" => "STRATEGY", "content" => Loc::getMessage('SEO_CAMPAIGN_STRATEGY'), "default" => true), array("id" => "LAST_UPDATE", "content" => Loc::getMessage('SEO_CAMPAIGN_LAST_UPDATE'), "sort" => "LAST_UPDATE", "default" => true), array("id" => "BANNER_CNT", "content" => Loc::getMessage('SEO_CAMPAIGN_BANNER_CNT'), "default" => true), array("id" => "SHOW", "content" => Loc::getMessage('SEO_STATUS_SHOW'), "default" => true), array("id" => "SHOW", "content" => Loc::getMessage('SEO_STATUS_SHOW'), "default" => true), array("id" => "SUM", "content" => Loc::getMessage('SEO_CAMPAIGN_SUM'), "default" => true), array("id" => "REST", "content" => Loc::getMessage('SEO_CAMPAIGN_REST'), "default" => true), array("id" => "SHOWS", "content" => Loc::getMessage('SEO_CAMPAIGN_SHOWS'), "default" => true), array("id" => "CLICKS", "content" => Loc::getMessage('SEO_CAMPAIGN_CLICKS'), "default" => true));
if ($request["mode"] != 'excel') {
    $arHeaders[] = array("id" => "UPDATE", "content" => "", "default" => true);
}
$adminList->AddHeaders($arHeaders);
$campaignList = Adv\YandexCampaignTable::getList(array('order' => array($by => $order), 'filter' => array("=ENGINE_ID" => $engine->getId(), '=ACTIVE' => $archive ? Adv\YandexCampaignTable::INACTIVE : Adv\YandexCampaignTable::ACTIVE), "select" => array("ID", "BANNER_CNT"), 'runtime' => array(new Entity\ExpressionField('BANNER_CNT', 'COUNT(%s)', "\\Bitrix\\Seo\\Adv\\YandexBannerTable:CAMPAIGN.ID"))));
$data = new \CAdminResult($campaignList, $tableID);
$data->NavStart();
$adminList->NavText($data->GetNavPrint(Loc::getMessage("PAGES")));
$campaignAdminList = array();
while ($campaign = $data->NavNext()) {
    $bannerCnt = $campaign["BANNER_CNT"];
    $campaignDetail = Adv\YandexCampaignTable::getList(array('filter' => array("=ID" => $campaign["ID"])));
    $campaign = $campaignDetail->fetch();
    $editUrl = "seo_search_yandex_direct_edit.php?lang=" . LANGUAGE_ID . "&ID=" . $campaign["ID"];
    $row =& $adminList->AddRow($campaign["ID"], $campaign, $editUrl, Loc::getMessage("SEO_CAMPAIGN_EDIT_TITLE", array("#ID#" => $campaign["ID"], "#XML_ID#" => $campaign["XML_ID"])));
    $bOwner = $campaign['OWNER_ID'] == $currentUser['id'];
    $row->AddViewField("ID", $campaign['ID']);
    $row->AddField("NAME", '<a href="' . Converter::getHtmlConverter()->encode($editUrl) . '" title="' . Loc::getMessage("SEO_CAMPAIGN_EDIT_TITLE", array("#ID#" => $campaign["ID"], "#XML_ID#" => $campaign["XML_ID"])) . '">' . Converter::getHtmlConverter()->encode($campaign['NAME']) . '</a>');
    $row->AddViewField('LAST_UPDATE', $campaign['LAST_UPDATE'] ? $campaign['LAST_UPDATE'] : Loc::getMessage('SEO_UPDATE_NEVER'));
    $row->AddViewField('SHOW', Loc::getMessage('SEO_YANDEX_STATUS_' . $campaign['SETTINGS']['StatusShow']));
    $active = 'grey';
Пример #10
0
$selectFieldsMap = array_fill_keys(array_keys($headerList), false);
$selectFieldsMap = array_merge($selectFieldsMap, $selectFields);
$userList = array();
$userIDs = array();
$nameFormat = CSite::GetNameFormat(true);
$rowList = array();
$couponTypeList = array();
if ($selectFieldsMap['TYPE']) {
    $couponTypeList = Internals\DiscountCouponTable::getCouponTypes(true);
}
$usePageNavigation = true;
$navyParams = array();
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'excel') {
    $usePageNavigation = false;
} else {
    $navyParams = CDBResult::GetNavParams(CAdminResult::GetNavSize($adminListTableID, array('nPageSize' => 20, 'sNavID' => $adminList->GetListUrl(true))));
    if ($navyParams['SHOW_ALL']) {
        $usePageNavigation = false;
    } else {
        $navyParams['PAGEN'] = (int) $navyParams['PAGEN'];
        $navyParams['SIZEN'] = (int) $navyParams['SIZEN'];
    }
}
if ($selectFields['TYPE']) {
    $selectFields['USE_COUNT'] = true;
}
$selectFields = array_keys($selectFields);
$getListParams = array('select' => $selectFields, 'filter' => $filter, 'order' => array($by => $order));
if ($usePageNavigation) {
    $countQuery = new Main\Entity\Query(Internals\DiscountCouponTable::getEntity());
    $countQuery->addSelect(new Main\Entity\ExpressionField('CNT', 'COUNT(1)'));
Пример #11
0
	{
		$totalPages = ceil($totalCount/$navyParams['SIZEN']);
		if ($navyParams['PAGEN'] > $totalPages)
			$navyParams['PAGEN'] = $totalPages;
		$getListParams['limit'] = $navyParams['SIZEN'];
		$getListParams['offset'] = $navyParams['SIZEN']*($navyParams['PAGEN']-1);
	}
	else
	{
		$navyParams['PAGEN'] = 1;
		$getListParams['limit'] = $navyParams['SIZEN'];
		$getListParams['offset'] = 0;
	}
}

$couponIterator = new CAdminResult(Internals\DiscountCouponTable::getList($getListParams), $adminListTableID);
if ($usePageNavigation)
{
	$couponIterator->NavStart($getListParams['limit'], $navyParams['SHOW_ALL'], $navyParams['PAGEN']);
	$couponIterator->NavRecordCount = $totalCount;
	$couponIterator->NavPageCount = $totalPages;
	$couponIterator->NavPageNomer = $navyParams['PAGEN'];
}
else
{
	$couponIterator->NavStart();
}

$adminList->NavText($couponIterator->GetNavPrint(Loc::getMessage('BT_SALE_DISCOUNT_COUPON_LIST_MESS_NAV')));
while ($coupon = $couponIterator->Fetch())
{
*/
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
$STAT_RIGHT = $APPLICATION->GetGroupRight("statistic");
if ($STAT_RIGHT == "D") {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
IncludeModuleLangFile(__FILE__);
$sTableID = "tbl_event_multiselect";
$oSort = new CAdminSorting($sTableID, "ID", "desc");
$lAdmin = new CAdminList($sTableID, $oSort);
$FilterArr = array("find", "find_type", "find_id", "find_id_exact_match", "find_event1", "find_event1_exact_match", "find_event2", "find_event2_exact_match", "find_description", "find_description_exact_match", "find_name", "find_name_exact_match");
$lAdmin->InitFilter($FilterArr);
$arFilter = array("ID" => $find != "" && $find_type == "id" ? $find : $find_id, "ID_EXACT_MATCH" => $find_id_exact_match, "EVENT1" => $find != "" && $find_type == "event1" ? $find : $find_event1, "EVENT1_EXACT_MATCH" => $find_event1_exact_match, "EVENT2" => $find != "" && $find_type == "event2" ? $find : $find_event2, "EVENT2_EXACT_MATCH" => $find_event2_exact_match, "DESCRIPTION" => $find_description, "DESCRIPTION_EXACT_MATCH" => $find_description_exact_match, "NAME" => $find_name, "NAME_EXACT_MATCH" => $find_name_exact_match);
$cData = new CStatEventType();
$rsData = $cData->GetSimpleList($by, $order, $arFilter, $is_filtered);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("STAT_EVENT_TYPE_PAGES")));
$arHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "s_id", "default" => true), array("id" => "EVENT1", "content" => "event1", "sort" => "s_event1", "default" => true), array("id" => "EVENT2", "content" => "event2", "sort" => "s_event2", "default" => true), array("id" => "NAME", "content" => GetMessage("STAT_NAME"), "sort" => "s_name", "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage("STAT_DESCRIPTION"), "sort" => "s_description", "default" => true));
if ($target_control == "text") {
    $arHeaders[] = array("id" => "SELECT_BUTTON", "content" => "&nbsp;", "sort" => "", "default" => true);
}
$lAdmin->AddHeaders($arHeaders);
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes);
    $row->AddViewField("EVENT1", $f_EVENT1 . '<input type="hidden" name="EVENT_NAME[' . $f_ID . ']" id="EVENT_NAME[' . $f_ID . ']" value="' . $f_EVENT . " [" . $f_ID . ']">');
    $id = CUtil::JSEscape($f_ID . ($full_name == "Y" ? " (" . $f_EVENT1 . " / " . $f_EVENT2 . ")" : ""));
    $fld = CUtil::JSEscape($field);
    $row->AddViewField("SELECT_BUTTON", "<a href=\"" . htmlspecialcharsbx("javascript:setTargetValue('" . $id . "', '" . $fld . "');") . "\" title=\"" . GetMessage("STAT_CHOOSE_TITLE") . "\">" . GetMessage("STAT_CHOOSE") . "</a>");
    if ($target_control == "text") {
        $arActions = array(array("ICON" => "", "DEFAULT" => true, "TEXT" => GetMessage("STAT_CHOOSE"), "ACTION" => htmlspecialcharsbx("javascript:setTargetValue('" . $id . "', '" . $fld . "');")));
Пример #13
0
				break;
			case "delete":
				if (!CCurrency::Delete($ID))
				{
					if ($ex = $APPLICATION->GetException())
						$lAdmin->AddGroupError($ex->GetString(), $ID);
					else
						$lAdmin->AddGroupError(GetMessage("currency_err1"), $ID);
				}
				break;
		}
	}
}

$rsData = CCurrency::GetList($by, $order);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();

$lAdmin->NavText($rsData->GetNavPrint(GetMessage("CURRENCY_TITLE")));

$arHeaders = array();
$arHeaders[] = array(
	"id" => "CURRENCY",
	"content" => GetMessage('currency_curr'),
	"sort" => "CURRENCY",
	"default" => true
);
$arHeaders[] = array(
	"id" => "FULL_NAME",
	"content" => GetMessage('CURRENCY_FULL_NAME'),
	"sort" => "name",
Пример #14
0
                    if ($e = $APPLICATION->GetException()) {
                        $lAdmin->AddGroupError(GetMessage("SAVE_ERROR") . $ID . ": " . $e->GetString(), $ID);
                    }
                }
                break;
        }
    }
}
// fetch data
if (isset($_REQUEST["mode"]) && $_REQUEST["mode"] == "excel") {
    $arNavParams = array();
} else {
    $arNavParams = array('nPageSize' => CAdminResult::GetNavSize($sTableID));
}
$rsData = CLQuestion::GetList(array($by => $order), $arFilter, true, $arNavParams);
$rsData = new CAdminResult($rsData, $sTableID);
// navigation string setup
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("LEARNING_QUESTION")));
// list header
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "ACTIVE", "content" => GetMessage('LEARNING_COURSE_ADM_ACT'), "sort" => "active", "default" => true), array("id" => "TIMESTAMP_X", "content" => GetMessage('LEARNING_COURSE_ADM_DATECH'), "sort" => "timestamp_x", "default" => true), array("id" => "NAME", "content" => GetMessage('LEARNING_NAME'), "sort" => "name", "default" => true), array("id" => "SORT", "content" => GetMessage('LEARNING_COURSE_ADM_SORT'), "sort" => "sort", "default" => true), array("id" => "SELF", "content" => GetMessage('LEARNING_QUESTION_ADM_SELF'), "sort" => "self", "default" => true), array("id" => "CORRECT_REQUIRED", "content" => GetMessage('LEARNING_QUESTION_ADM_REQUIRED'), "sort" => "correct_required", "default" => true), array("id" => "QUESTION_TYPE", "content" => GetMessage('LEARNING_QUESTION_ADM_TYPE'), "sort" => "type", "default" => true), array("id" => "POINT", "content" => GetMessage('LEARNING_QUESTION_ADM_POINT'), "sort" => "point", "default" => true), array("id" => "ANSWERS_STATS", "content" => GetMessage('LEARNING_QUESTION_ADM_STATS'), "default" => true)));
$arQuestions = array();
$arQuestionsIds = array();
while ($arRes = $rsData->Fetch()) {
    $arQuestionsIds[] = (int) $arRes['ID'];
    $arQuestions[] = $arRes;
}
$arMultiStats = CLAnswer::getMultiStats($arQuestionsIds);
// building list
foreach ($arQuestions as $arRes) {
    extract($arRes, EXTR_PREFIX_ALL, 'f');
    $row =& $lAdmin->AddRow($f_ID, $arRes);
Пример #15
0
    }
}
$sTableID = "tbl_perfmon_panel";
$APPLICATION->SetTitle(GetMessage("PERFMON_PHP_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
foreach ($data as $i => $arTable) {
    $lAdmin = new CAdminList($sTableID . $i);
    $lAdmin->BeginPrologContent();
    if (array_key_exists("TITLE", $arTable)) {
        echo "<h4>" . $arTable["TITLE"] . "</h4>\n";
    }
    $lAdmin->EndPrologContent();
    $lAdmin->AddHeaders($arTable["HEADERS"]);
    $rsData = new CDBResult();
    $rsData->InitFromArray($arTable["ITEMS"]);
    $rsData = new CAdminResult($rsData, $sTableID . $i);
    $j = 0;
    while ($arRes = $rsData->NavNext(true, "f_")) {
        $row =& $lAdmin->AddRow($j++, $arRes);
        $row->AddViewField("PARAMETER", $arRes["PARAMETER"]);
        if ($arRes["IS_OK"]) {
            $row->AddViewField("VALUE", $arRes["VALUE"] . "&nbsp;");
            $row->AddViewField("RECOMMENDATION", "&nbsp;");
        } else {
            $row->AddViewField("VALUE", "<span class=\"errortext\">" . $arRes["VALUE"] . "&nbsp;</span>");
            $row->AddViewField("RECOMMENDATION", $arRes["RECOMMENDATION"]);
        }
    }
    $lAdmin->CheckListMode();
    $lAdmin->DisplayList();
}
Пример #16
0
			),
			'SORT' => $arFields['SORT'],
			'TYPING' => $arFields['TYPING'],
		));
	}
}

$dbResultList = CSmile::getList(Array(
	'SELECT' => Array('ID', 'SET_ID', 'SET_NAME', 'TYPE', 'NAME', 'SORT', 'TYPING', 'IMAGE', 'IMAGE_WIDTH', 'IMAGE_HEIGHT'),
	'FILTER' => $arFilter,
	'ORDER' => array($by => $order),
	'NAV_PARAMS' => array("nPageSize"=>CAdminResult::GetNavSize($sTableID)),
	'RETURN_RES' => 'Y'
));

$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();

$lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("SMILE_NAV")));

$lAdmin->AddHeaders(array(
	array("id"=>"ID", "content"=>GetMessage("SMILE_ID"), "sort"=>"ID", "default"=>true),
	array("id"=>"SORT","content"=>GetMessage("SMILE_SORT"), "sort"=>"SORT", "default"=>true, "align"=>"right"),
	array("id"=>"NAME", "content"=>GetMessage("SMILE_NAME"), "default"=>true),
	array("id"=>"TYPING", "content"=>GetMessage("SMILE_TYPING"), "default"=>true),
	array("id"=>"ICON", "content"=>GetMessage("SMILE_ICON"), "default"=>true),
	array("id"=>"SET_NAME", "content"=>GetMessage("SMILE_SET_NAME"), "default"=>true),
	array("id"=>"TYPE", "content"=>GetMessage('SMILE_TYPE'), "default"=>true),
	array("id"=>"IMAGE", "content"=>GetMessage("SMILE_IMAGE_FILE"), "default"=>false),
));
Пример #17
0
foreach($arSelectedFields as $value)
	$arVisibleColumnsMap[$value] = true;

// Getting list data
if(array_key_exists("ELEMENT_CNT", $arVisibleColumnsMap))
{
	$arFilter["CNT_ALL"] = "Y";
	$arFilter["ELEMENT_SUBSECTIONS"] = "N";
	$rsData = CIBlockSection::GetMixedList($arOrder, $arFilter, true, $arSelectedFields);
}
else
{
	$rsData = CIBlockSection::GetMixedList($arOrder, $arFilter, false, $arSelectedFields);
}

$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();

// Navigation setup
$lAdmin->NavText($rsData->GetNavPrint(htmlspecialcharsbx($arIBlock["SECTIONS_NAME"])));

$bSearch = Loader::includeModule('search');

function GetElementName($ID)
{
	$ID = (int)$ID;
	if ($ID <= 0)
		return '';
	static $cache = array();
	if(!isset($cache[$ID]))
	{
                break;
            case "resume":
                CClusterMemcache::Resume($ID);
                break;
        }
    }
}
$arHeaders = array(array("id" => "ID", "content" => GetMessage("CLU_MEMCACHE_LIST_ID"), "align" => "right", "default" => true), array("id" => "FLAG", "content" => GetMessage("CLU_MEMCACHE_LIST_FLAG"), "align" => "center", "default" => true), array("id" => "STATUS", "content" => GetMessage("CLU_MEMCACHE_LIST_STATUS"), "align" => "center", "default" => true), array("id" => "WEIGHT", "content" => GetMessage("CLU_MEMCACHE_LIST_WEIGHT"), "align" => "right", "default" => true), array("id" => "HOST", "content" => GetMessage("CLU_MEMCACHE_LIST_HOST"), "align" => "left", "default" => true));
$lAdmin->AddHeaders($arHeaders);
if (!isset($_SESSION["MEMCACHE_LIST"])) {
    $_SESSION["MEMCACHE_LIST"] = array();
}
$cData = new CClusterMemcache();
$rsData = $cData->GetList();
$uptime = false;
$rsData = new CAdminResult($rsData, $sTableID);
while ($arRes = $rsData->Fetch()) {
    if (!$arRes["GROUP_ID"]) {
        $arRes = CClusterMemcache::GetByID($arRes["ID"]);
        $cData->Update($arRes["ID"], $arRes);
        $arRes = CClusterMemcache::GetByID($arRes["ID"]);
    }
    if ($arRes["GROUP_ID"] != $group_id) {
        continue;
    }
    $row =& $lAdmin->AddRow($arRes["ID"], $arRes);
    $row->AddViewField("ID", '<a href="cluster_memcache_edit.php?lang=' . LANGUAGE_ID . '&group_id=' . $group_id . '&ID=' . $arRes["ID"] . '">' . $arRes["ID"] . '</a>');
    $html = '';
    if (true) {
        $html .= '<table width="100%">';
        $arSlaveStatus = CClusterMemcache::GetStatus($arRes["ID"]);
$APPLICATION->SetTitle(GetMessage("BX_MOD_CATALOG_ADMIN_CIS_TITLE"));
$arFilterFields = array('filter_iblock_type_id');
$oSort = new CAdminSorting($sTableID, "NAME", "asc");
$lAdmin = new CAdminList($sTableID, $oSort);
$lAdmin->InitFilter($arFilterFields);
$arFilter = array("IBLOCK_TYPE_ID" => $IBLOCK_TYPE_ID, "CHECK_PERMISSIONS" => "Y", "MIN_PERMISSION" => "R");
$arHeader = array();
$arHeader[] = array("id" => "ID", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_ID"), "sort" => "ID", "align" => "right", "default" => true);
$arHeader[] = array("id" => "IBLOCK_TYPE_ID", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_IBLOCK_TYPE_ID"), "sort" => "IBLOCK_TYPE_ID", "default" => true);
$arHeader[] = array("id" => "NAME", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_NAME"), "sort" => "NAME", "default" => true);
$arHeader[] = array("id" => "ACTIVE", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_ACTIVE"), "sort" => "ACTIVE");
$arHeader[] = array("id" => "XML_ID", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_XML_ID"), "sort" => "XML_ID");
$arHeader[] = array("id" => "CODE", "content" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_HEAD_CODE"), "sort" => "CODE");
$lAdmin->AddHeaders($arHeader);
$rsIBlocks = CIBlock::GetList(array($by => $order), $arFilter);
$rsIBlocks = new CAdminResult($rsIBlocks, $sTableID);
$rsIBlocks->NavStart();
$lAdmin->NavText($rsIBlocks->GetNavPrint(GetMessage("BX_MOD_CATALOG_ADMIN_CIS_NAV")));
while ($arRes = $rsIBlocks->GetNext()) {
    $row =& $lAdmin->AddRow($arRes["ID"], $arRes);
    $row->AddViewField("NAME", $arRes["NAME"] . "<input type=hidden name='n" . $arRes["ID"] . "' id='name_" . $arRes["ID"] . "' value='" . CUtil::JSEscape(htmlspecialcharsbx($arRes["NAME"])) . "'>");
    $row->AddViewField("IBLOCK_TYPE_ID", $arRes["IBLOCK_TYPE_ID"]);
    $row->AddCheckField("ACTIVE", false);
    $row->AddViewField("XML_ID", $arRes["XML_ID"]);
    $row->AddViewField("CODE", $arRes["CODE"]);
    $row->AddActions(array(array("DEFAULT" => "Y", "TEXT" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_SELECT"), "ACTION" => "javascript:SelEl('" . CUtil::JSEscape($arRes["ID"]) . "', '" . CUtil::JSEscape($arRes["NAME"]) . "')")));
}
$lAdmin->AddFooter(array(array("title" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_MAIN_ADMIN_LIST_SELECTED"), "value" => $rsIBlocks->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
if ($boolMultiSelect) {
    $lAdmin->AddGroupActionTable(array(array("action" => "SelAll()", "value" => "select", "type" => "button", "name" => GetMessage("BX_MOD_CATALOG_ADMIN_CIS_SELECT"))), array("disable_action_target" => true));
}
Пример #20
0
                    $url .= "&productDelay[]=" . $arItems["PRODUCT_ID"];
                } elseif ($arItems["SUBSCRIBE"] == "Y") {
                    $url .= "&productSub[]=" . $arItems["PRODUCT_ID"];
                } else {
                    $url .= "&productNA[]=" . $arItems["PRODUCT_ID"];
                }
            }
            if (count($arID) > 0) {
                LocalRedirect($url);
                die;
            }
        }
    }
}
$dbResultList = CSaleBasket::GetLeave(array($by => $order), $arFilter, false, array("nPageSize" => CAdminResult::GetNavSize($sTableID)));
$dbResultList = new CAdminResult($dbResultList, $sTableID);
$dbResultList->NavStart();
$lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("SB_NAV")));
$lAdmin->AddHeaders(array(array("id" => "DATE_UPDATE_MAX", "content" => GetMessage("SB_DATE_UPDATE"), "sort" => "DATE_UPDATE_MAX", "default" => true), array("id" => "USER_ID", "content" => GetMessage("SB_USER"), "sort" => "user_id", "default" => true), array("id" => "PRICE_ALL", "content" => GetMessage("SB_PRICE_ALL"), "sort" => "PRICE_ALL", "default" => true, "align" => "right"), array("id" => "QUANTITY_ALL", "content" => GetMessage('SB_QUANTITY_ALL'), "sort" => "QUANTITY_ALL", "default" => false, "align" => "right"), array("id" => "PR_COUNT", "content" => GetMessage("SB_CNT"), "sort" => "PR_COUNT", "default" => true, "align" => "right"), array("id" => "LID", "content" => GetMessage("SB_LID"), "sort" => "LID", "default" => count($siteName) == 1 ? false : true), array("id" => "BASKET", "content" => GetMessage("SB_BASKET"), "sort" => "", "default" => true), array("id" => "BASKET_NAME", "content" => GetMessage("SB_BASKET_NAME"), "sort" => "", "default" => false), array("id" => "BASKET_QUANTITY", "content" => GetMessage("SB_BASKET_QUANTITY"), "sort" => "", "default" => false, "align" => "right"), array("id" => "BASKET_PRICE", "content" => GetMessage("SB_BASKET_PRICE"), "sort" => "", "default" => false, "align" => "right"), array("id" => "BASKET_AVAIBLE", "content" => GetMessage("BASKET_AVAIBLE"), "sort" => "", "default" => false), array("id" => "DATE_INSERT_MIN", "content" => GetMessage("SB_DATE_INSERT"), "sort" => "DATE_INSERT_MIN", "default" => true), array("id" => "FUSER_ID", "content" => GetMessage("SB_FUSER_ID"), "sort" => "FUSER_ID", "default" => false)));
$arVisibleColumns = $lAdmin->GetVisibleHeaderColumns();
while ($arBasket = $dbResultList->Fetch()) {
    $row =& $lAdmin->AddRow($arBasket["ID"], $arBasket);
    $row->AddField("ID", $arBasket["ID"]);
    $fieldValue = GetMessage("SB_NOT_AUTH");
    if (IntVal($arBasket["USER_ID"]) > 0) {
        $fieldValue = "[<a href=\"/bitrix/admin/user_edit.php?ID=" . $arBasket["USER_ID"] . "&lang=" . LANG . "\" title=\"" . GetMessage("SB_USER_INFO") . "\">" . $arBasket["USER_ID"] . "</a>] ";
        $fieldValue .= " (" . htmlspecialcharsEx($arBasket["USER_LOGIN"]) . ") ";
        $fieldValue .= "<a href=\"sale_buyers_profile.php?USER_ID=" . $arBasket["USER_ID"] . "&lang=" . LANG . "\" title=\"" . GetMessage("SB_FUSER_INFO") . "\">" . htmlspecialcharsEx($arBasket["USER_NAME"] . (strlen($arBasket["USER_NAME"]) <= 0 || strlen($arBasket["USER_LAST_NAME"]) <= 0 ? "" : " ") . $arBasket["USER_LAST_NAME"]) . "</a><br />";
        $fieldValue .= "<a href=\"mailto:" . htmlspecialcharsEx($arBasket["USER_EMAIL"]) . "\" title=\"" . GetMessage("SB_MAILTO") . "\">" . htmlspecialcharsEx($arBasket["USER_EMAIL"]) . "</a>";
    }
    $row->AddField("USER_ID", $fieldValue);
Пример #21
0
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fevent/include.php");

$CURRENCY_RIGHT = $APPLICATION->GetGroupRight("fevent");
if ($CURRENCY_RIGHT=="D") $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));


__IncludeLang(GetLangFileName($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fevent/admin/", "/trigger_actions.php"));
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fevent/prolog.php");

$sTableID = "f_triggers_log";
$oSort = new CAdminSorting($sTableID, "sort", "asc");
$lAdmin = new CAdminList($sTableID, $oSort);

$rsData = CFTriggerLog::GetList($by, $order);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();

function GetUserNameByID($USER_ID){
	if(intval($USER_ID)){
		$rsUser = CUser::GetByID($USER_ID);
		if($arUser = $rsUser->Fetch()){
			return (strlen($arUser["NAME"]) > 0 && strlen($arUser["LAST_NAME"]) > 0 ? $arUser["NAME"]." ".$arUser["LAST_NAME"] : $arUser["LOGIN"]);
		}else{
			return "";
		}
	}else{
		return "";
	}
}
 if (!empty($_REQUEST["filter_timestamp_to"])) {
     $arFilter["DATE_MODIFY_TO"] = $_REQUEST["filter_timestamp_to"];
 }
 if (!empty($_REQUEST["filter_xml_id"])) {
     $arFilter["XML_ID"] = $_REQUEST["filter_xml_id"];
 }
 if (!empty($_REQUEST["filter_code"])) {
     $arFilter["CODE"] = $_REQUEST["filter_code"];
 }
 //select subsection
 if ($arFilter["SECTION_ID"] > 0) {
     $arFilter["INCLUDE_SUBSECTIONS"] = "Y";
 }
 $arNavParams = array("nPageSize" => CAdminResult::GetNavSize($sTableID));
 $dbResultList = CIBlockElement::GetList(array($_REQUEST["by"] => $_REQUEST["order"]), $arFilter, false, $arNavParams);
 $dbResultList = new CAdminResult($dbResultList, $sTableID);
 $dbResultList->NavStart();
 $lAdmin->NavText($dbResultList->GetNavPrint(GetMessage("sale_prod_search_nav")));
 $balanceTitle = $storeFromId > 0 ? GetMessage("SOPS_BALANCE") : GetMessage("SOPS_BALANCE2");
 $arHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => true), array("id" => "ACTIVE", "content" => GetMessage("SOPS_ACTIVE"), "sort" => "ACTIVE", "default" => true), array("id" => "DETAIL_PICTURE", "default" => true, "content" => GetMessage("SPS_FIELD_DETAIL_PICTURE"), "align" => "center"), array("id" => "NAME", "content" => GetMessage("SPS_NAME"), "sort" => "name", "default" => true), array("id" => "QUANTITY", "content" => GetMessage("SOPS_QUANTITY"), "default" => true), array("id" => "BALANCE", "content" => $balanceTitle, "sort" => "", "default" => true, "align" => "right"));
 $arHeaders[] = array("id" => "CODE", "content" => GetMessage("SPS_FIELD_CODE"), "sort" => "code");
 $arHeaders[] = array("id" => "EXTERNAL_ID", "content" => GetMessage("SPS_FIELD_XML_ID"), "sort" => "external_id");
 $arHeaders[] = array("id" => "SHOW_COUNTER", "content" => GetMessage("SPS_FIELD_SHOW_COUNTER"), "sort" => "show_counter", "align" => "right");
 $arHeaders[] = array("id" => "SHOW_COUNTER_START", "content" => GetMessage("SPS_FIELD_SHOW_COUNTER_START"), "sort" => "show_counter_start", "align" => "right");
 $arHeaders[] = array("id" => "PREVIEW_PICTURE", "content" => GetMessage("SPS_FIELD_PREVIEW_PICTURE"), "align" => "right");
 $arHeaders[] = array("id" => "PREVIEW_TEXT", "content" => GetMessage("SPS_FIELD_PREVIEW_TEXT"));
 $arHeaders[] = array("id" => "DETAIL_TEXT", "content" => GetMessage("SPS_FIELD_DETAIL_TEXT"));
 foreach ($arProps as $prop) {
     $arHeaders[] = array("id" => "PROPERTY_" . $prop['ID'], "content" => $prop['NAME'], "align" => $prop["PROPERTY_TYPE"] == 'N' ? "right" : "left", "sort" => $prop["MULTIPLE"] != 'Y' ? "PROPERTY_" . $prop['ID'] : "");
 }
 $rsPrice = CCatalogGroup::GetListEx(array("SORT" => "ASC"), array(), false, false, array("ID", "NAME", "NAME_LANG", "BASE"));
Пример #23
0
                }
                break;
            case "deactivate":
            case "activate":
                $cData = new CXDILFScheme();
                $cData->Update($ID, array("ACTIVE" => $action == "deactivate" ? "N" : "Y"));
                break;
            default:
                break;
        }
    }
}
$arHeaders = array(array("id" => "ID", "content" => GetMessage("LFP_SCHEME_LIST_ID"), "sort" => "ID", "align" => "right", "default" => true), array("id" => "NAME", "content" => GetMessage("LFP_SCHEME_LIST_NAME"), "sort" => "NAME", "align" => "left", "default" => true), array("id" => "ACTIVE", "content" => GetMessage("LFP_SCHEME_LIST_ACTIVE"), "sort" => "ACTIVE", "align" => "left", "default" => true), array("id" => "SORT", "content" => GetMessage("LFP_SCHEME_LIST_SORT"), "sort" => "SORT", "align" => "left", "default" => true), array("id" => "LID", "content" => GetMessage("LFP_SCHEME_LIST_LID"), "sort" => "LID", "align" => "left", "default" => true), array("id" => "TYPE", "content" => GetMessage("LFP_SCHEME_LIST_TYPE"), "sort" => "TYPE", "align" => "left", "default" => true));
$lAdmin->AddHeaders($arHeaders);
$rsData = CXDILFScheme::GetList(array($by => $order));
$rsData = new CAdminResult($rsData, $sTableID);
while (is_array($arRes = $rsData->GetNext())) {
    $row =& $lAdmin->AddRow($arRes["ID"], $arRes);
    $row->AddInputField("NAME", array("size" => 20));
    $row->AddViewField("NAME", '<a href="xdi_lf_scheme_edit.php?ID=' . $arRes["ID"] . '&amp;lang=' . LANG . '">' . $arRes["NAME"] . '</a>');
    $row->AddEditField("LID", CLang::SelectBox("FIELDS[" . $arRes["ID"] . "][LID]", $arRes["LID"]));
    $row->AddInputField("SORT", array("size" => 20));
    $row->AddCheckField("ACTIVE");
    $row->AddViewField("ID", '<a href="xdi_lf_scheme_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"] . '">' . $arRes["ID"] . '</a>');
    $row->AddViewField("TYPE", GetMessage("LFP_SCHEME_LIST_" . $arRes["TYPE"]));
    $arActions = array(array("ICON" => "edit", "DEFAULT" => true, "TEXT" => GetMessage("LFP_SCHEME_LIST_EDIT"), "ACTION" => $lAdmin->ActionRedirect('xdi_lf_scheme_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"])));
    $arActions[] = array("SEPARATOR" => "Y");
    if ($arRes["ACTIVE"] === "Y") {
        $arActions[] = array("TEXT" => GetMessage("LFP_SCHEME_LIST_DEACTIVATE"), "ACTION" => "if(confirm('" . GetMessage("LFP_SCHEME_LIST_DEACTIVATE_CONF") . "')) " . $lAdmin->ActionDoGroup($arRes["ID"], "deactivate"));
    } else {
        $arActions[] = array("TEXT" => GetMessage("LFP_SCHEME_LIST_ACTIVATE"), "ACTION" => $lAdmin->ActionDoGroup($arRes["ID"], "activate"));
Пример #24
0
{
	$arData = array();
	foreach ($arHistoryData as $index => $arHistoryRecord)
		$arData[$index]  = $arHistoryRecord[$by];

	$arIds = array();
	foreach ($arHistoryData as $index => $arHistoryRecord)
		$arIds[$index]  = $arHistoryRecord["ID"];

	array_multisort($arData, constant("SORT_".ToUpper($order)), $arIds, constant("SORT_".ToUpper($order)), $arHistoryData);
}

$dbRes = new CDBResult;
$dbRes->InitFromArray($arHistoryData);

$dbRecords = new CAdminResult($dbRes, $sTableID_tab5);
$dbRecords->NavStart();
$lAdmin_tab5->NavText($dbRecords->GetNavPrint(GetMessage('SOD_HIST_LIST')));

$histdHeader = array(
	array("id"=>"DATE_CREATE", "content"=>GetMessage("SOD_HIST_H_DATE"), "sort"=>"DATE_CREATE", "default"=>true),
	array("id"=>"USER_ID", "content"=>GetMessage("SOD_HIST_H_USER"), "sort"=>"USER_ID", "default"=>true),
	array("id"=>"TYPE", "content"=>GetMessage("SOD_HIST_TYPE"), "sort"=>"TYPE", "default"=>true),
	array("id"=>"DATA", "content"=>GetMessage("SOD_HIST_DATA"), "sort"=>"", "default"=>true),
);

$lAdmin_tab5->AddHeaders($histdHeader);

$arOperations = array();
while ($arChangeRecord = $dbRecords->Fetch())
{
Пример #25
0
	function NavStart($nPageSize=20, $bShowAll=true, $iNumPage=false)
	{
		$nSize = CAdminResult::GetNavSize($this->table_id, $nPageSize);

		if(!is_array($nPageSize))
			$nPageSize = array();

		$nPageSize["nPageSize"] = $nSize;
		if($_REQUEST["mode"] == "excel")
			$nPageSize["NavShowAll"] = true;

		$this->nInitialSize = $nPageSize["nPageSize"];

		parent::NavStart($nPageSize, $bShowAll, $iNumPage);
	}
Пример #26
0
    unset($countQuery);
    $totalCount = (int) $totalCount['CNT'];
    if ($totalCount > 0) {
        $totalPages = ceil($totalCount / $navyParams['SIZEN']);
        if ($navyParams['PAGEN'] > $totalPages) {
            $navyParams['PAGEN'] = $totalPages;
        }
        $getListParams['limit'] = $navyParams['SIZEN'];
        $getListParams['offset'] = $navyParams['SIZEN'] * ($navyParams['PAGEN'] - 1);
    } else {
        $navyParams['PAGEN'] = 1;
        $getListParams['limit'] = $navyParams['SIZEN'];
        $getListParams['offset'] = 0;
    }
}
$propertyIterator = new CAdminResult(Iblock\PropertyTable::getList($getListParams), $sTableID);
if ($usePageNavigation) {
    $propertyIterator->NavStart($getListParams['limit'], $navyParams['SHOW_ALL'], $navyParams['PAGEN']);
    $propertyIterator->NavRecordCount = $totalCount;
    $propertyIterator->NavPageCount = $totalPages;
    $propertyIterator->NavPageNomer = $navyParams['PAGEN'];
} else {
    $propertyIterator->NavStart();
}
$lAdmin->NavText($propertyIterator->GetNavPrint(GetMessage("IBP_ADM_PAGER")));
while ($property = $propertyIterator->Fetch()) {
    $property['ID'] = (int) $property['ID'];
    $property['USER_TYPE'] = (string) $property['USER_TYPE'];
    if ($property['USER_TYPE'] != '') {
        $property['PROPERTY_TYPE'] .= ':' . $property['USER_TYPE'];
    }
Пример #27
0
if(!$USER->CanDoOperation('view_all_users'))
{
	$arUserSubordinateGroups = array();
	$arUserGroups = CUser::GetUserGroup($USER->GetID());
	foreach($arUserGroups as $grp)
		$arUserSubordinateGroups = array_merge($arUserSubordinateGroups, CGroup::GetSubordinateGroups($grp));

	$arFilter["CHECK_SUBORDINATE"] = array_unique($arUserSubordinateGroups);
}


$rsData = CUser::GetList($by, $order, $arFilter, array(
	"NAV_PARAMS"=> array("nPageSize"=>CAdminResult::GetNavSize($sTableID)),
));
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();


$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES")));


$lAdmin->AddHeaders(array(
	array("id"=>"ID",				"content"=>"ID", 	"sort"=>"id", "default"=>true),
	array("id"=>"TIMESTAMP_X",		"content"=>GetMessage('TIMESTAMP'), "sort"=>"timestamp_x", "default"=>true),
	array("id"=>"ACTIVE", 			"content"=>GetMessage('ACTIVE'),	"sort"=>"active", "default"=>true),
	array("id"=>"LOGIN", 			"content"=>GetMessage("LOGIN"),  "sort"=>"login", "default"=>true),
	array("id"=>"NAME",				"content"=>GetMessage("NAME"), "sort"=>"name",	"default"=>true),
	array("id"=>"LAST_NAME", 		"content"=>GetMessage("LAST_NAME"),  "sort"=>"last_name", "default"=>true),
	array("id"=>"EMAIL", 			"content"=>GetMessage('EMAIL'),  "sort"=>"email", "default"=>true),
	array("id"=>"LAST_LOGIN", 		"content"=>GetMessage("LAST_LOGIN"), "sort"=>"last_login", "default"=>true),
Пример #28
0
 protected function getMixedList($arOrder = array("SORT" => "ASC"), $arFilter = array(), $bIncCnt = false, $arSelectedFields = false)
 {
     $arResult = array();
     $notFound = false;
     if (is_array($arFilter["S_ID"]) && sizeof($arFilter["S_ID"]) == 1) {
         $notFound = $arFilter['S_ID'][0] == 0;
     }
     if (!$notFound && !$this->isFiltering()) {
         $arSectionFilter = array("IBLOCK_ID" => $arFilter["IBLOCK_ID"], "=ID" => $arFilter["S_ID"], "?NAME" => $arFilter["NAME"], ">=TIMESTAMP_X" => $arFilter["DATE_MODIFY_FROM"], "<=TIMESTAMP_X" => $arFilter["DATE_MODIFY_TO"], "CODE" => $arFilter["CODE"], "ACTIVE" => $arFilter["ACTIVE"]);
         if (isset($arFilter["CHECK_PERMISSIONS"])) {
             $arSectionFilter['CHECK_PERMISSIONS'] = $arFilter["CHECK_PERMISSIONS"];
             $arSectionFilter['MIN_PERMISSION'] = isset($arFilter['MIN_PERMISSION']) ? $arFilter['MIN_PERMISSION'] : 'R';
         }
         if (array_key_exists("SECTION_ID", $arFilter)) {
             if (!array_key_exists("INCLUDE_SUBSECTIONS", $arFilter)) {
                 $arSectionFilter['SECTION_ID'] = $arFilter['SECTION_ID'];
             } elseif (!$this->isAdvancedSearchAvailable() && ($margin = $this->getSectionMargin($arFilter['SECTION_ID']))) {
                 $arSectionFilter['>LEFT_MARGIN'] = $margin['LEFT_MARGIN'];
                 $arSectionFilter['<RIGHT_MARGIN'] = $margin['RIGHT_MARGIN'];
                 $arSectionFilter['>DEPTH_LEVEL'] = $margin['DEPTH_LEVEL'];
             }
         }
         $obSection = new \CIBlockSection();
         $rsSection = $obSection->GetList($arOrder, $arSectionFilter, $bIncCnt);
         while ($arSection = $rsSection->Fetch()) {
             $arSection["TYPE"] = "S";
             $arResult[] = $arSection;
         }
     }
     $notFound = false;
     if (is_array($arFilter["ID"]) && sizeof($arFilter["ID"]) == 1) {
         $notFound = $arFilter['ID'][0] == 0;
     }
     if (!$notFound) {
         $arElementFilter = array("IBLOCK_ID" => $arFilter["IBLOCK_ID"], "?NAME" => $arFilter["NAME"], "SECTION_ID" => $arFilter["SECTION_ID"], "=ID" => $arFilter["ID"], ">=TIMESTAMP_X" => $arFilter["DATE_MODIFY_FROM"], "<=TIMESTAMP_X" => $arFilter["DATE_MODIFY_TO"], "CODE" => $arFilter["CODE"], "ACTIVE" => $arFilter["ACTIVE"], "WF_STATUS" => $arFilter["WF_STATUS"], 'INCLUDE_SUBSECTIONS' => $arFilter["INCLUDE_SUBSECTIONS"]);
         if (isset($arFilter["CHECK_PERMISSIONS"])) {
             $arElementFilter['CHECK_PERMISSIONS'] = $arFilter["CHECK_PERMISSIONS"];
             $arElementFilter['MIN_PERMISSION'] = isset($arFilter['MIN_PERMISSION']) ? $arFilter['MIN_PERMISSION'] : 'R';
         }
         foreach ($arFilter as $key => $value) {
             $op = \CIBlock::MkOperationFilter($key);
             $newkey = strtoupper($op["FIELD"]);
             if (substr($newkey, 0, 9) == "PROPERTY_" || substr($newkey, 0, 8) == "CATALOG_") {
                 $arElementFilter[$key] = $value;
             }
         }
         if (strlen($arFilter["SECTION_ID"]) <= 0) {
             unset($arElementFilter["SECTION_ID"]);
         }
         if (!is_array($arSelectedFields)) {
             $arSelectedFields = array("ID", "IBLOCK_ID", "IBLOCK_SECTION_ID", "ACTIVE", "SORT", "NAME", "PREVIEW_PICTURE", "PREVIEW_TEXT", "PREVIEW_TEXT_TYPE", "DETAIL_PICTURE", "DETAIL_TEXT", "DETAIL_TEXT_TYPE", "SHOW_COUNTER", "SHOW_COUNTER_START", "CODE", "EXTERNAL_ID");
         }
         if (isset($arFilter["CHECK_BP_PERMISSIONS"])) {
             $arElementFilter["CHECK_BP_PERMISSIONS"] = $arFilter["CHECK_BP_PERMISSIONS"];
         }
         $obElement = new \CIBlockElement();
         $rsElement = $obElement->GetList($arOrder, $arElementFilter, false, false, $arSelectedFields);
         while ($arElement = $rsElement->Fetch()) {
             $arElement["TYPE"] = "E";
             $arResult[] = $arElement;
         }
     }
     $rsResult = new \CDBResult();
     $rsResult->InitFromArray($arResult);
     if ($this->isAdminSection()) {
         $rsResult = new \CAdminResult($rsResult, $this->getTableId());
         $rsResult->NavStart();
     } else {
         $rsResult->NavStart($this->getGridOptions()->GetNavParams());
     }
     return $rsResult;
 }
Пример #29
0
        }
    }
    foreach ($arID as $ID) {
        $ID = (int) $ID;
        if ($ID <= 0) {
            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                CCurrencyRates::Delete($ID);
                break;
        }
    }
}
$rsData = CCurrencyRates::GetList($by, $order, $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("curr_rates_nav")));
$arHeaders = array();
$arHeaders[] = array("id" => "ID", "content" => "ID", "default" => false);
$arHeaders[] = array("id" => "CURRENCY", "content" => GetMessage('curr_rates_curr1'), "sort" => "curr", "default" => true);
$arHeaders[] = array("id" => "DATE_RATE", "content" => GetMessage('curr_rates_date1'), "sort" => "date", "default" => true);
$arHeaders[] = array("id" => "RATE_CNT", "content" => GetMessage('curr_rates_rate_cnt'), "default" => true);
$arHeaders[] = array("id" => "RATE", "content" => GetMessage('curr_rates_rate'), "sort" => "rate", "default" => true);
$lAdmin->AddHeaders($arHeaders);
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes, "/bitrix/admin/currency_rate_edit.php?ID=" . $f_ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"), GetMessage('CURRENCY_RATES_A_EDIT'));
    $row->AddViewField('ID', '<a href="/bitrix/admin/currency_rate_edit.php?ID=' . $f_ID . '&lang=' . LANGUAGE_ID . GetFilterParams("filter_") . '" title="' . GetMessage('CURRENCY_RATES_A_EDIT_TITLE') . '">' . $f_ID . '</a>');
    $row->AddViewField('CURRENCY', '<a href="/bitrix/admin/currency_edit.php?ID=' . $f_CURRENCY . '&lang=' . LANGUAGE_ID . '" title="' . GetMessage('CURRENCY_A_EDIT_TITLE') . '">' . $f_CURRENCY . '</a>');
    $row->AddCalendarField('DATE_RATE');
    $row->AddInputField("RATE_CNT", array("size" => "5"));
Пример #30
0
	"CACHE_COUNT_C" => 0,
);

if (isset($arFilter["CACHE_TYPE"]) && $arFilter["CACHE_TYPE"] == "N")
	$arFilter["CACHE_TYPE"] = array(false, "N");

$cData = new CPerfomanceComponent;
$rsData = $cData->GetList(
	array($by => $order),
	$arFilter,
	false,
	array("nPageSize" => CAdminResult::GetNavSize($sTableID)),
	$arSelectedFields
);

$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PERFMON_COMP_PAGE")));

$max_display_url = COption::GetOptionInt("perfmon", "max_display_url");
while ($arRes = $rsData->NavNext(true, "f_"))
{
	$row =& $lAdmin->AddRow($f_NAME, $arRes);
	foreach ($arNumCols as $column_name => $precision)
	{
		if ($_REQUEST["mode"] == "excel")
			$row->AddViewField($column_name, number_format($arRes[$column_name], $precision, ".", ""));
		else
			$row->AddViewField($column_name, str_replace(" ", "&nbsp;", number_format($arRes[$column_name], $precision, ".", " ")));
	}
	if ($f_QUERIES > 0)