1970 г. 1970 г.

Фотографий на странице: рядов по фото

От coronel.ru | ">Главная страница раздела "Фото"


0) { ?>
Комментарии ()


      '.$descr1.'
Ещё? На coronel.ru.'); ?>    
4) { shuffle($tags); } foreach ($tags as $value) { $value=trim($value); if ($value != "" and $addcount < 4) { $resulta = @mysql_query("select id from ph_list where lower(tags) REGEXP lower('(,|^)( *)".$value."( *)(,|$)') and cat != 'x' limit 0,1"); //Let's do a little check... $rowa = @mysql_fetch_array($resulta); if ($rowa["id"] and !in_array($rowa["id"],$galcontrol)) { $galcontrol[$addcount]= $rowa["id"]; $queryes[$addcount] = "select id from ph_list where lower(tags) REGEXP lower('(,|^)( *)".$value."( *)(,|$)') and cat != 'x'"; print ""; $ldecrs[$addcount] = $value; $addcount++; } } } if ($addcount < 4) // if we still short on gals... { $ourtypes = array(); $phototypes=mysql_query($queryPh); //No way to ignore... $i=0; while ($ptypes=mysql_fetch_array($phototypes)) { if (strpos($row["cat"],$ptypes["def"]) !== false and $ptypes["def"] != "x") { $ourtypes[$i][$ptypes["def"]]=$ptypes["name"]; $i++; } } if (count($ourtypes) > 4-$addcount) { shuffle($ourtypes); } foreach ($ourtypes as $valu) { foreach ($valu as $num => $value) { $resulta = @mysql_query("select id from ph_list where cat like '%".$num."%' limit 0,1"); //Let's do a little check... $rowa = @mysql_fetch_array($resulta); if ($rowa["id"]) { $queryes[$addcount] = "select id from ph_list where cat like '%".$num."%'"; $ldecrs[$addcount] = $value; $addcount++; } } } } //Now to galchoosing... $NoMoreRows=0; $addgal=0; $addgals=array(); if ($queryes) { while ($addgal < 4 and $NoMoreRows < 2) { foreach ($queryes as $num => $value) { unset ($mysqlrows); $mysqlrows = array(); $i=0; $resulta = @mysql_query($value); while ($rowa = @mysql_fetch_array($resulta)) { if (!in_array($rowa["id"], $addgals) and $rowa["id"] != $gid) //aren't we using this already? { $mysqlrows[$i] = $rowa["id"]; $i++; } } if (count($mysqlrows)>0 and $addgal < 4) { $NoMoreRows=0; $adding=rand(0,count($mysqlrows)-1); $addgals[$addgal] = $mysqlrows[$adding]; $addgal++; $ldecrsnum[$mysqlrows[$adding]] = $ldecrs[$num]; } else { $NoMoreRows++; } } } //And to displaying ?>
px;">
Смотрите также:
"> год.
", $row2["name"] ); } else { $namex = str_replace( "\n", "
", $row2["ext_name"] ); } $namex = str_replace( "\r", "", $namex ); $namex = str_replace( "\"", """, $namex ); ?>"">
", $row2["name"] ); } else { $namey = str_replace( "\n", "
", $row2["ext_name"] ); } $namey = str_replace( "\r", "", $namey ); ?>">
От coronel.ru
"; include($html_dir."/footer.php"); ?>