9 $arAllFields =
array(
'ID',
'URL',
'SITE_ID',
'KEYWORDS');
15 if (in_array(
$key, $arAllFields))
20 $arWhere[] =
'ID=\''.intval($value).
'\'';
24 $arWhere[] =
'SITE_ID=\''.$DB->ForSql($value).
'\'';
28 if (array_key_exists(
'URL_EXACT_MATCH',
$arFilter) &&
$arFilter[
'URL_EXACT_MATCH'] ==
'N')
29 $arWhere[] =
'URL LIKE \''.$DB->ForSql($value).
'%\'';
31 $arWhere[] =
'URL=\''.$DB->ForSql($value).
'\'';
35 $arWhere[] =
'KEYWORDS LIKE \'%'.$DB->ForSql($value).
'%\'';
42 if (
count($arWhere) > 0)
43 $strWhere =
'WHERE '.implode(
' AND ', $arWhere);
53 if (in_array(
$key, $arAllFields))
55 $strOrder .= ($strOrder ==
'' ?
'' :
', ').
$DB->ForSql(
$key).
' '.
$dir;
59 if ($strOrder !=
'') $strOrder =
'ORDER BY '.$strOrder;
61 $query =
'SELECT * FROM b_seo_keywords ';
78 $arKeywords = explode(
",",
$arFields[
'KEYWORDS']);
80 $arKeywords = array_values(
$arFields[
'KEYWORDS']);
82 if (!is_array($arKeywords))
83 $arKeywords =
array();
85 foreach ($arKeywords as
$key => $value)
87 $arKeywords[
$key] = trim($value);
88 if ($arKeywords[
$key] ==
'')
89 unset($arKeywords[
$key]);
92 $arFields[
'KEYWORDS'] = implode(
', ', $arKeywords);
99 if (!isset(
$arFields[
'SITE_ID']) && defined(
'SITE_ID'))
114 $arAllFields =
array(
'URL',
'SITE_ID',
'KEYWORDS');
119 if (in_array(
$key, $arAllFields))
121 $arInsert[
$key] =
"'".($key ==
'SITE_ID' ?
$DB->ForSql($value, 2) :
$DB->ForSql($value)).
"'";
125 $ID =
$DB->Insert(
'b_seo_keywords', $arInsert);
138 $strUpdateBy = isset(
$arFields[
'ID']) ?
'ID' :
'URL';
140 if ($strUpdateBy ==
'ID')
151 $arAllFields =
array(
'ID',
'URL',
'SITE_ID',
'KEYWORDS');
156 if (in_array(
$key, $arAllFields))
158 $arUpdate[
$key] =
"'".($key ==
'SITE_ID' ?
$DB->ForSql($value, 2) :
$DB->ForSql($value)).
"'";
162 $condition = $strUpdateBy ==
'ID' ?
'WHERE ID=\''.$ID.
'\'' :
'WHERE URL=\''.$URL.
'\'';
164 $condition .=
' AND SITE_ID=\''.$siteId.
'\'';
165 $cnt =
$DB->Update(
'b_seo_keywords', $arUpdate, $condition);
167 if ($cnt <= 0 && $strUpdateBy ==
'URL')
169 $arUpdate[
'URL'] =
"'".$URL.
"'";
170 $cnt = intval((
$DB->Insert(
'b_seo_keywords', $arUpdate)) > 0);
176 public static function GetByURL($URL,
$SITE_ID =
false, $bPart =
false, $bCleanUrl =
false)
188 $arKeywords =
array();
static GetList($arOrder, $arFilter)
static CheckFields($ACTION, &$arFields)
static GetByURL($URL, $SITE_ID=false, $bPart=false, $bCleanUrl=false)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(empty($signedUserToken)) $key
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"