Jörg Rißmann
Erfahrenes Mitglied
Du bist doch sonst nicht unbeholfen.....BlackLove2005 hat gesagt.:Aber was ist denn GPL :suspekt: :suspekt:
http://de.wikipedia.org/wiki/GNU_General_Public_License
*dickesgrinsen*
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Du bist doch sonst nicht unbeholfen.....BlackLove2005 hat gesagt.:Aber was ist denn GPL :suspekt: :suspekt:
Eigentlich in Hong Kong, wurde aber von der Firma jetzt fuer eine Zeit nach China geschickt.svennson hat gesagt.:@reptiler:
Arbeitest du in China oder was?
<?php
$dbhostname="localhost";
$dbusername="";
$dbpassword="";
$db=mysql_connect($dbhostname,$dbusername,$dbpassword);
?>
<html>
<body>
<?php
include("connectdb.php");
if (mysql_query("CREATE DATABASE `usr_web430_1`",$db))
{
printf("Database gallery created<br>");
}
if (mysql_select_db("usr_web430_1",$db))
{
if (mysql_query("CREATE TABLE `galleries` (`id` INT( 8 ) UNSIGNED NOT NULL AUTO_INCREMENT,`gallery` VARCHAR( 128 ) NOT NULL,PRIMARY KEY ( `id` ))",$db))
{
printf("Table galleries created<br>");
}
if (mysql_query("CREATE TABLE `images` (`id` INT( 8 ) UNSIGNED NOT NULL AUTO_INCREMENT,`filename` VARCHAR( 255 ) NOT NULL,`gallery` INT( 8 ) UNSIGNED NOT NULL,PRIMARY KEY ( `id` ))",$db))
{
printf("Table images created<br>");
}
}
$db=mysql_close($db);
?>
</body>
</html>
<?php
$changesection="main";
$changes[$changesection].='<table class="vistable" border="1">';
$changes[$changesection].='<tr><th>Gallery</th><th>Images</th></tr>';
$galleries=mysql_query("select * from galleries order by gallery",$db);
while ($gallery=mysql_fetch_assoc($galleries))
{
$images=mysql_query("select * from images where gallery='$gallery[id]'",$db);
$num_images=mysql_num_rows($images);
$changes[$changesection].='<tr><td><a href="index.php?subsite=images.php&gallery='.$gallery[id].'">'.$gallery[gallery].'</a></td>';
$changes[$changesection].='<td>'.$num_images.'</td></tr>';
}
$changes[$changesection].='</table>';
?>
#main
{
position:absolute;
top:130px;
left:250px;
width:510px;
z-index:1;
}
<?php
mkdir("../../phptmp/thumbs",0777);
mkdir("../../phptmp/images",0777);
?>
<?php
ob_start();
$outputfile=fopen("output.html","r");
$output=fread($outputfile,filesize("output.html"));
fclose($outputfile);
if (isset($changes))
{
unset($changes);
}
include("connectdb.php");
mysql_select_db("usr_web430_1",$db);
if (isset($_GET["subsite"]))
{
$subsite=$_GET["subsite"];
}
if (isset($subsite))
{
if ((strpos($subsite,"index.php")>-1) || (strpos($subsite,"http:")>-1) || (strpos($subsite,"https:")>-1) || (strpos($subsite,"ftp:")>-1))
{
header("Location:index.php");
}
else
{
include($subsite);
}
}
else
{
include("galleries.php");
}
$db=mysql_close($db);
if (isset($changes))
{
$output=str_replace("{main}",$changes["main"],$output);
}
printf($output);
ob_end_flush();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="Image Gallery">
<meta name="keywords" content="Images,Pictures,Photos,Gallery">
<meta name="robots" content="index,follow">
<title>Image Gallery</title>
<link rel="stylesheet" type="text/css" href="layout.css">
<script src="functions.js" type="text/javascript">
</script>
</head>
<body>
<div id="main">
{main}
</div>
</body>
</html>
<?php
$changesection="main";
$galleryid=$_GET["gallery"];
if (!$galleryid)
{
header("Location:index.php?subsite=galleries.php");
}
$changes[$changesection].='<a href="index.php?subsite=galleries.php">Image Galleries</a>';
$changes[$changesection].=' -> ';
$galleries=mysql_query("select * from galleries where id='$galleryid'",$db);
$gallery=mysql_fetch_assoc($galleries);
$changes[$changesection].='<b>'.$gallery[gallery].'</b><br><hr>';
$changes[$changesection].='<table class="vistable">';
$changes[$changesection].='<tr>';
$images=mysql_query("select * from images where gallery='$galleryid' order by filename",$db);
$counter=0;
while ($image=mysql_fetch_assoc($images))
{
if ($counter==5)
{
$changes[$changesection].='</tr>';
$changes[$changesection].='<tr>';
$counter=1;
}
else
{
$counter++;
}
$changes[$changesection].='<td><a href="index.php?subsite=showimage.php&image='.$image[id].'"><img src="thumbs/'.$gallery[gallery].'/'.$image[filename].'" alt="'.$image[filename].'"></a></td>';
}
$changes[$changesection].='</tr>';
$changes[$changesection].='</table>';
?>
<?php
ob_start();
include("connectdb.php");
mysql_select_db("gallery",$db);
$imageid=$_GET["id"];
$images=mysql_query("select * from images where id='$imageid'",$db);
$image=mysql_fetch_assoc($images);
$galleries=mysql_query("select * from galleries where id='$image[gallery]'",$db);
$gallery=mysql_fetch_assoc($galleries);
header("Content-Type:image/jpeg");
readfile("../../phptmp/images/".$gallery[gallery]."/".$image[filename]);
$db=mysql_close($db);
ob_end_flush();
?>
<?php
$changesection="main";
$imageid=$_GET["image"];
if ($imageid)
{
$images=mysql_query("select * from images where id='$imageid'",$db);
$image=mysql_fetch_assoc($images);
$galleries=mysql_query("select * from galleries where id='$image[gallery]'",$db);
$gallery=mysql_fetch_assoc($galleries);
$changes[$changesection].='<a href="index.php?subsite=galleries.php'.'">Image Galleries</a>';
$changes[$changesection].=' -> ';
$changes[$changesection].='<a href="index.php?subsite=images.php&gallery='.$gallery[id].'">'.$gallery[gallery].'</a>';
$search_images=mysql_query("select * from images where gallery='$gallery[id]' order by filename",$db);
$num_images=mysql_num_rows($search_images);
$counter=1;
while ($search_image=mysql_fetch_assoc($search_images))
{
if ($new_image)
{
$prev_image=$new_image;
}
$new_image=$search_image;
if ($search_image==$image)
{
break;
}
$counter++;
}
if (($prev_image) || ($counter<$num_images))
{
$changes[$changesection].='<p>';
if ($prev_image)
{
$changes[$changesection].='<a href="index.php?subsite=showimage.php&image='.$prev_image[id].$sessionparm_link.'"><img src="previous.jpg" alt="Previous Picture"></a>';
}
if ($counter<$num_images)
{
$next_image=mysql_fetch_assoc($search_images);
$changes[$changesection].='<a href="index.php?subsite=showimage.php&image='.$next_image[id].$sessionparm_link.'"><img src="next.jpg" alt="Next Picture"></a>';
}
$changes[$changesection].='</p>';
}
$changes[$changesection].='<hr>';
$changes[$changesection].='<img src="imagefile.php?id='.$image[id].'" alt="'.$image[filename].'">';
}
?>