Jump to content

Need assistance with PHP table


mot777mot

Recommended Posts

Good day  All

 

Can someone please assist me in this as i know nothing about PHP coding

i have a site that shows dog family tree, but i only want it to show from parents onwords and not the child item.

You can see example here:  http://www.sa-apbt.co.za/base/printable_pedigree.php?id=89601&gens=4&images=yes

 

ofai4y.png

 

Attached is the code file

printable_pedigree.php

Link to comment
Share on other sites

Lines 113 to 149 should read as

	} elseif($level != 1) {
		echo "<TD ROWSPAN=" . pow(2,($generations - $level));
		echo " >"; 

		if (($dogVO != -1) && (!empty($dogVO ))) {
				$name = $dogVO->name;
				$sireId = $dogVO->sire->id;
				$damId = $dogVO->dam->id;
				$landofbirth = $dogVO->landofbirth;
				$yearofbirth = $dogVO->yearofbirth;
				$color = $dogVO->color;
				$title = $dogVO->title;		
				$photo = $dogVO->photo->thumb_ref;				
				if (empty($photo))
					$photo = $dogVO->photo->reference;

				### Highlight title w/ red font
				if (!empty($title)) {
					echo "<label>";
					echo "<font color=\"blue\">$title</font><BR>";
					echo "</label>";
				}
				if ($images == "yes") {
					if (!empty($photo)) {
						echo '<img SRC="'.$photo.'" width="'.$THUMBNAIL_WIDTH.'"></p>'; 				} 										
				}
				echo "$name";

				echo "<label>";

				echo "</label>";
		} else {
			$out[] = "<label>unknown</label>";
		}

		echo "</TD>";
	}
Link to comment
Share on other sites

Continue to replace 113 through to 149 with the code I provided earlier but then on lines 159 and 162 replace  $sireid  with  $dogVO->sire->id  and on lines 174 and 177 replace  $damId  with  $dogVO->dam->id

 

Now delete lines 119 and 120

$sireId = $dogVO->sire->id;
$damId = $dogVO->dam->id;

That should now fix it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.