vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Members Choice Voting Hack (https://vborg.vbsupport.ru/showthread.php?t=50819)

pgowder 04-08-2003 10:22 PM

Can someone help????

LangTuDaTinh 04-08-2003 11:30 PM

Quote:

Today at 05:02 AM pgowder said this in Post #90
I'm getting an error when anyone with a ' in thier username is nominated. How can this be fixed??
look for that line

and replace

PHP Code:

'$bbuserinfo[username]' 

with
PHP Code:

'".addslashes(htmlspecialchars($bbuserinfo[username]))."' 


pgowder 04-08-2003 11:34 PM

Replace every instance of that??

LangTuDaTinh 04-08-2003 11:58 PM

yes...it's best to do that....and let me know the result...

pgowder 04-09-2003 12:12 AM

Thanks, I've done that. I'll let you know if I still get errors!

trafix 04-09-2003 01:27 AM

sorry for taking so long to reply as i have been flat out on my next hack release

Im not sure if that last suggestion is correct....however try this

find in memberschoice.php
PHP Code:

$update=date("Y-m-d",time()+86400 $days);
  
$DB_site->query("INSERT INTO memberschoice (id,nominatorid,nomnameid,ndate,nomreason,nomname,nominator) VALUES (NULL,'$bbuserinfo[userid]',$nomnameid,UNIX_TIMESTAMP('$update'),'".addslashes($nomreason)."','".addslashes($nominatemember)."','".addslashes($nominatorid)."')");
  
$DB_site->query("UPDATE memberschoiceadmin SET nominees=nominees+1 WHERE event=1"); 

replace with
PHP Code:

$update=date("Y-m-d",time()+86400 $days);
  
$DB_site->query("INSERT INTO memberschoice (id,nominatorid,nomnameid,ndate,nomreason,nomname,nominator) VALUES (NULL,'$bbuserinfo[userid]','".addslashes($nomnameid)."',UNIX_TIMESTAMP('$update'),'".addslashes($nomreason)."','".addslashes($nominatemember)."','".addslashes($nominatorid)."')");
  
$DB_site->query("UPDATE memberschoiceadmin SET nominees=nominees+1 WHERE event=1"); 

let my know if it works and i will update the zip....even if the other suggestion works..

pgowder 04-09-2003 12:22 PM

The other changes did solve the problem.

I've made this change also, and will let you know if it causes any problems.

Thanks

pgowder 04-09-2003 02:57 PM

After adding that change, I'm now getting errors.

Quote:

Invalid SQL: SELECT * FROM memberschoice WHERE nomname='Smokin' Ace' mysql error: You have an error in your SQL syntax near 'Ace'' at line 1

pgowder 04-09-2003 03:18 PM

Another question...

Right now, my users have two monthly contest. Male member of the month and female member of the month. Can I run two at the same time?

pgowder 04-10-2003 12:38 AM

That changed generated a php error for line 145 on memberchoice.php.

I changed it back, and everything is working great.


All times are GMT. The time now is 09:32 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01281 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete