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)
-   -   Lottery Addon For The Store Hack (https://vborg.vbsupport.ru/showthread.php?t=40056)

BluSmurf 08-13-2002 05:53 PM

I've added another lottery and the query result as below
mysql> SELECT * FROM storelottery WHERE lotnumber='1';
+----+-----------+--------------------------------+---------+------------+------------+--------+----------+
| id | lotnumber | lotname | jackpot | startdate | enddate | userid | username |
+----+-----------+--------------------------------+---------+------------+------------+--------+----------+
| 1 | 1 | SoccerMamak Weekend Lottery #2 | 200 | 1029297600 | 1029643200 | 0 | 0 |
+----+-----------+--------------------------------+---------+------------+------------+--------+----------+
1 row in set (0.00 sec)

But I'm still unable to buy a lottery because the page is blank :(

Mr_P 08-13-2002 06:00 PM

Lesane if u do get around to reading this id like to thank you for all teh support u gave in this post but like to know one more thing regarding this hack.

How do we get it to show on main index page how many have been sold for the current draw.

I have on main page how much is in the lottery so the 2 would go nice together.

Anyone got a decent lotto Gif ?????//

DestyNova 08-13-2002 06:20 PM

Quote:

Originally posted by Mr_P
Lesane if u do get around to reading this id like to thank you for all teh support u gave in this post but like to know one more thing regarding this hack.

How do we get it to show on main index page how many have been sold for the current draw.

I have on main page how much is in the lottery so the 2 would go nice together.

Anyone got a decent lotto Gif ?????//

ditto, I want to know how to get that display on forumhome

Mr_P 08-13-2002 06:55 PM

im back again with another small idea - for such a small hack the ideas are endless

Ok on index page how about the winners avator being displayed till the next lottery is won ? where it is then replaced by the new winners and if the winner dont have an avator then we can use a pre made one.

This on front page with money in lottery and how many tickets sold would look smart in a nice little box i got for it.
I mean come on if you won and you got the ugliest avator everyone is forced to see it for a week (hmm and i do have a sense of humour,so is this possible Lesane)

Lesane 08-13-2002 08:23 PM

Quote:

Originally posted by BluSmurf
Hi Lesane,

here's the result of the query
mysql> SELECT * FROM storelottery WHERE lotnumber='1';
Empty set (0.00 sec)

and attachment of my store.php

BluSmurf, you don't have the lottery code in the store.php so it never can function properly. Look on the instructions again.

Lesane 08-13-2002 08:36 PM

Quote:

Originally posted by Mr_P
Lesane if u do get around to reading this id like to thank you for all teh support u gave in this post but like to know one more thing regarding this hack.

How do we get it to show on main index page how many have been sold for the current draw.

I have on main page how much is in the lottery so the 2 would go nice together.

Anyone got a decent lotto Gif ?????//

If you have the code in root/index.php wich i gave before, on this post: https://vborg.vbsupport.ru/showthrea...353#post284353

Then find this line:

PHP Code:

$jackpot="Current Lottery Fund is now: $lot[jackpot]"

And change it to:

PHP Code:

$cost $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
$jackpot="Current Lottery Fund is now: $lot[jackpot]<br>Ticket's sold: $cost[sold]"


Mr_P 08-13-2002 10:29 PM

Excellant and works a treat - wish there was someway to rate a hacker on this board not just for his hacks but also for the feedback they give to other users as theres some good ones on here.

Anyway thanks a million Lesane,it may only have been a small thing but once i did it i seen the amount of tickets sold from 12 to 33.

Goes to show - Its all in the packaging.

Karmed m8 if i could.

tpearl5 08-14-2002 05:06 AM

Quote:

Originally posted by Lesane


Wich mysql version are you using?

http://degster.com/phpinfo.php

3.22.32 :(

I had a feeling it had something to do with that.

Lesane 08-14-2002 09:05 AM

Quote:

Originally posted by tpearl5


http://degster.com/phpinfo.php

3.22.32 :(

I had a feeling it had something to do with that.

You are using an old mysql version wich don't support that way of choosing a random user. Mysql version 3.23+ supports the "order by rand" function.

Try this way:

Open the file: admin/storeadmin.php

Find:

PHP Code:

$findus=$DB_site->query_first("SELECT * FROM user ORDER BY RAND() desc LIMIT 1"); 

And change it to:

PHP Code:

$findus=$DB_site->query_first("select *, rand() as r from user order by r limit 1;"); 


Lesane 08-14-2002 09:07 AM

Quote:

Originally posted by Mr_P
Excellant and works a treat - wish there was someway to rate a hacker on this board not just for his hacks but also for the feedback they give to other users as theres some good ones on here.

Anyway thanks a million Lesane,it may only have been a small thing but once i did it i seen the amount of tickets sold from 12 to 33.

Goes to show - Its all in the packaging.

Karmed m8 if i could.

You're welcome Mr_p :)


All times are GMT. The time now is 04:50 PM.

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.01326 seconds
  • Memory Usage 1,754KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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