ok... here is a function in the file gallery.php. this i sone of maybe ten or so functions that are called from the index.php file depending on the action.
function show_type() {
$cat = $_GET["action"];
$limit = $_GET["limit"];
echo("<div align=\"center><center><table cellpadding=\"1\" cellspacing=\"3\" width=\"90%\"><tr><td width=\"100%\" align=\"right\" colspan=\"2\">Photo Gallery</td></tr>
<tr><td width=\"100%\" align=\"left\" colspan=\"2\"><BR></td></tr>
<tr><td width=\"100%\" align=\"left\" colspan=\"2\">Live</td></tr>
<tr><td width=\"100%\" align=\"left\" colspan=\"2\"><BR></td></tr>
<tr><td width=\"100%\" align=\"left\" colspan=\"2\"><div align=\"center\"><center><table align=\"center\" width=\"100%\"><tr>");
$recent_live = mysql_query("SELECT * FROM gallery WHERE img_cat = '$cat' ORDER BY upload_date DESC LIMIT $limit, 12");
$p = 1;
while(($recent_live1 = mysql_fetch_array($recent_live)) && ($p <= 12)) {
$img_thumb_url = $recent_live1["img_thum_url"];
$img_x = $recent_live1["img_x"];
$img_y = $recent_live1["img_y"];
$uploaded_on = $recent_live1["uploaded_on"];
$img_id = $recent_live1["img_id"];
$uploaded_by = $recent_live1["uploaded_by"];
$uploaded_on = strftime($timeformat,$uploaded_on);
echo("**Stuff**");
if($p == 4 || $p == 7 || $p == 10) { echo("</tr><tr>"); }
$p++;
}
echo("</tr> <tr><td width=\"100%\" align=\"left\" colspan=\"2\"><BR></td></tr>
<tr><td width=\"100%\" align=\"left\" colspan=\"2\">");
$pages = mysql_num_rows(mysql_query("SELECT * FROM gallery WHERE img_cat = '$cat'"));
$pages = ceil($pages / 12);
$cur = ($limit / 12) + 1;
echo("Page: ");
for($d=1;$d<=$pages;$d++) {
$e = ($d - 1) * 15;
if($cur == $d) { echo("<font color=\"#ffffff\">$d</font>"); }
else { echo("<a href=\"index.php?action=$cat&limit=$e\">$d</a> "); }
}
}
the function itself is called from the index.php file if the file has been included, using call_user_func.
the error i get is:
Fatal error: Call to undefined function: call_user_function() in /data/sites/asdkfj/www/web/v2/gallery/index.php on line 30