5 public static function PrintSmilesList($num_cols, $strLang = False, $strPath2Icons = False, $cacheTime = False)
9 $return_array = intval($num_cols) > 0 ?
false :
true;
10 if ($strLang === False)
11 $strLang = LANGUAGE_ID;
12 if ($strPath2Icons === False)
13 $strPath2Icons =
"/bitrix/images/socialnetwork/smile/";
14 $cache =
new CPHPCache;
15 $cache_id =
"socialnetwork_smiles_".$strLang.preg_replace(
"/[^a-z0-9]/is",
"_", $strPath2Icons);
17 $cache_path =
"/".SITE_ID.
"/socialnetwork/smiles/";
18 if ($cacheTime > 0 && $cache->InitCache($cacheTime, $cache_id, $cache_path))
20 $res = $cache->GetVars();
21 $arSmile =
$res[
"arSmile"];
37 $cache->StartDataCache($cacheTime, $cache_id, $cache_path);
38 $cache->EndDataCache(
array(
"arSmile"=>$arSmile));
47 foreach ($arSmile as
$res)
49 if ($ind == 0) {$res_str .=
"<tr align=\"center\">";}
50 $res_str .=
"<td width=\"".intval(100/$num_cols).
"%\">";
51 $strTYPING = strtok(
$res[
'TYPING'],
" ");
52 $res_str .=
"<img src=\"".$strPath2Icons.$res[
'IMAGE'].
"\" alt=\"".
$res[
'NAME'].
"\" title=\"".
$res[
'NAME'].
"\" border=\"0\"";
53 if (intval(
$res[
'IMAGE_WIDTH'])>0) {$res_str .=
" width=\"".$res[
'IMAGE_WIDTH'].
"\"";}
54 if (intval(
$res[
'IMAGE_HEIGHT'])>0) {$res_str .=
" height=\"".$res[
'IMAGE_HEIGHT'].
"\"";}
55 $res_str .=
" onclick=\"if(emoticon){emoticon('".$strTYPING.
"');}\" name=\"smile\" id='".$strTYPING.
"' ";
56 $res_str .=
"/> </td>\n";
58 if ($ind >= $num_cols)
66 for (
$i=0;
$i<$num_cols-$ind;
$i++)
68 $res_str .=
"<td> </td>";
92 while ($arLang = $db_lang->Fetch())
112 $DB->Query(
"DELETE FROM b_sonet_smile_lang WHERE SMILE_ID = ".
$ID, True);
113 $DB->Query(
"DELETE FROM b_sonet_smile WHERE ID = ".
$ID, True);
125 "SELECT FR.ID, FR.SORT, FR.SMILE_TYPE, FR.TYPING, FR.IMAGE, FR.CLICKABLE, ".
126 " FR.DESCRIPTION, FR.IMAGE_WIDTH, FR.IMAGE_HEIGHT ".
127 "FROM b_sonet_smile FR ".
128 "WHERE FR.ID = ".$ID.
"";
144 "SELECT FR.ID, FR.SORT, FR.SMILE_TYPE, FR.TYPING, FR.IMAGE, FR.CLICKABLE, ".
145 " FRL.LID, FRL.NAME, FR.DESCRIPTION, FR.IMAGE_WIDTH, FR.IMAGE_HEIGHT ".
146 "FROM b_sonet_smile FR ".
147 " LEFT JOIN b_sonet_smile_lang FRL ON (FR.ID = FRL.SMILE_ID AND FRL.LID = '".$DB->ForSql($strLang).
"') ".
148 "WHERE FR.ID = ".$ID.
"";
162 $SMILE_ID = intval($SMILE_ID);
164 "SELECT FRL.ID, FRL.SMILE_ID, FRL.LID, FRL.NAME ".
165 "FROM b_sonet_smile_lang FRL ".
166 "WHERE FRL.SMILE_ID = ".$SMILE_ID.
" ".
167 " AND FRL.LID = '".$DB->ForSql($strLang).
"' ";
static GetList($by="sort", $order="asc", $arFilter=[])
static CheckFields($ACTION, &$arFields)
static GetByIDEx($ID, $strLang)
static GetLangByID($SMILE_ID, $strLang)
static PrintSmilesList($num_cols, $strLang=False, $strPath2Icons=False, $cacheTime=False)
static GetList($arOrder=Array("ID"=> "DESC"), $arFilter=Array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
</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."%"