0){ $conncond.=" AND conn_type='".$conn_type."'"; } if(isset($_GET['conn_id'])){ $conn_id=$_GET['conn_id']; }else{ $conn_id=""; } if(strlen($conn_id)>0){ if($ext=="coll"){ $conncond.= " AND coll_id='".$conn_id."'"; $imageconnectonstable=""; $imageconnectionscond=""; }else{ $conncond.= " AND conn_id='".$conn_id."'"; $imageconnectionstable=", image_connections kapocs "; $imageconnectionscond=" AND kapocs.img_id=kepek.id "; } } $ext=$_GET['ext']; $order=$_GET['o']; if($ext=='fav'){ $extracon_fields=",COUNT(kedvencek.nick) AS kedvencekszama"; $extracon_tables=" ,favimages kedvencek"; $extracon_cond=" AND kedvencek.img_id=kepek.id"; $extracon_groupby=" GROUP BY kedvencek.img_id"; $orderby=" kedvencekszama DESC, kedvencek.img_id DESC"; $titletext=$txt['favourite']." ".$txt['pictures']; }else if($ext=="coll" && $conn_id>0){ $extracon_fields=""; $extracon_tables=" ,image_coll_items gyujtemenyek"; $extracon_cond=" AND gyujtemenyek.img_id=kepek.id AND gyujtemenyek.coll_id='".$conn_id."'"; $extracon_groupby=" GROUP BY gyujtemenyek.img_id"; $orderby=" gyujtemenyek.datetime DESC, kepek.id DESC"; $pagerquery="SELECT name, nick FROM image_collections WHERE id='".$conn_id."' "; $eredmeny = mysql_query($pagerquery, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); while ( $sor = mysql_fetch_array($eredmeny)){ $titletext=$sor['name']; $collowner=$sor['nick']; } //$titletext=$txt['collection']; }else if($ext=="nfav" && strlen($nick)>0){ $extracon_fields=",COUNT(kedvencek.nick) AS kedvencekszama"; $extracon_tables=" ,favimages kedvencek"; $extracon_cond=" AND kedvencek.img_id=kepek.id AND kedvencek.nick='".$nick."'"; $extracon_groupby=" GROUP BY kedvencek.img_id"; $orderby=" kedvencek.datetime DESC, kepek.id DESC"; $titletext=$txt['favourite']." ".$txt['pictures']; $titletext.=" *"; }else{ $extracon_fields=""; $extracon_tables=""; $extracon_cond=""; $extracon_groupby=" GROUP BY kepek.id"; $orderby=" datetime DESC, kepek.id DESC"; $titletext=$txt['pictures']; } /* if(strlen($conn_type)>0 && $conn_id>0){ $connlinkfilter="&conn_type=".$conn_type."&conn_id=".$conn_id; $pagerquery="SELECT kepek.id, hun_title, eng_title, orientation, filename, owner, kepek.datetime FROM images kepek, image_connections kapocs WHERE kapocs.img_id=kepek.id AND conn_type='".$conn_type."' AND conn_id='".$conn_id."' "; }else{ $pagerquery="SELECT id, hun_title, eng_title, orientation, filename, owner, datetime FROM images"; } */ if((strlen($conn_type)>0 && $conn_id>0) || strlen($ext)>0 ){ $pagerquery="SELECT kepek.id, hun_title, eng_title, orientation, filename, owner, kepek.datetime AS datetime ".$extracon_fields." FROM images kepek ".$imageconnectionstable." ".$extracon_tables." WHERE 1=1 ".$imageconnectionscond." ".$conncond." ".$extracon_cond." ".$extracon_groupby." ORDER BY ".$orderby.""; }else{ $pagerquery="SELECT kepek.id, hun_title, eng_title, orientation, filename, owner, kepek.datetime ".$extracon_fields." FROM images kepek ".$extracon_tables." ".$extracon_groupby." ORDER BY ".$orderby.""; } $connlinkfilter=""; if(strlen($conn_type)>0){ $connlinkfilter="&conn_type=".$conn_type; } if($conn_id>0){ $connlinkfilter.="&conn_id=".$conn_id; } if(strlen($nick)>0){ $connlinkfilter.="&nick=".$nick; } if(strlen($ext)>0){ $connlinkfilter.="&ext=".$ext; } $previousimageid; $nextimageid; $eredmeny = mysql_query($pagerquery, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); if(mysql_num_rows($eredmeny)>0){ $count=0; while ( $sor = mysql_fetch_array($eredmeny)){ $count++; if($count==1){ $firstid=$sor['id']; $previousimageid_temp=$sor['id']; $nextimageid_temp=$sor['id']; } if($sor['id']==$id){ $currentindex=$count; $previousimageid=$previousimageid_temp; $nextimageid=$nextimageid_temp; }else{ $previousimageid_temp=$sor['id']; } if($count==($currentindex+1)){ $nextimageid_temp=$sor['id']; } $nextimageid=$nextimageid_temp; if($firstid==$id){ $previousimageid=$sor['id']; } } } //echo "elozo".$previousimageid; //echo "kovetkezo".$nextimageid; $previousimagelink="img.php?id=".$previousimageid."".$connlinkfilter; $nextimagelink="img.php?id=".$nextimageid."".$connlinkfilter; //csekkolni h csak sajatot /* if($nick!=$_SESSION['nick'] && $_SESSION['role']!="admin"){ header("Location: index.php"); echo ""; } */ $description_lng="description_".$lng; $parancs = "SELECT id, hun_title, eng_title, orientation, filename,copyright, owner,author,source_name, source_url, datetime, ".$description_lng." FROM images WHERE id='".$id."'"; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); while ( $sor = mysql_fetch_array($eredmeny)) { $id= $sor['id']; $hun_title=$sor['hun_title']; if($lng=="hun"){ $title=$sor['hun_title']; }else{ $title=$sor['eng_title']; } $filename=$sor['filename']; $author=$sor['author']; $copyright=$sor['copyright']; $source_name=$sor['source_name']; $source_url=$sor['source_url']; $description=$sor[$description_lng]; } $maxheight=540; $maxwidth=800; list($width, $height, $type, $attr) = getimagesize($_SERVER[DOCUMENT_ROOT].'/i/full/'.$filename); if($width>$height){ //fekvo if($maxwidth>$width){ $maxwidth=$width; } $currwidth=$maxwidth; $currheight=round(($height/$width)*$currwidth); $maxrule="width:".$maxwidth."px;"; $imgrule="width:95%;"; }else{ if($maxheight>$height){ $maxheight=$height; } $currheight=$maxheight; $currwidth=round(($widtht/$height)*$height); $maxrule="height:".$maxheight."px;"; $imgrule="height:95%;"; } $image_type=exif_imagetype ($_SERVER[DOCUMENT_ROOT].'/i/full/'.$filename ); $mime_type=image_type_to_mime_type($image_type); ?>
" . $hun_title . " ::FilmO"; print ""; print ""; ?> $height){ echo ""; }else{ echo ""; } ?> 0) { $nickcheckquery= "SELECT id FROM favimages WHERE img_id='" . $id . "' AND nick='" . $_SESSION['nick'] . "' " ; $nickcheckresult = mysql_query($nickcheckquery) or die(mysql_error()); $nickfav=mysql_num_rows($nickcheckresult); } if($_SESSION['belepett'] == true){ if($nickfav>0){ $isfavIMG="favIMGActive"; $favIMGTitle=$txt['delete_from_favourites']; }else{ $favIMGTitle=$txt['add_to_favourites']; } $favIMGajaxbutton="favIMGAjaxButton"; $numberOffavIMGsId="numberOffavIMGs"; }else{ $favIMGajaxbutton="favIMGAjaxButtonNo"; $favIMGTitle=$txt['add_to_favourites']; $numberOffavIMGsId="numberOffavIMGsNo"; } $parancs = "SELECT DISTINCT nick FROM favimages WHERE img_id='".$id."'"; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); $numberOffavIMGs=mysql_num_rows($eredmeny); if($numberOffavIMGs<1){ $numberOffavIMGs="0"; } print "
".$title."
"; ?>";
print " ";
print " ";
print " ";
print " ";
print " ";
echo " |
![]() | ";
echo " ";
echo "";
echo " ";
echo "".$name." "; if($_SESSION['role']=="admin"){ echo " ";
}
echo "".$txt["more_pictures"]." ";
echo " | ";
if($count%3==2){
echo "
| ";
$count=0;
$eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error());
while ( $sor = mysql_fetch_array($eredmeny)){
//echo " ".$i.": ".$keys[$i] ." >> ".$values[$i]."db"; $tag_id=$sor['tag_id']; $name=$sor[$lng_tag_name]; echo " ".$name." ";
/* echo "";
echo "";
echo $name." "; */
}
echo " |
";
echo " | ";
echo "";
echo " ".$txt["more_pictures"]." ";
echo " | ";
if($count%3==2){
echo "
";
echo " ".$sor['name']."";
if($_SESSION['nick']==$sor['nick']){
echo " ";
}
echo " | ";
echo "".$sor['nick']." | "; print("
";
echo " ".$sor['name']."";
if($_SESSION['nick']==$sor['nick']){
//echo " ";
}
echo " | ";
//echo "".$sor['nick']." | "; echo " ![]() | ";
print("
".$newcollectiontext." | ||