public static function showProgress($text, $title, $v)
 {
     $v = $v >= 0 ? $v : 0;
     if ($v < 100) {
         $msg = new \CAdminMessage(array("TYPE" => "PROGRESS", "HTML" => true, "MESSAGE" => $title, "DETAILS" => "#PROGRESS_BAR#<div style=\"width: " . self::PROGRESS_WIDTH . "px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 20px;\">" . Converter::getHtmlConverter()->encode($text) . "</div>", "PROGRESS_TOTAL" => 100, "PROGRESS_VALUE" => $v, "PROGRESS_TEMPLATE" => '#PROGRESS_PERCENT#', "PROGRESS_WIDTH" => self::PROGRESS_WIDTH));
     } else {
         $msg = new \CAdminMessage(array("TYPE" => "OK", "MESSAGE" => $title, "DETAILS" => $text));
     }
     return $msg->show();
 }
use \Bitrix\Main\Text\Converter;
use \Bitrix\Seo\Adv;

Loc::loadMessages(dirname(__FILE__).'/../seo_adv.php');

$bAllowDelete = $ID > 0;

if(count($arLinks) > 0)
{
	foreach($arLinks as $link)
	{
		switch($link['LINK_TYPE'])
		{
			case Adv\LinkTable::TYPE_IBLOCK_ELEMENT:

				echo '<div><a href="/bitrix/admin/iblock_element_edit.php?IBLOCK_ID='.$link['ELEMENT_IBLOCK_ID'].'&type='.Converter::getHtmlConverter()->encode($link['ELEMENT_IBLOCK_TYPE_ID']).'&ID='.$link['LINK_ID'].'&lang='.LANGUAGE_ID.'&find_section_section='.$link['ELEMENT_IBLOCK_SECTION_ID'].'" style="display: inline-block; height: 20px; vertical-align: top; margin-top: 2px;">'.Converter::getHtmlConverter()->encode($link['ELEMENT_NAME']).'</a>'.($bAllowDelete ? '&nbsp;<span class="yandex-delete" onclick="deleteLink(\''.$link['LINK_ID'].'\', \''.$link['LINK_TYPE'].'\', this)"></span>' : '').'</div>';

				break;
		}
	}
}
else
{
	echo Loc::getMessage('MAIN_NO');
}

?>
<script>
	function deleteLink(linkId, linkType, el)
	{
		if(!el._loading)
Example #3
0
function seo_getIblock($iblockId, $sectionId, $sectionChecked, $elementChecked, $arSectionChecked = array(), $arElementChecked = array())
{
    $dbIblock = \CIBlock::GetByID($iblockId);
    $arIBlock = $dbIblock->Fetch();
    if (is_array($arIBlock)) {
        $bSection = strlen($arIBlock['SECTION_PAGE_URL']) > 0;
        $bElement = strlen($arIBlock['DETAIL_PAGE_URL']) > 0;
        $dbRes = \CIBlockSection::GetList(array('SORT' => 'ASC', 'NAME' => 'ASC'), array('IBLOCK_ID' => $iblockId, 'SECTION_ID' => $sectionId, 'ACTIVE' => 'Y', 'CHECK_PERMISSIONS' => 'Y'));
        $bFound = false;
        while ($arRes = $dbRes->Fetch()) {
            $r = RandString(8);
            $d = $arRes['ID'];
            $bSectionChecked = $bSection && ($arSectionChecked[$d] === 'Y' || $sectionChecked && $arSectionChecked[$d] !== 'N');
            $bElementChecked = $bElement && ($arElementChecked[$d] === 'Y' || $elementChecked && $arElementChecked[$d] !== 'N');
            if (!$bFound) {
                $bFound = true;
                ?>
<table class="internal" style="width: 100%;">
	<tr class="heading">
		<td colspan="2"><?php 
                echo Loc::getMessage('SEO_SITEMAP_IBLOCK_SECTION_NAME');
                ?>
</td>
		<td width="100"><?php 
                echo Loc::getMessage('SEO_SITEMAP_IBLOCK_SECTION_SECTION');
                ?>
</td>
		<td width="100"><?php 
                echo Loc::getMessage('SEO_SITEMAP_IBLOCK_SECTION_ELEMENTS');
                ?>
</td>
	</tr>
<?php 
            }
            ?>
	<tr>
		<td width="20"><span onclick="loadIblock(this, '<?php 
            echo $arRes['IBLOCK_ID'];
            ?>
', '<?php 
            echo $d;
            ?>
', '<?php 
            echo $r;
            ?>
', BX('IBLOCK_SECTION_SECTION_<?php 
            echo $d;
            ?>
').checked, BX('IBLOCK_SECTION_ELEMENT_<?php 
            echo $d;
            ?>
').checked);" class="sitemap-tree-icon-iblock"></span></td>
		<td><a href="iblock_list_admin.php?lang=<?php 
            echo LANGUAGE_ID;
            ?>
&amp;IBLOCK_ID=<?php 
            echo $arRes['IBLOCK_ID'];
            ?>
&amp;find_section_section=<?php 
            echo $d;
            ?>
"><?php 
            echo Converter::getHtmlConverter()->encode($arRes['NAME']);
            ?>
</a></td>
		<td align="center"><input type="hidden" name="IBLOCK_SECTION_SECTION[<?php 
            echo $iblockId;
            ?>
][<?php 
            echo $d;
            ?>
]" value="N" /><input type="checkbox" name="IBLOCK_SECTION_SECTION[<?php 
            echo $iblockId;
            ?>
][<?php 
            echo $d;
            ?>
]" id="IBLOCK_SECTION_SECTION_<?php 
            echo $d;
            ?>
" value="Y"<?php 
            echo $bSection ? '' : ' disabled="disabled"';
            echo $bSectionChecked ? ' checked="checked"' : '';
            ?>
 data-type="section" onclick="checkAllSection('<?php 
            echo $r;
            ?>
', this.checked);" />&nbsp;<label for="IBLOCK_SECTION_SECTION_<?php 
            echo $d;
            ?>
"><?php 
            echo Loc::getMessage('MAIN_YES');
            ?>
</label></td>
		<td align="center"><input type="hidden" name="IBLOCK_SECTION_ELEMENT[<?php 
            echo $iblockId;
            ?>
][<?php 
            echo $d;
            ?>
]" value="N" /><input type="checkbox" name="IBLOCK_SECTION_ELEMENT[<?php 
            echo $iblockId;
            ?>
][<?php 
            echo $d;
            ?>
]" id="IBLOCK_SECTION_ELEMENT_<?php 
            echo $d;
            ?>
" value="Y"<?php 
            echo $bElement ? '' : ' disabled="disabled"';
            echo $bElementChecked ? ' checked="checked"' : '';
            ?>
 data-type="element" onclick="checkAllElement('<?php 
            echo $r;
            ?>
', this.checked);" />&nbsp;<label for="IBLOCK_SECTION_ELEMENT_<?php 
            echo $d;
            ?>
"><?php 
            echo Loc::getMessage('MAIN_YES');
            ?>
</label></td>
	</tr>
	<tr style="display: none" id="subdirs_row_<?php 
            echo $r;
            ?>
">
		<td colspan="4" id="subdirs_<?php 
            echo $r;
            ?>
" align="center"></td>
	</tr>
<?php 
        }
        if (!$bFound) {
            echo Loc::getMessage('SEO_SITEMAP_NO_DIRS_FOUND');
        }
    }
}
Example #4
0
:</b><div style="width: 300px; padding: 10px 0 0 0;">
<?php 
        if ($currentUser['picture']) {
            ?>
		<img src="<?php 
            echo Converter::getHtmlConverter()->encode($currentUser['picture']);
            ?>
" style="float: left; margin: 0 13px 0 0; max-width: 55px;" />
<?php 
        }
        ?>
		<a href="<?php 
        echo Converter::getHtmlConverter()->encode($currentUser['profile']);
        ?>
" target="_blank"><?php 
        echo Converter::getHtmlConverter()->encode($currentUser['name']);
        ?>
</a><br /><br />
		<a href="javascript:void(0)" onclick="makeNewAuth()"><?php 
        echo Loc::getMessage('SEO_AUTH_CANCEL');
        ?>
</a>
		<div style="clear: both;"></div>
	</div>
</div>
<?php 
    }
    ?>
<script type="text/javascript">updateInfo();</script>
<?php 
}
Example #5
0
echo GetMessage("SOC_OPT_MAIN_DENY_SPLIT");
?>
: </td>
		<td>
			<select name="group_deny_split[]" size="5" multiple="multiple">
<?php 
foreach ($groups as $groupId => $groupTitle) {
    ?>
				<option value="<?php 
    echo $groupId;
    ?>
"<?php 
    echo in_array($groupId, $groupDenySplit) ? ' selected="selected"' : '';
    ?>
><?php 
    echo Converter::getHtmlConverter()->encode($groupTitle);
    ?>
</option>
<?php 
}
?>
			</select>
		</td>
	</tr>

<?php 
$siteTabControl->End();
?>
</td></tr>
<?php 
$tabControl->Buttons();
Example #6
0
            if (count($arDomains) <= 0) {
                $msg = new CAdminMessage(array('MESSAGE' => Loc::getMessage('SEO_YANDEX_ERROR'), 'HTML' => 'Y'));
                echo $msg->Show();
            } else {
                ?>
<div id="seo_original_text_form_form">
<form name="seo_original_text_form" style="padding:0;margin: 0;">
	<b><?php 
                echo Loc::getMessage('SEO_YANDEX_DOMAIN');
                ?>
: </b><select name="domain">
<?php 
                foreach ($arDomains as $domain) {
                    $domainView = \CBXPunycode::ToUnicode($domain['DOMAIN'], $errors = null);
                    $domainEnc = Converter::getHtmlConverter()->encode($domain['DOMAIN']);
                    $domainViewEnc = Converter::getHtmlConverter()->encode($domainView);
                    ?>
		<option value="<?php 
                    echo $domainEnc;
                    ?>
"><?php 
                    echo $domainViewEnc;
                    ?>
</option>
<?php 
                }
                ?>
	</select><br /><br />
	<textarea style="width: 700px; height: 450px;" name="original_text"></textarea>
</form>
</div><div id="seo_original_text_form_ok" style="display: none;">
 /*
 	if($bOwner)
 	{
 		$row->AddField("ONLINE", '<div class="lamp-green"></div>');
 	}
 	else
 	{
 		$row->AddField("ONLINE", '<div class="lamp-red" onmouseover="BX.hint(this, \''.Converter::getHtmlConverter()->encode(CUtil::JSEscape(Loc::getMessage('SEO_CAMPAIGN_WRONG_OWNER', array("#USERINFO#" => "(".$campaign["OWNER_ID"].") ".$campaign["OWNER_NAME"])))).'\');"></div>');
 	}
 */
 $row->AddField("UPDATE", '<input type="button" ' . ($bOwner ? '' : 'disabled="disabled"') . ' class="adm-btn-save" value="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_UPDATE')) . '" onclick="updateCampaign(this, ' . $campaign['ID'] . ')" name="save" id="campaign_update_button_' . $campaign['ID'] . '"' . ($bNeedAuth ? ' disabled="disabled"' : '') . ' />');
 $row->AddViewField('XML_ID', '<a href="https://direct.yandex.ru/registered/main.pl?cmd=editCamp&cid=' . $campaign['XML_ID'] . '" target="_blank" title="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_EDIT_EXTERNAL')) . '">' . Loc::getMessage('SEO_YANDEX_DIRECT_LINK_TPL', array('#XML_ID#' => $campaign['XML_ID'])) . '</a>');
 if ($campaign['SETTINGS']['StatusArchive'] == Engine\YandexDirect::BOOL_YES) {
     $row->AddViewField('BANNER_CNT', '<a href="seo_search_yandex_direct_banner.php?lang=' . LANGUAGE_ID . '&amp;campaign=' . $campaign['ID'] . '&amp;archive=1" title="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_BANNER_CNT_TITLE')) . '">' . $bannerCnt . '</a>');
 } else {
     $row->AddViewField('BANNER_CNT', '<a href="seo_search_yandex_direct_banner.php?lang=' . LANGUAGE_ID . '&amp;campaign=' . $campaign['ID'] . '" title="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_BANNER_CNT_TITLE')) . '">' . $bannerCnt . '</a>' . ($bStrategySupported ? ' [<a href="seo_search_yandex_direct_banner_edit.php?lang=' . LANGUAGE_ID . '&amp;campaign=' . $campaign['ID'] . '" title="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_BANNER_ADD_TITLE')) . '">+</a>]' : ''));
 }
 if (!$bNeedAuth) {
     $actionsList = array(array("ICON" => $bOwner && $bStrategySupported ? "edit" : 'view', "TEXT" => Loc::getMessage($bOwner && $bStrategySupported ? "SEO_CAMPAIGN_EDIT" : "SEO_BANNER_VIEW"), "ACTION" => $adminList->ActionRedirect($editUrl), "DEFAULT" => true));
     if ($bOwner) {
         $actionsList[] = array("ICON" => "move", "TEXT" => Loc::getMessage("SEO_CAMPAIGN_UPDATE"), "ACTION" => 'updateCampaign(BX(\'campaign_update_button_' . $campaign['ID'] . '\'), ' . $campaign['ID'] . ');');
     }
     $actionsList[] = array("ICON" => "list", "TEXT" => Loc::getMessage("SEO_CAMPAIGN_BANNER_CNT"), "ACTION" => $adminList->ActionRedirect('seo_search_yandex_direct_banner.php?lang=' . LANGUAGE_ID . '&amp;campaign=' . $campaign['ID'] . ($archive ? '&amp;archive=1' : '')));
     if ($bOwner) {
         if ($campaign['SETTINGS']['StatusArchive'] == Engine\YandexDirect::BOOL_NO) {
             if ($campaign['SETTINGS']['StatusShow'] == Engine\YandexDirect::BOOL_YES) {
                 $actionsList[] = array("ICON" => "stop", "TEXT" => Loc::getMessage("SEO_BANNER_STOP"), "ACTION" => $adminList->ActionDoGroup($campaign['ID'], 'stop'));
             } else {
                 $actionsList[] = array("ICON" => "resume", "TEXT" => Loc::getMessage("SEO_BANNER_RESUME"), "ACTION" => $adminList->ActionDoGroup($campaign['ID'], 'resume'));
             }
         }
		<tbody id="adv_banner_selector">
		<tr>
			<td width="40%"><?=Loc::getMessage("SEO_CAMPAIGN_CHOOSE")?>:</td>
			<td width="60%">
				<select id="seo_adv_campaign" style="width:400px" onchange="updateNewBannerLink()">
					<option value="0"><?=Loc::getMessage("SEO_CAMPAIGN_CHOOSE_OPTION")?></option>
					<?
					foreach($campaignList as $campaign)
					{
						$canAdd = in_array(
							$campaign["SETTINGS"]['Strategy']['StrategyName'],
							Adv\YandexCampaignTable::$supportedStrategy
						);
						?>
						<option value="<?=$campaign["ID"]?>"
							data-add="<?=$canAdd ? 1 : 0?>"><?=Converter::getHtmlConverter()->encode($campaign["NAME"])?></option>
					<?
					}
					?>
				</select>&nbsp;&nbsp;<a
					href="/bitrix/admin/seo_search_yandex_direct_edit.php?lang=<?=LANGUAGE_ID?>&back_url=<?=urlencode($APPLICATION->GetCurPageParam('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab=seo_adv_seo_adv', array('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab')))?>"><?=Loc::getMessage("SEO_CREATE_NEW_CAMPAIGN")?></a>
			</td>
		</tr>
		<tr>
			<td><?=Loc::getMessage("SEO_BANNER_CHOOSE")?>:</td>
			<td>
				<select id="seo_adv_banner" style="width:400px" disabled="disabled"
					onchange="BX('seo_adv_link_btn').disabled=this.value<=0">
					<option value="0"><?=Loc::getMessage("SEO_CAMPAIGN_CHOOSE_OPTION")?></option>
				</select>&nbsp;&nbsp;<a id="adv_banner_link"
					href="/bitrix/admin/seo_search_yandex_direct_banner_edit.php?lang=<?=LANGUAGE_ID?>&element=<?=$iblockElementInfo['ID']?>&back_url=<?=urlencode($APPLICATION->GetCurPageParam('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab=seo_adv_seo_adv', array('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab')));?>" style="display: none;"><?=Loc::getMessage('SEO_CREATE_NEW_BANNER')?></a>
    ?>
	</td>
</tr>
<?php 
}
$tabControl->EndTab();
if (!$bReadOnly) {
    $tabControl->Buttons(array("back_url" => $back_url ? $back_url : "seo_search_yandex_direct_banner.php?lang=" . LANGUAGE_ID));
}
$tabControl->End();
if (!$bReadOnly) {
    echo bitrix_sessid_post();
    if ($back_url != '') {
        ?>
	<input type="hidden" name="back_url" value="<?php 
        echo Converter::getHtmlConverter()->encode($back_url);
        ?>
">
<?php 
    }
    ?>

	<input type="hidden" name="campaign" value="<?php 
    echo $campaignId;
    ?>
">
	<input type="hidden" name="element" value="<?php 
    echo $elementId;
    ?>
">
	<input type="hidden" name="ID" value="<?php 
			<div class="adv-banner-item">
				<input type="hidden" name="seo_yandex_banner_id[]" value="<?php 
                    echo $banner['BANNER_ID'];
                    ?>
" />
				<a href="/bitrix/admin/seo_search_yandex_direct_banner_edit.php?lang=<?php 
                    echo LANGUAGE_ID;
                    ?>
&ID=<?php 
                    echo $banner['BANNER_ID'];
                    ?>
&element=<?php 
                    echo $iblockElementInfo['ID'];
                    ?>
&back_url=<?php 
                    echo Converter::getHtmlConverter()->encode(urlencode($APPLICATION->GetCurPageParam('form_element_' . $iblockElementInfo["IBLOCK"]["ID"] . '_active_tab=seo_adv_seo_adv', array('form_element_' . $iblockElementInfo["IBLOCK"]["ID"] . '_active_tab'))));
                    ?>
" class="adv-banner-link"><?php 
                    echo Loc::getMessage('SEO_YANDEX_DIRECT_BANNER_LINK_TPL', array("#XML_ID#" => $banner['BANNER_XML_ID'], '#NAME#' => $banner['BANNER_NAME']));
                    ?>
</a>&nbsp;<span class="yandex-delete" onclick="deleteLink('<?php 
                    echo $banner['BANNER_ID'];
                    ?>
', this)"></span>
			</div>
<?php 
                }
                ?>
	</div></div>
<?php 
            }
<?php 
}
if (!is_array($bannerInfo)) {
    $bannerInfo = array('SETTINGS' => array('Title' => Loc::getMessage('SEO_BANNER_DATA_TITLE'), 'Text' => Loc::getMessage('SEO_BANNER_DATA_TEXT'), 'Href' => ($request->isHttps() ? 'http' : 'https') . '://' . $request->getHttpHost() . "/"));
}
$host = parse_url($bannerInfo['SETTINGS']['Href'], PHP_URL_HOST);
?>
<div class="yandex-adv-block">
	<h2 class="yandex-title"><a href="/" class="yandex-title-link" id="yandex_link"><b id="yandex_title_content"><?php 
echo Converter::getHtmlConverter()->encode($bannerInfo['SETTINGS']['Title']);
?>
</b> / <font id="yandex_link_content"><?php 
echo Converter::getHtmlConverter()->encode($host);
?>
</font></a></h2>
<div class="yandex-adv"><div class="yandex-adv-note"><?php 
echo Loc::getMessage('SEO_BANNER_ADV_MARK');
?>
</div><a class="yandex-adv-link" href="<?php 
echo Converter::getHtmlConverter()->encode($bannerInfo['SETTINGS']['Href']);
?>
" id="yandex_link_content_link"><?php 
echo Converter::getHtmlConverter()->encode($host);
?>
</a></div>
<div class="yandex-text" id="yandex_text_content"><?php 
echo preg_replace("/\\n+/", ' ', Converter::getHtmlConverter()->encode($bannerInfo['SETTINGS']['Text']));
?>
</div>
</div>
Example #12
0
                }
            }
            if (count($arDomains) <= 0) {
                $msg = new CAdminMessage(array('MESSAGE' => Loc::getMessage('SEO_YANDEX_ERROR'), 'HTML' => 'Y'));
                echo $msg->Show();
            } else {
                ?>
<div id="seo_original_text_form_form">
<form name="seo_original_text_form" style="padding:0;margin: 0;">
	<b><?php 
                echo Loc::getMessage('SEO_YANDEX_DOMAIN');
                ?>
: </b><select name="domain">
<?php 
                foreach ($arDomains as $domain) {
                    $domainEnc = Converter::getHtmlConverter()->encode($domain['DOMAIN']);
                    ?>
		<option value="<?php 
                    echo $domainEnc;
                    ?>
"><?php 
                    echo $domainEnc;
                    ?>
</option>
<?php 
                }
                ?>
	</select><br /><br />
	<textarea style="width: 700px; height: 450px;" name="original_text"></textarea>
</form>
</div><div id="seo_original_text_form_ok" style="display: none;">
	<b><?=Loc::getMessage('SEO_YANDEX_DIRECT_BANNER_LINKS')?></b>
<?
		foreach($arBanners as $campaignId => $campaignBanners)
		{
			if(isset($campaignList[$campaignId]))
			{
?>
	<div class="adv-campaign-item">
		<a href="/bitrix/admin/seo_search_yandex_direct_edit.php?lang=<?=LANGUAGE_ID?>&ID=<?=$campaignId?>&back_url=<?=Converter::getHtmlConverter()->encode(urlencode($APPLICATION->GetCurPageParam('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab=seo_adv_seo_adv', array('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab'))))?>" class="adv-campaign-link"><?=Converter::getHtmlConverter()->encode($campaignList[$campaignId]['NAME']);?></a>
		<div class="adv-campaign-list">
<?
				foreach($campaignBanners as $banner)
				{
?>
			<div class="adv-banner-item">
				<a href="/bitrix/admin/seo_search_yandex_direct_banner_edit.php?lang=<?=LANGUAGE_ID?>&ID=<?=$banner['BANNER_ID']?>&element=<?=$iblockElementInfo['ID']?>&back_url=<?=Converter::getHtmlConverter()->encode(urlencode($APPLICATION->GetCurPageParam('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab=seo_adv_seo_adv', array('form_element_'.$iblockElementInfo["IBLOCK"]["ID"].'_active_tab'))))?>" class="adv-banner-link"><?=Loc::getMessage('SEO_YANDEX_DIRECT_BANNER_LINK_TPL', array(
							"#XML_ID#" => $banner['BANNER_XML_ID'],
							'#NAME#' => $banner['BANNER_NAME'],
						))?></a>&nbsp;<span class="yandex-delete" onclick="deleteLink('<?=$banner['BANNER_ID']?>', this)"></span>
			</div>
<?
				}
?>
	</div></div>
<?
			}
		}
?>
</div>
<?
    echo Loc::getMessage('SEO_GOOGLE_GEOLOCATION');
    ?>
:</td>
		<td id="geolocation_row">
			<div class="seo-view-field">
				<span id="geolocation_view"><?php 
    echo Converter::getHtmlConverter()->encode($arSiteInfo[$domain]['geolocation']);
    ?>
</span>
				<span class="seo-edit-link" onclick="BX.addClass(this.parentNode.parentNode, 'seo-edit');"><?php 
    echo Loc::getMessage('SEO_EDIT_FIELD_VALUE');
    ?>
</span>
			</div>
			<div class="seo-edit-field"><input type="text" style="width: 22px" value="<?php 
    echo Converter::getHtmlConverter()->encode($arSiteInfo[$domain]['geolocation']);
    ?>
" maxlength="2" id="geolocation_edit"><span class="seo-save-link"onclick="saveParam('geolocation')"><?php 
    echo Loc::getMessage('SEO_EDIT_FIELD_VALUE_SAVE');
    ?>
</span><span class="seo-cancel-link" onclick="BX.removeClass(this.parentNode.parentNode, 'seo-edit')"><?php 
    echo Loc::getMessage('SEO_EDIT_FIELD_VALUE_CANCEL');
    ?>
</span><span class="seo-loading-message"><?php 
    echo Loc::getMessage('SEO_EDIT_FIELD_VALUE_LOADING');
    ?>
</span></div>
		</td>
	</tr>
	<tr>
		<td><?php 
Example #15
0
    ?>
</td>
</tr>

<?php 
}
$tabControl->BeginNextTab();
?>
<tr>
	<td colspan="2">
		<b><?php 
echo $robotsFile->getPath();
?>
</b><br /><br />
		<textarea style="width: 100%" rows="30" id="robots_text" name="ROBOTS[TEXT]"><?php 
echo Converter::getHtmlConverter()->encode($fileContent);
?>
</textarea>
	</td>
</tr>
<tr>
	<td colspan="2"><?php 
echo BeginNote() . Loc::getMessage('SEO_ROBOTS_HINT' . (!$bVendor ? '' : '_1C')) . EndNote();
?>
</td>
</tr>

<?php 
$tabControl->Buttons(array('btnApply' => false));
echo bitrix_sessid_post();
$tabControl->End();
Example #16
0
?>
: <input type="text" name="CODE" style="width: 200px" /> <input type="submit" name="send_code" value="<?php 
echo Loc::getMessage('SEO_AUTH_CODE_SUBMIT');
?>
"></form></div>
<?php 
if (!$bNeedAuth) {
    if (is_array($currentUser)) {
        ?>
<div id="auth_result" class="seo-auth-result">
	<b><?php 
        echo Loc::getMessage('SEO_AUTH_CURRENT');
        ?>
:</b><div style="width: 300px; padding: 10px 0 0 0;">
		<?php 
        echo Converter::getHtmlConverter()->encode($currentUser['real_name'] . ' (' . $currentUser['display_name'] . ')');
        ?>
<br />
		<a href="javascript:void(0)" onclick="makeNewAuth()"><?php 
        echo Loc::getMessage('SEO_AUTH_CANCEL');
        ?>
</a>
		<div style="clear: both;"></div>
	</div>
</div>
<?php 
    }
    ?>
<script type="text/javascript">updateInfo();</script>
<?php 
}
				$active_title = Loc::getMessage('SEO_ISACTIVE_NO');
			}
		}
	}

	$row->AddField("ISACTIVE", '<div style="white-space:nowrap;"><div class="lamp-'.$active.'" style="display:inline-block;"></div>&nbsp;'.$active_title.'</div>'/*.'<pre>'.print_r(array(
		'IsActive' => $banner['SETTINGS']['IsActive'],
		'StatusShow' => $banner['SETTINGS']['StatusShow'],
		'StatusBannerModerate' => $banner['SETTINGS']['StatusBannerModerate'],
		'StatusActivating' => $banner['SETTINGS']['StatusActivating'],
		'StatusPhrasesModerate' => $banner['SETTINGS']['StatusPhrasesModerate'],
	), 1).'</pre>'*/);

	$row->AddField("UPDATE", '<input type="button" '.($bAllowSimpleActions ? '' : 'disabled="disabled"').' class="adm-btn-save" value="'.Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_UPDATE')).'" onclick="updateBanner(this, '.$banner['ID'].')" name="save" id="banner_update_button_'.$banner['ID'].'" />');

	$row->AddViewField('XML_ID', '<a href="https://direct.yandex.ru/registered/main.pl?cmd=showCampMultiEdit&bids='.$banner['XML_ID'].'&cid='.$campaign['XML_ID'].'" target="_blank" title="'.Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_EDIT_EXTERNAL')).'">'.Loc::getMessage('SEO_YANDEX_DIRECT_LINK_TPL', array('#XML_ID#' => $banner['XML_ID'])).'</a>');

	$row->AddViewField('MODERATE', Loc::getMessage('SEO_YANDEX_STATUS_'.$banner['SETTINGS']['StatusBannerModerate']));
	$row->AddViewField('PHRASES_MODERATE', Loc::getMessage('SEO_YANDEX_STATUS_'.$banner['SETTINGS']['StatusPhrasesModerate']));
	$row->AddViewField('SHOW', Loc::getMessage('SEO_YANDEX_STATUS_'.$banner['SETTINGS']['StatusShow']));

	if($bAllowSimpleActions)
	{
		$rowActions = array(
			array(
				"ICON" => "edit",
				"TEXT" => Loc::getMessage("SEO_BANNER_EDIT"),
				"ACTION" => $adminList->ActionRedirect($editUrl),
				"DEFAULT" => true,
			),
			array(
    ShowError($e->getMessage());
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
}
$bSiteVerified = $arSiteInfo[$domain]['verification'] == Engine\Yandex::VERIFIED_STATE_VERIFIED;
$aTabs = array(array("DIV" => "seo_info1", "TAB" => Loc::getMessage('SEO_DETAIL_INFO'), "ICON" => "main_settings", "TITLE" => Loc::getMessage('SEO_DETAIL_INFO_TITLE', array('#DOMAIN#' => $siteDomainEncView))), array("DIV" => "seo_info2", "TAB" => Loc::getMessage('SEO_DETAIL_TOP_QUERIES'), "ICON" => "main_settings", "TITLE" => Loc::getMessage('SEO_DETAIL_TOP_QUERIES_TITLE', array('#DOMAIN#' => $siteDomainEncView)), 'ONSELECT' => 'window.BXLoadInfo(\'top-queries\')'), array("DIV" => "seo_info3", "TAB" => Loc::getMessage('SEO_DETAIL_CRAWLING'), "ICON" => "main_settings", "TITLE" => Loc::getMessage('SEO_DETAIL_CRAWLING_TITLE', array('#DOMAIN#' => $siteDomainEncView)), 'ONSELECT' => 'window.BXLoadInfo(\'crawling\')'), array("DIV" => "seo_info4", "TAB" => Loc::getMessage('SEO_DETAIL_ORIGINAL'), "ICON" => "main_settings", "TITLE" => Loc::getMessage('SEO_DETAIL_ORIGINAL_TITLE', array('#DOMAIN#' => $siteDomainEncView)), 'ONSELECT' => 'window.BXLoadInfo(\'original_texts\')'));
$tabControl = new CAdminTabControl("seoYandexTabControl", $aTabs, true, true);
$APPLICATION->SetTitle(Loc::getMessage("SEO_YANDEX_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$aMenu = array();
$aMenu[] = array("TEXT" => Loc::getMessage("SEO_DOMAIN_LIST"), "LINK" => "/bitrix/admin/seo_search_yandex.php?lang=" . LANGUAGE_ID, "ICON" => "btn_list");
$context = new CAdminContextMenu($aMenu);
$context->Show();
$tabControl->Begin();
$tabControl->BeginNextTab();
$siteIdEnc = Converter::getHtmlConverter()->encode($arDomain['LID']);
$siteNameEnc = Converter::getHtmlConverter()->encode($arDomain['SITE_NAME']);
?>
	<tr class="adm-detail-required-field">
		<td width="40%"><?php 
echo Loc::getMessage('SEO_DOMAIN');
?>
:</td>
		<td width="60%"><?php 
echo $siteDomainEncView;
?>
</td>
	</tr>
	<tr>
		<td><?php 
echo Loc::getMessage('SEO_SITE');
?>
    echo Loc::getMessage("SEO_CAMPAIGN_CHOOSE_OPTION");
    ?>
</option>
				<?php 
    foreach ($campaignList as $campaign) {
        $canAdd = in_array($campaign["SETTINGS"]['Strategy']['StrategyName'], Adv\YandexCampaignTable::$supportedStrategy);
        ?>
					<option value="<?php 
        echo $campaign["ID"];
        ?>
"
						data-add="<?php 
        echo $canAdd ? 1 : 0;
        ?>
"><?php 
        echo Converter::getHtmlConverter()->encode($campaign["NAME"]);
        ?>
</option>
				<?php 
    }
    ?>
			</select>&nbsp;&nbsp;<a
				href="/bitrix/admin/seo_search_yandex_direct_edit.php?lang=<?php 
    echo LANGUAGE_ID;
    ?>
&back_url=<?php 
    echo urlencode($APPLICATION->GetCurPageParam('form_element_' . $iblockElementInfo["IBLOCK"]["ID"] . '_active_tab=seo_adv_seo_adv', array('form_element_' . $iblockElementInfo["IBLOCK"]["ID"] . '_active_tab')));
    ?>
"><?php 
    echo Loc::getMessage("SEO_CREATE_NEW_CAMPAIGN");
    ?>
Example #20
0
                            $arReferers[$arUrl['host']]['URL_FROM'][$arRes['URL_FROM']] = $arRes['QUANTITY'];
                        }
                    }
                }
            }
            if ($total > 0) {
                $cnt = count($arReferers);
                ?>
<table width="100%">
	<tr>
		<td colspan="2" align="center"><table class="referers-table">
<?php 
                $color = null;
                foreach ($arReferers as $domain => $arData) {
                    $percent = number_format($arData['PERCENT'], 2);
                    $domainEnc = \Bitrix\Main\Text\Converter::getHtmlConverter()->encode($domain);
                    ?>
		<tr>
			<td width="30%" align="left"><a href="javascript:void(0)" onclick="BXToggle('bx_referer_ex_<?php 
                    echo CUtil::JSEscape($domainEnc);
                    ?>
'); return false;" title="<?php 
                    echo GetMessage('SEO_PAGE_REFERERS_SEO_PAGE_REFERERS_ALT');
                    ?>
"><?php 
                    echo $domainEnc;
                    ?>
</td>
			<td width="70%">
				<div style="height: 15px; border: solid 1px #<?php 
                    echo $color = GetNextRGB($color, $cnt);
		</tr>
<?php 
    } else {
        ?>
		<tr>
			<td>
				<?php 
        echo BeginNote();
        ?>
				<span id="ss_network_profile"><?php 
        echo Loc::getMessage("SS_USERTAB_LINKED_PROFILE");
        ?>
: <a href="<?php 
        echo Converter::getHtmlConverter()->encode($profileInfo["PERSONAL_WWW"]);
        ?>
" target="_blank"><?php 
        echo Converter::getHtmlConverter()->encode($profileInfo["NAME"] . " " . $profileInfo["LAST_NAME"] . " (" . $profileInfo["EMAIL"] . ")");
        ?>
</a></span><br /><br /><input type="checkbox" name="SS_REMOVE_NETWORK" id="ss_remove_network" value="Y" onclick="BX('ss_network_profile').style.textDecoration = this.checked ? 'line-through' : 'none'"> <label for="ss_remove_network"><?php 
        echo Loc::getMessage("SS_USERTAB_DELETE_LINK");
        ?>
</label>

				<?php 
        echo EndNote();
        ?>
			</td>
		</tr>
<?php 
    }
}
unset($map['SETTINGS']);
$sitemapList = SitemapTable::getList(array('order' => array($by => $order), "select" => array_keys($map)));
$data = new CAdminResult($sitemapList, $tableID);
$data->NavStart();
$arHeaders = array(array("id" => "ID", "content" => Loc::getMessage("SITEMAP_ID"), "sort" => "ID", "default" => true), array("id" => "TIMESTAMP_X", "content" => Loc::getMessage('SITEMAP_TIMESTAMP_X'), "sort" => "TIMESTAMP_X", "default" => true), array("id" => "NAME", "content" => Loc::getMessage('SITEMAP_NAME'), "sort" => "NAME", "default" => true), array("id" => "SITE_ID", "content" => Loc::getMessage('SITEMAP_SITE_ID'), "sort" => "SITE_ID", "default" => true), array("id" => "DATE_RUN", "content" => Loc::getMessage('SITEMAP_DATE_RUN'), "sort" => "DATE_RUN", "default" => true), array("id" => "RUN", "content" => "", "default" => true));
$adminList->AddHeaders($arHeaders);
$adminList->NavText($data->GetNavPrint(Loc::getMessage("PAGES")));
while ($sitemap = $data->NavNext()) {
    $id = intval($sitemap['ID']);
    $row =& $adminList->AddRow($sitemap["ID"], $sitemap, "seo_sitemap_pro_edit.php?ID=" . $sitemap["ID"] . "&lang=" . LANGUAGE_ID, Loc::getMessage("SITEMAP_EDIT_TITLE"));
    $row->AddViewField("ID", $sitemap['ID']);
    $row->AddViewField('TIMESTAMP_X', $sitemap['TIMESTAMP_X']);
    $row->AddViewField('DATE_RUN', $sitemap['DATE_RUN'] ? $sitemap['DATE_RUN'] : Loc::getMessage('SITEMAP_DATE_RUN_NEVER'));
    $row->AddViewField('SITE_ID', '<a href="site_edit.php?lang=' . LANGUAGE_ID . '&amp;LID=' . $sitemap['SITE_ID'] . '">[' . $sitemap['SITE_ID'] . '] ' . $arSites[$sitemap['SITE_ID']]['NAME'] . '</a>');
    $row->AddField("NAME", '<a href="seo_sitemap_pro_edit.php?ID=' . $sitemap["ID"] . '&amp;lang=' . LANGUAGE_ID . '" title="' . Loc::getMessage("SITEMAP_EDIT_TITLE") . '">' . Converter::getHtmlConverter()->encode($sitemap['NAME']) . '</a>');
    $row->AddField("RUN", '<input type="button" class="adm-btn-save" value="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SITEMAP_RUN')) . '" onclick="generateSitemap(' . $sitemap['ID'] . ')" name="save" id="sitemap_run_button_' . $sitemap['ID'] . '" />');
    //$row->AddInputField("NAME");
    //$row->AddCheckField("ACTIVE");
    $row->AddActions(array(array("ICON" => "edit", "TEXT" => Loc::getMessage("SITEMAP_EDIT"), "ACTION" => $adminList->ActionRedirect("seo_sitemap_pro_edit.php?ID=" . $sitemap["ID"] . "&lang=" . LANGUAGE_ID), "DEFAULT" => true), array("ICON" => "move", "TEXT" => Loc::getMessage("SITEMAP_RUN"), "ACTION" => 'generateSitemap(' . $sitemap['ID'] . ');'), array("ICON" => "delete", "TEXT" => Loc::getMessage("SITEMAP_DELETE"), "ACTION" => "if(confirm('" . \CUtil::JSEscape(Loc::getMessage('SITEMAP_DELETE_CONFIRM')) . "')) " . $adminList->ActionDoGroup($id, "delete"))));
}
$arDDMenu = array();
$arDDMenu[] = array("TEXT" => "<b>" . Loc::getMessage("SEO_ADD_SITEMAP_CHOOSE_SITE") . "</b>", "ACTION" => false);
foreach ($arSites as $arRes) {
    $arDDMenu[] = array("TEXT" => "[" . $arRes["LID"] . "] " . $arRes["NAME"], "LINK" => "seo_sitemap_pro_edit.php?lang=" . LANGUAGE_ID . "&site_id=" . $arRes['LID']);
}
$aContext = array();
$aContext[] = array("TEXT" => Loc::getMessage("SEO_ADD_SITEMAP"), "TITLE" => Loc::getMessage("SEO_ADD_SITEMAP_TITLE"), "ICON" => "btn_new", "MENU" => $arDDMenu);
$adminList->AddAdminContextMenu($aContext);
$adminList->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
$adminList->CheckListMode();
$APPLICATION->SetTitle(Loc::getMessage("SEO_SITEMAP_TITLE"));
$tabControl->EndTab();
if(!$bReadOnly)
{
	$tabControl->Buttons(array(
		"back_url" => $back_url ? $back_url : "seo_search_yandex_direct_banner.php?lang=".LANGUAGE_ID,
	));
}
$tabControl->End();

if(!$bReadOnly):
?>
<?=bitrix_sessid_post();?>
<?
	if($back_url!=''):
?>
	<input type="hidden" name="back_url" value="<?echo Converter::getHtmlConverter()->encode($back_url)?>">
<?
	endif;
?>

	<input type="hidden" name="campaign" value="<?=$campaignId?>">
	<input type="hidden" name="element" value="<?=$elementId?>">
	<input type="hidden" name="ID" value="<?=$ID?>">


<?
endif;
?>
</form>
<?
require($_SERVER["DOCUMENT_ROOT"].BX_ROOT."/modules/main/include/epilog_admin.php");
}
if (!Main\Loader::includeModule('seo')) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
    ShowError(Loc::getMessage("SEO_ERROR_NO_MODULE"));
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
}
$engine = new Engine\YandexDirect();
$tableID = "tbl_yandex_direct_auto_log";
$oSort = new \CAdminSorting($tableID, "ID", "desc");
$adminList = new \CAdminList($tableID, $oSort);
$arHeaders = array(array("id" => "ID", "content" => "ID", "sort" => "ID", "default" => true), array("id" => "TIMESTAMP_X", "content" => Loc::getMessage('SEO_AUTOLOG_TIMESTAMP_X'), "sort" => "TIMESTAMP_X", "default" => true), array("id" => "SUCCESS", "content" => Loc::getMessage('SEO_AUTOLOG_SUCCESS'), "sort" => "SUCCESS", "default" => true), array("id" => "CAMPAIGN", "content" => Loc::getMessage('SEO_AUTOLOG_CAMPAIGN'), "default" => true), array("id" => "BANNER", "content" => Loc::getMessage('SEO_AUTOLOG_BANNER'), "default" => true), array("id" => "DESCRIPTION", "content" => Loc::getMessage('SEO_AUTOLOG_DESCRIPTION'), "default" => true));
$adminList->AddHeaders($arHeaders);
$logEntriesList = Adv\AutologTable::getList(array('order' => array($by => $order), 'filter' => array('=ENGINE_ID' => $engine->getId())));
$data = new \CAdminResult($logEntriesList, $tableID);
$data->NavStart();
$adminList->NavText($data->GetNavPrint(Loc::getMessage("PAGES")));
while ($entry = $data->NavNext()) {
    $editUrl = "seo_search_yandex_direct_banner_edit.php?lang=" . LANGUAGE_ID . "&campaign=" . $entry["CAMPAIGN_ID"] . "&ID=" . $entry["BANNER_ID"];
    $row =& $adminList->AddRow($log["ID"], $entry, $editUrl, Loc::getMessage("SEO_BANNER_EDIT_TITLE", array("#ID#" => $entry["BANNER_ID"], "#XML_ID#" => $entry["BANNER_XML_ID"])));
    $row->AddViewField("ID", $entry['ID']);
    $row->AddViewField('TIMESTAMP_X', $entry['TIMESTAMP_X']);
    $row->AddViewField('SUCCESS', $entry["SUCCESS"] == Adv\AutologTable::SUCCESS ? '<div style="white-space:nowrap;"><div class="lamp-green" style="display:inline-block;"></div>&nbsp;' . Loc::getMessage("SEO_AUTOLOG_SUCCESS_" . $entry["SUCCESS"]) . '</div>' : '<div style="white-space:nowrap;"><div class="lamp-red" style="display:inline-block;"></div>&nbsp;' . Loc::getMessage("SEO_AUTOLOG_SUCCESS_" . $entry["SUCCESS"]) . '</div>');
    $row->AddViewField("CAMPAIGN", '<a href="seo_search_yandex_direct_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $entry["CAMPAIGN_ID"] . '">' . $entry["CAMPAIGN_ID"] . '</a> (<a href="https://direct.yandex.ru/registered/main.pl?cmd=editCamp&cid=' . $entry['CAMPAIGN_XML_ID'] . '" target="_blank" title="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_EDIT_EXTERNAL')) . '">' . Loc::getMessage('SEO_YANDEX_DIRECT_LINK_TPL', array('#XML_ID#' => $entry['CAMPAIGN_XML_ID'])) . '</a>)');
    $row->AddViewField("BANNER", '<a href="' . Converter::getHtmlConverter()->encode($editUrl) . '">' . $entry["BANNER_ID"] . '</a> (<a href="https://direct.yandex.ru/registered/main.pl?cmd=showCampMultiEdit&bids=' . $entry['BANNER_XML_ID'] . '&cid=' . $entry['CAMPAIGN_XML_ID'] . '" target="_blank" title="' . Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_EDIT_EXTERNAL')) . '">' . Loc::getMessage('SEO_YANDEX_DIRECT_LINK_TPL', array('#XML_ID#' => $entry['BANNER_XML_ID'])) . '</a>)');
    $row->AddViewField('DESCRIPTION', Loc::getMessage("SEO_AUTOLOG_ACTION_" . $entry["CAUSE_CODE"], array("#BANNER_ID#" => $entry["BANNER_ID"], "#BANNER_XML_ID#" => $entry["BANNER_XML_ID"], "#CAMPAIGN_ID#" => $entry["CAMPAIGN_ID"], "#CAMPAIGN_XML_ID#" => $entry["CAMPAIGN_XML_ID"])));
}
$adminList->CheckListMode();
$APPLICATION->SetTitle(Loc::getMessage("SEO_MENU_ADV_AUTOLOG"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$adminList->DisplayList();
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";