PHP 4.0 Bug #7047: This code generates a strange error.. the link "tabort"...

From: Date: Fri, 06 Oct 2000 01:07:31 +0000
Subject: PHP 4.0 Bug #7047: This code generates a strange error.. the link "tabort"...
Groups: php.dev 
Request: Send a blank email to php-dev+get-34310@lists.php.net to get a copy of this message
From: mats@fairytale.se Operating system: Linux Debian PHP version: 4.0.2 PHP Bug Type: Output Control Bug description: This code generates a strange error.. the link "tabort"... <?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>

« previous php.dev (#34310) next »