Author Topic: Upload limit und Kategorie Privat  (Read 3155 times)

0 Members and 1 Guest are viewing this topic.

Offline thomaswolf

  • Pre-Newbie
  • Posts: 6
    • View Profile
Upload limit und Kategorie Privat
« on: February 14, 2007, 07:52:56 PM »
Ich habe das folgende funktionierent in meine galerie eingebaut.  Beim testen hat alles geklappt. Nun habe ich festgestellt das ein user mehr bilder hochladen konnte. Der user hat einen eigenen Ordner und der ist bei den Befugnissen als privat gekennzeichnet.

wer weiß hier rat, sie suchfunktion hat mir nicht geholfen


$user_id = $user_info['user_id'];
$date_check = mktime(0,0,0,month,day,year);

function check_picture_limit($date_check, $user_id) {
$sql = "SELECT image_id FROM 4images_images WHERE image_date>=$date_check AND user_id=$user_id";
$result = mysql_query($sql);
$today_images_user = mysql_num_rows($result);

if($today_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_picture_limit($date_check, $user_id))) {
    show_error_page($lang['no_permission']);
    exit;
  }

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Upload limit und Kategorie Privat
« Reply #1 on: February 14, 2007, 08:34:52 PM »
MUST READ- Guidelines for posting questions in this forum!

5) Reply to the appropriate thread if you have questions regarding MODs
If you have questions regarding a MOD/thread, please DO NOT START A NEW TOPIC, post a REPLY to the MOD/thread.

... closed ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...