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 "
"; print "
". $numberOffavIMGs." ".$txt['members']." ".$txt['marked_as_favourite']."\" class='hastipButton'>".ucfirst(strtolower($txt['favourite']))." [".$numberOffavIMGs."]
"; print "
"; echo "
"; echo "
"; echo "
"; print "
Biztosan el szeretnéd küldeni?
 
"; print "
"; print "
"; ?>

 ".$title." 

"; ?>
"; echo "
"; echo ""; echo "
"; echo "".$copyright.""; echo "
"; echo "
"; echo " "; echo "
"; echo "
"; echo "
"; echo " "; echo "
"; echo "
"; echo " "; echo "
"; echo ""; //FORRÁS ÉS COPYRIGHT $parancs = "SELECT filmek.movie_id, year FROM movies filmek, image_connections kapocs WHERE (filmek.movie_id = kapocs.conn_id and kapocs.img_id='".$id."' AND kapocs.conn_type='1') " ; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); if(mysql_num_rows($eredmeny)>0){ while ( $sor = mysql_fetch_array($eredmeny)){ $movie_id=$sor['movie_id']; $year=$sor['year']; $langtagname=$lng."_tag_name"; $parancs = "SELECT ".$langtagname.", cimkek.tag_id FROM tags cimkek, movie_tags filmcimkek WHERE cimkek.tag_id=filmcimkek.tag_id AND cimkek.category='2' AND filmcimkek.movie_id =" . $movie_id ; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); $studiolist=" ".$year." "; if ( $sor2 = mysql_fetch_array($eredmeny)) { do { if(strlen($studiolist)>2){ $studiolist.=", "; } $studiolist .= "".$sor2[$langtagname].""; } while ( $sor2 = mysql_fetch_array($eredmeny)); } } } echo "
"; if(strlen($source_name)>0){ echo "
".$txt['source'].": "; echo "".$source_name.""; echo "
"; } if(strlen($author)>0){ echo "
".$txt['author'].": "; echo $author; echo "
"; } if(strlen($studiolist)>0 || strlen($copyright)>0){ echo "
"; echo "©".$studiolist; if(strlen($copyright)>0){ if(strlen($studiolist)>0){ echo " ||"; } echo " ".$copyright; } echo "
"; } echo "
"; if(strlen($description)>2){ echo "
"; echo $description; echo "
"; } if($_SESSION['role'] == 'admin'){ echo "
"; print "  "; print "  "; print "  "; print "  "; print "  "; echo "
"; } //KAPCSOLODO SZEMELYEK $parancs = "SELECT szemelyek.person_id, name FROM persons szemelyek, image_connections kapocs WHERE (szemelyek.person_id= kapocs.conn_id and kapocs.img_id='".$id."' AND kapocs.conn_type='2') ORDER BY name ASC " ; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); $numofrows=mysql_num_rows($eredmeny); if($numofrows>0){ echo "
"; echo "
"; echo "
"; echo $txt['related_persons'].":"; echo "
"; echo "
"; echo ""; 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"; $person_id=$sor['person_id']; $name=$sor['name']; echo ""; if($count%3==2){ echo ""; } $count++; } if($numofrows%3!=2){ echo ""; } echo "
"; echo "
"; echo ""; echo "

".$name.""; if($_SESSION['role']=="admin"){ echo " "; } echo "

"; echo "
".$txt["more_pictures"]."
"; echo "
"; echo "
"; } ///KAPCSOLODO FILMEK $parancs = "SELECT hun_title, filmek.movie_id, title, season, year FROM movies filmek, image_connections kapocs WHERE (filmek.movie_id = kapocs.conn_id and kapocs.img_id='".$id."' AND kapocs.conn_type='1') ORDER BY filmek.year DESC, filmek.movie_id DESC " ; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); if(mysql_num_rows($eredmeny)>0){ ?>

".$sor['title']."

"; if($lng=="hun"){ print $sor['hun_title']; } print " 

".$sor['year']."

"; $readonly=""; if($nick!=$_SESSION['nick']){ $readonly=" readonly=readonly' "; } echo "
".$txt["more_pictures"]."
"; if($_SESSION['role']=="admin"){ print "
"; } print "
"; $sorszam++; } ?>
0){ echo "
"; echo "
"; echo "
"; echo $txt['related_tags'].":"; echo "
"; echo "
"; echo ""; 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 "
"; } //END KAPCSOLODO CIMKEK //KAPCSOLODO KULTFIGURAK $parancs = "SELECT szemelyek.id, ".$lng."_name FROM cult_characters szemelyek, image_connections kapocs WHERE (szemelyek.id= kapocs.conn_id and kapocs.img_id='".$id."' AND kapocs.conn_type='4') ORDER BY ".$lng."_name ASC " ; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); $numofrows=mysql_num_rows($eredmeny); if($numofrows>0){ echo "
"; echo "
"; echo "
"; echo $txt['related_cultcharacters'].":"; echo "
"; echo "
"; echo ""; 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"; $person_id=$sor['id']; $name=$sor[$lng."_name"]; echo ""; if($count%3==2){ echo ""; } $count++; } if($numofrows%3!=2){ echo ""; } echo "
"; echo ""; echo ""; echo "
".$txt["more_pictures"]."
"; echo "
"; echo "
"; } //KOLLEKCIOK $parancs="SELECT kollekciok.id, name, kollekciok.nick, COUNT(kepek.img_id) AS kepekszama FROM image_collections kollekciok LEFT OUTER JOIN image_coll_items kepek ON kepek.coll_id=kollekciok.id WHERE kepek.img_id='".$id."' GROUP BY kollekciok.id ORDER BY kollekciok.datetime DESC"; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); if(mysql_num_rows($eredmeny)){ echo "
"; echo "
"; echo "
"; echo $txt['collections'].":"; echo "
"; echo "
"; echo ""; while ( $sor = mysql_fetch_array($eredmeny)){ echo ""; echo ""; echo ""; print(""); } echo "
"; echo "  ".$sor['name'].""; if($_SESSION['nick']==$sor['nick']){ echo "  "; } echo "  ".$sor['nick']."
"; } if($_SESSION['belepett']==true){ //HOZZAADAS KOLLEKCIOKHOZ $parancs="SELECT kollekciok.id, name, kollekciok.nick FROM image_collections kollekciok LEFT OUTER JOIN image_coll_items kepek ON kepek.coll_id=kollekciok.id WHERE kollekciok.id NOT IN (SELECT coll_id FROM image_coll_items WHERE img_id='".$id."') AND kollekciok.nick='".$_SESSION['nick']."' GROUP BY kollekciok.id ORDER BY kollekciok.datetime DESC"; $eredmeny = mysql_query($parancs, $conn) or die("Nem tudtam az adatokat lekérni. A hiba oka: ".mysql_error()); echo "
"; echo "
"; echo "
"; echo "Hozzáadás kollekcióhoz:"; echo "
"; echo "
"; echo ""; while ( $sor = mysql_fetch_array($eredmeny)){ echo ""; echo ""; //echo ""; echo ""; print(""); } if($lng=="hun"){ $newcollectiontext="Új Kollekció"; }else{ $newcollectiontext="New Collection"; } echo ""; echo "
"; echo "  ".$sor['name'].""; if($_SESSION['nick']==$sor['nick']){ //echo "  "; } echo "  ".$sor['nick']." 
   ".$newcollectiontext."
"; } ?>