예제 #1
0
 public static function GetByURL($URL, $SITE_ID = false, $bPart = false, $bCleanUrl = false)
 {
     if ($bCleanUrl) {
         $URL = CSeoUtils::CleanURL($URL);
     }
     $arFilter = array('URL' => $URL);
     if ($bPart) {
         $arFilter['URL_EXACT_MATCH'] = 'N';
     }
     if ($SITE_ID) {
         $arFilter['SITE_ID'] = $SITE_ID;
     }
     $dbRes = CSeoKeywords::GetList(array('URL' => 'ASC', 'ID' => 'ASC'), $arFilter);
     $arKeywords = array();
     while ($arRes = $dbRes->Fetch()) {
         $arKeywords[] = $arRes;
     }
     return $arKeywords;
 }
예제 #2
0
</tr>
<tr>
	<td colspan="2" id="bx_page_errors"></td>
</tr>
</tbody>
<?php 
/*************************************/
/* internal keywords tab */
/*************************************/
$tabControl->BeginNextTab();
if ($prop_code = COption::GetOptionString('seo', 'property_internal_keywords', 'keywords_inner')) {
    $arInnerKeywords = CSeoKeywords::GetByURL($back_url, $site);
    if (count($arInnerKeywords) <= 0) {
        $arInnerKeywords = $arGlobalProperties[$prop_code] ? $arGlobalProperties[$prop_code] : $arDirProperties[$prop_code];
        if (count($arInnerKeywords) >= 0) {
            CSeoKeywords::Add(array('URL' => $back_url, 'SITE_ID' => $site, 'KEYWORDS' => $arInnerKeywords));
        }
    } else {
        $k = '';
        foreach ($arInnerKeywords as $key => $value) {
            $k .= ($k == '' ? '' : ',') . $value['KEYWORDS'];
        }
        $arInnerKeywords = $k;
    }
    if (strlen($arInnerKeywords) > 0) {
        $arInnerKeywords = explode(',', $arInnerKeywords);
    } else {
        $arInnerKeywords = array();
    }
    ?>
<tr id="bx_keywords_stats_loading_notify"><td align="center"><?php