<?php
//Konfigurations Datei einbinden
include "../data/config.php";
include "../configs/functions.php";
include "db.inc.php";
session_start();
if(empty($_SESSION['rights']))
{
session_destroy();
header("Location: http://www.Privat/co/nologin.php?page=".$_SERVER['PHP_SELF']);
exit;
}
if(isset($_GET['logout']) and $_GET['logout'])
{
header("Location: http://www.Privat/co/logout.php?".SID);
exit;
}
$idx_bild = $HTTP_GET_VARS['idx_bild'];
$sql="SELECT * FROM tblbilder WHERE id='$idx_bild'";
$result = mysql_query($sql,$db2);
if (!$result) { sql_error("<p>Abfrage: $sql.</p>"); exit; }
$myrow = mysql_fetch_array($result);
$idx = $myrow['id'];
$idx_kategorie = $myrow['kategorie'];
$idx_benutzer = $myrow['benutzer'];
$datum = $myrow['datum'];
$name = $myrow['bild'];
//nächstes Bild suchen
$sql="SELECT id AS idx_weiter FROM tblbilder WHERE id>'$idx_bild' AND kategorie='$idx_kategorie' AND datum='$datum' AND benutzer = '$idx_benutzer' ORDER BY id ASC LIMIT 1";
$result = mysql_query($sql,$db2);
if (!$result) { sql_error("<p>Abfrage: $sql.</p>"); exit; }
$numrow2 = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$idx_weiter = $myrow['idx_weiter'];
//vorletztes Bild suchen
$sql="SELECT id AS idx_zurueck FROM tblbilder WHERE id<'$idx_bild' AND kategorie='$idx_kategorie' AND datum='$datum' AND benutzer = '$idx_benutzer' ORDER BY id DESC LIMIT 1";
$result = mysql_query($sql,$db2);
if (!$result) { sql_error("<p>Abfrage: $sql.</p>"); exit; }
$numrow3 = mysql_num_rows($result);
$myrow = mysql_fetch_array($result);
$idx_zurueck = $myrow['idx_zurueck'];
?>
<?php
$sql = "INSERT INTO kommentare_zu_den_bildern
(
idx_bild,
ip,
user,
kommentar,
datum
)
VALUES
(
'$idx_bild',
'" . $_SERVER['REMOTE_ADDR']. "',
'" . $_SESSION['benutzername'] . "',
'" . addslashes($_POST['kommentar']) . "',
NOW()
)
";
mysql_query($sql) OR die(mysql_error());
?>
<html>
<head>
<?php
//Metas einbinden
include "../includes/meta.php";
?>
<link href="../img/css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
background-color: #000000;
}
.Stil2 {color: #000000}
.Stil3 {color: #FFFFFF}
.style3 {color: #000000}
.style6 {color: #000000; }
.style5 {color: #FF0000}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
a:hover {
color: #000000;
}
-->
</style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="727">
<tbody>
<tr>
<td><table border="0" cellpadding="0" cellspacing="0" width="727">
<tbody>
<tr>
<tbody>
<tr>
<td height="108"><img src="../img/design/header.jpg" width="971" height="107" border="0" usemap="#Map" href="../index.php"></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="972" height="80" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="147" height="20" bgcolor="#F28E00"><p><img src="../img/design/o.jpg" width="147" height="20"></p>
</td>
<td width="12" height="20" bgcolor="#000000"><p align="center"> </p></td>
<td width="813" height="20" bgcolor="#FFFFFF"><div align="left"><img src="../img/design/w.jpg" width="23" height="20"></div></td>
</tr>
<tr>
<td height="20" valign="top" bgcolor="#F28E00"><p><br>
<?php include "../data/nav_links.php"; ?>
</p>
</td>
<td height="20" bgcolor="#000000"> </td>
<td height="20" valign="top" bgcolor="#FFFFFF"><div align="center">
<table width="50%" border="0">
<tr>
<td><img src="../img/design/anzeige.gif" width="9" height="40"></td>
<td><!-- BEGINN des zanox-affiliate HTML-Code -->
<!-- ( Der HTML-Code darf im Sinne der einwandfreien Funktionalität nicht verändert werden! ) --> <!-- ENDE des zanox-affiliate HTML-Code --></td>
</tr>
</table>
<DIV align=center><BR>
<table align="center" border="0" cellpadding="2" cellspacing="2" width="97%">
<tbody>
<tr>
<td><table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td align="left"><TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD align=left><H2> </H2>
<p class="style6"> </p>
</TD>
</TR>
</TBODY>
</TABLE> </td>
</tr>
</tbody>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="597" rowspan="2" align="center" valign="top"><table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center">
<img src="bilder/<? echo $name ;?>" height="431" width="575"></td>
</tr>
</tbody>
</table>
<br>
<table cellpadding="2" cellspacing="1" width="582">
<tbody>
<tr>
<td align="left"><? if ($numrow3>0) { ?> <a href="photos_det.php?idx_bild=<? echo $idx_zurueck ?>"><img src="../img/grafiken/left.jpg" alt="Zum vorigen Bild" border="0" height="20" width="90"></a><? } ?></td>
<td align="center"> </td>
<td align="center"><a href="photos_gal.php?idx_kategorie=<? echo $idx_kategorie?>&idx_benutzer=<? echo $idx_benutzer?>&datum=<? echo $datum ?>"><img src="../img/grafiken/uebersicht.jpg" alt="zur Übersicht" name="uebersicht" border="0" height="20" width="102"></a> </td>
<td align="center"> </td>
<td align="right"><? if ($numrow2>0) { ?> <a href="photos_det.php?idx_bild=<? echo $idx_weiter ?>"><img src="../img/grafiken/right.jpg" alt="weiter zum nächsten Bild" name="vor" border="0" height="20" width="81"></a><? } ?> </td>
</tr>
</tbody>
</table><br>
<table cellpadding="0" cellspacing="0" width="98%">
<tbody>
<tr>
<td colspan="2" height="12"><img src="../img/navigation/info.jpg" height="12" width="128"></td>
</tr>
<tr>
<td background="../img/navigation/pixel.jpg" bgcolor="#A00608" width="1"><img src="../img/navigation/fake.gif" height="1" width="1"></td>
<td width="100%">
<table width="100%">
<tbody>
<tr>
<td><table cellpadding="2" cellspacing="0" width="100%">
<tbody>
<tr bgcolor="#ffffff" valign="top">
<td width="4"><img src="../img/navigation/fake.gif" height="15" width="4"></td>
<td width="130"><p> </p></td>
<td width="375">
<p> </p></td>
<td align="right">
<p> </p></td>
</tr>
<tr bgcolor="#efefef" valign="top">
<td width="4"><img src="../img/navigation/fake.gif" height="15" width="4"></td>
<td width="130"><p> </p></td>
<td width="375">
<p> </p></td>
<td align="right">
<p> </p></td>
</tr>
<tr>
<td colspan="4" align="center"><p align="right"> </p></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table></td>
</tr>
<tr background="../img/navigation/pixel.jpg" bgcolor="#A00608">
<td colspan="2" height="1"><img src="../img/navigation/fake.gif" height="1" width="1"></td>
</tr>
</tbody>
</table>
<br><table width="98%" border="0" align="center">
<tr>
<th scope="col"><table width="52%" align="left" cellpadding="0" cellspacing="0">
<tbody>
<tr> </tr>
</tbody>
<tbody>
<tr>
<td colspan="2" height="12"><img src="../img/navigation/info.jpg" height="12" width="128"></td>
</tr>
</tbody>
<tbody>
<tr>
<td width="1" background="../img/navigation/pixel.jpg" bgcolor="#A00608"><img src="../img/navigation/fake.gif" height="1" width="1"></td>
<td width="301" valign="top">
<form action="photos_det.php?idx_bild=<?php echo $idx_bild; ?>" method="post" name="form1">
<table width="100%" height="10" border="0" cellpadding="4" cellspacing="2">
<tbody>
<tr>
<td width="58%"><p>
<input name="kommentar" id="kommentar2" size="40" class="chatfields" type="text">
</p></td>
<td width="42%"><input name="go" type="submit" class="chatfields" id="go" value="Abschicken"></td>
</tr>
<tr valign="middle">
<td height="68" colspan="2">
<p> Bei Nutzung dieser Funktionen werden zusätzlich der Username, die IP-Adresse sowie Datum und Uhrzeit gespeichert. Mit diesen Angaben ist es bei Missbrauch zweifelsfrei möglich, den Urheber zu ermitteln!</p></td>
</tr>
</tbody>
</table>
</form></td>
<td width="4"> </td>
</tr>
<tr>
<td colspan="2" background="../img/navigation/pixel.jpg" bgcolor="#A00608" height="1"><img src="../img/navigation/fake.gif" height="1" width="1"></td>
</tr>
</tbody>
</table></th>
</tr>
</table>
<!-- Tabelle mit Kommentaren zum Foto --></td>
<td width="198" valign="top" bgcolor="#FFFFFF"><div align="right">
<table cellpadding="0" cellspacing="0" width="94%">
<tbody>
<tr>
<td colspan="2" height="12"><div align="left"><img src="../img/navigation/info.jpg" height="12" width="128"></div></td>
</tr>
<tr>
<td background="../img/navigation/pixel.jpg" bgcolor="#A00608" width="1"><img src="../img/navigation/fake.gif" height="1" width="1"></td>
<td width="100%"> </td>
</tr>
<tr background="../img/navigation/pixel.jpg" bgcolor="#A00608">
<td height="1" colspan="2" background="../img/navigation/pixel.jpg"><img src="../img/navigation/fake.gif" height="1" width="1"></td>
</tr>
</tbody>
</table>
<br>
</div></td>
</tr>
<tr>
<td width="198" align="right" valign="top" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
</tbody>
</table>
<div align="center"></div></td>
</tr>
</tbody>
</table>
</DIV>
</div></td>
</tr>
<tr bgcolor="#000000">
<td height="20" colspan="3"> </td>
</tr>
<tr bgcolor="A00608">
<td height="20" colspan="3"><div align="center">
<p class="Stil3">©
<?php
// Copyright Zeitraum feststellen
$start_jahr = 2004;
$akt_jahr = date("Y");
if($akt_jahr <= $start_jahr) $jahr = $start_jahr;
else $jahr = "$start_jahr bis $akt_jahr";
echo $jahr;
?>
by Privat - all rights reserved</p>
</div> </td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
<?
//Points
$x = points_add(1);
if($x == false)
{
"Kein Benutzername in der session";
}
else
{
//echo points_get("all");
}
?>
<map name="Map">
<area shape="rect" coords="10,4,275,105" href="../index.php">
</map>
</body>
</html>