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)

Darnell 0216 04-11-2003 04:52 AM

Make sure you don't have errors in the the following lines:
PHP Code:

$jack=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber=1");
$kutje=$jack[jackpot]; 

Your error says that it's trying to add nothing (storep=storep+ WHERE) to the current storepoints which implies kutje is returning an empty value.

BTW I'm running 2.2.9 and haven't had any errors other than choosing from only those who have bought a ticket and the fact he hardcoded the colors and bullet images in which were all rectified...

dstruct2k 04-13-2003 03:32 AM

Anyone feel like telling me the meaning of "kutje"? I tried translating it to no avail.... :(

vurton 05-02-2003 02:00 AM

everything worked fine until i picked a winner

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='1'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid='1'' at line 1

mysql error number: 1064

hmmmhhhhhhhhhhhhhh

Zelda-King 05-02-2003 10:22 AM

Mine's ok on 2.3.0 but I want to change the userid of the winner/loser PM sender (I use Admin-Bot for jobs like this. :D).

Darnell 0216 05-03-2003 12:37 AM

Quote:

Today at 07:22 AM Zelda-King said this in Post #214
Mine's ok on 2.3.0 but I want to change the userid of the winner/loser PM sender (I use Admin-Bot for jobs like this. :D).
Find in storeadmin.php
PHP Code:

$pmwinner="Congratulations $username,\n\n You won the lottery named $lotop[lotname]. Your amount of points is increased with $kutje points.\n\n Thanks for your participation on this lottery.";
$pmw $DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,messageread,folderid) VALUES (NULL,'$userid','$userid','$bbuserinfo[userid]','You Won The Lottery','".addslashes($pmwinner)."',".time().",0,0)"); 

Replace $bbuserinfo[userid] with the userid you wish the message to come from.

Zelda-King 05-03-2003 01:33 PM

Yeah, I knew that had to be the key. I just wasn't sure if you just stick the userid on its own or whatnot.

Right, I've now replaced '$bbuserinfo[userid]' with '192' and done the same for the loser PM. I'll see how that goes when the next lottery ends in a week.

Thanks a lot!

On another note, with the last lottery the jackpot was over 30000 but the lottery awarded little over 1000. Maybe the jackpot just went over the maximum at the last minute? I've made the jackpot for the current lottery less to see if this one goes better.

Darnell 0216 05-03-2003 01:51 PM

There's a fix mentioned earlier in the thread regarding award issues... You might wanna doublecheck that problem if you haven't already corrected it. I've got my lottery to award over $10,000,000...

mcyates 05-03-2003 03:45 PM

http://www.myfootballforum.com/myfoo...action=lottery

When i try to buy a ticket i click on the buy button BUT it does nothing.. Below is the code for it which i'm using.


template: store_lottery

Code:

<html>
<head>
<title>$storename - Buy A Lottery Ticket</title>
$headinclude
</head>
<body>
$header
<table cellpadding="2" cellspacing="0" border="0" width="95%"  align="center">
<tr>
        <td width="100%"><img src="https://vborg.vbsupport.ru/images/vb_bullet.gif" alt="" border="0" align="absmiddle">
        <normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> &gt;
        <a href="store.php?s=$session[sessionhash]">$storename</a> &gt; Buy A Lottery Ticket</b></normalfont></td>
</tr>
</table>
<br>
<p><form action="store.php"  name="name" method="post">
<input type="hidden" name="action" value="lotteryupdate">
<input type="hidden" name="cost" value="$cost">
<input type="hidden" name="storeid" value="$storeid">
<br>
<table cellpadding="0" align=center cellspacing="0" border="0" width="90%"><tr><td>
<table cellpadding="0" align=center cellspacing="1" border="0" bgcolor="#0A293E" width="90%">
<tr>
<td colspan="2" bgcolor="#1D6AA0"><normalfont color="#EEEEFF"><b>Verify:</b></normalfont></td>
</tr>
<tr bgcolor="#13486D" valign='top'>
<td><p><normalfont color="#000000">Buying a lottery ticket costs:</p></td>
<td><p><normalfont color="#000000">$cost</p></td>
</tr>
<tr bgcolor="#13486D" valign='top'>
<td><p><normalfont color="#000000">$pointname you have:</p></td>
<td><p><normalfont color="#000000">$points</p></td>
</tr>
<tr bgcolor="#13486D" valign='top'>
<td><p><normalfont color="#000000">$pointname after buying the lottery ticket:</p></td>
<td><p><normalfont color="#000000">$need</p></td></tr>
<tr>
<td bgcolor="#1D6AA0" colspan='2' align='center'><p id='submitrow'><input type="submit" value="Ok, Buy The Lottery Ticket">
</p></td>
</tr>
</table>
</form>
</td></tr>
</table>
$footer
</body>
</html>

Any help would be welcomed. Thanks in advance

Nur1 05-04-2003 09:31 PM

getting problem.. well dunno if its a problem or not, but the lotto insert is appearing twice in admin

check attached gif

007 05-05-2003 04:28 PM

Nur1 I also have that problem. It doesn't seem to mess anything up, just shows everything twice though. I just ignore it.

I also have the same problem as you vurton. Members still get their money, but I get your error along with a nice vbulletin error email. I hate those LOL!

But yeah I get this too in 2.2.9. Anyone know what could be wrong?

Quote:

05-01-03 at 10:00 PM vurton said this in Post #213
everything worked fine until i picked a winner

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='1'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid='1'' at line 1

mysql error number: 1064

hmmmhhhhhhhhhhhhhh



All times are GMT. The time now is 06:24 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.01319 seconds
  • Memory Usage 1,757KB
  • 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
  • (1)bbcode_code_printable
  • (2)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)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