A
Anonymous
Guest
The same code but in 10 lines for the viewer.php and 2 lines for each index file.
Viewer.php:
index file:
I don't understand your maths actually.
If you are doing it with php rendered static pages you still need one file per image + 1 more for the viewer + 1 more for the picture listings.
so 100 images =
100 files for the images
100 index files
1 viewer function file
1 main index
---------------------------------
Total 202 files for 100 images (including image files themself).
This could be done in 101 files (1 containing php code + 100 image files) by using a mysql database.
Viewer.php:
Code:
<?php
function gen_viewer( $img, $alt, $ver, $hor, $bor, $bgd, $ial, $rtn )
{
echo "<html><head><style type='text/css'>body { background-image: url(" . $bgd . "); background-repeat: repeat; }</style></head><body><div align='" . $ial ."'>"<img class='main' src=" . $img . " width=" . $hor ." height=" .$ver ." border=" . $bor . " alt='" . $alt ."'><p>";
if ( $rtn == 1 ) {
echo "<FORM><INPUT type='button' onclick='history.back();' name='ReturnButton' value='Return'></FORM>";
}
echo "</div></body>";
}
?>
index file:
Code:
<?php
require( "viewer.php" );
gen_viewer( "animage.jpg", "This is a title", 500, 500, 10, "abackground.jpg", "center", 0 );
?>
I don't understand your maths actually.
If you are doing it with php rendered static pages you still need one file per image + 1 more for the viewer + 1 more for the picture listings.
so 100 images =
100 files for the images
100 index files
1 viewer function file
1 main index
---------------------------------
Total 202 files for 100 images (including image files themself).
This could be done in 101 files (1 containing php code + 100 image files) by using a mysql database.