problème de vote problème de vote
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

problème de vote

Started by nicole80, May 23, 2006, 06:27:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nicole80

Bonjour à tous,

Nous organisons un concours photo actuellement ... et il y a des petits malins qui trichent !

J'aimerais
1° limiter le vote à 1 seul par jour par personne
J'ai fait les modifs dans ratepic.php en mettant
$clean_before = $curr_time - 86400; comme je l'ai vu dans le forum qqpart mais çà ne marche pas !
On peut toujours voter autant de fois que l'on veut !

2° supprimer la possibilité de voter pour soi-même !

3°  supprimer les votes multiples pour la même photo même en supprimant le cookie !

Merci d'avance pour votre aide !!

Précisions : j'ai ouvert le concours à tous car nous sommes sur un intranet.

Nicole


USER:
------------------
Array
(
    [ID] => *********************
    [am] => 1
    [lang] => french
    [liv] => Array
        (
            [0] => 61
            [1] => 60
            [2] => 107
            [3] => 31
            [5] => 6
        )

    [theme] => water_drop
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 0
    [user_name] => Guest
    [groups] => Array
        (
            [0] => 3
        )

    [group_quota] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 0
    [can_post_comments] => 0
    [can_upload_pictures] => 0
    [can_create_albums] => 0
    [pub_upl_need_approval] => 1
    [priv_upl_need_approval] => 1
    [upload_form_config] => 3
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [custom_user_upload] => 0
    [disk_max] => 0
    [disk_min] => 0
    [ufc_max] => 3
    [ufc_min] => 3
    [has_admin_access] => 0
    [group_name] => Guests
    [can_see_all_albums] => 0
    [group_id] => 3
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM photo_filetypes; (0.001s)
    [1] => select * from photo_plugins order by priority asc; (0s)
    [2] => delete from `xxxx`.photo_sessions where time<1148397563 and remember=0; (0s)
    [3] => delete from `xxxx`.photo_sessions where time<1147191563; (0s)
    [4] => select user_id from `xxxx`.photo_sessions where session_id=md5("****"); (0s)
    [5] => select user_id as id, user_password as password from `xxxx`.photo_users where user_id=0 (0s)
    [6] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM photo_usergroups WHERE group_id in (3) (0s)
    [7] => SELECT group_name FROM  photo_usergroups WHERE group_id= 3 (0s)
    [8] => update `xxxx`.photo_sessions set time='1148401163' where session_id=md5('d8f1e123a9539eee210b7c3cd8e8d47d72ae59aa24e7215aa25251ced7dcb15d'); (0s)
    [9] => DELETE FROM photo_banned WHERE expiry < '2006-05-23 16:19:24' (0s)
    [10] => SELECT * FROM photo_banned WHERE (ip_addr='***.***.*'**.56 OR ip_addr='***.***.***.56' OR user_id=0) AND brute_force=0 (0s)
    [11] => SELECT aid FROM photo_albums (0s)
    [12] => SELECT title,keyword from photo_albums WHERE aid='5' (0s)
    [13] => SELECT COUNT(*) from photo_pictures WHERE ((aid='5'  ) ) AND approved='YES' AND aid IN (1,3,4,5,7)  (0s)
    [14] => SELECT * from photo_pictures WHERE ((aid='5'  ) ) AND approved='YES' AND aid IN (1,3,4,5,7)  ORDER BY pid ASC  LIMIT 0 ,1 (0.001s)
    [15] => SELECT title, comments, votes, category, aid FROM photo_albums WHERE aid='5' LIMIT 1 (0s)
    [16] => SELECT name, parent FROM photo_categories WHERE cid = '4' (0s)
    [17] => UPDATE photo_pictures SET hits=hits+1, lasthit_ip='***.***.***.56', mtime=CURRENT_TIMESTAMP WHERE pid='6' (0s)
    [18] => INSERT INTO photo_hit_stats
                          SET
                            pid = 6,
                            search_phrase = '',
                            Ip   = '***.***.**.56',
                            sdate = '1148401164',
                            referer='http://www.monsite.com/photos/thumbnails.php?album=5',
                            browser = 'Firefox',
                            os = 'Windows XP' (0.015s)
    [19] => SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM photo_comments WHERE pid='6' ORDER BY msg_id ASC (0s)
    [20] => SELECT title,keyword from photo_albums WHERE aid='5' (0s)
    [21] => SELECT COUNT(*) from photo_pictures WHERE ((aid='5'  ) ) AND approved='YES' AND aid IN (1,3,4,5,7)  (0s)
    [22] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from photo_pictures WHERE ((aid='5'  ) ) AND approved='YES' AND aid IN (1,3,4,5,7)  ORDER BY pid ASC  LIMIT 0 ,10 (0.002s)
)

==========================
GET :
------------------
Array
(
    [album] => 5
    [pos] => 0
)

==========================
POST :
------------------
Array
(
)

==========================
Page generated in 0.428 seconds - 23 queries in 0.019 seconds - Album set : AND aid IN (1,3,4,5,7) ; Meta set: AND aid IN (1,3,4,5,7) ;