<?php 
/*

Making "the rounds".  Cheezy ass script where I make the rounds of
web pages I'd visit in a day.  

me@simoncarr.com

*/

$url = array(
"http://www.simoncarr.com",
"http://slashdot.org",
"http://plastic.com",
"http://www.fuckedcompany,com",
"http://www.aint-it-cool-news.com"
); 

if(!
$frame) { $frame ""; } 

switch(
$frame) { 
    Default:
        
$out frame($url[0]); 
    break;

    case 
"top":
        
$out top($url); 
    break; 

    case 
"bottom"
        
$out bottom($myURL); 
    break;
}

function 
top($data) { 
$result "
<HTML>
<HEAD>
</HEAD>
<BODY>"
;

foreach(
$url) { 
    
$result =. "<A href=\"$PHP_SELF?frame=bottom&number=".$data."\" target=\"bottom\">$data</a>";
}

$result =. "</body></HTML>"

return(
$result); 
}

function 
bottom($data) { 
//header("Redirect: $data"); 
}

function 
frame($myURL) { 
$result "<HTML>
<HEAD>
<TITLE>The Rounds: by Simon Carr http://www.simoncarr.com/                                                                    </TITLE>
</HEAD>
<FRAMESET rows=\"40,0*\" frameborder=\"YES\"  border=\"2\" framespacing=\"0\" marginwwidth=\"0\" marginheight=\"0\">
<FRAME name=\"top\" src=\"$PHP_SELF?frame=top\" scrolling=\"no\" noresize frameborder=\"no\">
<FRAME name=\"bottom\" src=\"$myURL\" scrolling=\"no\" frameborder=\"no\">
</FRAMESET>
</HTML>
"
;
return(
$result); 

    
?>

<?php print $out ?>