<?php
if( ! defined( 'DATALIFEENGINE' ) ) { die( "Hacking attempt!" ); }
$xflist = dle_cache( $xfname, $config['skin'] );
if(!$xflist) {
$sql_result = $db->query( "SELECT xfields FROM " . PREFIX . "_post WHERE approve=1" );
while ( $rows = $db->get_row( $sql_result ) ) {
$xfields[] = $rows;
}
$stack = array();
foreach($xfields as $value){
if($value[xfields]){
$row = xfieldsdataload($value[xfields]);
if($row[$xfname]){
$rowdata = explode( "~", $row[$xfname]);
foreach($rowdata as $value){
if($value){
$value = trim($value);
array_unshift($stack, $value);
}
}
}
}
}
$stack = array_unique($stack);
sort ($stack);
foreach($stack as $value){
$vala = explode(",", $value);
foreach ($vala as $valka) {
$xflist .= "<option value=" . $valka . ">" . $valka . "</option>";
}
}
create_cache($xfname, $xflist, $config['skin']);
}
echo $xflist;
foreach($stack as $value){
$vala = explode(",", $value);
$grecha = array_merge($vala);
$grecha = array_unique($grecha);
foreach ($vala as $valka) {
$xflist .= "<option value=" . $valka . ">" . $valka . "</option>";
}
}
foreach($stack as $value){
$vala = explode(",", $value);
foreach (array_unique($vala) as $valka) {
$xflist .= "<div class=" . $valka . ">" . $valka . "</div>";
}
}
foreach($stack as $value){
$vala = explode(",", $value);
foreach ($vala as $valka) {
$vala = array_unique($vala);
$xflist .= "<div class=" . $valka . ">" . $valka . "</div>";
}
}
if(!$xflist) {
$sql_result = $db->query( "SELECT xfields FROM " . PREFIX . "_post WHERE approve=1" );
while ( $rows = $db->get_row( $sql_result ) ) {
$xfields[] = $rows;
}
$stack = array();
foreach($xfields as $value){
if($value[xfields]){
$row = xfieldsdataload($value[xfields]);
if($row[$xfname]){
$rowdata = explode( "~", $row[$xfname]);
foreach($rowdata as $value){
if($value){
$value = trim($value);
array_unshift($stack, $value);
}
}
}
}
}
$stack = array_unique($stack);
sort ($stack);
foreach( $stack as $value ){
$xflist .= "
<div class=" . $value . ">" . $value . "</div>
";
}
create_cache( $xfname, $xflist, $config['skin'] );
}
Кондиционер, Охранная система
Растаможена, Электрозеркала, Кондиционер
Электрозеркала, Парктроник