Файл: modules/smiles/inc_form.php
Строк: 25
<?php
ECHO "<div id='_smiles' style='display: none;'>";
ECHO "<div class='smiles_body2'>";
ECHO "<div class='smiles_section_optimize' id='smop'>";
$data = DB::GET_STRING_ALL("SELECT * FROM `SMILES_DIR` ORDER BY `ID` ASC LIMIT 0, 4");
$s = 0;
WHILE ($list = $data->FETCH()){
$s++;
$smile = DB::GET_STRING("SELECT * FROM `SMILES` WHERE `ID_DIR` = '".$list['ID']."' ORDER BY `ID` ASC LIMIT 1");
IF (ISSET($smile['ID'])){
?><div class="smile-optimize" style="width: 16.6%;" onclick="smiles_upgd('/system/AJAX/php/smiles.php?id=<?=$list['ID']?>')"><?
ECHO "<span class='_smile'>";
ECHO "<img src='/files/upload/smiles/".$smile['ID'].".".$smile['EXT']."' style='max-width: 25px;'>";
ECHO "</span>";
ECHO "</div>";
}ELSE{
?><div class="smile-optimize" style="width: 16.6%; line-height: 40px; color: white;" onclick="smiles_upgd('/system/AJAX/php/smiles.php?id=<?=$list['ID']?>')"><?
ECHO "".ICONS('smile-o', 25, 'fa-fw')."";
ECHO "</div>";
}
}
IF ($s == 0){
ECHO "<div class='smile-optimize' style='width: 50%; line-height: 40px;'>";
ECHO LG('Пока нет смайлов');
ECHO "</div>";
}
IF ($s >= 4){
ECHO "<div class='smile-optimize' onclick='smiles_section_show()' id='ud_sm' style='width: 16.6%; line-height: 40px;'>";
ECHO "".ICONS('chevron-down', 17, 'fa-fw')."";
ECHO "</div>";
}
ECHO "<div class='smile-optimize' onclick='smiles_hide()' style='width: 16.6%; line-height: 40px; color: white;'>";
ECHO "".ICONS('times', 21, 'fa-fw')."";
ECHO "</div>";
IF ($s >= 4){
ECHO "<div id='section_sm' style='display: none;'>";
$data = DB::GET_STRING_ALL("SELECT * FROM `SMILES_DIR` ORDER BY `ID` ASC LIMIT 4, 25");
WHILE ($list = $data->FETCH()){
$smile = DB::GET_STRING("SELECT * FROM `SMILES` WHERE `ID_DIR` = '".$list['ID']."' ORDER BY `ID` ASC LIMIT 1");
IF (ISSET($smile['ID'])){
?><div class="smile-optimize" style="width: 16.6%;" onclick="smiles_upgd('/system/AJAX/php/smiles.php?id=<?=$list['ID']?>')"><?
ECHO "<span class='_smile'>";
ECHO "<img src='/files/upload/smiles/".$smile['ID'].".".$smile['EXT']."' style='max-width: 25px;'>";
ECHO "</span>";
ECHO "</div>";
}ELSE{
?><div class="smile-optimize" style="width: 16.6%; line-height: 40px; color: white;" onclick="smiles_upgd('/system/AJAX/php/smiles.php?id=<?=$list['ID']?>')"><?
ECHO "".ICONS('smile-o', 25, 'fa-fw')."";
ECHO "</div>";
}
}
ECHO "</div>";
}
ECHO "</div>";
ECHO "<div class='smile-spis'>";
ECHO "<div id='smile-spis'>";
ECHO "</div>";
ECHO "</div>";
ECHO "</div>";
ECHO "</div>";
?>