Allright, ive been learning PHP for some days now starting with blank files, MM dreamweaver, open minded and a lot of food and drinks next to me 😃
Also i had set up a server from which i ran scripts from hotscripts.com and such for some months now 🙂
(Now its my dedicated test server)
Anyway let get to the topic... In earlier posts i tried to make an allround emailform and i (read: WE) succeeded thanks to the forum here!
Now im working on a photoalbum thing, again it must be real simple and basic no fancy stuff just showing photos...
I already created an thing to do that! but here's the problem!
When i open a photo it opens in a new blank screen showing the photo. Now my idea is to create something like it only WITH it must open in an new page. showing the picture and an BACK button 🙂 kind of an problem since i hardly know PHP and dont know where to start 🙁
here's my script so far:
<?
include ('./includes/opmaak.php');
$maxline="2";
$_list_path = "fotos" . "/";
echo "<center><table align='center' border='$fborder' bordercolor='$ftcolor' bgcolor='$fbgcolor' width='75%'>";
$dir = opendir($_list_path);
$x=1;
echo "<tr>";
while ($file = readdir($dir)) {
if ($file == "index.php") continue;
list ($s1,$s2) = split ('[.]', $file);
if (!$_show_dots_dirs && $file == "." || $file == "..") continue;
$fullfile = "$_list_path$file";
if (!is_dir($fullfile)) {
if (($s2 == "JPG") || ($s2 == "GIF") || ($s2 == "PNG") ) {
echo "<td align='center' width='50%' bordercolor='$fccolor'><font size='2'>";
// echo "<a href='$_list_path$file'>$file</a><br>";
echo "<a href='$_list_path$file'><img src='$_list_path$file' height='125' width='100' border='1'></a>";
echo "</font></td>";
} else {
echo "<td align='center' width='50%' bordercolor='$fccolor'><font size='2'>";
// echo "<a href='$_list_path$file'>$file</a><br>";
echo "<a href='$_list_path$file'><img src='$_list_path$file' height='125' width='100' border='1'></a>";
echo "</font></td>";
}
if ( $x == $maxline ) {
echo "</tr><tr>";
$x=0;
}
$x++;
}
}
echo "</tr>";
echo "</table></center>";
?>
the include() command on top refers to opmaak.php. opmaak.php holds the theming or template or whatever you want to call it... Alomst every value, array is in the script itself... so no additional files this time, only for the templating...! :p
Does anyone have an idea how to pull this off ? 🙂
Thanks in advance!