3
I made this function but you need to test it:
add onlyonepic function to include/functions.inc.php file
function onlyonepic($owner_id) {
global $xoopsDB;
$onepic = "SELECT COUNT(*) FROM ".$xoopsDB->prefix('xcgal_pictures')." WHERE owner_id = '".$owner_id."'";
$resultlimit = $xoopsDB->query($onepic);
list($count) = $xoopsDB->fetchRow($resultlimit);
if ($count == 0) {
redirect_header('index.php',2,_MD_PERM_DENIED);
die;
}
}
edit upload.php file then add:
onlyonepic($owner_id);after this line at the top:
require('include/init.inc.php');