Hello everybody,
We currently organize a photo contest... and there are some crafty cheating !
I would like
1° to only limit the vote to 1 per day by anybody I made the modifs in ratepic.php by putting $clean_before = $curr_time - 86400; as I saw in the forum somewhere but that does not go! One can always vote once as many as one wants!
2° to remove the possibility of voting for oneself!
3° to remove the multiple votes for the same photograph even by removing the cookie!
Thank you in advance for your assistance!!
Specified: I opened the gallery to everybody we are on an Intranet.
Nicole
Here is the debug info we can see when the photo is disolaying :
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) ;