get_config_vars();
echo "
\n";
for ($i=0; $i < $config_vars["tableRows"]; $i++)
{
switch($config_vars["pic_" . $i . "b_tag"])
{
case "empty":
$secondCol = " " . " " . " | \n";
$colSpan = 1;
break;
case "double":
$secondCol = "\n";
$colSpan = 2;
break;
default:
$secondCol = " " . createLinkImgCode($config_vars, $i, "b") . " | \n";
$colSpan = 1;
break;
}
$firstCol = " " . createLinkImgCode($config_vars, $i, "a") . " | \n";
echo "\n";
echo $firstCol;
echo $secondCol;
echo "
\n";
}
echo "
\n";
function filenameSmallify($filename)
{
$pos_of_last_point = strrpos($filename,".");
$filename_smallified = substr($filename,0,$pos_of_last_point) . "_small" . substr($filename,$pos_of_last_point);
return $filename_smallified;
}
function createLinkImgCode($config_vars, $i, $a_or_b)
{
// use user-defined stylesheet if given
if (array_key_exists('stylesheet',$_REQUEST))
$stylesheet = "&stylesheet=" . $_REQUEST["stylesheet"];
else
$stylsheet = "";
$filename = $config_vars["pic_" . $i . $a_or_b . "_file"];
$filetag = $config_vars["pic_" . $i . $a_or_b . "_tag"];
$linkTagLeft = "";
$imgTag = "";
$linkTagRight = "";
return $linkTagLeft . $imgTag . $linkTagRight;
}
?>