<html>
<head>
<title>Zeile bearbeiten</title>
<meta http-equiv="pragma" content="no cache">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<LINK REL="SHORTCUT ICON" href="http://www.fachwerk-lehmbau.de/superspitzensymbol.ico">
</head>
</html>
<?PHP
//////////////////////////////////////////////////////////
        include("config/includes/linkleiste");
	include("config/includes/configuration");
        echo "<link rel=stylesheet type=\"text/css\" href=\"config/includes/style.css\">\n";
//////////////////////////////////////////////////////////

////////////////////////////////////////////////////////// Script Pfad ermitteln!

$path_to = explode("/", $SCRIPT_NAME);
for($x=0; $x<count($path_to)-1; $x++)
	{
	$home = "$home$path_to[$x]/";
	}
///	Feddich

echo "<div align=center>\n";
$path = "eigene_bilder/$kopier_bereich";
$read_write = "config/tables/$kopier_bereich";
if(isset($rotate))
	{
	if(file_exists("eigene_bilder/$kopier_bereich/safe_pics")){}
	else
		{
		mkdir("eigene_bilder/$kopier_bereich/safe_pics",0777);
		chmod("eigene_bilder/$kopier_bereich/safe_pics",0777);
		}
	###### Sicherungskopie!!!
	if(file_exists("$path/safe_pics/jpg_$akt_pic.jpg~")){}
	else
		{
		copy("$path/jpg/jpg_$akt_pic.jpg","$path/safe_pics/jpg_$akt_pic.jpg~");
		}
	###### /sicherungskopie
	
	###### Drehen! Marsch, marsch!

	if($rotate == right)
		{
		$execute = "convert -rotate 90 $path/jpg/jpg_$akt_pic.jpg $path/jpg/jpg_$akt_pic.jpg";
		exec ($execute);
		$execute = "convert -rotate 90 $path/thumbs/thumb_$akt_pic.jpg $path/thumbs/thumb_$akt_pic.jpg";
		exec ($execute);
		}
	if($rotate == left)
		{
		$execute = "convert -rotate 270 $path/jpg/jpg_$akt_pic.jpg $path/jpg/jpg_$akt_pic.jpg";
		exec ($execute);
		$execute = "convert -rotate 270 $path/thumbs/thumb_$akt_pic.jpg $path/thumbs/thumb_$akt_pic.jpg";
		exec ($execute);
		}
	echo "<br><br><br><br><br><br><br><br>\n<font size=4 color =#FF0000>Einen Moment bitte........</font>\n<br>\n";
	if(isset($site))
		{
		echo "<head>\n<meta http-equiv=\"refresh\" content=\"1; URL=$home/line_work.php?kopier_bereich=$kopier_bereich&akt_pic=$akt_pic&line=$line&titel=$titel&bemerkungen=$bemerkungen&datum=$datum&anker=$anker&site=$site\">\n</head>\n";
		exit;
		}
	else
		{
		echo "<head>\n<meta http-equiv=\"refresh\" content=\"1; URL=http://$SERVER_NAME$homeline_work.php?kopier_bereich=$kopier_bereich&akt_pic=$akt_pic&line=$line&titel=$titel&bemerkungen=$bemerkungen&datum=$datum&anker=$anker&site=$site\">\n</head>\n";
		exit;
		}
	}
echo "<br><div align=center><font class=anweis_gr>Geben Sie zu diesem Bild Ihre Angaben ein:<br></font></div>\n";

echo "<table border width=100% cellspacing=5 cellpadding=0><tr>\n";
echo "<td width=30% valign=top><div align=left><font class=titel>Bildvorschau</font></div></td>\n";
echo "<td width=13% valign=top><div align=left><font class=titel>Titel / Urheber</font></div></td>\n";
echo "<td width=47% valign=top><div align=left><font class=titel>Bemerkungen</font></div></td>\n";
echo "<td width=10% valign=top><div align=left><font class=titel>Datum</font></div></td>\n";
echo "</tr>\n";

$titel = htmlentities(stripslashes(str_replace("<br>","\n",$titel)));
$bemerkungen = htmlentities(stripslashes(str_replace("<br>","\n","$bemerkungen")));
$datum = htmlentities(stripslashes(str_replace("<br>","\n",$datum)));

echo "<tr><td width=18% valign=top><div align=right><img src=$path/thumbs/thumb_$akt_pic.jpg><br>\n";
echo "<font class=klein>thumb_$akt_pic.jpg<br>\n";
echo "jpg_$akt_pic.jpg\n";
if(file_exists("eigene_bilder/$kopier_bereich/tif/tif_$akt_pic.tif"))
{
echo "<br>tif_$akt_pic.tif\n";
}
echo "</font>\n";
echo "<table width=100% cellspacing=5 cellpadding=0>\n";
echo "<tr><td width=30% colspan=3><font class=anweis color=#008080>Bild drehen (Bei den meisten Browsern müssen sie danach auf reload klicken)</font><br>\n";
if(isset($site))
        {
	echo "<form action=line_work.php?kopier_bereich=$kopier_bereich&anker=$anker&site=$site method=post class=action>\n";
	}
else
	{
	echo "<form action=line_work.php?kopier_bereich=$kopier_bereich&anker=$anker method=post class=action>\n";
	}
echo "<select name=rotate>";
echo "<option value=left>Um 90° nach links\n";
echo "<option value=right>Um 90° nach rechts</option>\n";
echo "</select>\n";
echo "<input type=hidden name=akt_pic value=\"$akt_pic\">\n";
echo "<input type=hidden name=line value=\"$line\">\n";
#echo "<input type=hidden name=rotate value=right>\n";
echo "<input type=hidden name=titel value=\"$titel\">\n";
echo "<input type=hidden name=bemerkungen value=\"$bemerkungen\">\n";
echo "<input type=hidden name=datum value=\"$datum\">\n";
echo "&nbsp;&nbsp;&nbsp;<input type=submit value=Los!></form><nobr>\n";
#if(isset($site))
#        {
#	echo "<form action=line_work.php?kopier_bereich=$kopier_bereich&anker=$anker&site=$site method=post class=action>\n";
#	}
#else
#	{
#	echo "<form action=line_work.php?kopier_bereich=$kopier_bereich&anker=$anker method=post class=action>\n";
#	}
#echo "<input type=hidden name=akt_pic value=\"$akt_pic\">\n";
#echo "<input type=hidden name=line value=\"$line\">\n";
#echo "<input type=hidden name=rotate value=left>\n";
#echo "<input type=hidden name=titel value=\"$titel\">\n";
#echo "<input type=hidden name=bemerkungen value=\"$bemerkungen\">\n";
#echo "<input type=hidden name=datum value=\"$datum\">\n";
#echo "<input type=submit value=\"Um 90° nach links\"></form>\n";
echo "</td></tr></table>\n";

if(isset($site))
        {
        echo "<form action=tab_show.php?kopier_bereich=$kopier_bereich&brow=1&anker=$anker&site=$site method=post>\n";
        }
else
        {
        echo "<form action=tab_show.php?kopier_bereich=$kopier_bereich&brow=1&anker=$anker method=post>\n";
        }
echo "<input type=hidden name=copy value=1>\n";
echo "<input type=hidden name=akt_pic value=$akt_pic>\n";
echo "<input type=hidden name=line value=$line>\n";
echo "<td width=13% valign=top><textarea cols=15 rows=15 name=titel>$titel</textarea></td>\n";
echo "<td width=47% valign=top><textarea cols=40 rows=15 name=bemerkungen>$bemerkungen</textarea></td>\n";
echo "<td width=10% valign=top><textarea cols=10 rows=15 name=datum>$datum</textarea></td>\n";
echo "</div></td></tr></table>\n";
echo "\n";
echo "<center><input type=submit value=\"So in die Tabelle einfügen\"></form></center><br><br>\n";
?>
