|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-19 09:16 UTC] stas@php.net
[2000-11-29 06:39 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
<?php $page_title = "Images..."; include("smart_functions.php"); db_connect(); //$password = "test"; $grupp = "test"; if ($password<>"baa") $t = "where grupp='$grupp' and password='$password'"; $q = db_query("SELECT * FROM file $t"); $nof_images = db_numrows($q); $nof_imagesx = 5; $nof_imagesy = $nof_images / $nof_imagesx; function generate_image($image_filename,$image_filename2,$info_text,$link,$id) { $size1 = GetImageSize ($image_filename); $size2 = GetImageSize ($image_filename2); $image_width = $size1[0]; $image_height = $size1[1]; $image_width2 = $size2[0]; $image_height2 = $size2[1]; ?> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD><IMG SRC="images/one_image_01.gif" WIDTH=13 HEIGHT=10></TD> <TD><IMG SRC="images/one_image_02.gif" WIDTH=<?php echo $image_width; ?> HEIGHT=10></TD> <TD><IMG SRC="images/one_image_03.gif" WIDTH=9 HEIGHT=10></TD> </TR> <TR> <TD><IMG SRC="images/one_image_04.gif" WIDTH=13 HEIGHT=<?php echo $image_height; ?>></TD> <TD><A onClick="open_pic(<?php echo $image_width2; ?>,<?php echo $image_height2; ?>,'<?php echo $link;?>')"><IMG BORDER="0" ALT="<?php echo $info_text;?>" SRC="<?php echo $image_filename; ?>" WIDTH=<?php echo $image_width; ?> HEIGHT=<?php echo $image_height; ?>></TD> <TD><IMG SRC="images/one_image_06.gif" WIDTH=9 HEIGHT=<?php echo $image_height; ?>></TD> </TR> <TR> <TD><IMG SRC="images/one_image_07.gif" WIDTH=13 HEIGHT=12></TD> <TD><IMG SRC="images/one_image_08.gif" WIDTH=<?php echo $image_width; ?> HEIGHT=12></TD> <TD><IMG SRC="images/one_image_09.gif" WIDTH=9 HEIGHT=12></TD> <?php if ($password<>"baa") { ?> </TR> <TD COLSPAN="3" ALIGN="CENTER"> <a onClick="dele('<?php echo $id;?>')"><font color="#ccceff">tabort</a> </TD> </TR> <?php } ?> </TABLE> <?php } ?> <link rel="stylesheet" href="stylesheet.css"> <SCRIPT> var new_win; function open_pic(width,heigth,addr) { if (!new_win || new_win.closed) new_win = window.open( addr, "", "WIDTH="+width+",HEIGHT="+heigth ); else { new_win.location = addr; new_win.focus(); } } function dele(lank) { if (confirm("?r du s?ker p? att\ndu vill tabort bilden...")) window.location=lank; } </SCRIPT> <HTML> <TITLE><?PHP echo $page_title; ?></TITLE> <BODY BGCOLOR="#6699CC"> <TABLE> <?php while ($tmp<($nof_imagesx*$nof_imagesy)) { if (($tmp % $nof_imagesx) == 0) echo "<TR VALIGN=\"MIDDLE\">"; ?> <TD ALIGN="CENTER"> <?php $data = db_fetch($q,$tmp); generate_image($data->thumbname,$data->filename,$data->info_text,"show_img.php?id=$data->id","<?php echo $data->id;?>"); flush();?> </TD> <?php if (($tmp % $nof_imagesx) == $nof_imagesx) echo "</TR>"; $tmp++;?> <?php } ?> </TABLE> </BODY> </HTML>