Galerie Problem mit der Userid

Brian Folte

Angesehenes Mitglied
Hallo und einen guten Morgen.

Habe folgendes Problem mit meiner Galerie:

CODE $endung_tell = "jpg$id";


Nun zeigt er mir nur jpg Bilder mit der dazugehörigen User ID an. Wenn ich nun das jpg wegnehme wäre ja eigetlich die Endung ID ( Bei user Nummer eins eben eine 1)

Dem ist aber leider nicht so.
Wenn ich jpg wegnehme werden mir alle Bilder angezeigt die überhaupt nicht zu dem user gehören.

Hat jemand einen Rat für mich wie ich es schaffe das dem User jpg und gif Bilder angezeigt werden die zu ihm gehören?

Ich hoffe ihr habt mich verstanden was ich von euch gerne wissen möchte.

LG Brian
 
ich glaube um dir einen besseren rat geben zu können, musst du mehr code preis geben.
Was passiert mit dem $endung_tell?

Grüsse, Crazy
 
Hallo. Hier der ganze Code, vielleicht weiß jemand einen Rat.

LG Brian
CODE //Hier angeben, wo die Vorschaubilder (Thumbs) liegen
//Beispiel: /upload
$thumb_dir = "../upload/";

//Hier angeben, wo die Original Bilder liegen
//Beispiel: ./upload
$photo_dir = "../upload/";

//Wie lautet die Endung der Bilder (Auf Groß- und Kleinschreibung wird geachtet!!!)
//Beispiel: gif oder jpg
$endung_tell = "jpg$id";

?>

<html>

<head>
<meta http-equiv="Content-Language" content="de">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Fotogalerie</title>

<style type="text/css">
<!--

.tooltiptitle{COLOR: #FFFFFF; TEXT-DECORATION: none; CURSOR: Default; font-family: arial; font-weight: bold; font-size: 8pt}
.tooltipcontent{COLOR: #000000; TEXT-DECORATION: none; CURSOR: Default; font-family: arial; font-size: 8pt}

#ToolTip{position:absolute; width: 100px; top: 0px; left: 0px; z-index:4; visibility:hidden;}

-->
</style>
<script language = "javascript">
<!--
ContentInfo = "";
topColor = "#808080"
subColor = "#C0C0C0"
var mouse_X;
var mouse_Y;
var tip_active = 0;

function update_tip_pos(){

document.getElementById('ToolTip').style.left = mouse_X + 20;
document.getElementById('ToolTip').style.top = mouse_Y;
}
var ie = document.all?true:false;
if (!ie) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

function getMouseXY(e) {
if (ie) { // grab the x-y pos.s if browser is IE
mouse_X = event.clientX + document.body.scrollLeft;
mouse_Y = event.clientY + document.body.scrollTop;
}
else { // grab the x-y pos.s if browser is NS
mouse_X = e.pageX;
mouse_Y = e.pageY;
}
if (mouse_X < 0){mouse_X = 0;}
if (mouse_Y < 0){mouse_Y = 0;}

if(tip_active){update_tip_pos();}
}
function EnterContent(TTitle, TContent){

ContentInfo = '<table border="0" width="100" cellspacing="0" cellpadding="0">'+
'<tr><td width="100%" bgcolor="#000000">'+

'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
'<tr><td width="100%" bgcolor='+topColor+'>'+

'<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center">'+
'<tr><td width="100%">'+

'<font class="tooltiptitle"> '+TTitle+'</font>'+

'</td></tr>'+
'</table>'+

'</td></tr>'+

'<tr><td width="100%" bgcolor='+subColor+'>'+

'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+

'<tr><td width="100%">'+

'<font class="tooltipcontent">'+TContent+'</font>'+

'</td></tr>'+
'</table>'+

'</td></tr>'+
'</table>'+

'</td></tr>'+
'</table>';

}
function tip_it(which, TTitle, TContent){
if(which){

update_tip_pos();

tip_active = 1;

document.getElementById('ToolTip').style.visibility = "visible";
EnterContent(TTitle, TContent);

document.getElementById('ToolTip').innerHTML = ContentInfo;

}else{

tip_active = 0;

document.getElementById('ToolTip').style.visibility = "hidden";
}
}
//-->
</script>
</head>
<body>
<div id="ToolTip"></div>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width=500><?php
$verz=opendir ($thumb_dir);
while ($file = readdir ($verz)) {

if($file != "." && $file != "..")
if($file) {
$endung = explode(".", $file);
if($endung[2] != $endung_tell) { } else {
$count = $count+1;
$size=getimagesize("$photo_dir/$file");
$hoehe = $size[1];
$breite = $size[0];
$neueBreite=100;
$neueHoehe=intval($hoehe*$neueBreite/$breite);
$filtype = $size[2];
$endung = explode(".", $file);
?>

<?
if($count == "5") { echo '<tr>'; }
else { } ?>


<td valign="top"><table id="table1" width="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13">
<img src="../template/img/content_01.gif" width="13" height="11" alt=""></td>
<td background="../template/img/content_02.gif">
</td>
<td width="11">
<img src="../template/img/content_03.gif" width="11" height="11" alt=""></td>
</tr>
<tr>
<td background="../template/img/content_04.gif" width="13">
 </td>
<td valign="top"><? echo ''.$file.''; ?>

<a href="#" onMouseover="tip_it(1,'<? echo $file; ?>','<? echo $breite; ?>x<? echo $hoehe; ?> Pixel<BR>Dateityp: <? echo $endung[2]; ?>');" onMouseout="tip_it(0, '', '')" onMouseout="tip_it(0, '', '')" onclick="Fenster1=window.open('<? echo ''.$photo_dir.'/'.$file.''; ?>','','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=<? echo $breite; ?>,height=<? echo $hoehe; ?>'); return false;"><? echo "<IMG border=0 src='$thumb_dir/".$file."' width=150 height=150></a>"; ?><br>
</td>
 
Zurück
Oben