|  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
 [2000-10-05 21:07 UTC] mats at fairytale dot se
	$page_title = "Images...";
	//$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];

		<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>
		<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>
		<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") { ?>
			<a onClick="dele('<?php echo $id;?>')"><font color="#ccceff">tabort</a>
	<?php } ?>


<link rel="stylesheet" href="stylesheet.css">
	var new_win;
	function open_pic(width,heigth,addr) {
		if (!new_win || new_win.closed) new_win = 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;

<TITLE><?PHP echo $page_title; ?></TITLE>
		<?php while ($tmp<($nof_imagesx*$nof_imagesy)) { 
			if (($tmp % $nof_imagesx) == 0) echo "<TR VALIGN=\"MIDDLE\">"; ?>
			<?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();?>
			<?php if (($tmp % $nof_imagesx) == $nof_imagesx) echo "</TR>"; $tmp++;?>
		<?php } ?>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-19 09:16 UTC]
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]
No feedback, old version, closing.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 10:01:31 2024 UTC