Hi, I'm totally new to php, and I have a script that I downloaded that I'm trying to use, but I don't seem to get it right.
It's for making an image popup without margins, but I get error messages that look like this:
Warning: Missing argument 5 for popup() in /home/cjbcc/public_html/members/arkresource/new_page_4.php on line 3
the page I'm trying to make is this
<?php
## The pop up function for dodo's nmimage popup
function popup($nmdir, $title, $pic, $thumbnail, $des, $fmode = "false") {
global $target;
$target++;
// do you wish to use autocenter script?
$autocenter = 1; // set to 1 if you want to use it. make sure you put the appropriate
// javascript between your <head> and </head> from
// http://www.dynamicdrive.com/dynamicindex8/autocenter.htm
$size = GetImageSize($pic);
$width = $size[0];
$height = $size[1];
if($thumbnail != "" && $thumbnail != "none") {
$size = GetImageSize($thumbnail);
$twidth = $size[0];
$theight = $size[1];
}
// get function mode
if($fmode != "false") {
$fmode = explode(",", $fmode);
$mode = $fmode[0];
}
if($autocenter == 1) {
echo "<a href=\"#\" onclick=\"NewWindow('nmimage.php?z=$dir$pic&width=$width&height=$height&title=$title','$target','$width','$height','no');return false\" onMouseOver=\"window.status='$title';return true\" onMouseOut=\"window.status='';return true\">";
} else {
print "\n<A HREF=\"#\" onMouseOver=\"window.status='$title';return true\" onMouseOut=\"window.status='';return true\" onClick=\"window.open('$nmdir";
print "nmimage.php?z=$dir$pic&width=$width&height=$height&title=$title','$target',' width=$width,height=$height,directories=no,location=no,menubar=no,scrollbars=no,
status=no,toolbar=no,resizable=no,left=0,top=0,screenx=50,screeny=50');return false\">";
}
if($thumbnail != "" && $thumbnail != "none") {
if($mode == "highlight") {
if(!$fmode[1])
$fmode[1] = "black";
if(!$fmode[2])
$fmode[2] = "white";
print "<img src=\"$thumbnail\" width=\"$twidth\" height=\"$theight\" border=\"0\" class=\"borderimage\" onMouseover=\"borderit(this,'$fmode[1]')\" onMouseout=\"borderit(this,'$fmode[2]')\"></a>";
} elseif($mode == "shake") {
print "<img src=\"$thumbnail\" width=\"$twidth\" height=\"$theight\" border=\"0\" class=\"shakeimage\" onMouseover=\"init(this);rattleimage()\" onMouseout=\"stoprattle(this);top.focus()\" onClick=\"top.focus()\"></a>";
} elseif($mode == "ghighlight") {
if(!$fmode[1])
$fmode[1] = 50;
print "<img src=\"$thumbnail\" width=\"$twidth\" height=\"$theight\" border=\"0\" style=\"filter:alpha(opacity=$fmode[1])\" onMouseover=\"high(this)\" onMouseout=\"low(this)\"></a>";
} else {
print "<img src=\"$thumbnail\" width=\"$twidth\" height=\"$theight\" border=\"0\"></a>";
}
} else {
print "$des</a>";
}
} // end of function
?>
and then I call with
<?php
## call the function with description
popup("http://www.cjb.cc/members/arkresource/nmimage.php", "picture", "http://www.arkresource.com/bilder/concerts/soberbarke_05/2.jpg", "http://www.arkresource.com/bilder/concerts/soberbarke_05/thumbs/2.jpg");
?>
the file I'm calling is
<html>
<head>
<title><?php echo $title ?></title>
</head>
<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<?php
if ($z != "" && $width != "" && $height != "") {
print "<img src=\"$z\" width=\"$width\" height=\"$height\">";
} else {
print "";
}
?>
<script TYPE="text/javascript">
<!--
window.focus();
//-->
</SCRIPT>
</body>
</html>
Please don't laugh at me, since it's probably pretty obvious to people who know anything about php, but I don't, and that's why I need help.