initial: bootstrap from BukidBountyApp base
This commit is contained in:
80
legacy/pages-html/slvl/user/defaultuser
Normal file
80
legacy/pages-html/slvl/user/defaultuser
Normal file
@@ -0,0 +1,80 @@
|
||||
<br>
|
||||
<h2 class="fw_6 text-center">Cornerstone Focus Property Alliance</h2><br>
|
||||
<div class="card-section" id="main-card-section">
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="bill-content">
|
||||
<div class="tf-container" id="recents_home">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
statsarray = [["Today", 0, "Leads", "left", "leads-today-no"],
|
||||
["Actionable", 0, "Leads", "left", "actionable-leads-no"],
|
||||
["Sold", 0, "Today", "right", "sold-today-no"],
|
||||
["Sold", 0, "This Month", "right", "sold-monthly-no"]
|
||||
//,["Sold", 0, "Total", "right", "sold-all-no"]
|
||||
];
|
||||
|
||||
balancewrapper_item_array = [["New Lead", "NewLeads", "", "/assets/NewLeads.png", "", "", "", ""], ["List Leads", "ListLeads", "0", "/assets/ListLeads.png", "", "", "", ""]];
|
||||
balancebox = UIcreateBalanceBoxfromArray(statsarray, balancewrapper_item_array);
|
||||
|
||||
servicesbuttonarray = [['/assets/ListLeads.png', 'My Leads', 'ListLeads', ''],
|
||||
['/assets/house.png', 'Properties', 'ListProperties', ''],
|
||||
['/assets/NewProperty.png', 'New Property', 'NewProperty']];
|
||||
|
||||
|
||||
servicesbox = UIServices_FullDIV_GOTOPAGE_Array('', '', '', '', servicesbuttonarray);
|
||||
|
||||
|
||||
dualcolumn_button_array = [['Leads', 'ListLeads', '', '/assets/ListLeads.png'],
|
||||
['Properties', 'ListProperties', '', '/assets/house.png']
|
||||
];
|
||||
dualcolumnhtml = UISideText_DualColumnButton_Array(dualcolumn_button_array);
|
||||
dualcolumnhtml='';
|
||||
|
||||
recents_list_array = [['Loading', 'Please Wait...', '', 'xxxwait', 'unknown', '', '/assets/sync.png']];
|
||||
arrowlist_button_array = '';
|
||||
searchbox_html = UISearchBox_with_BUTTONS_FULL('Recent', recents_list_array, arrowlist_button_array, 'RecentsPage', '', 'View All', 'HomeRecentList', 'home_recent_search', 'Search');
|
||||
|
||||
$('#main-card-section').append(balancebox);
|
||||
$('#main-body').append(servicesbox + dualcolumnhtml + '<br><br>' + searchbox_html);
|
||||
function UIHome_Leads_Today_Change(num) {
|
||||
if (num === false || num === undefined || num === null) {
|
||||
return false;
|
||||
}
|
||||
$('#leads-today-no').html(num);
|
||||
}
|
||||
|
||||
function loadrecents_home() {
|
||||
|
||||
}
|
||||
function HomeULT_reinitilize_loaders() {
|
||||
Preloaders.Account_Settings_Details();
|
||||
Preloaders.PreferredSitesOption();
|
||||
Preloaders.ListLeadsData();
|
||||
Preloaders.ListPropertyData(true,false,false);
|
||||
}
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
changeTopbarTitle('Home');
|
||||
|
||||
loadrecents_home();
|
||||
HomeULT_reinitilize_loaders();
|
||||
CheckAndSetDarkMode();
|
||||
|
||||
});
|
||||
</script>
|
||||
97
legacy/pages-html/slvl/user/draw_numbers_today
Normal file
97
legacy/pages-html/slvl/user/draw_numbers_today
Normal file
@@ -0,0 +1,97 @@
|
||||
|
||||
|
||||
|
||||
<table id="Draw_Numbers_Today">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Type</th>
|
||||
<th>Number</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function GenerateDrawWinningTodayRow(Type,Time,btnumber){
|
||||
let activecheckbox='';
|
||||
|
||||
|
||||
|
||||
//activecheckbox='<input class="form-control" type="checkbox" '+Active+' disabled>';
|
||||
//const actionbutton =`<button class="btn btn-warning btn-block" onclick="gotoPage('UserModify','${Hashkey}')">View User</button>`;
|
||||
|
||||
Time=Time.replace(' ','<br>');
|
||||
Type=Type.replace(' ','<br>');
|
||||
|
||||
|
||||
return `<tr>
|
||||
<td>${Time}</td>
|
||||
<td>${Type}</td>
|
||||
<td>${btnumber}</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async function GenerateDrawsTodayRows(responsearray) {
|
||||
|
||||
let newhtmltable = '';
|
||||
|
||||
for (let i = 0; i < responsearray.length; i++) {
|
||||
|
||||
newhtmltable += GenerateDrawWinningTodayRow(
|
||||
responsearray[i]['type'],
|
||||
responsearray[i]['schedule'],
|
||||
responsearray[i]['draw_number'],
|
||||
);
|
||||
}
|
||||
|
||||
//$("#User_list_table").find("tbody").replaceWith(newhtmltable);
|
||||
// new DataTable('#User_list_table');
|
||||
|
||||
|
||||
$("#Draw_Numbers_Today").find("tbody").html(newhtmltable);
|
||||
//new DataTable('#Winning_Numbers_Today');
|
||||
|
||||
new DataTable('#Draw_Numbers_Today', {
|
||||
language: {
|
||||
emptyTable: 'No Draws'
|
||||
},
|
||||
order: [[0, 'asc']],
|
||||
"bDestroy": true
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#draws-today-card').fadeIn(200);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function GenerateDrawListTodayTable(draw_numbers_today_target_date=''){
|
||||
AjaxDo('?user/list/draw_winning_numbers/', { target_date: draw_numbers_today_target_date}, GenerateDrawsTodayRows, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
GenerateDrawListTodayTable(draw_numbers_today_target_date);
|
||||
|
||||
if (home_page_card_html_auto_load_table_content===1){
|
||||
setInterval(function () {
|
||||
if (currentPage=='Home'){
|
||||
GenerateDrawListTodayTable(draw_numbers_today_target_date);
|
||||
}
|
||||
}, 300000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
106
legacy/pages-html/slvl/user/my_winning_numbers
Normal file
106
legacy/pages-html/slvl/user/my_winning_numbers
Normal file
@@ -0,0 +1,106 @@
|
||||
|
||||
|
||||
|
||||
<table id="My_Winning_Numbers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Type</th>
|
||||
<th>Number</th>
|
||||
<th>Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function GenerateBetWinningRow(Time,Type,btnumber,Amount,Hashkey){
|
||||
let activecheckbox='';
|
||||
|
||||
|
||||
|
||||
//activecheckbox='<input class="form-control" type="checkbox" '+Active+' disabled>';
|
||||
//const actionbutton =`<button class="btn btn-warning btn-block" onclick="gotoPage('UserModify','${Hashkey}')">View User</button>`;
|
||||
|
||||
Time=Time.replace(' ','<br>');
|
||||
Type=Type.replace(' ','<br>');
|
||||
|
||||
return `<tr>
|
||||
<td>${Time}</td>
|
||||
<td>${Type}</td>
|
||||
<td>${btnumber}</td>
|
||||
<td>${Amount}</td>
|
||||
</tr>`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async function GenerateMyBetWinningRows(responsearray) {
|
||||
|
||||
let newhtmltable = '';
|
||||
|
||||
for (let i = 0; i < responsearray.length; i++) {
|
||||
|
||||
newhtmltable += GenerateBetWinningRow(
|
||||
responsearray[i]['time'],
|
||||
responsearray[i]['type'],
|
||||
responsearray[i]['bet_number'],
|
||||
responsearray[i]['amount'],
|
||||
responsearray[i]['hashkey']
|
||||
);
|
||||
}
|
||||
|
||||
//$("#User_list_table").find("tbody").replaceWith(newhtmltable);
|
||||
// new DataTable('#User_list_table');
|
||||
|
||||
|
||||
$("#My_Winning_Numbers").find("tbody").html(newhtmltable);
|
||||
//new DataTable('#Winning_Numbers_Today');
|
||||
|
||||
new DataTable('#My_Winning_Numbers', {
|
||||
language: {
|
||||
emptyTable: 'No Winning Numbers'
|
||||
},
|
||||
order: [[0, 'desc']],
|
||||
"bDestroy": true
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#secondary-card').fadeIn(200);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function GenerateMyWinningNumbersTable(my_winning_numbers_target_user){
|
||||
|
||||
AjaxDo('?user/list/winning_numbers/all', {target_user : my_winning_numbers_target_user}, GenerateMyBetWinningRows, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
GenerateMyWinningNumbersTable(my_winning_numbers_target_user);
|
||||
|
||||
if (home_page_card_html_auto_load_table_content===1){
|
||||
setInterval(function () {
|
||||
if (currentPage=='Home'){GenerateMyWinningNumbersTable(my_winning_numbers_target_user);}
|
||||
|
||||
}, 300000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
552
legacy/pages-html/slvl/user/old/place-bet - Copy
Normal file
552
legacy/pages-html/slvl/user/old/place-bet - Copy
Normal file
@@ -0,0 +1,552 @@
|
||||
<br><br>
|
||||
<div class="card-body card-info" id="main-card-body" style="">
|
||||
<div class="row">
|
||||
<div class="col-md-18">
|
||||
Welcome User
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row card-info">
|
||||
<div class="col-md-18 card bg-gray text-xl border-rounded" style="width:100%;height:20%;">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
Total Balance
|
||||
</div>
|
||||
<div class="col-md-6" id="total-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" id="credited-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-sm" id="phone-number">
|
||||
...
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" id="secondary-card">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style=""></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<div class="row card-body">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="secondary-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style=""></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Bet type:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<select id="b-type" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Date:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<select id="sched" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card" id="third-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;">
|
||||
<h3 class="card-title" style="" id="selected-numbers"></h3>
|
||||
<div class="card-tools bg-warning" style="display: none;">
|
||||
Maximum Numbers Selected
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="fourth-card-confirm" style="display: none;">
|
||||
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
<button class="form-control border-rounded btn-danger" onclick="trytosubmitB();">Confirm</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="br-space" style="display:none;">
|
||||
<br><br><br><br><br><br><br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var gamesdetails = null;
|
||||
var gamemaxnumberofdigits = null;
|
||||
var digitselection = null;
|
||||
var numberofdigits = 0;
|
||||
var numofbets = 0;
|
||||
var minimumbet = null;
|
||||
|
||||
|
||||
function numberofselectedbuttons() {
|
||||
return $(".l-button.btn-danger").length;
|
||||
}
|
||||
|
||||
function IsSelectedNumbersMax() {
|
||||
if ($(".custom-select.numbersinorderselect").length !== 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!gamemaxnumberofdigits || gamemaxnumberofdigits === -1) {
|
||||
return false;
|
||||
}
|
||||
if (numberofselectedbuttons() < gamemaxnumberofdigits) {
|
||||
return false;
|
||||
} else { return true; }
|
||||
|
||||
}
|
||||
|
||||
function currentgametype() {
|
||||
return $("#b-type").val();
|
||||
}
|
||||
|
||||
function hideconfirmbutton() {
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
|
||||
function hideselectednumbersTop() {
|
||||
$("#selected-numbers").html("");
|
||||
}
|
||||
|
||||
function showconfirmbutton() {
|
||||
$("#third-card-betting .card-tools").show(); $("#fourth-card-confirm").fadeIn(200);
|
||||
$("#br-space").show();
|
||||
}
|
||||
|
||||
|
||||
function repopulatebtype(response) {
|
||||
//console.log();
|
||||
$("#b-type").empty();
|
||||
$("#sched").empty();
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
|
||||
let dateoptions = '';
|
||||
|
||||
|
||||
for (var key in response) {
|
||||
var optionValue = response[key]['hashkey'];
|
||||
var optionText = response[key]['bet_type'];
|
||||
|
||||
$("#b-type").append($('<option>', { value: optionValue, text: optionText }));
|
||||
|
||||
|
||||
}
|
||||
reloadschedbyvalue();
|
||||
|
||||
}
|
||||
|
||||
function repopulatedatesched(response) {
|
||||
|
||||
for (var key in response) {
|
||||
var optionValue = response[key];
|
||||
|
||||
|
||||
$("#sched").append($('<option>', { value: optionValue, text: optionValue }));
|
||||
|
||||
}
|
||||
|
||||
populatebuttonsb();
|
||||
|
||||
}
|
||||
|
||||
function reloadschedbyvalue() {
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
$("#sched").empty();
|
||||
const currentgametype = $("#b-type").val();
|
||||
const dataRight = { game: currentgametype };
|
||||
AjaxDo('?user/bet/sched', dataRight, repopulatedatesched, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
function generateAmountButton() {
|
||||
return 'Amount: <input type="number" min=' + minimumbet + ' max=' + total_balance + ' class="form-control amountcontrol">';
|
||||
}
|
||||
function GenerateAddBetButton() {
|
||||
return '<button class="form-control btn-primary" onclick="AddBetNow(this)">Add Bet</button>';
|
||||
}
|
||||
|
||||
function AmounthasEmptyOrZeroValue() {
|
||||
let hasEmptyOrZero = false;
|
||||
|
||||
$('.amountcontrol').each(function () {
|
||||
const inputValue = $(this).val();
|
||||
|
||||
if (inputValue === '' || parseFloat(inputValue) === 0) {
|
||||
hasEmptyOrZero = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
return hasEmptyOrZero;
|
||||
}
|
||||
|
||||
function isTotalBalanceExceeded() {
|
||||
const totalBalance = parseFloat(total_balance);
|
||||
let currentTotal = 0;
|
||||
|
||||
$('.amountcontrol').each(function () {
|
||||
const inputValue = parseFloat($(this).val());
|
||||
if (!isNaN(inputValue)) {
|
||||
currentTotal += inputValue;
|
||||
}
|
||||
});
|
||||
|
||||
return currentTotal > totalBalance;
|
||||
}
|
||||
function EmptyAmountControl() {
|
||||
$('.amountcontrol').val('');
|
||||
}
|
||||
|
||||
|
||||
function GenerateNewBet() {
|
||||
numofbets++;
|
||||
numberofdigits = 0;
|
||||
let html = "<div class='row NumRow'>";
|
||||
|
||||
|
||||
digitselection.forEach(function (rowValues, rowIndex) {
|
||||
html += '<div class="col-3 mx-auto" style="padding-bottom:10px;">';
|
||||
html += ("<select class='form-control num-select'>");
|
||||
numberofdigits++;
|
||||
rowValues.forEach(function (value) {
|
||||
|
||||
html += '<option value=' + value + '>' + value + '</option>';
|
||||
});
|
||||
html += '</select></div>'
|
||||
});
|
||||
html += '</div>';
|
||||
return html + '<br><br>' + generateAmountButton() + '<br><br>' + GenerateAddBetButton() + '<hr class="bet-separator">';
|
||||
|
||||
}
|
||||
|
||||
|
||||
function AddBetNow(button) {
|
||||
|
||||
if (AmounthasEmptyOrZeroValue()) { EmptyAmountWarning(); return false; }
|
||||
if (isTotalBalanceExceeded()) {
|
||||
TotalBalanceExceededWarning();
|
||||
EmptyAmountControl();
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#bubble-sheet-card").append('<br>' + GenerateNewBet() + '');
|
||||
$(window).scrollTop($(document).height());
|
||||
|
||||
$(button).remove();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function populatebuttonsnow(response) {
|
||||
//console.log(response);
|
||||
numofbets = 0;
|
||||
minimumbet = response.price;
|
||||
showconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
$('#bubble-sheet-card').fadeOut(200);
|
||||
$('#bubble-sheet-card').empty();
|
||||
|
||||
|
||||
let newhtmlbuttons;
|
||||
if (response.digit_selection) {
|
||||
digitselection = response.digit_selection;
|
||||
$("#bubble-sheet-card").html(GenerateNewBet());
|
||||
}
|
||||
|
||||
newhtmlbuttons += '<br><br>'
|
||||
|
||||
//$("#bubble-sheet-card").html(newhtmlbuttons);
|
||||
$("#bubble-sheet-card").fadeIn(200);
|
||||
|
||||
var Bbuttons = [];
|
||||
|
||||
gamemaxnumberofdigits = response.number_of_digits;
|
||||
$(".l-button").click(function () {
|
||||
if ($(this).hasClass("btn-primary")) {
|
||||
if (!IsSelectedNumbersMax()) {
|
||||
$(this).removeClass("btn-primary");
|
||||
$(this).addClass("btn-danger");
|
||||
} else {
|
||||
// Handle case when max numbers are selected
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass("btn-danger");
|
||||
$(this).addClass("btn-primary");
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
showSelectedNumbers(gamemaxnumberofdigits);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function populatebuttonsb() {
|
||||
$("#bubble-sheet-card").fadeOut(200);
|
||||
$("#bubble-sheet-card").empty();
|
||||
|
||||
const dataRight = { game: $("#b-type").val() };
|
||||
|
||||
AjaxDo('?user/bet/buttons', dataRight, populatebuttonsnow, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showSelectedNumbers(number_of_digits = -1) {
|
||||
const selectedButtons = document.querySelectorAll('.l-button.btn-danger');
|
||||
let selectedNumbers = '';
|
||||
if (selectedButtons.length === number_of_digits) {
|
||||
showconfirmbutton();
|
||||
}
|
||||
selectedButtons.forEach(button => {
|
||||
selectedNumbers += button.textContent + '-';
|
||||
});
|
||||
|
||||
document.getElementById('selected-numbers').textContent = 'Selected Numbers: ' + selectedNumbers;
|
||||
return selectedNumbers;
|
||||
}
|
||||
|
||||
|
||||
function getselectednumbersold() {
|
||||
|
||||
var buttonValues = "";
|
||||
if ($(".l-button.btn-danger").length === 0) {
|
||||
|
||||
const selectedValues = [];
|
||||
|
||||
$(".numbersinorderselect").each(function () {
|
||||
if ($(this).is("select")) {
|
||||
let currentnumber = $(this).val().toString().padStart(2, "0")
|
||||
selectedValues.push($(this).val());
|
||||
buttonValues += currentnumber + '-';
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
$(".l-button.btn-danger").each(function () {
|
||||
var buttonValue = $(this).val();
|
||||
buttonValues += buttonValue + "-";
|
||||
});
|
||||
}
|
||||
|
||||
return buttonValues;
|
||||
}
|
||||
|
||||
function getselectednumbers() {
|
||||
|
||||
const numSelectValues = $('.num-select').map(function () {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
|
||||
const result = [];
|
||||
let currentIndex = 0;
|
||||
|
||||
while (currentIndex < numSelectValues.length) {
|
||||
const chunkSize = Math.min(numberofdigits, numSelectValues.length - currentIndex);
|
||||
const chunk = numSelectValues.slice(currentIndex, currentIndex + chunkSize);
|
||||
result.push(chunk);
|
||||
currentIndex += chunkSize;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function collectAmountControlValues() {
|
||||
return $('.amountcontrol').map(function () {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function mergeValuesIntoObjects(numSelectValues, amountControlValues) {
|
||||
const result = [];
|
||||
const maxLength = Math.max(numSelectValues.length, amountControlValues.length);
|
||||
|
||||
for (let i = 0; i < maxLength; i++) {
|
||||
const pair = {
|
||||
numSelect: numSelectValues[i] || null,
|
||||
amountControl: amountControlValues[i] || null
|
||||
};
|
||||
|
||||
result.push(pair);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
function getAllSelectedNumbers() {
|
||||
|
||||
const numSelectValues = getselectednumbers(numberofdigits);
|
||||
const amountControlValues = collectAmountControlValues();
|
||||
const mergedObjects = mergeValuesIntoObjects(numSelectValues, amountControlValues, numberofdigits);
|
||||
return mergedObjects;
|
||||
}
|
||||
|
||||
|
||||
function BetFailed(response) {
|
||||
CreateAndShowModal('betting-failed', 'Failed', 'Your bet didn\'t go through. Please Try Again Later!', '');
|
||||
}
|
||||
function BetSuccessful(response) {
|
||||
CreateAndShowModal('betting-success', 'Success', 'Successfully Entered Bet!', '');
|
||||
gotoPage('bet_qr', response);
|
||||
}
|
||||
|
||||
function TotalBalanceExceededWarning() {
|
||||
CreateAndShowModal('balance-not-enough-warning', 'Total Amount Exceeded', 'Not Enough Balance!', '');
|
||||
}
|
||||
function EmptyAmountWarning() {
|
||||
CreateAndShowModal('empty-amount-warning', 'Amount', 'No Amount Entered.<br><br>Please Enter an Amount!', '');
|
||||
}
|
||||
|
||||
function SubmitFailed() {
|
||||
CreateAndShowModal('submit-failed-warning', 'Failed', 'Unable to Place Bet Please Try Again later!', '');
|
||||
}
|
||||
|
||||
function SubmitNow(response) {
|
||||
console.log(response);
|
||||
if (Array.isArray(response) || !response || typeof response !== "string") {
|
||||
BetFailed(response);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (response.length !== 72) {
|
||||
BetFailed(response);
|
||||
return false;
|
||||
}
|
||||
|
||||
BetSuccessful(response);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function trytosubmitB() {
|
||||
if (isTotalBalanceExceeded()) { TotalBalanceExceededWarning(); return false; }
|
||||
if (AmounthasEmptyOrZeroValue()) { EmptyAmountWarning(); return false; }
|
||||
let selectedNumbers = getAllSelectedNumbers();
|
||||
|
||||
const data = { user_target: currenttarget, game: currentgametype(), selected_numbers: selectedNumbers, schedule: $("#sched").val() };
|
||||
AjaxDo('?user/new/bet/transaction', data, SubmitNow, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
if (currenttarget===0){
|
||||
loaduserdatadashboard();
|
||||
}
|
||||
|
||||
AjaxDo('?user/bet/tps', null, repopulatebtype, null, reqtype = 'POST');
|
||||
|
||||
const currentgametype = $("#b-type").val();
|
||||
const dataRight = { game: currentgametype };
|
||||
|
||||
|
||||
$("#b-type").change(reloadschedbyvalue);
|
||||
|
||||
|
||||
|
||||
if (currenttarget !== 0) {
|
||||
|
||||
function PostUserNumber(response) {
|
||||
// CreateAndShowModal('TargetBetUserWarn', 'Betting for a Different User', 'You are betting for ' + response + '.');
|
||||
ModalQuickDismiss('Betting for a Different User', 'You are betting for ' + response + '.');
|
||||
}
|
||||
AjaxDo('?query/user/number/byhash', { user_target: currenttarget }, PostUserNumber, null, reqtype = 'POST');
|
||||
|
||||
function UpdateTotalBalanceforDifferentUser(response){
|
||||
if (!response){return false;}
|
||||
total_balance=response;
|
||||
}
|
||||
|
||||
AjaxDo('?query/user/balance', { user_target: currenttarget }, UpdateTotalBalanceforDifferentUser, null, reqtype = 'POST');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
506
legacy/pages-html/slvl/user/old/place-betnn
Normal file
506
legacy/pages-html/slvl/user/old/place-betnn
Normal file
@@ -0,0 +1,506 @@
|
||||
<div class="card-body card-info" id="main-card-body" style="">
|
||||
<div class="row">
|
||||
<div class="col-md-18">
|
||||
Welcome User
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row card-info">
|
||||
<div class="col-md-18 card bg-gray text-xl border-rounded" style="width:100%;height:20%;">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
Total Balance
|
||||
</div>
|
||||
<div class="col-md-6" id="total-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" id="credited-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-sm" id="phone-number">
|
||||
...
|
||||
</div>
|
||||
<div class="col-md-6" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" id="secondary-card">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style=""></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body "><div class="row card-body">
|
||||
|
||||
<!--
|
||||
<div class="col mx-auto" id="regionbutton"><button class="bg-transparent border-0 btn-block" style="" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class=" img-circle rounded mx-auto d-block" src="assets/lotto649.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Super Lotto 6/49 </h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="agenciesbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body no-border">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/lotto658.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Ultra Lotto 6/58</h3>
|
||||
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="acsbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/megalotto645.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Mega Lotto 6/45</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/lotto642.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Lotto 6/42</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/4dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">4D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/3dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">3D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/6dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">6D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/2dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">2D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="secondary-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style="" ></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Bet type:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<select id="b-type" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Date:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<select id="sched" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card" id="third-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;">
|
||||
<h3 class="card-title" style="" id="selected-numbers"></h3>
|
||||
<div class="card-tools bg-warning" style="display: none;">
|
||||
Maximum Numbers Selected
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="fourth-card-confirm" style="display: none;">
|
||||
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
<button class="form-control border-rounded btn-danger" onclick="trytosubmitB();">Confirm</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="br-space" style="display:none;">
|
||||
<br><br><br><br><br><br><br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var gamesdetails = null;
|
||||
var gamemaxnumberofdigits=null;
|
||||
|
||||
function numberofselectedbuttons(){
|
||||
return $(".l-button.btn-danger").length;
|
||||
}
|
||||
|
||||
function IsSelectedNumbersMax(){
|
||||
if ($(".custom-select.numbersinorderselect").length !== 0){
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!gamemaxnumberofdigits || gamemaxnumberofdigits===-1){
|
||||
return false;
|
||||
}
|
||||
if (numberofselectedbuttons()<gamemaxnumberofdigits){
|
||||
return false;
|
||||
}else{return true;}
|
||||
|
||||
}
|
||||
|
||||
function currentgametype(){
|
||||
return $("#b-type").val();
|
||||
}
|
||||
|
||||
function hideconfirmbutton(){
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
|
||||
function hideselectednumbersTop(){
|
||||
$("#selected-numbers").html("");
|
||||
}
|
||||
|
||||
function showconfirmbutton(){
|
||||
$("#third-card-betting .card-tools").show();$("#fourth-card-confirm").fadeIn(200);
|
||||
$("#br-space").show();
|
||||
}
|
||||
|
||||
|
||||
function repopulatebtype(response){
|
||||
|
||||
$("#b-type").empty();
|
||||
$("#sched").empty();
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
|
||||
let dateoptions='';
|
||||
|
||||
|
||||
for (var key in response) {
|
||||
var optionValue = response[key]['hashkey'];
|
||||
var optionText = response[key]['bet_type'];
|
||||
|
||||
$("#b-type").append($('<option>', { value: optionValue, text: optionText }));
|
||||
|
||||
|
||||
}
|
||||
reloadschedbyvalue();
|
||||
|
||||
}
|
||||
|
||||
|
||||
function generatenumberbuttonbasedonarray(array,classwhenclicked='btn-warning selected'){
|
||||
//array is = to [[0,1,2,3,4,5,6,7,8,9],[0,1,2,3,4,5,6,7,8,9]]
|
||||
|
||||
|
||||
}
|
||||
|
||||
function repopulatedatesched(response){
|
||||
for (var key in response) {
|
||||
var optionValue = response[key];
|
||||
$("#sched").append($('<option>', { value: optionValue, text: optionValue }));
|
||||
}
|
||||
populatebuttonsb();
|
||||
}
|
||||
|
||||
function reloadschedbyvalue(){
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
$("#sched").empty();
|
||||
const currentgametype = $("#b-type").val();
|
||||
const dataRight = { game: currentgametype };
|
||||
AjaxDo('?user/bet/sched',dataRight,repopulatedatesched, null,reqtype='POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function GenerateButtonsForNumberSelectionRANDOM(response_max_digits){
|
||||
let newhtmlbuttons = '<div class="row">';
|
||||
|
||||
function newbuttonhtml(currentnumber){
|
||||
return '<button class="l-button btn btn-primary rounded-circle" value="'+currentnumber+'">'+currentnumber+'</button>';
|
||||
}
|
||||
|
||||
for (let i = 1; i <response_max_digits+1; i++) {
|
||||
let currentnumber= i.toString().padStart(2, "0");
|
||||
newhtmlbuttons += '<div class="col-1 mx-3 my-2">'+newbuttonhtml(currentnumber)+'</div>';
|
||||
}
|
||||
newhtmlbuttons +='</div>';
|
||||
return newhtmlbuttons;
|
||||
}
|
||||
|
||||
function GenerateButtonsForNumberSelectionINORDER(response_max_digits,response_number_of_digits){
|
||||
let newhtmlbuttons = '<div class="row">';
|
||||
|
||||
function newbuttonhtml(currentnumber,maxdigits){
|
||||
let newhtml='<select class="custom-select numbersinorderselect" id="SelectedNumber-'+currentnumber+'">';
|
||||
for (let i = 1; i <maxdigits+1; i++) {
|
||||
let newnumbernumber= i.toString().padStart(2, "0");
|
||||
newhtml+='<option value="'+i+'">'+newnumbernumber+'</option>';
|
||||
}
|
||||
|
||||
return newhtml+='</select>';
|
||||
}
|
||||
|
||||
for (let i = 1; i <response_number_of_digits+1; i++) {
|
||||
let currentnumber= i.toString().padStart(2, "0");
|
||||
newhtmlbuttons += '<div class="col mx-auto"><br>'+currentnumber+' '+newbuttonhtml(currentnumber,response_max_digits)+'</div>';
|
||||
}
|
||||
newhtmlbuttons +='</div>';
|
||||
return newhtmlbuttons;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function populatebuttonsnow(response) {
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
|
||||
let newhtmlbuttons; // Declare the variable outside the if-else block
|
||||
|
||||
if (response.numbers_must_be_in_order) {
|
||||
newhtmlbuttons =GenerateButtonsForNumberSelectionINORDER(response.max_digits,response.number_of_digits);
|
||||
// $("#fourth-card-confirm").show();
|
||||
showconfirmbutton();
|
||||
} else {
|
||||
newhtmlbuttons = GenerateButtonsForNumberSelectionRANDOM(response.max_digits);
|
||||
|
||||
}
|
||||
|
||||
$("#bubble-sheet-card").html(newhtmlbuttons);
|
||||
$("#bubble-sheet-card").fadeIn(200);
|
||||
|
||||
var Bbuttons = [];
|
||||
|
||||
gamemaxnumberofdigits = response.number_of_digits;
|
||||
$(".l-button").click(function () {
|
||||
if ($(this).hasClass("btn-primary")) {
|
||||
if (!IsSelectedNumbersMax()) {
|
||||
$(this).removeClass("btn-primary");
|
||||
$(this).addClass("btn-danger");
|
||||
} else {
|
||||
// Handle case when max numbers are selected
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass("btn-danger");
|
||||
$(this).addClass("btn-primary");
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
showSelectedNumbers(gamemaxnumberofdigits);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function populatebuttonsb() {
|
||||
$("#bubble-sheet-card").fadeOut(200);
|
||||
$("#bubble-sheet-card").empty();
|
||||
|
||||
const dataRight = { game: $("#b-type").val() };
|
||||
|
||||
AjaxDo('?user/bet/buttons', dataRight, populatebuttonsnow, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showSelectedNumbers(number_of_digits=-1) {
|
||||
const selectedButtons = document.querySelectorAll('.l-button.btn-danger');
|
||||
let selectedNumbers = '';
|
||||
if (selectedButtons.length===number_of_digits){
|
||||
showconfirmbutton();
|
||||
}
|
||||
selectedButtons.forEach(button => {
|
||||
selectedNumbers += button.textContent + '-';
|
||||
});
|
||||
|
||||
document.getElementById('selected-numbers').textContent = 'Selected Numbers: ' + selectedNumbers;
|
||||
return selectedNumbers;
|
||||
}
|
||||
|
||||
|
||||
function getselectednumbers(){
|
||||
|
||||
var buttonValues = "";
|
||||
if ($(".l-button.btn-danger").length === 0) {
|
||||
|
||||
const selectedValues = [];
|
||||
|
||||
$(".numbersinorderselect").each(function() {
|
||||
if ($(this).is("select")) {
|
||||
let currentnumber= $(this).val().toString().padStart(2, "0")
|
||||
selectedValues.push($(this).val());
|
||||
buttonValues+=currentnumber+'-';
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
$(".l-button.btn-danger").each(function() {
|
||||
var buttonValue = $(this).val();
|
||||
buttonValues += buttonValue + "-";
|
||||
});
|
||||
}
|
||||
|
||||
return buttonValues;
|
||||
}
|
||||
|
||||
function BetFailed(response){
|
||||
CreateAndShowModal('betting-failed','Failed','Your bet didn\'t go through. Please Try Again Later!','');
|
||||
}
|
||||
function BetSuccessful(response){
|
||||
CreateAndShowModal('betting-success','Success','Successfully Entered Bet!','');
|
||||
gotoPage('bet_qr',response);
|
||||
}
|
||||
|
||||
|
||||
function trytosubmitB(){
|
||||
//let selectedNumbers = showSelectedNumbers();
|
||||
let selectedNumbers = getselectednumbers();
|
||||
if (!IsSelectedNumbersMax()){return false;}
|
||||
|
||||
function SubmitNow(response){
|
||||
if(!response){BetFailed(); return false;}
|
||||
else{
|
||||
BetSuccessful(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const data = { user_target: currenttarget, game: currentgametype(), selected_numbers: selectedNumbers, schedule : $("#sched").val() };
|
||||
AjaxDo('?user/bet/submit',data,SubmitNow, null,reqtype='POST');
|
||||
}
|
||||
|
||||
|
||||
function populatebTypeNow(){
|
||||
AjaxDo('?user/bet/tps',null,repopulatebtype, null,reqtype='POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var currenttarget=0;
|
||||
|
||||
loaduserdatadashboard();
|
||||
populatebTypeNow();
|
||||
|
||||
|
||||
//const currentgametype = $("#b-type").val();
|
||||
//const dataRight = { game: currentgametype };
|
||||
|
||||
|
||||
$("#b-type").change(reloadschedbyvalue);
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (currenttarget!==0){
|
||||
|
||||
function PostUserNumber(response){
|
||||
|
||||
CreateAndShowModal('TargetBetUserWarn','Betting for a Different User','You are betting for '+response+'.');
|
||||
|
||||
}
|
||||
|
||||
AjaxDo('?query/user/number/byhash',{ user_target: currenttarget},PostUserNumber, null,reqtype='POST');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
500
legacy/pages-html/slvl/user/old/place-betold
Normal file
500
legacy/pages-html/slvl/user/old/place-betold
Normal file
@@ -0,0 +1,500 @@
|
||||
<div class="card-body card-info" id="main-card-body" style="">
|
||||
<div class="row">
|
||||
<div class="col-md-18">
|
||||
Welcome User
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row card-info">
|
||||
<div class="col-md-18 card bg-gray text-xl border-rounded" style="width:100%;height:20%;">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
Total Balance
|
||||
</div>
|
||||
<div class="col-md-6" id="total-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" id="credited-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-sm" id="phone-number">
|
||||
...
|
||||
</div>
|
||||
<div class="col-md-6" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" id="secondary-card">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style=""></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body "><div class="row card-body">
|
||||
|
||||
<!--
|
||||
<div class="col mx-auto" id="regionbutton"><button class="bg-transparent border-0 btn-block" style="" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class=" img-circle rounded mx-auto d-block" src="assets/lotto649.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Super Lotto 6/49 </h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="agenciesbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body no-border">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/lotto658.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Ultra Lotto 6/58</h3>
|
||||
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="acsbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/megalotto645.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Mega Lotto 6/45</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/lotto642.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">Lotto 6/42</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/4dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">4D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/3dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">3D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/6dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">6D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
<div class="col mx-auto" id="uposbutton"><button class="bg-transparent border-0 btn-block" onclick="">
|
||||
<div class="card-body box-profile">
|
||||
<div class="text-center">
|
||||
<img class="rounded mx-auto d-block" src="assets/2dlotto.png" width="75px" height="75px" style="overflow:hidden;"></div>
|
||||
<h3 class="profile-username text-center">2D Lotto</h3>
|
||||
<p class="text-muted text-center"></p>
|
||||
|
||||
</div>
|
||||
</button></div>
|
||||
|
||||
-->
|
||||
|
||||
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="secondary-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style="" ></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Bet type:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<select id="b-type" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Date:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<select id="sched" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card" id="third-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;">
|
||||
<h3 class="card-title" style="" id="selected-numbers"></h3>
|
||||
<div class="card-tools bg-warning" style="display: none;">
|
||||
Maximum Numbers Selected
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="fourth-card-confirm" style="display: none;">
|
||||
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
<button class="form-control border-rounded btn-danger" onclick="trytosubmitB();">Confirm</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="br-space" style="display:none;">
|
||||
<br><br><br><br><br><br><br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var gamesdetails = null;
|
||||
var gamemaxnumberofdigits=null;
|
||||
|
||||
function numberofselectedbuttons(){
|
||||
return $(".l-button.btn-danger").length;
|
||||
}
|
||||
|
||||
function IsSelectedNumbersMax(){
|
||||
if ($(".custom-select.numbersinorderselect").length !== 0){
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!gamemaxnumberofdigits || gamemaxnumberofdigits===-1){
|
||||
return false;
|
||||
}
|
||||
if (numberofselectedbuttons()<gamemaxnumberofdigits){
|
||||
return false;
|
||||
}else{return true;}
|
||||
|
||||
}
|
||||
|
||||
function currentgametype(){
|
||||
return $("#b-type").val();
|
||||
}
|
||||
|
||||
function hideconfirmbutton(){
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
|
||||
function hideselectednumbersTop(){
|
||||
$("#selected-numbers").html("");
|
||||
}
|
||||
|
||||
function showconfirmbutton(){
|
||||
$("#third-card-betting .card-tools").show();$("#fourth-card-confirm").fadeIn(200);
|
||||
$("#br-space").show();
|
||||
}
|
||||
|
||||
|
||||
function repopulatebtype(response){
|
||||
console.log();
|
||||
$("#b-type").empty();
|
||||
$("#sched").empty();
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
|
||||
let dateoptions='';
|
||||
|
||||
|
||||
for (var key in response) {
|
||||
var optionValue = response[key]['hashkey'];
|
||||
var optionText = response[key]['bet_type'];
|
||||
|
||||
$("#b-type").append($('<option>', { value: optionValue, text: optionText }));
|
||||
|
||||
|
||||
}
|
||||
reloadschedbyvalue();
|
||||
|
||||
}
|
||||
|
||||
function repopulatedatesched(response){
|
||||
|
||||
for (var key in response) {
|
||||
var optionValue = response[key];
|
||||
|
||||
|
||||
$("#sched").append($('<option>', { value: optionValue, text: optionValue }));
|
||||
|
||||
}
|
||||
|
||||
populatebuttonsb();
|
||||
|
||||
}
|
||||
|
||||
function reloadschedbyvalue(){
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
$("#sched").empty();
|
||||
const currentgametype = $("#b-type").val();
|
||||
const dataRight = { game: currentgametype };
|
||||
AjaxDo('?user/bet/sched',dataRight,repopulatedatesched, null,reqtype='POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function GenerateButtonsForNumberSelectionRANDOM(response_max_digits){
|
||||
let newhtmlbuttons = '<div class="row">';
|
||||
|
||||
function newbuttonhtml(currentnumber){
|
||||
return '<button class="l-button btn btn-primary rounded-circle" value="'+currentnumber+'">'+currentnumber+'</button>';
|
||||
}
|
||||
|
||||
for (let i = 1; i <response_max_digits+1; i++) {
|
||||
let currentnumber= i.toString().padStart(2, "0");
|
||||
newhtmlbuttons += '<div class="col-1 mx-3 my-2">'+newbuttonhtml(currentnumber)+'</div>';
|
||||
}
|
||||
newhtmlbuttons +='</div>';
|
||||
return newhtmlbuttons;
|
||||
}
|
||||
|
||||
function GenerateButtonsForNumberSelectionINORDER(response_max_digits,response_number_of_digits){
|
||||
let newhtmlbuttons = '<div class="row">';
|
||||
|
||||
function newbuttonhtml(currentnumber,maxdigits){
|
||||
let newhtml='<select class="custom-select numbersinorderselect" id="SelectedNumber-'+currentnumber+'">';
|
||||
for (let i = 1; i <maxdigits+1; i++) {
|
||||
let newnumbernumber= i.toString().padStart(2, "0");
|
||||
newhtml+='<option value="'+i+'">'+newnumbernumber+'</option>';
|
||||
}
|
||||
|
||||
return newhtml+='</select>';
|
||||
}
|
||||
|
||||
for (let i = 1; i <response_number_of_digits+1; i++) {
|
||||
let currentnumber= i.toString().padStart(2, "0");
|
||||
newhtmlbuttons += '<div class="col mx-auto"><br>'+currentnumber+' '+newbuttonhtml(currentnumber,response_max_digits)+'</div>';
|
||||
}
|
||||
newhtmlbuttons +='</div>';
|
||||
return newhtmlbuttons;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function populatebuttonsnow(response) {
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
|
||||
let newhtmlbuttons; // Declare the variable outside the if-else block
|
||||
|
||||
if (response.numbers_must_be_in_order) {
|
||||
newhtmlbuttons =GenerateButtonsForNumberSelectionINORDER(response.max_digits,response.number_of_digits);
|
||||
// $("#fourth-card-confirm").show();
|
||||
showconfirmbutton();
|
||||
} else {
|
||||
newhtmlbuttons = GenerateButtonsForNumberSelectionRANDOM(response.max_digits);
|
||||
|
||||
}
|
||||
|
||||
$("#bubble-sheet-card").html(newhtmlbuttons);
|
||||
$("#bubble-sheet-card").fadeIn(200);
|
||||
|
||||
var Bbuttons = [];
|
||||
|
||||
gamemaxnumberofdigits = response.number_of_digits;
|
||||
$(".l-button").click(function () {
|
||||
if ($(this).hasClass("btn-primary")) {
|
||||
if (!IsSelectedNumbersMax()) {
|
||||
$(this).removeClass("btn-primary");
|
||||
$(this).addClass("btn-danger");
|
||||
} else {
|
||||
// Handle case when max numbers are selected
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass("btn-danger");
|
||||
$(this).addClass("btn-primary");
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
showSelectedNumbers(gamemaxnumberofdigits);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function populatebuttonsb() {
|
||||
$("#bubble-sheet-card").fadeOut(200);
|
||||
$("#bubble-sheet-card").empty();
|
||||
|
||||
const dataRight = { game: $("#b-type").val() };
|
||||
|
||||
AjaxDo('?user/bet/buttons', dataRight, populatebuttonsnow, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showSelectedNumbers(number_of_digits=-1) {
|
||||
const selectedButtons = document.querySelectorAll('.l-button.btn-danger');
|
||||
let selectedNumbers = '';
|
||||
if (selectedButtons.length===number_of_digits){
|
||||
showconfirmbutton();
|
||||
}
|
||||
selectedButtons.forEach(button => {
|
||||
selectedNumbers += button.textContent + '-';
|
||||
});
|
||||
|
||||
document.getElementById('selected-numbers').textContent = 'Selected Numbers: ' + selectedNumbers;
|
||||
return selectedNumbers;
|
||||
}
|
||||
|
||||
|
||||
function getselectednumbers(){
|
||||
|
||||
var buttonValues = "";
|
||||
if ($(".l-button.btn-danger").length === 0) {
|
||||
|
||||
const selectedValues = [];
|
||||
|
||||
$(".numbersinorderselect").each(function() {
|
||||
if ($(this).is("select")) {
|
||||
let currentnumber= $(this).val().toString().padStart(2, "0")
|
||||
selectedValues.push($(this).val());
|
||||
buttonValues+=currentnumber+'-';
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
$(".l-button.btn-danger").each(function() {
|
||||
var buttonValue = $(this).val();
|
||||
buttonValues += buttonValue + "-";
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
return buttonValues;
|
||||
}
|
||||
|
||||
function BetFailed(response){
|
||||
CreateAndShowModal('betting-failed','Failed','Your bet didn\'t go through. Please Try Again Later!','');
|
||||
}
|
||||
function BetSuccessful(response){
|
||||
CreateAndShowModal('betting-success','Success','Successfully Entered Bet!','');
|
||||
gotoPage('bet_qr',response);
|
||||
}
|
||||
|
||||
|
||||
function trytosubmitB(){
|
||||
//let selectedNumbers = showSelectedNumbers();
|
||||
let selectedNumbers = getselectednumbers();
|
||||
if (!IsSelectedNumbersMax()){return false;}
|
||||
|
||||
function SubmitNow(response){
|
||||
if(!response){BetFailed(); return false;}
|
||||
else{
|
||||
BetSuccessful(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const data = { user_target: currenttarget, game: currentgametype(), selected_numbers: selectedNumbers, schedule : $("#sched").val() };
|
||||
AjaxDo('?user/bet/submit',data,SubmitNow, null,reqtype='POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var currenttarget=0;
|
||||
|
||||
loaduserdatadashboard();
|
||||
AjaxDo('?user/bet/tps',null,repopulatebtype, null,reqtype='POST');
|
||||
|
||||
const currentgametype = $("#b-type").val();
|
||||
const dataRight = { game: currentgametype };
|
||||
|
||||
|
||||
$("#b-type").change(reloadschedbyvalue);
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (currenttarget!==0){
|
||||
|
||||
function PostUserNumber(response){
|
||||
|
||||
CreateAndShowModal('TargetBetUserWarn','Betting for a Different User','You are betting for '+response+'.');
|
||||
|
||||
}
|
||||
|
||||
AjaxDo('?query/user/number/byhash',{ user_target: currenttarget},PostUserNumber, null,reqtype='POST');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
620
legacy/pages-html/slvl/user/place-bet
Normal file
620
legacy/pages-html/slvl/user/place-bet
Normal file
@@ -0,0 +1,620 @@
|
||||
<br><br>
|
||||
<div class="card-body card-info" id="main-card-body" style="">
|
||||
<div class="row">
|
||||
<div class="col-md-18">
|
||||
Welcome
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row card-info">
|
||||
<div class="col-md-18 card bg-gray text-xl border-rounded" style="width:100%;height:20%;">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
Total Balance
|
||||
</div>
|
||||
<div class="col-md-6" id="total-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" id="credited-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-sm" id="phone-number">
|
||||
...
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" id="secondary-card">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style=""></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<div class="row card-body">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="secondary-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;display: none;">
|
||||
<h3 class="card-title" style=""></h3>
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Bet type:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<select id="b-type" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row card-body">
|
||||
<div class="col mx-auto" id="">
|
||||
Date:
|
||||
</div>
|
||||
<div class="col mx-auto" id="">
|
||||
<div class="row schedrow">
|
||||
<div class="col-6">
|
||||
<input type="date" class="form-control" id="scheddate" name="scheddate">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select id="schedtime" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card" id="third-card-betting">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;">
|
||||
<h3 class="card-title" style="" id="selected-numbers"></h3>
|
||||
<div class="card-tools bg-warning" style="display: none;">
|
||||
Maximum Numbers Selected
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" id="fourth-card-confirm" style="display: none;">
|
||||
|
||||
<div class="card-body text-center" id="bubble-sheet-card">
|
||||
<button class="form-control border-rounded btn-danger" onclick="trytosubmitB();">Confirm</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="br-space" style="display:none;">
|
||||
<br><br><br><br><br><br><br>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
var gamesdetails = null;
|
||||
var gamemaxnumberofdigits = null;
|
||||
var digitselection = null;
|
||||
var numberofdigits = 0;
|
||||
var numofbets = 0;
|
||||
var minimumbet = null;
|
||||
|
||||
|
||||
function numberofselectedbuttons() {
|
||||
return $(".l-button.btn-danger").length;
|
||||
}
|
||||
|
||||
function IsSelectedNumbersMax() {
|
||||
if ($(".custom-select.numbersinorderselect").length !== 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!gamemaxnumberofdigits || gamemaxnumberofdigits === -1) {
|
||||
return false;
|
||||
}
|
||||
if (numberofselectedbuttons() < gamemaxnumberofdigits) {
|
||||
return false;
|
||||
} else { return true; }
|
||||
|
||||
}
|
||||
|
||||
function currentgametype() {
|
||||
return $("#b-type").val();
|
||||
}
|
||||
|
||||
function hideconfirmbutton() {
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
|
||||
function hideselectednumbersTop() {
|
||||
$("#selected-numbers").html("");
|
||||
}
|
||||
|
||||
function showconfirmbutton() {
|
||||
$("#third-card-betting .card-tools").show(); $("#fourth-card-confirm").fadeIn(200);
|
||||
$("#br-space").show();
|
||||
}
|
||||
|
||||
|
||||
function repopulatebtype(response) {
|
||||
//$("#b-type").empty();
|
||||
$("#sched").empty();
|
||||
hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
|
||||
let dateoptions = '';
|
||||
|
||||
|
||||
//for (var key in bet_types) {
|
||||
// var optionValue = key;
|
||||
//var optionText = bet_types[key];
|
||||
//$("#b-type").append($('<option>', { value: optionValue, text: optionText }));
|
||||
$("#b-type").html(bet_types_options);
|
||||
//}
|
||||
reloadschedbyvalue();
|
||||
|
||||
}
|
||||
|
||||
function repopulatedatesched(response) {
|
||||
|
||||
// UpdateSchedData();
|
||||
|
||||
|
||||
|
||||
populatebuttonsb();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
document.getElementById('scheddate').addEventListener('change', function () {
|
||||
updateSchedtimes();
|
||||
});
|
||||
|
||||
|
||||
|
||||
function reloadschedbyvalue(btypeid = 'b-type') {
|
||||
|
||||
//hideconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
resetDatePicker();
|
||||
|
||||
//const currentgametype = $('#'+btypeid).val();
|
||||
//const dataRight = { game: currentgametype };
|
||||
// repopulatedatesched();
|
||||
AjaxDo('?user/bet/sched', dataRight=null, repopulatedatesched, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
function generateAmountButton() {
|
||||
return 'Amount: <input type="number" min=' + minimumbet + ' max=' + total_balance + ' class="form-control amountcontrol">';
|
||||
}
|
||||
function GenerateAddBetButton() {
|
||||
return '<button style="" class="form-control btn-primary" onclick="AddBetNow(this)">Add Bet</button>';
|
||||
}
|
||||
|
||||
function AmounthasEmptyOrZeroValue() {
|
||||
let hasEmptyOrZero = false;
|
||||
|
||||
$('.amountcontrol').each(function () {
|
||||
const inputValue = $(this).val();
|
||||
|
||||
if (inputValue === '' || parseFloat(inputValue) < 10) {
|
||||
hasEmptyOrZero = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
return hasEmptyOrZero;
|
||||
}
|
||||
|
||||
function isTotalBalanceExceeded() {
|
||||
const totalBalance = parseFloat(total_balance);
|
||||
let currentTotal = 0;
|
||||
|
||||
$('.amountcontrol').each(function () {
|
||||
const inputValue = parseFloat($(this).val());
|
||||
if (!isNaN(inputValue)) {
|
||||
currentTotal += inputValue;
|
||||
}
|
||||
});
|
||||
|
||||
return currentTotal > totalBalance;
|
||||
}
|
||||
function EmptyAmountControl() {
|
||||
$('.amountcontrol').val('');
|
||||
}
|
||||
|
||||
|
||||
function GenerateNewBet() {
|
||||
numofbets++;
|
||||
numberofdigits = 0;
|
||||
let html = "<div class='row NumRow'>";
|
||||
|
||||
|
||||
digitselection.forEach(function (rowValues, rowIndex) {
|
||||
html += '<div class="col-3 mx-auto" style="padding-bottom:10px;">';
|
||||
html += ("<select class='form-control num-select'>");
|
||||
numberofdigits++;
|
||||
rowValues.forEach(function (value) {
|
||||
|
||||
html += '<option value=' + value + '>' + value + '</option>';
|
||||
});
|
||||
html += '</select></div>'
|
||||
});
|
||||
html += '</div>';
|
||||
return html + '<br><br>' + generateAmountButton() + '<br><br>' + GenerateAddBetButton() + '<hr class="bet-separator">';
|
||||
|
||||
}
|
||||
|
||||
|
||||
function AddBetNow(button) {
|
||||
if (DuplicateBetNumbers()) { return false; }
|
||||
if (AmounthasEmptyOrZeroValue()) { EmptyAmountWarning(); return false; }
|
||||
if (isTotalBalanceExceeded()) {
|
||||
TotalBalanceExceededWarning();
|
||||
EmptyAmountControl();
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#bubble-sheet-card").append('<br>' + GenerateNewBet() + '');
|
||||
$(window).scrollTop($(document).height());
|
||||
|
||||
$(button).remove();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function populatebuttonsnow(response) {
|
||||
//console.log(response);
|
||||
numofbets = 0;
|
||||
minimumbet = response.price;
|
||||
showconfirmbutton();
|
||||
hideselectednumbersTop();
|
||||
$('#bubble-sheet-card').fadeOut(200);
|
||||
$('#bubble-sheet-card').empty();
|
||||
|
||||
|
||||
let newhtmlbuttons;
|
||||
if (response.digit_selection) {
|
||||
digitselection = response.digit_selection;
|
||||
$("#bubble-sheet-card").html(GenerateNewBet());
|
||||
}
|
||||
|
||||
newhtmlbuttons += '<br><br>'
|
||||
|
||||
//$("#bubble-sheet-card").html(newhtmlbuttons);
|
||||
$("#bubble-sheet-card").fadeIn(200);
|
||||
|
||||
var Bbuttons = [];
|
||||
|
||||
gamemaxnumberofdigits = response.number_of_digits;
|
||||
$(".l-button").click(function () {
|
||||
if ($(this).hasClass("btn-primary")) {
|
||||
if (!IsSelectedNumbersMax()) {
|
||||
$(this).removeClass("btn-primary");
|
||||
$(this).addClass("btn-danger");
|
||||
} else {
|
||||
// Handle case when max numbers are selected
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass("btn-danger");
|
||||
$(this).addClass("btn-primary");
|
||||
$("#third-card-betting .card-tools").hide();
|
||||
$("#fourth-card-confirm").hide();
|
||||
}
|
||||
showSelectedNumbers(gamemaxnumberofdigits);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function populatebuttonsb() {
|
||||
$("#bubble-sheet-card").fadeOut(200);
|
||||
$("#bubble-sheet-card").empty();
|
||||
|
||||
const dataRight = { game: $("#b-type").val() };
|
||||
|
||||
AjaxDo('?user/bet/buttons', dataRight, populatebuttonsnow, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showSelectedNumbers(number_of_digits = -1) {
|
||||
const selectedButtons = document.querySelectorAll('.l-button.btn-danger');
|
||||
let selectedNumbers = '';
|
||||
if (selectedButtons.length === number_of_digits) {
|
||||
showconfirmbutton();
|
||||
}
|
||||
selectedButtons.forEach(button => {
|
||||
selectedNumbers += button.textContent + '-';
|
||||
});
|
||||
|
||||
document.getElementById('selected-numbers').textContent = 'Selected Numbers: ' + selectedNumbers;
|
||||
return selectedNumbers;
|
||||
}
|
||||
|
||||
|
||||
function getselectednumbersold() {
|
||||
|
||||
var buttonValues = "";
|
||||
if ($(".l-button.btn-danger").length === 0) {
|
||||
|
||||
const selectedValues = [];
|
||||
|
||||
$(".numbersinorderselect").each(function () {
|
||||
if ($(this).is("select")) {
|
||||
let currentnumber = $(this).val().toString().padStart(2, "0")
|
||||
selectedValues.push($(this).val());
|
||||
buttonValues += currentnumber + '-';
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
$(".l-button.btn-danger").each(function () {
|
||||
var buttonValue = $(this).val();
|
||||
buttonValues += buttonValue + "-";
|
||||
});
|
||||
}
|
||||
|
||||
return buttonValues;
|
||||
}
|
||||
|
||||
function getselectednumbers() {
|
||||
|
||||
const numSelectValues = $('.num-select').map(function () {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
|
||||
const result = [];
|
||||
let currentIndex = 0;
|
||||
|
||||
while (currentIndex < numSelectValues.length) {
|
||||
const chunkSize = Math.min(numberofdigits, numSelectValues.length - currentIndex);
|
||||
const chunk = numSelectValues.slice(currentIndex, currentIndex + chunkSize);
|
||||
result.push(chunk);
|
||||
currentIndex += chunkSize;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function collectAmountControlValues() {
|
||||
return $('.amountcontrol').map(function () {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function mergeValuesIntoObjects(numSelectValues, amountControlValues) {
|
||||
const result = [];
|
||||
const maxLength = Math.max(numSelectValues.length, amountControlValues.length);
|
||||
|
||||
for (let i = 0; i < maxLength; i++) {
|
||||
const pair = {
|
||||
numSelect: numSelectValues[i] || null,
|
||||
amountControl: amountControlValues[i] || null
|
||||
};
|
||||
|
||||
result.push(pair);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
function getAllSelectedNumbers() {
|
||||
|
||||
const numSelectValues = getselectednumbers(numberofdigits);
|
||||
const amountControlValues = collectAmountControlValues();
|
||||
const mergedObjects = mergeValuesIntoObjects(numSelectValues, amountControlValues, numberofdigits);
|
||||
return mergedObjects;
|
||||
}
|
||||
|
||||
|
||||
function BetFailed(response) {
|
||||
console.log(response);
|
||||
CreateAndShowModal('betting-failed', 'Failed', 'Your bet didn\'t go through.!<br><br><br>' + response, '');
|
||||
}
|
||||
function BetSuccessful(response) {
|
||||
CreateAndShowModal('betting-success', 'Success', 'Successfully Entered Bet!', '');
|
||||
gotoPage('bet_qr', response);
|
||||
}
|
||||
|
||||
function TotalBalanceExceededWarning() {
|
||||
CreateAndShowModal('balance-not-enough-warning', 'Total Amount Exceeded', 'Not Enough Balance!', '');
|
||||
}
|
||||
function EmptyAmountWarning() {
|
||||
CreateAndShowModal('empty-amount-warning', 'Amount', 'Invalid Amount Entered.<br><br>Please Enter Valid Amount!', '');
|
||||
}
|
||||
|
||||
function CheckTimeWarning() {
|
||||
CreateAndShowModal('wrong-time-warning', 'Time', 'Wrong Time Entered.<br><br>Please Pick a proper time!<br><br> If no Time is available pick another date.', '');
|
||||
}
|
||||
|
||||
function SubmitFailed() {
|
||||
CreateAndShowModal('submit-failed-warning', 'Failed', 'Unable to Place Bet Please Try Again later!', '');
|
||||
}
|
||||
|
||||
function SubmitNow(response) {
|
||||
//console.log(response);
|
||||
/*
|
||||
if (Array.isArray(response) || !response || typeof response !== "string") {
|
||||
BetFailed(response);
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
if (response.length !== 72) {
|
||||
|
||||
BetFailed(response);
|
||||
return false;
|
||||
}
|
||||
|
||||
BetSuccessful(response);
|
||||
|
||||
}
|
||||
|
||||
function DuplicateBetNumbers() {
|
||||
let selectedNumbers = getselectednumbers();
|
||||
let Duplicates = findDuplicatesInMultidimensionalArray(selectedNumbers);
|
||||
if (Duplicates) {
|
||||
ModalQuickDismiss('Duplicate', 'Duplicate Bet Numbers: ' + implodeArrayWithHyphen(Duplicates[0]), modalid = 'modal-bet-duplicate-bets-warning');
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function trytosubmitB() {
|
||||
if (DuplicateBetNumbers()) { return false; }
|
||||
if (isTotalBalanceExceeded()) { TotalBalanceExceededWarning(); return false; }
|
||||
if (AmounthasEmptyOrZeroValue()) { EmptyAmountWarning(); return false; }
|
||||
|
||||
let selectedNumbers = getAllSelectedNumbers();
|
||||
if (!$('#schedtime').val()) { CheckTimeWarning(); return false; }
|
||||
|
||||
const data = { user_target: currenttarget, game: currentgametype(), selected_numbers: selectedNumbers, schedule: $("#scheddate").val() + ' ' + $("#schedtime").val() };
|
||||
AjaxDo('?user/new/bet/transaction', data, SubmitNow, null, reqtype = 'POST');
|
||||
}
|
||||
|
||||
|
||||
function selectNextDate() {
|
||||
const datePicker = document.getElementById('scheddate');
|
||||
const currentDate = new Date(datePicker.value);
|
||||
currentDate.setDate(currentDate.getDate() + 1);
|
||||
const nextDate = currentDate.toISOString().split('T')[0];
|
||||
datePicker.value = nextDate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
schedtimeElementTarget = document.getElementById('schedtime');
|
||||
|
||||
observer = new MutationObserver((mutations) => {
|
||||
mutations.forEach(() => {
|
||||
const schedtimeValue = schedtimeElementTarget.value;
|
||||
const bTypeValue = document.getElementById('b-type').value;
|
||||
const schedDateValue = document.getElementById('scheddate').value;
|
||||
|
||||
if (schedtimeValue === '') {
|
||||
if (bTypeValue && schedDateValue) {
|
||||
UpdateSchedDateifSchedTimeisEmpty();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Start observing the select element for attribute and child list changes
|
||||
observer.observe(schedtimeElementTarget, {
|
||||
attributes: true, // Observe attribute changes (e.g., value change)
|
||||
childList: true, // Observe addition/removal of child elements
|
||||
subtree: true // Observe changes in descendants
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
if (currenttarget === 0 || currenttarget ==='' || currenttarget==='0') {
|
||||
loaduserdatadashboard();
|
||||
|
||||
}
|
||||
|
||||
AjaxDo('?user/bet/tps', null, repopulatebtype, null, reqtype = 'POST');
|
||||
|
||||
const currentgametype = $("#b-type").val();
|
||||
// const dataRight = { game: currentgametype };
|
||||
|
||||
|
||||
$("#b-type").change(reloadschedbyvalue);
|
||||
|
||||
|
||||
|
||||
if (currenttarget !=='0' && currenttarget !=0 && currenttarget !='') {
|
||||
|
||||
function PostUserNumber(response) {
|
||||
|
||||
CreateAndShowModal('TargetBetUserWarn', 'Betting for a Different User', 'You are betting for ' + response + '.');
|
||||
}
|
||||
|
||||
|
||||
AjaxDo('?query/user/number/byhash', { user_target: currenttarget }, PostUserNumber, null, reqtype = 'POST');
|
||||
|
||||
function UpdateTotalBalanceforDifferentUser(response) {
|
||||
if (!response) { return false; }
|
||||
total_balance = response;
|
||||
}
|
||||
|
||||
AjaxDo('?query/user/balance', { user_target: currenttarget }, UpdateTotalBalanceforDifferentUser, null, reqtype = 'POST');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
312
legacy/pages-html/slvl/user/request-credit
Normal file
312
legacy/pages-html/slvl/user/request-credit
Normal file
@@ -0,0 +1,312 @@
|
||||
<br><br>
|
||||
<div class="card-body card-info" id="main-card-body" style="">
|
||||
<div class="row">
|
||||
<div class="col-md-18">
|
||||
Welcome
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="row card-info">
|
||||
<div class="col-md-18 card bg-gray text-xl border-rounded" style="width:100%;height:20%;">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
Total Balance
|
||||
</div>
|
||||
<div class="col-md-6" id="total-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" id="credited-balance">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-sm" id="phone-number">
|
||||
...
|
||||
</div>
|
||||
<div class="col-md-6" >
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" id="secondary-card">
|
||||
<div class="card-header ui-sortable-handle" style="cursor: move;">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4 class="card-title">Assigned Parent:</h4>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h4 class="card-title" id="assigned-coordinator">...</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body " id="credit-amount-request-form">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<input class="form-control" type="number" id="request-credit-amount-field" placeholder="Amount to Request" >
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<button value="Request" id ="request-credit-initial-button" class=" form-control btn btn-primary">Request</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
function CreateAndShowModalCreditConfirmation(){
|
||||
|
||||
const modalid="modal-credit-request-confirmation";
|
||||
const modaltitle="Continue?";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const modalbody=`
|
||||
<p>You are requesting credit from your assigned coordinator. Would you like to continue?</p>
|
||||
|
||||
<p>Amount</p><p id="amount-to-request-text-modal"></p>
|
||||
`;
|
||||
const modalfooter=`<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="request-credit-now">Continue</button>`;
|
||||
|
||||
|
||||
CreateAndShowModal(modalid,modaltitle,modalbody,modalfooter,modalfooterclose=false,topclosebutton=true,modalbodyclass='modal-body',modalheaderclass='modal-header');
|
||||
|
||||
$("#amount-to-request-text-modal").html($("#request-credit-amount-field").val().trim());
|
||||
|
||||
|
||||
|
||||
|
||||
$("#request-credit-now").on("click", function() {
|
||||
|
||||
function SendCreditRequest(response){
|
||||
ErrorCreditRequestResponse(response);
|
||||
SuccessCreditRequestPendingResponse(response);
|
||||
CurrentPendingCreditRequestResponse(response);
|
||||
|
||||
}
|
||||
|
||||
AjaxDo('?sendcreditrequestfromuser', {amount: $("#request-credit-amount-field").val().trim(), user_target: currenttarget}, SendCreditRequest, null, reqtype = 'POST');
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function CreateAndShowModalCreditError(){
|
||||
|
||||
const modalid="modal-credit-request-failed";
|
||||
const modaltitle="Error";
|
||||
const modalbody=`
|
||||
<p>Failed to send credit request. Please try again later!</p>
|
||||
`;
|
||||
const modalfooter=``;
|
||||
|
||||
const modalheaderclass='modal-header bg-danger';
|
||||
|
||||
|
||||
CreateAndShowModal(modalid,modaltitle,modalbody,modalfooter,modalfooterclose=true,topclosebutton=true,modalbodyclass='modal-body',modalheaderclass);
|
||||
|
||||
}
|
||||
|
||||
function CreateAndShowModalCreditPending(){
|
||||
|
||||
const modalid="modal-credit-request-pending";
|
||||
const modaltitle="Pending";
|
||||
const modalbody=`
|
||||
<p>Your Request hava been submitted. Please wait for approval! Thank you.</p>
|
||||
`;
|
||||
const modalfooter=``;
|
||||
|
||||
const modalheaderclass='modal-header bg-primary';
|
||||
|
||||
CreateAndShowModal(modalid,modaltitle,modalbody,modalfooter,modalfooterclose=true,topclosebutton=true,modalbodyclass='modal-body',modalheaderclass);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function CreateAndShowModalCreditBlockedbecauseofPending(){
|
||||
|
||||
const modalid="modal-credit-request-pending-waiting";
|
||||
const modaltitle="Current Pending Request";
|
||||
const modalbody=`
|
||||
<p>Your Request was NOT submitted. You have a pending credit request. </p><p>Please wait for approval! Thank you.</p>
|
||||
`;
|
||||
const modalfooter=``;
|
||||
|
||||
const modalheaderclass='modal-header bg-warning';
|
||||
|
||||
CreateAndShowModal(modalid,modaltitle,modalbody,modalfooter,modalfooterclose=true,topclosebutton=true,modalbodyclass='modal-body',modalheaderclass);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loaduserdatadashboard(){
|
||||
|
||||
$.get("?userdatadashboard", function(data, status){
|
||||
$( "#total-balance" ).html(data.total_balance);
|
||||
$( "#pending-credit" ).html(data.total_credit);
|
||||
$( "#phone-number" ).html(data.number);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadcoordinatornumber(){
|
||||
$( "#assigned-coordinator" ).load( "?coordinatornumber" );
|
||||
}
|
||||
|
||||
function ErrorCreditRequestResponse(response=false){
|
||||
|
||||
if (response === '1' ){return true;}else if (response === '0' ){
|
||||
$("#modal-credit-request-confirmation").modal("hide");
|
||||
$("#modal-credit-request-pending").modal("hide");
|
||||
CreateAndShowModalCreditError();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function CheckPendingRequestForUI(){
|
||||
|
||||
function showpendingrequesthtml(amount){
|
||||
|
||||
if (amount){
|
||||
const conhtml= `<div class="row">
|
||||
<div class="col-6">
|
||||
<h3>Current Pending Request</h3>
|
||||
</div>
|
||||
<div class="col-6"><h2>P
|
||||
`+amount+`</h2>
|
||||
</div></div>`;
|
||||
|
||||
$("#credit-amount-request-form").html(conhtml);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (currenttarget===0){
|
||||
/*
|
||||
$.get("?user/creditrequest/check/pending", function(data, status){
|
||||
showpendingrequesthtml(data.amount);
|
||||
|
||||
});
|
||||
*/
|
||||
|
||||
AjaxDo('?user/creditrequest/check/pending', { user_target: currenttarget}, showpendingrequesthtml, null, reqtype = 'POST');
|
||||
|
||||
}
|
||||
else{
|
||||
AjaxDo('?user/creditrequest/check/pending', { user_target: currenttarget}, showpendingrequesthtml, null, reqtype = 'POST');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SuccessCreditRequestPendingResponse(response=true){
|
||||
|
||||
if (response === '0'){return true;}else if (response ==='1'){
|
||||
$("#modal-credit-request-confirmation").modal("hide");
|
||||
$("#modal-credit-request-failed").modal("hide");
|
||||
CreateAndShowModalCreditPending();
|
||||
CheckPendingRequestForUI();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function CurrentPendingCreditRequestResponse(response){
|
||||
if (response=== null || response ==='1' || response === '0'){
|
||||
return;
|
||||
}
|
||||
$("#modal-credit-request-confirmation").modal("hide");
|
||||
$("#modal-credit-request-failed").modal("hide");
|
||||
$("#modal-credit-request-pending").modal("hide");
|
||||
CreateAndShowModalCreditBlockedbecauseofPending();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
var currenttarget=0;
|
||||
|
||||
loaduserdatadashboard();
|
||||
loadcoordinatornumber();
|
||||
CheckPendingRequestForUI();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$("#request-credit-initial-button").on("click", function() {
|
||||
let inputValue = $("#request-credit-amount-field").val().trim();
|
||||
if (inputValue && inputValue.length > 0 && !isNaN(inputValue) && parseFloat(inputValue) > 0) {
|
||||
CreateAndShowModalCreditConfirmation(); }
|
||||
else { $("#modal-credit-request-confirmation").modal("hide"); }
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
80
legacy/pages-html/slvl/user/teamleader
Normal file
80
legacy/pages-html/slvl/user/teamleader
Normal file
@@ -0,0 +1,80 @@
|
||||
<br>
|
||||
<h2 class="fw_6 text-center">Cornerstone Focus Property Alliance</h2><br>
|
||||
<div class="card-section" id="main-card-section">
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="bill-content">
|
||||
<div class="tf-container" id="recents_home">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
statsarray = [["Today", 0, "Leads", "left", "leads-today-no"],
|
||||
["Actionable", 0, "Leads", "left", "actionable-leads-no"],
|
||||
["Sold", 0, "Today", "right", "sold-today-no"],
|
||||
["Sold", 0, "This Month", "right", "sold-monthly-no"]
|
||||
//,["Sold", 0, "Total", "right", "sold-all-no"]
|
||||
];
|
||||
|
||||
balancewrapper_item_array = [["New Lead", "NewLeads", "", "/assets/NewLeads.png", "", "", "", ""], ["List Leads", "ListLeads", "0", "/assets/ListLeads.png", "", "", "", ""]];
|
||||
balancebox = UIcreateBalanceBoxfromArray(statsarray, balancewrapper_item_array);
|
||||
|
||||
servicesbuttonarray = [['/assets/ListLeads.png', 'Leads', 'ListLeads', ''],
|
||||
['/assets/house.png', 'Properties', 'ListProperties', ''],
|
||||
['/assets/NewProperty.png', 'New Property', 'NewProperty']];
|
||||
|
||||
|
||||
servicesbox = UIServices_FullDIV_GOTOPAGE_Array('', '', '', '', servicesbuttonarray);
|
||||
|
||||
|
||||
dualcolumn_button_array = [['Leads', 'ListLeads', '', '/assets/ListLeads.png'],
|
||||
['Properties', 'ListProperties', '', '/assets/house.png']
|
||||
];
|
||||
dualcolumnhtml = UISideText_DualColumnButton_Array(dualcolumn_button_array);
|
||||
dualcolumnhtml='';
|
||||
|
||||
recents_list_array = [['Loading', 'Please Wait...', '', 'xxxwait', 'unknown', '', '/assets/sync.png']];
|
||||
arrowlist_button_array = '';
|
||||
searchbox_html = UISearchBox_with_BUTTONS_FULL('Recent', recents_list_array, arrowlist_button_array, 'RecentsPage', '', 'View All', 'HomeRecentList', 'home_recent_search', 'Search');
|
||||
|
||||
$('#main-card-section').append(balancebox);
|
||||
$('#main-body').append(servicesbox + dualcolumnhtml + '<br><br>' + searchbox_html);
|
||||
function UIHome_Leads_Today_Change(num) {
|
||||
if (num === false || num === undefined || num === null) {
|
||||
return false;
|
||||
}
|
||||
$('#leads-today-no').html(num);
|
||||
}
|
||||
|
||||
function loadrecents_home() {
|
||||
|
||||
}
|
||||
function HomeULT_reinitilize_loaders() {
|
||||
Preloaders.Account_Settings_Details();
|
||||
Preloaders.PreferredSitesOption();
|
||||
Preloaders.ListLeadsData();
|
||||
Preloaders.ListPropertyData(true,false,false);
|
||||
}
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
changeTopbarTitle('Home');
|
||||
|
||||
loadrecents_home();
|
||||
HomeULT_reinitilize_loaders();
|
||||
CheckAndSetDarkMode();
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user