$sql = "SELECT id, ContactInfo, OrgID, title, region, implement_level, guiding_principals, ";
$sql .= "background, procedure_process, stakeholder, stakeholder_desc, ";
$sql .= "budget, results, sustainability, lessons, replication, Filename ";
$sql .= "FROM tigsm_yes.inititive ";
$sql .= "WHERE id = '$pid'";
$sql_result = mysql_query($sql);
$row = mysql_fetch_array($sql_result) or die(mysql_error());
$id = $row["id"];
$contact_id = $row["contact_id"];
$title = $row["title"];
$region = $row["region"];
$duration = $row["duration"];
$implement_level = $row["implement_level"];
$guiding_principals = $row["guiding_principals"];
$background = $row["background"];
$priorities = $row["priorities"];
$procedure_process = $row["procedure_process"];
$stakeholder = $row["stakeholder"];
$stakeholder_desc = $row["stakeholder_desc"];
$budget = $row["budget"];
$results = $row["results"];
$sustainability = $row["sustainability"];
$lessons = $row["lessons"];
$replication = $row["replication"];
echo "| Title: | $title |
";
if ($row[OrgID]) {
tigconnect("tig");
$org = query("SELECT * FROM tig.Organizations WHERE OrgID = '$row[OrgID]'");
tigdisconnect();
echo "| Organization: | ".id2name(org,$row[OrgID])." |
";
if ($org[OrgStatusID]) {
echo "| Organization Status: | ".id2name(orgstatus,$org[OrgStatusID])." |
";
}
}
if ($org[Email]) {
$pci .= "E: $org[Email]
";
} if ($org[Phone]) {
$pci .= "P: $org[Phone]
";
} if ($org[Fax]) {
$pci .= "F: $org[Fax]
";
}
if (!$row[OrgID]) {
$pci = $row[ContactInfo];
}
echo "| Primary Contact Information: | ".$pci." |
";
echo "| Region: | $region |
";
echo "| Target Age Group(s): | ";
$sql = "SELECT age ";
$sql .= "FROM tigsm_yes.age AS a INNER JOIN tigsm_yes.inititive_age AS ia ON a.id = ia.age_id ";
$sql .= "WHERE ia.inititive_id = '$pid'";
$sql_result = mysql_query($sql) or die(mysql_error());
while ($ageRow = mysql_fetch_array($sql_result)) {
$age = $ageRow["age"];
echo "$age ";
}
echo " |
";
echo "| Special Groups Focus: | ";
$sql = "SELECT special_group ";
$sql .= "FROM tigsm_yes.special_group AS sg INNER JOIN tigsm_yes.inititive_group AS ig ON sg.id = ig.group_id ";
$sql .= "WHERE ig.inititive_id = $pid";
$sql_result = mysql_query($sql);
while ($spRow = mysql_fetch_array($sql_result)) {
$group = $spRow["special_group"];
echo "$group ";
}
echo " |
";
echo "| Thematic Area: | ";
$sql = "SELECT thematic ";
$sql .= "FROM tigsm_yes.thematic AS t INNER JOIN tigsm_yes.inititive_thematic AS it ON t.id = it.thematic_id ";
$sql .= "WHERE it.inititive_id = $pid";
$sql_result = mysql_query($sql);
while ($thematicRow = mysql_fetch_array($sql_result)) {
$thematic = $thematicRow["thematic"];
echo "$thematic ";
}
echo " |
";
if ($implement_level) {
echo "| Levels of Implementation: | $implement_level |
";
}
echo "| Guiding Principals: | $guiding_principals |
";
echo "| Background and Focus: | $background |
";
echo "| Overcoming Barriers: Obstacles this initiative aims to address. | ";
$sql = "SELECT barrier ";
$sql .= "FROM tigsm_yes.barrier AS b INNER JOIN tigsm_yes.inititive_barrier AS ib ON b.id = ib.barrier_id ";
$sql .= "WHERE ib.inititive_id = $pid";
$sql_result = mysql_query($sql);
while ($barrierRow = mysql_fetch_array($sql_result)) {
$barrier = $barrierRow["barrier"];
echo "$barrier ";
}
echo " |
";
if ($procedure_process) {
echo "| Initiative Procedure: | $procedure_process |
";
} if ($stakeholder) {
echo "| Stakeholders: Organizations, Groups or Individuals, from different sectors of society, with an interest or role to play in this initiative. | $stakeholder |
";
} if ($stakeholder_desc) {
echo "| Stakeholders' Involvement: | $stakeholder_desc |
";
} if ($budget) {
echo "| Budget: | $budget |
";
} if ($results) {
echo "| Results and Impact: | $results |
";
} if ($sustainability) {
echo "| Sustainability: | $sustainability |
";
} if ($lessons) {
echo "| Lessons Learned: | $lessons |
";
} if ($replication) {
echo "| Potential for Replication: | $replication |
";
}
echo "| Areas of Focus (topics): | ";
$sql = "SELECT focus ";
$sql .= "FROM tigsm_yes.focus AS f INNER JOIN tigsm_yes.inititive_focus AS i_f ON f.id = i_f.focus_id ";
$sql .= "WHERE i_f.inititive_id = $pid";
$sql_result = mysql_query($sql);
while ($focusRow = mysql_fetch_array($sql_result)) {
$focus = $focusRow["focus"];
echo "$focus ";
}
echo " |
";
if ($row["Filename"]) {
?>
| Download the related file! |
}
?>