Jump to content
TNG Community
Sign in to follow this  
jayat1familytree

My Branch version of "Open My Page"

Recommended Posts

jayat1familytree

I have been working on an expanded version of "Open My Page" that is more like a User Profile review

as well as a place to run some  'data validation' reports (mirrored after Darrin's TNG Admin Data Validation) 

This is designed for when a site has branches assigned to specific registered users.

I am looking for input for improvement.

 

Note that some of the reports do not yet work properly, and that the branch assigned to the Visitor login will not show living persons.

You can see the pages on my test site at

1familytree.org/genealogy/1ft_data_validation.php

Login with user:  Visitor   pw=  GuestVisitor

You can find the "My Branch" link in the top menu line next to "My Page" as well as in the INFO drop Menu above My Page.

 

I'm open to ideas and concerns to improve this page for Registered Users of the web site.

Thanks,
Jay

 

 

 

Share this post


Link to post
Share on other sites
jayat1familytree

I am still looking for feedback.

Also, I am thinking that adding on the right half of the page either the persons family.php results, or possibly their ancestry via the Text+ report

My_Branch_page_example_with_more.jpg

I am really bad at CSS layout code.... Would either of these be hard to do?

 

Also, I am having problems with a few of the SQL queries. This has been new for me, in that I have only dabbled in SQL for the Report Generator, and this is a slightly syntax needed to get the right query.

So here are a couple of ones I have problems with;

Cause of Death for Deceased persons.

        case "branch_deceased_cause_death":
            //test for assigned branch info
            $select1a = "SELECT $nameFields, $people_table.personID, $people_table.birthdate, $people_table.deathdate, $people_table.deathplace, $events_table.persfamID,      $events_table.parenttag, $events_table.cause";
            $select1b = "SELECT count($people_table.personID) as pcount ";
            $query1 = "FROM $people_table, $events_table
                    WHERE ($events_table.persfamID = $people_table.personID AND $events_table.gedcom = $people_table.gedcom)
                    AND ($people_table.branch LIKE '%$assignedbranch%') AND ($people_table.living = 0) AND ($events_table.cause <> '' AND $events_table.parenttag = 'DEAT' ) $treestr ";
            $orderby = "ORDER BY cause, lastname, firstname";
            $select2a = $select2b = $query2 = "";
            $display = array('personid','name','birthdate','deathdate','cause','treeid');
            $values = array('personID','name','birthdate','deathdate','cause','gedcom');
            break;

Missing Marriage Place for Deceased Persons;

        case "branch_missing_marriage_place_deceased":
            //select from family, join husb and wife with people, return entries where marriage date missing
            $select1a = "SELECT $nameFields, $hNameFields, $wNameFields, h.birthdate as hbirthdate, w.birthdate as wbirthdate, $people_table.birthdate, $families_table.marrdate, $families_table.familyID, $families_table.marrdatetr, $families_table.living, $families_table.marrplace ";
            $select1b = "SELECT count($families_table.familyID) as pcount ";
            $query1 = "FROM $people_table, $families_table
                LEFT JOIN $people_table as h ON $families_table.husband = h.personID AND $families_table.gedcom = h.gedcom
                LEFT JOIN $people_table as w ON $families_table.wife = w.personID AND $families_table.gedcom = w.gedcom
                WHERE ($families_table.branch LIKE '%$assignedbranch%') AND  (($families_table.living = 0) AND ($families_table.marrplace = '') ) $treestr ";
            $orderby = "ORDER BY h.lastname, h.firstname";
            $select2a = $select2b = $query2 = "";
            $display = array('familyid','h.lastname','h.firstname','marrdate','marrplace','w.lastname','w.firstname','treeid');
            $values = array('familyID','h.lastname','h.firstname','marrdate','marrplace','w.lastname','w.firstname','gedcom');
            break;

Missing Marriage Date for deceased persons

        case "branch_missing_marriage_date_deceased":
            //select from family, join husb and wife with people, return entries where marriage date missing
            $select1a = "SELECT $nameFields, $hNameFields, $wNameFields, h.birthdate as hbirthdate, w.birthdate as wbirthdate, $people_table.birthdate, $families_table.marrdate, $families_table.familyID, $families_table.marrdatetr, $families_table.living ";
            $select1b = "SELECT count($families_table.familyID) as pcount ";
            $query1 = "FROM $people_table, $families_table
                LEFT JOIN $people_table as h ON $families_table.husband = h.personID AND $families_table.gedcom = h.gedcom
                LEFT JOIN $people_table as w ON $families_table.wife = w.personID AND $families_table.gedcom = w.gedcom
                WHERE ($families_table.living = 0) AND (($families_table.marrdatetr = '0000-00-00')  AND ($families_table.branch LIKE '%$assignedbranch%')) $treestr ";
            $orderby = "ORDER BY h.lastname, h.firstname";
            $select2a = $select2b = $query2 = "";
            $display = array('familyid','h.personID','h.firstname','marrdate','w.personID','w.firstname','treeid');
            $values = array('familyID','h.personID','h.firstname','marrdate','w.personID','w.firstname','gedcom');
            break;

 

Thanks in advance for any help.

Jay

 

My_Branch_page_example_with_more.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×