php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7047 This code generates a strange error.. the link "tabort"...
Submitted: 2000-10-05 21:07 UTC Modified: 2000-11-29 06:39 UTC
From: mats at fairytale dot se Assigned:
Status: Closed Package: Output Control
PHP Version: 4.0.2 OS: Linux Debian
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mats at fairytale dot se
New email:
PHP Version: OS:

 

 [2000-10-05 21:07 UTC] mats at fairytale dot se
<?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>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-19 09:16 UTC] stas@php.net
Could you please explain what is the problem and provide
short stand-alone (without database accesses) code to
reproduce it?

 [2000-11-29 06:39 UTC] sniper@php.net
No feedback, old version, closing.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jan 29 15:01:24 2020 UTC