?php
/*
MCCodes Lite
original slotsmachine.php Rev 1.0.0
Copyright (C) 2006 Dabomstew
updated by spellbyte
crystalslots.php
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
session_start();
require "global_func.php";
if($_SESSION['loggedin']==0) { header("Location: login.php");exit; }
$userid=$_SESSION['userid'];
require "header.php";
$h = new headers;
$h->startheaders();
include "mysql.php";
global $c;
$is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error());
$ir=mysql_fetch_array($is);
check_level();
$fm=crystal_formatter($ir['crystals']);
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm);
$h->menuarea();
$tresder = (int) (rand(100,999));
$maxbet=$ir['level']*250;
$_GET['tresde']=abs((int) $_GET['tresde']);
if(($_SESSION['tresde'] == $_GET['tresde']) || $_GET['tresde']<100)
{
die ("Error, you cannot refresh or go back on the slots, please use a side link to go somewhere else.
> Back");
}
$_SESSION['tresde']=$_GET['tresde'];
$_GET['bet']=abs((int) $_GET['bet']);
print "