include "../main.php";
include "functions.php";
if (!(isset($lan))) {$lan=0;}
$tmpLan = ( $lan==0 ? 0 : 1 ) ;
//$lan=0; // 0-ua, 3-en
if (!(isset($mm))) {$mm=1;}
if (!(isset($sm))) {$sm=1;}//1
if (!(isset($p))) {$p=0;}
$r=4;
$row1 = 0;
$fp = fopen ("../gallery/gallery.csv","r");
while (!feof ($fp)) {
$buffer = fgets($fp, 4096);
// echo $buffer;
$data1[$row1] = explode(";", $buffer);
$row1++;
}
$row1--;
fclose ($fp);
$row1=0;
$row=1; //1
$countCol = 0;
$countPage = 0;
$countRow =1;
$cTmp = $c ;
$rTmp = $r ;
$xTmp = 0 ;
$countPic = 0 ;
$polyaMy = 9; // pozicia polya v *.csv s kotorogo mojno vyvodit slujebnie polya
while (isset($data1[$row1])){
if (($data1[$row1][1] == $mm) and ($data1[$row1][2] == $sm)){
$row1++;
$startRow = $row1 ;
while ($data1[$row1] [0] <> "#"){// main cycle start +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$x = $data1[$row1][$polyaMy];
$y = $data1[$row1][$polyaMy+1];
if ( $y != 0 ) { // y != 0 start +++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
//echo( gettype($y)." ... ".$y."
");
// if ( ($countCol != 1) && ($countCol != 0) || ($countRow != 1) ) {
$countCol = 0 ;
$countRow = 1 ;
$countPage++ ;
// }
$rTmp = $y ;
$yTmp = $y ;
settype($yTmp, "integer");
} // y != 0 end +++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
if ( $x != 0 ) { // x != 0 start +++..................................................
$countCol = 0 ;
$cTmp = $x ;
$xTmp = $x ;
settype($xTmp, "integer");
if ( $y == 0 ) {
$countRow++ ;
}
} // y != 0 end +++..................................................................................
// if ( ($x != 0) && ($y != 0) ) {
$countPic++;
if ( $countCol == $cTmp ) {
$countCol = 1 ;
$countRow++ ;
if ( $yTmp > 0 ) { // counter row to default start -------------
$yTmp-- ;
//echo( "\$yTmp ".$yTmp."
" );
if ( $yTmp == 0 ) {
$cTmp = $c ;
$rTmp = $r ;
//echo( "poluchilos
" );
}
} // counter row to default end -----------------------------------
} else {
$countCol++;
} // colCounter end
if ( $countRow > $rTmp ) {
$countRow = 1 ;
$countPage++ ;
} // rowCounter end
if ( $xTmp > 0 ) { // counter col to default start -------------
$xTmp-- ;
//echo( "\$xTmp ".$xTmp."
" );
if ( $xTmp < 0 ) {
$cTmp = $c ;
$countCol = 1 ;
$countRow++ ;
//echo( "poluchilos
" );
}
} // counter row to default end -----------------------------------
$currentArray[ $countPage ][ $countRow ][ $countCol ] = $row1 ;
// echo( $countPage." :: ".$countRow." :: ".$countCol." :: ".$x." :: ".$y." :: ".$row1."
");
$npTmp = ereg_replace(".jpg","",$data1[$row1][0]);
//echo $npTmp;
if ( ($np == $npTmp) AND isset($np) ) {
$p = $countPage;
}
$row1++;
} // main cycle end +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
} else {$row1++;}
}
//echo( $countPage." / ".$countPic."
");
$row--;
$cp="";
for ($k=0; $k<=$countPage; $k++) {
$cp .=" ";
if ($k==$p) { $cp .= "".($k+1)."";} else {$cp .="";}
}
/// META Keywords ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ START
reset ( $currentArray );
$tmpcurPage = $currentArray["$p"] ;
$iii = 0 ;
$myKeywords = " " ;
$myKeywords2 = " " ;
while ( list ( $key ) = each ( $tmpcurPage )) {
$curRow = $key;
$tmpcurRow = $tmpcurPage["$curRow"] ;
// row +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++start
while ( list ( $key2 ) = each ( $tmpcurRow )) {
$curCol = $key2;
$tmpcurCol = $tmpcurRow["$curCol"] ;
$idData1Row = $currentArray["$p"]["$curRow"]["1"] ;
$schem = $data1["$idData1Row"][$polyaMy+2];
if ( $schem != 0 ) {
$myKeywords = $myKeywords.$data1[$tmpcurCol][$polyaMy+3+$tmpLan]." ";
} else {
$myKeywords = $myKeywords.$data1[$tmpcurCol][$lan+3]." ";
}
if( $iii == 0 ) { // $startName - Название 1-ой работы в заглавии страницы
$startName = $myKeywords ;
$iii++;
} // $startName ............. end
$myKeywords2 = $myKeywords2.$data1[$tmpcurCol][4+$lan]." ".$data1[$tmpcurCol][5+$lan]." " ;
// echo( $data1[$tmpcurCol]["3"]."
" );
//$vyvodRow = $varGallery( $currentArray["$p"]["$curRow"] ) ;
// row +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ end
} // end while
} // end while
//echo( $myKeywords."
" );
//echo( $myKeywords2."
" );
// echo( $startName."
" );
$strBad = array( ""," " ) ;
$myKeywords2 = $myKeywords2." ".$myKeywords ;
filterStr( $myKeywords2 );
//echo( $myKeywords2."
" );
$strIdItogoMetaF = filterArr( $myKeywords2, "1" );
//echo( "
".$strIdItogoMetaF."
" );
/// META Keywords ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ END
$metaGallery[0][0] = "";
$metaGallery[3][0] = "";
?>
echo $titleNameRazdel[$lan][4] ?>
echo ($metaGraphics[$lan][0]); ?>
|
|
|
|
|
|
|
echo $menu[$lan] ?> |
|
|
|
|
for ($imm=0; $imm<$nmenup3; $imm++) {
if ($mm == $imm){
$ism=1;
while (isset($menup[$lan][$imm][$ism])) {
?>
$ism++;
}}
} ?>
|
|
|
|
|
echo $page[$lan]; ?> |
|
|
|
|
|
//if ( @$podMenu = $menup[$lan][$mm][$sm] ) echo ($podMenu);?>
echo " "; ?>
|
|
|
|
// ********************************************
// start table ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
///////////////////////////////////////////////////////////////////////11111111111111111111111122 START
reset ( $currentArray );
$tmpcurPage = $currentArray["$p"] ;
while ( list ( $key ) = each ( $tmpcurPage )) {
$curRow = $key;
$tmpcurRow = $tmpcurPage["$curRow"] ;
$idData1Row = $currentArray["$p"]["$curRow"]["1"] ;
$schem = trim($data1["$idData1Row"][$polyaMy+2]);
if ( $schem != 0 ) {
$varGallery = "gallery".$schem;
} else {
$varGallery = "gallery" ;
}
// echo $varGallery." ";
$vyvodRow = $varGallery($currentArray["$p"]["$curRow"]);
} // end while
//////////////////// FUNCTIONS ///////////////// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ START
function gallery( $tempArray ) { // ***************************************************************start
reset( $tempArray ) ;
$col = count( $tempArray );
$TDwidth = ( 100/$col );
global $data1, $lan, $d1, $n1, $isize1, $w1, $h1, $isize1, $w11, $h11, $js1, $tabStart, $tabEnd, $tmpLan, $menur, $mm, $galPaintingAlt;
$picTD = "";
$txtTD = "";
while ( list ( $key ) = each ( $tempArray )) {
$curCol = $key;
$id = $tempArray["$curCol"] ;
$js1=imageInfo($id);
$np=ereg_replace(".jpg","",$data1[$id][0]);
if ( $data1[$id][0]!="" ) {
echo '
';
echo "";
echo '
|
';
echo "".$data1[$id][$lan+3]." ".$data1[$id][1].", ".$data1[$id][2].", ".$data1[$id][$lan+4]." ".$data1[$id][$lan+5]."";
echo '
|
|
|
';
} // if $data1[$id][0]<>""
} // while
} // ************************************************************************************************ end
function gallery1( $tempArray ) { // ***************************************************************start
reset( $tempArray ) ;
$col = count( $tempArray );
$TDwidth = ( 100/$col );
global $data1, $lan, $d1, $n1, $isize1, $w1, $h1, $isize1, $w11, $h11, $js1, $tabStart, $tabEnd, $tmpLan;
$picTD = "";
$txtTD = "";
while ( list ( $key ) = each ( $tempArray )) {
$curCol = $key;
$id = $tempArray["$curCol"] ;
$picTD = $picTD." | | ";
$txtTD = $txtTD."".$data1[$id][$lan+3]." ".$data1[$id][1].", ".$data1[$id][2].", ".$data1[$id][$lan+4]." ".$data1[$id][$lan+5]." | ";
}
$vyvod = "
";
echo $vyvod;
//return $vyvod;
} // ************************************************************************************************ end
function imageInfo ( $i ) { // *******************************************************************start
global $data1, $lan, $d1, $n1, $isize1, $w1, $h1, $isize1, $w11, $h11, $js1;
$d1=$data1[$i][0];
$n1=$data1[$i][$lan+3];
$isize1 = getimagesize("../gallery/$d1");
$w1=$isize1[0];
$h1=$isize1[1];
$isize1 = getimagesize("../gallery/tn_$d1");
$w11[$i]=$isize1[0];
$h11[$i]=$isize1[1];
$js1="JustSoPicWindow('../gallery/$d1','$w1','$h1',' :: $n1','#FFFFFF','hug image','10','w1$i');return document.MM_returnValue";
//$js1="JustSoPicWindow('../gallery/$d1','$w1','$h1',' :: $n1','#FFFFFF','hug image','10','w1$i$counterR');return document.MM_returnValue";
return $js1;
} // ************************************************************************************************ end
//////////////////// FUNCTIONS ///////////////// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ END
// ********************************************
?>
|
|
|
|
|
|
|
|
|
|