include "check_forum_id.inc.php"; ?> define("PM_URLBASE", "/myoh/uzone,pm/"); include "1-Center_Info_Lookup.phtml"; $Page_Title = "$Surg_Name - Meet Our Patients"; include "header.phtml"; # leaves 1 dangling table include_once "function_lib/common.lib.php"; ?>
Meet Some Of Our Patients Support is a critical element throughout this process. Reading about the progress of others can bring comfort during trying times. Read what some of our patients have to say about their experiences. |
# --------------------- # Now, check Block Emails table #---------------------- $AllowContact = false; if(isset($_COOKIE['OHID']) && $_COOKIE['OHID']) { $sql = "SELECT Member_ID FROM AbusiveEmail WHERE Member_ID='" . mysql_escape_string($_COOKIE['OHID']) . "'"; $rs = db_query_read("ambmembers", $sql); if(mysql_num_rows($rs) == 0) $AllowContact = true; mysql_free_result($rs); } # This line is enables the page to run the first time. # The query string has a part called $Time_String in it. # The first pass, $Time_String will be empty. # Only if $Next_Stamp has a value will $Time_String be given a value. # The first time this page runs, $Next_Stamp is empty, so $Time_String is empty. # If one clicks on the "show next 5 testimonials" link at the bottom of the page, then # that link will send back some value for $Next_Stamp. if (isset($_REQUEST['Next_Stamp']) && intval($_REQUEST['Next_Stamp']) > 0) $Time_String = "AND m.Post_Date_Doc < " . intval($_REQUEST['Next_Stamp']) . " "; else $Time_String = ""; $database = "ambmembers"; $query = "SELECT m.Member_ID, su.display_name, m.City, m.State, m.Post_Date_Doc, " . "m.Surgeon_Comments, p.Comments, m.Photo_1_URL, m.Photo_2_URL, m.Photo_Gallery, " . "su.user_id " . "FROM members m " . "LEFT OUTER JOIN profilecomments p ON m.Member_ID = p.Member_ID " . "INNER JOIN " . SYS_DATABASE . ".sys_user su ON m.Member_ID=su.legacy_id " . "WHERE LENGTH(m.Surgeon_ID) > 0 AND m.$Surg_ID_String $Time_String " . "AND m.OH_Visible=1 AND IFNULL(m.Owner_Approved,'') IN ('Yes','') " . "AND m.account_status='active' AND su.account_status='active' " . "ORDER BY Post_Date_Doc DESC LIMIT 10"; #echo "query=$query\n"; $result = db_query_read($database, $query); if(!$result) echo " SQL: $query \n"; else $Post_Date_Doc = ""; #Lets take out those nasty html tags from the patients comments $Comments = strip_all_tags($Comments,''); if (strlen($Comments) > 1000) { $Comments = substr($Comments, 0, 1000); $pos = strrpos($Comments, " "); $Comments = substr($Comments, 0, $pos); $Comments .= "... Click here to read more"; } $Surgeon_Comments = strip_all_tags(stripslashes($Surgeon_Comments)); echo " \n";
echo "$MemberName \n"; if($AllowContact && $profileUserID) echo "Send a Personal Message \n"; echo $Post_Date_Doc; if ($Photo_Gallery == "Yes") echo " \n";
if (strlen($Comments) > 0)
echo "Personal Comments: $Comments \n"; if (strlen($Surgeon_Comments) > 0) echo "Comments About $Surg_Name: $Surgeon_Comments \n"; echo " \n"; flush(); } # Now, we want to provide a link to see the next five testimonials # However, we don't want to put a link if we have already gone through all of them. # One way for sure to tell that we don't have any more is if the number appearing on the current page is less than 5. # Our query statement above has a limit of 5. # If it pulls up less than five, this means that there weren't enough left to put 5 on the page. # $num is the number of records pulled up. # We only want the link if $num is 5. if ($num == 10) echo " \n"; ?> |