'', 'cur'=>'', 'next'=>''); $directory_information = MEMBER_DATA_PATH.'memberdirectory.xml'; $membersXsl = ''; $membersXml = ''; $friendsalliesXsl = MEMBER_DATA_PATH.'friendsallies.xsl'; $friendsalliesXml = MEMBER_DATA_PATH.'friendsallies.xml'; $phpxml = new XML($directory_information); if( isset($_REQUEST['year']) ) { $files = $phpxml->evaluate("//directoryFiles/file[@year = '".$_REQUEST['year']."']"); //if nothing comes back, then theres a good chance a bogus year was fed. //default to most recent year if(!$files) { $files = $phpxml->evaluate("//directoryFiles/file[1]"); } /* call function at end of this doc*/ set_data($phpxml,$files,$membersXml,$membersXsl,$year); } else { //no incoming year, open xml file and grab latest year $files = $phpxml->evaluate("//directoryFiles/file[1]"); set_data(); }//end else ?> <?=$year['cur']?> Member Directory - About Us - South Carolina Association of Community Development Corporations (SCACDC)

2007 Member Directory

Associate Members

Community Organization for Rights and Empowerment (C.O.R.E)
L.M. Anderson & Company (consultant)
Wilson Consulting Associates (consultant)
S.C. Commission for Minority Affairs
Southeastern Housing Foundation
Spartanburg County Community & Economic Development

Members

transformDocument( $membersXml ); $html = preg_replace($patterns, $replacements, $html); print $html; $xslt->free(); ?>

Friends & Allies

transformDocument( $friendsalliesXml ) ); $xslt->free(); ?>
get_content($files[0]); $attributes = $phpxml->get_attributes($files[0]); //get membership year $year['cur'] = $attributes['year']; //set previous year if( !isset($attributes['last']) ) { $year['prev'] = $year['cur'] - 1; } //set next year if( !isset($attributes['first']) ) { $year['next'] = $year['cur'] + 1; } //set xsl file if( isset($attributes['first']) /*$year['cur'] == date('Y',time())*/) { $membersXsl = MEMBER_DATA_PATH . 'members.xsl'; } else { $membersXsl = MEMBER_DATA_PATH . 'members_pastyear.xsl'; } } ?>