Sql kullanıcı tablosu;
Alıntı
<link rel="stylesheet" href="cark/css/sweetalert2.min.css"> <!-- sweetalert2 -->
<div class="wheel-letter-spacing"></div>
<button type="button" class="btn btn-round btn-border btn-default wheel-letter-spacing-spin-button">Çevir</button>
<script src="cark/js/lmcark.js"></script>lmcark.js kodlarıjQuery(document).ready(function($){
$('.wheel-letter-spacing').superWheel({
slices: [
{
text: "%20 İNDİRİM",
value: 1,
message: "%20 indirim kazandın",
discount: "95Qm9tof",
background: "#f1c40f",
color: "#fff"
},
{
text: "ŞANS YOK",
value: 0,
message: "Bugün Şansın Yok",
discount: "********",
background: "#e74c3c",
color: "#fff"
},
{
text: "%30 İNDİRİM",
value: 1,
message: "%30 indirim kazandın",
discount: "8C46fBeH",
background: "#2980b9",
color: "#fff"
},
{
text: "KAYBETTİN",
value: 0,
message: "Kaybettin :(",
discount: "********",
background: "#333333",
color: "#fff"
},
{
text: "ÜCRETSİZ",
value: 1,
message: "Tebrikler ücretsiz hak kazandın",
discount: "aHiH4bfd",
background: "#27ae60",
color: "#fff"
},
{
text: "HİÇBİR ŞEY!",
value: 0,
message: "Hiçbir şey alamıyorsun :(",
discount: "********",
background: "#8e44ad",
color: "#fff"
}
],
width: 400,
frame: 1,
type: "spin",
slice: {
background: "#f1c40f",
selected: {
background: "#f1c40f",
color: "#ecf0f1"
}
},
text: {
color: "#f1c40f",
size: 14,
offset: 8,
arc: false
},
line: {
color: "#1abc9c"
},
outer: {
color: "#1abc9c"
},
inner: {
color: "#1abc9c"
},
center: {
rotate: true,
image: {
url: "img/ikon.jpg",
width: 25
}
},
marker: {
background: "#f1c40f",
animate: "true"
}
});
var tick = new Audio('media/tick.mp3');
$(document).on('click','.wheel-letter-spacing-spin-button',function(e){
$('.wheel-letter-spacing').superWheel('start','value',Math.floor(Math.random() * 2));
$(this).prop('disabled',true);
});
$('.wheel-letter-spacing').superWheel('onStart',function(results){
$('.wheel-letter-spacing-spin-button').text('Çeviriliyor...');
});
$('.wheel-letter-spacing').superWheel('onStep',function(results){
if (typeof tick.currentTime !== 'undefined')
tick.currentTime = 0;
tick.play();
});
$('.wheel-letter-spacing').superWheel('onComplete',function(results){
if(results.value === 1){
swal({
type: 'success',
title: "Tebrikler!",
html: results.message+' <br><br><b>İndirim Kodunuz : [ '+ results.discount+ ' ]</b>'
});
}else{
swal("Oops!", results.message, "error");
}
$('.wheel-letter-spacing-spin-button:disabled').prop('disabled',false).text('Çevir');
});
});