array('Authour statments', '#990000'), '3'=>array('Directly Cited Sources', '#006600'), '3q'=>array('Directly Cited Quotes', '#0066FF'), '2'=>array('Directly Cited Affiliations', '#000099'), '5'=>array('Indirectly Cited Sources', '#FF9900'), '5q'=>array('Indirectly Cited Text', '#006699'), '6'=>array('Indirectly Cited Affiliations', '#0000FF')); if( !isset($_GET['article']) && !isset($_POST['select']) ){ page_top(); select_article(); page_bot(); }else{ if(isset($_GET['article']))$article=$_GET['article']; if(isset($_POST['article'])){ $article=$_POST['article']; }else{ //none selected so select all. $_POST['select']=array(0=> 0, 3, '3q', 2, 5, '5q', 6); } $doc=load_article($article); load_interface($doc,$article); } function page_top(){ ?> sources fun

key: $val){ echo ' '; echo ''; } ?>
' . $key . ''; echo '' . $val[0] . '
'; echo '

Included:

'; foreach($types as $key => $val){ echo ' '; } echo ''; echo''; ?>

 

$val){ if(is_selected($key)==''){ // if not selected replace out. array_push($patterns, "/<$key>[^<]*<\/$key>/"); array_push($replacements, '...'); }else{ //else replace with html tag to format array_push($pat2, "/<$key>/"); array_push($rep2, ''); array_push($pat2, "/<\/$key>/"); array_push($rep2, ""); } } // print_r($patterns); //replace out the inside tags $doc = preg_replace($patterns, $replacements, $doc); //replace tags if not replaced before: $doc = preg_replace($pat2, $rep2, $doc); //and finaly replace tags that were not replaced in either: // $doc = preg_replace("/<[^>]*>/", '', $doc); //add newlines $doc = str_replace("\n","
",$doc); return $doc; } function select_article(){ ?>

Please select an article:

The Next Space Race: China Heads to the Stars
By JIM YARDLEY and WILLIAM J. BROAD
The U.S. and China stand at a critical juncture, between cooperation or competition, in what could be a costly and dangerous new space race.[original]
Democrats Vow to Battle Bush on Social Issues
By ADAM NAGOURNEY
and KATHARINE Q. SEELYE
In their final debate before the New Hampshire primary, the candidates promised that they could withstand attacks from President Bush on social values.