Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • InvisionFree Modifications
  • [SC] Admin Advanced Lottery Code Generator
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
[SC] Admin Advanced Lottery Code Generator; Invisionfree
Topic Started: Jul 10 2008, 05:06 PM (1,340 Views)
slayer766 Jul 10 2008, 05:06 PM Post #1
Member Avatar
Hello all

Posts:
1,652
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Code Name: Admin Advanced Lottery Code Generator
Description: Allows the use of a Lottery Code Generator to Admins only, with the choices of as many numbers as you want, and will pick 1 of those numbers you have down out at random. This is placed in the My Controls section and will be on the left hand side menu. Also you can charge money in a topic for people to buy a lottery ticket which this has no money hack with it so use a seperate one.
Preview of it in Use/Screenshot: Posted Image
Where it goes: Footer
Quote:
 
<script>
//Admin Advanced Lottery Code Generator
//By slayer766 of thecodingzone.com

//Set Lottery Price Here
var LotteryPrice = "$1,000";
//Set Possible Numbers Here, you can add as many as you want
var RandomNum = [2,44,8,57,12,6];


a = document.getElementById("userlinks").getElementsByTagName("a");
for(r=0;r<a.length;r++){
if(a[r].href.match("admin")){
var c = document.getElementById("ucpmenu");
if(c){
c.innerHTML+="<div class='pformstrip'>Lottery Area</div><p>ยท <a href='"+location.href.split("?")[0]+"?act=UserCP&CODE=Lottery'>Lottery Generator</a></p>";
}
}
}

if(location.href.match("Lottery")){
a='<br /><br /><table width="50%" border="1" cellspacing="5" cellpadding="5" align="center"><tr><th align="center">*Note* Price: <i>'+LotteryPrice+'</i></th><th align="center">Overall Numbers</th></tr><tr><th rowspan="6" valign="top"><br /><div class="pformstrip">Generate Number</div><br /><br /><input type="button" onclick="ShowNum()" value="Generate Now!"><br /><br /><fieldset>Winning Number: <i><span id="winnum" style="color:green"></span></i></fieldset><br /></th></tr>';
for(q in RandomNum){
a+='<tr><td>'+RandomNum[q]+'</td></tr>';
}
a+='</table>';
document.getElementById("ucpcontent").innerHTML="<div class='maintitle'>Lottery Generator</div>"+a;
}

function ShowNum(){
document.getElementById("winnum").innerHTML=RandomNum[Math.floor(Math.random()*RandomNum.length)];
}
</script>


You can change what's in RED to whatever you want it to be.
Edited by Reid, Jun 14 2009, 10:19 PM.
Posted Image
Thanks Helena for the siggah!!!
Offline Profile Goto Top
 
Sylmaria Dec 21 2008, 05:32 AM Post #2


Posts:
1
Group:
Member
Member
#1,835
Joined:
Dec 21, 2008
Can it generate more then just six numbers at a time or not, well what i mean is can it be edited to generate more then six numbers at a time?
Offline Profile Goto Top
 
slayer766 Dec 21 2008, 09:45 AM Post #3
Member Avatar
Hello all

Posts:
1,652
Group:
Distinguished Coder
Member
#12
Joined:
Jul 9, 2008
Coding language
PHP
Hahaha you said the same exact thing twice. :D

Check the first post again though. :)
Posted Image
Thanks Helena for the siggah!!!
Offline Profile Goto Top
 
tayleeshiuan Feb 3 2009, 04:30 AM Post #4


Posts:
8
Group:
Member
Member
#2,182
Joined:
Jan 31, 2009
can the members play this?
Offline Profile Goto Top
 
iPBFree User Feb 25 2010, 02:43 AM Post #5

Posts:
127
Group:
Banned
Member
#3,703
Joined:
Feb 25, 2010
Nice code!
Offline Profile Goto Top
 
eltear Mar 18 2011, 08:48 PM Post #6


Posts:
1
Group:
Member
Member
#3,943
Joined:
Aug 9, 2010
Coding language
HTML/CSS
Ah, interesting! Thanks for sharing:)
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · InvisionFree Modifications · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 8:54 PM Jan 27
Hosted for free by ZetaBoards