function print_buttons($buttons,$horizontal,$space=0,$otherspace=1)
{
global $id; // The ID to use for each image
global $REQUEST_URI;
global $HTTP_USER_AGENT; // So we can determine if rollovers will work.
if(!isset($id)) $id = 0;
$currentURL = strrchr($REQUEST_URI,"/");
if($currentURL)
{
$currentURL = substr($currentURL,1);
}
else
{
$currentURL = $REQUEST_URI;
}
if(strlen($currentURL) == 0) $currentURL = "index.phtml";
$dhtml = false;
if(strstr($HTTP_USER_AGENT,"Mozilla/"))
{
$version = strstr($HTTP_USER_AGENT,"/");
$version = strtok($version," ");
$version = substr($version,1);
if($version >= 3.0) $dhtml = true;
}
$nmbtns = count($buttons);
if($dhtml)
{
$j = $id;
echo "";
}
echo "
\n";
if($horizontal)
{
echo "";
}
for($i = 0; $i < $nmbtns ; $i++)
{
if($horizontal == false)
{
if($space)
{
echo "
 |
";
}
echo "\n";
}
else
{
if($space)
{
echo " | ";
}
}
echo "\n";
$url = $buttons[$i]["url"];
$rollover = $buttons[$i]["rollover"];
if($url == $currentURL)
{
$image = $buttons[$i]["current"];
}
else
{
$image = $buttons[$i]["normal"];
}
$size = GetImageSize($image);
$width = $size[0];
$height = $size[1];
if($url != $currentURL)
{
echo "";
}
echo " ";
if($url != $currentURL)
{
echo "";
}
$id++;
echo " | \n";
if($horizontal == false)
{
echo "
\n";
}
}
if($horizontal)
{
echo "\n";
}
echo "
";
}
$left_buttons = array(
array(
"normal" => "images/who_nrml.gif",
"current" => "images/who_crnt.gif",
"rollover" => "images/who_roll.gif",
"alt" => "Who We Are",
"url" => "index.phtml"
),
array(
"normal" => "images/grow_nrml.gif",
"current" => "images/grow_crnt.gif",
"rollover" => "images/grow_roll.gif",
"alt" => "What We Grow",
"url" => "grow.phtml"
),
array(
"normal" => "images/cooking_nrml.gif",
"current" => "images/cooking_crnt.gif",
"rollover" => "images/cooking_roll.gif",
"alt" => "What's Cooking",
"url" => "cooking.phtml"
),
array(
"normal" => "images/happening_nrml.gif",
"current" => "images/happening_crnt.gif",
"rollover" => "images/happening_roll.gif",
"alt" => "What's Happening",
"url" => "happening.phtml"
)
);
?>
 |
Fatal error: Call to undefined function print_buttons() in /home/www/pinetreeappleorchard.com/www/index.phtml on line 26
| |