Hallo zusammen,
nach einigen Test komme ich zu diesem Ergebnis:
Original von Lisa:
$user_id = $user_info['user_id'];
function check_cat_limit($cat_id, $user_id) {
$sql = "SELECT image_id FROM 4images_images WHERE cat_id=$cat_id AND user_id=$user_id";
$result = mysql_query($sql);
$cat_images_user = mysql_num_rows($result);
if($cat_images_user >= 5) {
return false;
} else {
return true;
}
}
and added "!check_cat_limit($cat_id, $user_id)" to the second line of if ($action == "uploadform") { as:
if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_permission("auth_up
load", $cat_id) || !check_cat_limit($cat_id, $user_id))) {
Von mir verändert:
$user_id = $user_info['user_id'];
function check_cat_limit($user_id) {
$sql = "SELECT image_id FROM 4images_images WHERE user_id = $user_id";
$result = mysql_query($sql);
$cat_images_user = mysql_num_rows($result);
if($cat_images_user >= 5) {
return false;
}else{
return true;
}
}
if ($action == "uploadform") {
if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload", $cat_id) || !check_cat_limit($user_id) )) {
Alles was Fett ist, habe ich verändert, es war nicht viel, nur alles mit cat_id gelöscht.
Ich hoffe, das ist die Endlösung.