Jump to content

Chrisj

Members
  • Posts

    537
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Chrisj

  1. Thanks for your reply. So, I want to remove this?: return checked;
  2. what type of variable is that checked one. Is it a number?
  3. This is what I have so far: function countTotalCredits() { var checked = []; $("button[data-action='multiple_select_button][data-selected=1]").closest(".video-wrapper").each(function(i){ if ($(this).attr('data-selected') == 1) { checked.push($(this).attr('data-price')); } }); return checked; } I'm not sure what else I need. I looked at this example, but don't know how it would work with the code above: var numbers = [65, 44, 12, 4]; function getSum(total, num) { return total + num; } function myFunction(item) { document.getElementById("demo").innerHTML = numbers.reduce(getSum); } any additional help is appreciated
  4. Thanks so much for your help/guidance. Much appreciated. This is above my skill level, but here's my attempt. Added attribute here: <div class="col-md-3 col-sm-6 no-padding-right-at-all no-padding-mobile-left"> <div class="video-latest-list video-wrapper" data-id="{{ID}}" data-views="{{VIEWS}}" data-price="{{PRICE}}"> <div class="video-thumb"> <img src="{{THUMBNAIL}}" alt="{{TITLE}}"> <div class="video-duration">{{DURATION}}</div> </div> <div class="video-title"> <h4 title="{{TITLE}}">{{TITLE}}</h4> </div> <div class="video-info"> <div style="float:right;"><button class="btn btn-main" data-action="multiple_select_button" data-selected="0" data-id="{{ID}}">View</button></div> <div class="price" data-id="{{ID}}"> {{PRICE}} credits</div> </div> </div> </div> Copied of the countSelectedVideos function, renamed it, etc. function countTotalCredits() { var total = price1 + price2; $("button[data-action='multiple_select_button][data-selected=1]").closest(".video-info").find(".price[data-price]") parseInt($(this).attr('data-price'), 10) }); } any additional instruction will be welcomed
  5. Thanks for your reply. Here's all of it: <div class="content pt_shadow"> <div class="col-md-12"> <div class="upload-head"> <div style="float: right;"> <button class="btn btn-main" data-action="multuple-buy-video" onclick="PT_MultipleBuyVideo();">View all selected</button> </div> <h4><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg> {{LANG search_results}}: {{KEYWORD}}</h4> <hr> </div> <div class="videos-latest-list row"> {{VIDEOS}} </div> <?php if (count($pt->videos) > 0 && empty($_GET['is_channel'])) { ?> <div class="watch-video-show-more desc load-more" data-type="search" data-keyword="{{KEYWORD}}"> {{LANG show_more}} </div> <?php } ?> <div class="clear"></div> </div> <div class="clear"></div> </div> I believe that corresponds with this php: <?php include('/assets/langs/english.php'); if (empty($_GET['keyword'])) { header("Location: " . PT_Link('login')); exit(); } $keyword = PT_Secure($_GET['keyword']); $category_id = (isset($_GET['category_id'])?$_GET['category_id']:0); $list = '<div class="text-center no-content-found empty_state"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video-off"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>' . $lang->no_videos_found_for_now . '</div>'; $list2 = '<div class="text-center no-content-found empty_state"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video-off"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg></div>'; $final = ''; if ($pt->config->total_videos > 1000000) { if($category_id == 0){ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE MATCH (title) AGAINST ('$keyword') OR tags LIKE '%$keyword%' ORDER BY id ASC LIMIT 20"); }else{ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE category_id=$category_id AND ( MATCH (title) AGAINST ('$keyword') OR tags LIKE '%$keyword%' ) ORDER BY id ASC LIMIT 20"); } } else { if($category_id == 0){ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE title LIKE '%$keyword%' OR tags LIKE '%$keyword%' ORDER BY id ASC LIMIT 20"); }else{ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE category_id=$category_id AND ( title LIKE '%$keyword%' OR tags LIKE '%$keyword%' ) ORDER BY id ASC LIMIT 20"); } } if (!empty($get_videos)) { $len = count($get_videos); foreach ($get_videos as $key => $video) { $video = PT_GetVideoByID($video, 0, 0, 0); $pt->last_video = false; if ($key == $len - 1) { $pt->last_video = true; } $final .= PT_LoadPage('search/list', array( 'ID' => $video->id, 'USER_DATA' => $video->owner, 'THUMBNAIL' => $video->thumbnail, 'URL' => $video->url, 'TITLE' => $video->title, 'DESC' => $video->markup_description, 'VIEWS' => $video->views, 'VIEWS_NUM' => number_format($video->views), 'TIME' => $video->time_ago, 'DURATION' => $video->duration, 'PRICE' => number_format( $video->video_play_price < $config['video_play_price'] ? $config['video_play_price'] : $video->video_play_price) )); } } if (empty($final)) { $final = $list; } $get_users = $db->rawQuery("SELECT * FROM " . T_USERS . " WHERE ((`username` LIKE '%$keyword%') OR CONCAT( `first_name`, ' ', `last_name` ) LIKE '%$keyword%') ORDER BY id ASC LIMIT 50"); if (!empty($get_users)) { $len = count($get_users); foreach ($get_users as $key => $user) { $user = PT_UserData($user, array('data' => true)); $pt->last_user = false; if ($key == $len - 1) { $pt->last_user = true; } $final2 .= PT_LoadPage('search/user-list', array( 'ID' => $user->id, 'USER_DATA' => $user, )); } } if (empty($final2)) { $final2 = $list2; } $pt->videos = $get_videos; $pt->users = $get_users; $pt->page = 'search'; $pt->title = $lang->search . ' | ' . $pt->config->title; $pt->description = $pt->config->description; $pt->keyword = $pt->config->keyword; $pt->content = PT_LoadPage('search/content', array( 'VIDEOS' => $final, 'USERS' => $final2, 'KEYWORD' => $keyword )); Also this: <div class="col-md-3 col-sm-6 no-padding-right-at-all no-padding-mobile-left"> <div class="video-latest-list video-wrapper" data-id="{{ID}}" data-views="{{VIEWS}}"> <div class="video-thumb"> <img src="{{THUMBNAIL}}" alt="{{TITLE}}"> <div class="video-duration">{{DURATION}}</div> </div> <div class="video-title"> <h4 title="{{TITLE}}">{{TITLE}}</h4> </div> <div class="video-info"> <div style="float:right;"><button class="btn btn-main" data-action="multiple_select_button" data-selected="0" data-id="{{ID}}">View</button></div> <div class="price" data-id="{{ID}}"> {{PRICE}} credits</div> </div> </div> </div> which ties in with the javascript, correct? function buttonMultipleBuy(command) { var button = $("button[data-action='multuple-buy-video']"); if (command == 'hide') { button.hide(); } else if (command == 'show') { button.show(); } } buttonMultipleBuy('hide'); $(document).on('click touchstart', "button[data-action='multiple_select_button']", function(){ if ($(this).attr('data-selected') == 1) { // uncheck buttonMultipleSelectingStyle($(this), 'uncheck'); } else { // check buttonMultipleSelectingStyle($(this), 'check'); } if (countSelectedVideos()) { buttonMultipleBuy('show'); } else { buttonMultipleBuy('hide'); } }); function countSelectedVideos() { var checked = 0; $("button[data-action='multiple_select_button']").each(function(i){ if ($(this).attr('data-selected') == 1) { checked++; } }); return checked; } function getSelectedVideos() { var checked = []; $("button[data-action='multiple_select_button']").each(function(i){ if ($(this).attr('data-selected') == 1) { checked.push($(this).attr('data-id')); } }); return checked; } function buttonMultipleSelectingStyle(button, action) { if (action == 'check') { button.attr('data-selected', 1); button.css('backgroundColor', '#FF4500'); button.html('Selected'); } else if (action == 'uncheck') { button.attr('data-selected', 0); button.css('backgroundColor', '#04abf2'); button.html('View'); } else if (action == 'purchased') { button.attr('data-selected', 0); button.css('backgroundColor', '#04abf2'); button.html('Purchased'); button.attr('disabled', 'disabled'); } } any additional help is appreciated
  6. Or this? <?php include('/assets/langs/english.php'); if (empty($_GET['keyword'])) { header("Location: " . PT_Link('login')); exit(); } $keyword = PT_Secure($_GET['keyword']); $category_id = (isset($_GET['category_id'])?$_GET['category_id']:0); $list = '<div class="text-center no-content-found empty_state"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video-off"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>' . $lang->no_videos_found_for_now . '</div>'; $list2 = '<div class="text-center no-content-found empty_state"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video-off"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg></div>'; $final = ''; if ($pt->config->total_videos > 1000000) { if($category_id == 0){ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE MATCH (title) AGAINST ('$keyword') OR tags LIKE '%$keyword%' ORDER BY id ASC LIMIT 20"); }else{ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE category_id=$category_id AND ( MATCH (title) AGAINST ('$keyword') OR tags LIKE '%$keyword%' ) ORDER BY id ASC LIMIT 20"); } } else { if($category_id == 0){ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE title LIKE '%$keyword%' OR tags LIKE '%$keyword%' ORDER BY id ASC LIMIT 20"); }else{ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE category_id=$category_id AND ( title LIKE '%$keyword%' OR tags LIKE '%$keyword%' ) ORDER BY id ASC LIMIT 20"); } } if (!empty($get_videos)) { $len = count($get_videos); foreach ($get_videos as $key => $video) { $video = PT_GetVideoByID($video, 0, 0, 0); $pt->last_video = false; if ($key == $len - 1) { $pt->last_video = true; } $final .= PT_LoadPage('search/list', array( 'ID' => $video->id, 'USER_DATA' => $video->owner, 'THUMBNAIL' => $video->thumbnail, 'URL' => $video->url, 'TITLE' => $video->title, 'DESC' => $video->markup_description, 'VIEWS' => $video->views, 'VIEWS_NUM' => number_format($video->views), 'TIME' => $video->time_ago, 'DURATION' => $video->duration, //'PRICE' => $video->video_play_price, //'PRICE' =>number_format($video->video_play_price?$video->video_play_price:$config['video_play_price'],1) 'PRICE' =>number_format($video->video_play_price?$video->video_play_price:$config['video_play_price']) )); } } if (empty($final)) { $final = $list; } $get_users = $db->rawQuery("SELECT * FROM " . T_USERS . " WHERE ((`username` LIKE '%$keyword%') OR CONCAT( `first_name`, ' ', `last_name` ) LIKE '%$keyword%') ORDER BY id ASC LIMIT 50"); if (!empty($get_users)) { $len = count($get_users); foreach ($get_users as $key => $user) { $user = PT_UserData($user, array('data' => true)); $pt->last_user = false; if ($key == $len - 1) { $pt->last_user = true; } $final2 .= PT_LoadPage('search/user-list', array( 'ID' => $user->id, 'USER_DATA' => $user, )); } } if (empty($final2)) { $final2 = $list2; } $pt->videos = $get_videos; $pt->users = $get_users; $pt->page = 'search'; $pt->title = $lang->search . ' | ' . $pt->config->title; $pt->description = $pt->config->description; $pt->keyword = $pt->config->keyword; $pt->content = PT_LoadPage('search/content', array( 'VIDEOS' => $final, 'USERS' => $final2, 'KEYWORD' => $keyword ));
  7. Thanks for your message. Maybe this 'code puts the actual video data onto the page'? <button class="btn btn-main" data-action="multuple-buy-video" onclick="PT_MultipleBuyVideo();">View all selected</button>
  8. Thanks for your reply. Well, I guess I should have titled this :" Help with finding where the calculation takes place". I can start another thread, if needed, asking Can anyone help me determine where the total amount is calculated prior to Proceeding with Purchase? The code in regard to purchasing begins about halfway at line 247: $(".video-player").hover( function(e){ $('.watermark').css('display', 'block'); }, function(e){ setTimeout(function () { if ($('.video-player:hover').length == 0) { $('.watermark').css('display', 'none'); } }, 1000); } ); $(function () { $.fn.scrollTo = function (speed) { if (typeof(speed) === 'undefined') speed = 500; $('html, body').animate({ scrollTop: ($(this).offset().top - 100) }, speed); return $(this); }; $('.cover-container, .edit-cover-container').hover(function() { $('.edit-cover-container').removeClass('hidden'); }); $('.cover-container, .edit-cover-container').mouseleave(function() { $('.edit-cover-container').addClass('hidden'); }); $('.avatar-container, .edit-avatar-container').hover(function() { $('.edit-avatar-container').removeClass('hidden'); }); $('.avatar-container, .edit-avatar-container').mouseleave(function() { $('.edit-avatar-container').addClass('hidden'); }); $('[data-toggle="tooltip"]').tooltip(); $('.player-video').hover(function() { $('.icons').removeClass('hidden'); }); $('.player-video').mouseleave(function() { $('.icons').addClass('hidden'); }); $ var hash = $('.main_session').val(); $.ajaxSetup({ data: { hash: hash }, cache: false }); if ($(window).width() < 720) { $('ul li').click(function(e) { e.stopPropagation(); }); $('.video-info-element').removeClass('pull-right'); } else { if (!$('.video-info-element').hasClass('pull-right')) { $('.video-info-element').addClass('pull-right'); } } }); if ($(window).width() < 720) { $('ul li').click(function(e) { e.stopPropagation(); }); } function scrollToTop() { verticalOffset = typeof (verticalOffset) != 'undefined' ? verticalOffset : 0; element = $('html'); offset = element.offset(); offsetTop = offset.top; $('html, body').animate({ scrollTop: offsetTop }, 300, 'linear'); } function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('.thumbnail-preview img').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } function copyToClipboard(element) { var $temp = $("<input>"); $("body").append($temp); $temp.val($(element).attr("link")).select(); document.execCommand("copy"); $temp.remove(); notif({ msg: "Link copyed to clipboard", type: "default", fade:0, timeout:1500 }); } function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } function Wo_LikeSystem(id, type, this_, is_ajax, repeat) { if (!id || !type) { return false; } if (!$('#main-container').attr('data-logged') && $('#main-url').val()) { window.location.href = PT_Ajax_Requests_File() + 'login?to=' + $('#main-url').val(); return false; } var result = 0; if (type == 'like') { var likes = $(this_).attr('data-likes'); if ($(this_).attr('liked')) { result = Number(likes) - 1; $(this_).removeAttr('liked'); $(this_).removeClass('active'); } else { result = Number(likes) + 1; $(this_).attr('liked', true); $(this_).addClass('active'); } $('#likes').text(numberWithCommas(result)); $(this_).attr('data-likes', result); if ($('#dislikes-bar').attr('data-likes') > 0) { if ($('#dislikes-bar').hasClass('active')) { $('#dislikes-bar').removeAttr('disliked'); $('#dislikes-bar').removeClass('active'); result = Number($('#dislikes-bar').attr('data-likes')) - 1; $('#dislikes').text(numberWithCommas(result)); $('#dislikes-bar').attr('data-likes', result); } } } else if (type == 'dislike') { var dislikes = $(this_).attr('data-likes'); if ($(this_).attr('disliked')) { result = Number(dislikes) - 1; $(this_).removeAttr('disliked'); $(this_).removeClass('active'); } else { result = Number(dislikes) + 1; $(this_).attr('disliked', true); $(this_).addClass('active'); } $(this_).attr('data-likes', result); $('#dislikes').text(numberWithCommas(result)); if ($('#likes-bar').attr('data-likes') > 0) { if ($('#likes-bar').hasClass('active')) { $('#likes-bar').removeAttr('liked'); $('#likes-bar').removeClass('active'); result = Number($('#likes-bar').attr('data-likes')) - 1; $('#likes').text(numberWithCommas(result)); $('#likes-bar').attr('data-likes', result); } } } if (is_ajax == 'is_ajax') { $.post(PT_Ajax_Requests_File() + 'aj/like-system/' + type, {id: id, type:type}); } } function PT_AddLike(id, this_, type , is_ajax) { if (!id || !type) { return false; } if (!$('#main-container').attr('data-logged') && $('#main-url').val()) { window.location.href = PT_Ajax_Requests_File() + 'login?to=' + $('#main-url').val(); return false; } var result = 0; var main_comment = $('#comment-' + id); if (type == 'like') { var likes = $(this_).attr('data-likes'); if ($(this_).attr('liked')) { result = Number(likes) - 1; $(this_).removeAttr('liked'); $(this_).removeClass('active'); } else { result = Number(likes) + 1; $(this_).attr('liked', true); $(this_).addClass('active'); } main_comment.find('#comment-likes').text(numberWithCommas(result)); $(this_).attr('data-likes', result); } if (type == 'dislike') { var likes = $(this_).attr('data-likes'); if ($(this_).attr('liked')) { result = Number(likes) - 1; $(this_).removeAttr('liked'); $(this_).removeClass('active'); } else { result = Number(likes) + 1; $(this_).attr('liked', true); $(this_).addClass('active'); } main_comment.find('#comment-likes').text(numberWithCommas(result)); $(this_).attr('data-likes', result); } if (is_ajax == 'is_ajax') { $.post(PT_Ajax_Requests_File() + 'aj/comment-like-system/' + type, {id: id, type:type}); } } var PT_Delay = (function(){ var timer = 0; return function(callback, ms){ clearTimeout (timer); timer = setTimeout(callback, ms); }; })(); function PT_progressIconLoader(container_elem) { container_elem.each(function() { progress_icon_elem = $(this).find('i.progress-icon'); default_icon = progress_icon_elem.attr('data-icon'); hide_back = false; if (progress_icon_elem.hasClass('hidde') == true) { hide_back = true; } if ($(this).find('i.fa-spinner').length == 1) { progress_icon_elem.removeClass('fa-spinner').removeClass('fa-spin').addClass('fa-' + default_icon); if (hide_back == true) { progress_icon_elem.hide(); } } else { progress_icon_elem.removeClass('fa-' + default_icon).addClass('fa-spinner fa-spin').show(); } return true; }); } function PT_HasExtension(id, exts) { var fileName = $(id).val(); return (new RegExp('(' + exts.join('|').replace(/\./g, '\\.') + ')$')).test(fileName); } function PT_MultipleBuyVideo() { var checked = getSelectedVideos(); if (!checked) { return false; } swal({ title: "", type: "info", html:"Simply proceed to purchase " + countSelectedVideos() + " videos", showCancelButton: true, cancelButtonText: "Close", customClass: 'sweetalert-lg', confirmButtonText:'Proceed' }).then(function(){ $.ajax({ url: PT_Ajax_Requests_File() + 'aj/buy-video', type: 'POST', dataType: 'json', data: {id:checked}, }).done(function(data){ if (data.status == 200) { for (var i = 0; i < checked.length; i++) { var button = $("button[data-action='multiple_select_button'][data-id='" + checked[i] + "']") buttonMultipleSelectingStyle(button, 'purchased'); } swal({ title: "Success", type: "success", html:"", showCancelButton: true, cancelButtonText: "Close", customClass: 'sweetalert-lg', confirmButtonText:'Go To Video(s)' }).then(function(){ window.location.href='/paid-list'; }); } else { if (data.error_num == 1) { swal( 'Error!', 'Not enough money', 'error' ); } else { swal( 'Error!', 'Something went wrong. Please try again later!', 'error' ); } } }).fail(function() { swal( 'Error!', 'Something went wrong. Please try again later!', 'error' ); }) }); } function buttonMultipleBuy(command) { var button = $("button[data-action='multuple-buy-video']"); if (command == 'hide') { button.hide(); } else if (command == 'show') { button.show(); } } buttonMultipleBuy('hide'); $(document).on('click touchstart', "button[data-action='multiple_select_button']", function(){ if ($(this).attr('data-selected') == 1) { // uncheck buttonMultipleSelectingStyle($(this), 'uncheck'); } else { // check buttonMultipleSelectingStyle($(this), 'check'); } if (countSelectedVideos()) { buttonMultipleBuy('show'); } else { buttonMultipleBuy('hide'); } }); function countSelectedVideos() { var checked = 0; $("button[data-action='multiple_select_button']").each(function(i){ if ($(this).attr('data-selected') == 1) { checked++; } }); return checked; } function getSelectedVideos() { var checked = []; $("button[data-action='multiple_select_button']").each(function(i){ if ($(this).attr('data-selected') == 1) { checked.push($(this).attr('data-id')); } }); return checked; } function buttonMultipleSelectingStyle(button, action) { if (action == 'check') { button.attr('data-selected', 1); button.css('backgroundColor', '#FF4500'); button.html('Selected'); } else if (action == 'uncheck') { button.attr('data-selected', 0); button.css('backgroundColor', '#04abf2'); button.html('View'); } else if (action == 'purchased') { button.attr('data-selected', 0); button.css('backgroundColor', '#04abf2'); button.html('Purchased'); button.attr('disabled', 'disabled'); } } function PT_ModalPlayerForPurchasedVideo(video_id, title) { if (!video_id) { return false; } $.ajax({ url: PT_Ajax_Requests_File() + 'aj/get-modal-player', type: 'POST', dataType: 'json', data: {id:video_id}, }).done(function(data) { if (data.status == 200) { swal({ title: title, type: "", html: data.html, showConfirmButton: false, showCancelButton: true, cancelButtonText: "Close", }); } else { swal( 'Error!', 'Something went wrong. Please try again later!', 'error' ); } }).fail(function() { swal( 'Error!', 'Something went wrong.Please try again later!', 'error' ); }) } function pt_elexists(el){ return ($(el).length > 0); } function nl2br (str, is_xhtml) { var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>'; return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1'+ breakTag +'$2'); } function makeid() { var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for (var i = 0; i < 10; i++) text += possible.charAt(Math.floor(Math.random() * possible.length)); return text; } function escapeHTML(string) { var pre = document.createElement('pre'); var text = document.createTextNode( string ); pre.appendChild(text); return pre.innerHTML; } var lastScrollTop = 0; $('.user-messages').scroll(function(event){ var st = $(this).scrollTop(); if (st > lastScrollTop){ $('#load-more-messages').css('display', 'none'); } else { $('#load-more-messages').css('display', 'block'); } lastScrollTop = st; }); Object.defineProperty(HTMLMediaElement.prototype, 'playing', { get: function(){ return !!(this.currentTime > 0 && !this.paused && !this.ended && this.readyState > 2); } }) /*! * Snackbar v0.1.8 * http://polonel.com/Snackbar * * Copyright 2017 Chris Brame and other contributors * Released under the MIT license * https://github.com/polonel/Snackbar/blob/master/LICENSE */ !function(a,b){"use strict";"function"==typeof define&&define.amd?define([],function(){return a.Snackbar=b()}):"object"==typeof module&&module.exports?module.exports=a.Snackbar=b():a.Snackbar=b()}(this,function(){var a={};a.current=null;var b={text:"Default Text",textColor:"#FFFFFF",width:"auto",showAction:!0,actionText:"X",actionTextColor:"#4CAF50",showSecondButton:!1,secondButtonText:"",secondButtonTextColor:"#4CAF50",backgroundColor:"#323232",pos:"bottom-left",duration:5e3,customClass:"",onActionClick:function(a){a.style.opacity=0},onSecondButtonClick:function(a){}};a.show=function(d){var e=c(!0,b,d);a.current&&(a.current.style.opacity=0,setTimeout(function(){var a=this.parentElement;a&& a.removeChild(this)}.bind(a.current),500)),a.snackbar=document.createElement("div"),a.snackbar.className="snackbar-container "+e.customClass,a.snackbar.style.width=e.width;var f=document.createElement("p");if(f.style.margin=0,f.style.padding=0,f.style.color=e.textColor,f.style.fontSize="14px",f.style.fontWeight=300,f.style.lineHeight="1em",f.innerHTML=e.text,a.snackbar.appendChild(f),a.snackbar.style.background=e.backgroundColor,e.showSecondButton){var g=document.createElement("button");g.className="action",g.innerHTML=e.secondButtonText,g.style.color=e.secondButtonTextColor,g.addEventListener("click",function(){e.onSecondButtonClick(a.snackbar)}),a.snackbar.appendChild(g)}if(e.showAction){var h=document.createElement("button");h.className="action",h.innerHTML=e.actionText,h.style.color=e.actionTextColor,h.addEventListener("click",function(){e.onActionClick(a.snackbar)}),a.snackbar.appendChild(h)}e.duration&&setTimeout(function(){a.current===this&&(a.current.style.opacity=0)}.bind(a.snackbar),e.duration),a.snackbar.addEventListener("transitionend",function(b,c){"opacity"===b.propertyName&&"0"===this.style.opacity&&(this.parentElement.removeChild(this),a.current===this&&(a.current=null))}.bind(a.snackbar)),a.current=a.snackbar,"top-left"!==e.pos&&"top-center"!==e.pos&&"top"!==e.pos&&"top-right"!==e.pos||(a.snackbar.style.top="-100px"),document.body.appendChild(a.snackbar);getComputedStyle(a.snackbar).bottom,getComputedStyle(a.snackbar).top;a.snackbar.style.opacity=1,a.snackbar.className="snackbar-container "+e.customClass+" snackbar-pos "+e.pos,"top-left"===e.pos||"top-right"===e.pos?a.snackbar.style.top=0:"top-center"===e.pos||"top"===e.pos?a.snackbar.style.top="25px":"bottom-center"!==e.pos&&"bottom"!==e.pos||(a.snackbar.style.bottom="-25px")},a.close=function(){a.current&&(a.current.style.opacity=0)}; var c=function(){var a={},b=!1,c=0,d=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(b=arguments[0],c++);for(var e=function(c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(b&&"[object Object]"===Object.prototype.toString.call(c[d])?a[d]=extend(!0,a[d],c[d]):a[d]=c[d])};c<d;c++){var f=arguments[c];e(f)}return a};return a}); //# sourceMappingURL=snackbar.min.js.map Any help will be appreciated
  9. Thanks again for your kind reply/info. here is the ajax/buy-video.php code: <?php ob_start(); if (IS_LOGGED == false) { $data = array('status' => 400, 'error' => 'Not logged in'); echo json_encode($data); exit(); } if (!empty($_POST['id'])) { if (!is_array($_POST['id'])) { $id_array[] = $_POST['id']; } else { $id_array = $_POST['id']; } // get cost video $db->where('name', 'video_play_price'); $db_cost = $db->getOne('config'); $video_cost = (float)$db_cost->value; $count_video = count($id_array); $user_id = $user->id; $wallet = (float)str_replace(',', '', $user->wallet); $amout = 0; foreach ($id_array as $id) { $video_id = (int)PT_Secure($id); // get video data $video = $db->where('id', $id)->getOne(T_VIDEOS); $amout += $video->video_play_price?$video->video_play_price:$video_cost; } // $amout = $video_cost * $count_video; $charge = ( $video_cost *0.50 ); if ($wallet >= $amout) { //$new_wallet = (string)($wallet - $amout); $wallet = (string)($wallet - $amout); $db->startTransaction(); $inserted_records = 0; foreach ($id_array as $id) { $video_id = (int)PT_Secure($id); // $uploader_amount = $video_cost - $charge; //100 - 20% = 80 // get video data $video = $db->where('id', $id)->getOne(T_VIDEOS); $video_cost_new = $video->video_play_price?$video->video_play_price:$video_cost; $uploader_amount = ( $video_cost_new *0.50 ); // add data to paid table $insert_buy = $db->insert('u_paid_videos', [ 'id_user' => $user_id, 'id_video' => $video_id, 'session_key' => $_SESSION['session_key'], 'video_play_price' => (string)$video_cost, 'video_title' => $video->title, 'user_id_uploaded' => $video->user_id, ]); if ($insert_buy) { $inserted_records++; } //add wallet users' video $userwallet = $db->where('id', $video->user_id)->getOne(T_USERS); //$videouserwallet = $userwallet->balance+$video_cost; $videouserwallet = $userwallet->balance+$uploader_amount; $db->where('id', $video->user_id); $update_balance = $db->update(T_USERS, [ // 'wallet' => $videouserwallet, 'balance' => number_format($videouserwallet, 1, '.', ''), ]); } $db->where('id', $user_id); //$update_wallet = $db->update(T_USERS, [ $update_wallet = $db->update(T_USERS, [ 'wallet' => $wallet, ]); if (($inserted_records == $count_video) && $update_wallet) { $db->commit(); echo json_encode([ 'status' => 200 ]); exit(); } else { $db->rollback(); echo json_encode([ 'status' => 400, 'error' => 'Buy process error' ]); exit(); } } else { echo json_encode([ 'status' => 400, 'error_num' => 1, 'error' => 'Not enough money' ]); exit(); } } else { echo json_encode([ 'status' => 400, 'error' => 'Bad Request, Invalid or missing parameter' ]); exit(); echo('$video_play_price: '.$video_play_price.PHP_EOL); echo('$charge: '.$charge.PHP_EOL); echo('$amout: '.$amout.PHP_EOL); $uploader_amount = $video_play_price - $charge; $uploader_amount = $amout - $charge; exit; echo "$uploader_amount"; } Any additional help will be welcomed
  10. I am using a php web video script (that I didn’t write) which allows Users to purchase videos and allows the video uploader to change the default price (set by Admin). I am trying to get help modifying the script so that an Uploader can’t change the price below the Admins’ default price. I know some things about this code script - when the Admin sets a video purchase price that number/value appears in the config table under the name: video_play_price (this should be the minimum price). That same Admin set number also appears in the videos table, under the column videos_play_price, but when the User/Uploader changes the price, the price changes there (in the videos table > videos_play_price column). So, based on all that, I attempted to modify the file, by adding lines 30,31,32. I look forward to hearing about what I need to correct, to try again. Thanks <?php if (IS_LOGGED == false) { header("Location: " . PT_Link('login')); exit(); } if (empty($_GET['id'])) { header("Location: " . PT_Link('login')); exit(); } $id = PT_Secure($_GET['id']); $video = $db->where('id', $id)->getOne(T_VIDEOS); if (empty($video)) { header("Location: " . PT_Link('login')); exit(); } if (!PT_IsAdmin()) { if (empty($db->where('id', $id)->where('user_id', $user->id)->getValue(T_VIDEOS, 'count(*)'))) { header("Location: " . PT_Link('login')); exit(); } } $video = PT_GetVideoByID($video, 0, 0, 0); $pt->video = $video; $pt->page = 'edit-video'; $pt->title = $lang->edit_video . ' | ' . $pt->config->title; $pt->description = $pt->config->description; $pt->keyword = $pt->config->keyword; $min_price=$config[‘video_play_price’]; // in db > config table > video_play_price column is where admin's default price is stored $temp_price = $videos[‘video_play_price’]; //in db > videos table > video_play_price column - is where uploader price changes are stored if ($temp_price<$min_price) { $temp_price = $min_price; } $pt->content = PT_LoadPage('edit-video/content', array( 'ID' => $video->id, 'USER_DATA' => $video->owner, 'THUMBNAIL' => $video->thumbnail, 'URL' => $video->url, 'TITLE' => $video->title, 'DESC' => br2nl($video->edit_description), 'DESC_2' => $video->markup_description, 'VIEWS' => $video->views, 'TIME' => $video->time_ago, 'TAGS' => $video->tags, 'video_play_price' => $u_paid_videos->video_play_price, 'video_play_price_user' => number_format($video->video_play_price?$video->video_play_price:$config['video_play_price'],1) )); But, I believe I just need to reflect this minimum price code above where it saves the video price in “video_play_price_user”, which, I believe is this line: 'video_play_price_user' => number_format($video->video_play_price?$video->video_play_price:$config['video_play_price'],1) Any additional guidance will be welcomed.
  11. I am using a php web video script (that I didn’t write) which allows Users to purchase videos successfully. Upon selecting videos a pop-up window shows “Simply proceed to purchase X videos”, as you can see in the code below. I’d like to get help to also display there the total price of purchasing the X (amount) of videos. Can you provide a suggestion? The buy-video formula price happens in the buy-video.php file, which I believe, is referenced in the url line highlighted below, function PT_MultipleBuyVideo() { var checked = getSelectedVideos(); if (!checked) { return false; } swal({ title: "", type: "info", html:"Simply proceed to purchase " + countSelectedVideos() + " videos", showCancelButton: true, cancelButtonText: "Close", customClass: 'sweetalert-lg', confirmButtonText:'Proceed' }).then(function(){ $.ajax({ **url: PT_Ajax_Requests_File() + 'aj/buy-video',** type: 'POST', dataType: 'json', data: {id:checked}, }).done(function(data){ if (data.status == 200) { for (var i = 0; i < checked.length; i++) { var button = $("button[data-action='multiple_select_button'][data-id='" + checked[i] + "']") buttonMultipleSelectingStyle(button, 'purchased'); } swal({ title: "Success", type: "success", html:"", showCancelButton: true, cancelButtonText: "Close", customClass: 'sweetalert-lg', confirmButtonText:'Go To Video(s)' }).then(function(){ window.location.href='/paid-list'; }); } else { if (data.error_num == 1) { swal( 'Error!', 'Not enough money', 'error' ); } else { swal( 'Error!', 'Something went wrong. Please try again later!', 'error' ); } } }).fail(function() { swal( 'Error!', 'Something went wrong. Please try again later!', 'error' ); }) }); } Any suggestions/guidance will be appreciated.
  12. Thanks again for your reply. After searching to try to get an idea of what you’re telling me, I don’t know what to do with that line of code. Any additional help will be appreciated
  13. This doesn't work, but it might be close? 'PRICE' => $video->number_format($video->video_play_price?$video->video_play_price:$config['video_play_price'],2),
  14. Thanks again for your reply. Yes, I'm not sure how/where to Set the PRICE value to be whatever was set, or the default value if one wasn't set. I'm not sure, for example, what code defines 'default' price
  15. Ok, yes, thanks a lot for your replies/help. I realized it worked for some particular videos. When a video is uploaded, the price reflected in the Admin-panel is the default price. After upload, a logged-in uploader can change the price, in their my-account > manage-videos area. It appears that the only numeric {{PRICE}} that is now successfully displaying, in the search results, is the price changed by the uploader, the rest of the displayed results show no price. So, your great help was correct, but, now how to get the default price to display is the next mystery. This is the buy-video.php file code (below). Maybe that would help determine how to display the default price (if applicable), in the search results, too: <?php ob_start(); if (IS_LOGGED == false) { $data = array('status' => 400, 'error' => 'Not logged in'); echo json_encode($data); exit(); } if (!empty($_POST['id'])) { if (!is_array($_POST['id'])) { $id_array[] = $_POST['id']; } else { $id_array = $_POST['id']; } // get cost video $db->where('name', 'video_play_price'); $db_cost = $db->getOne('config'); $video_cost = (float)$db_cost->value; $count_video = count($id_array); $user_id = $user->id; $wallet = (float)str_replace(',', '', $user->wallet); $amout = 0; foreach ($id_array as $id) { $video_id = (int)PT_Secure($id); // get video data $video = $db->where('id', $id)->getOne(T_VIDEOS); $amout += $video->video_play_price?$video->video_play_price:$video_cost; } // $amout = $video_cost * $count_video; $charge = ( $video_cost *0.50 ); if ($wallet >= $amout) { //$new_wallet = (string)($wallet - $amout); $wallet = (string)($wallet - $amout); $db->startTransaction(); $inserted_records = 0; foreach ($id_array as $id) { $video_id = (int)PT_Secure($id); // $uploader_amount = $video_cost - $charge; //100 - 20% = 80 // get video data $video = $db->where('id', $id)->getOne(T_VIDEOS); $video_cost_new = $video->video_play_price?$video->video_play_price:$video_cost; $uploader_amount = ( $video_cost_new *0.50 ); // add data to paid table $insert_buy = $db->insert('u_paid_videos', [ 'id_user' => $user_id, 'id_video' => $video_id, 'session_key' => $_SESSION['session_key'], 'video_play_price' => (string)$video_cost, 'video_title' => $video->title, 'user_id_uploaded' => $video->user_id, //'up_credit'=>$video_cost, 'up_credit'=>$uploader_amount, ]); if ($insert_buy) { $inserted_records++; } //add wallet users' video $userwallet = $db->where('id', $video->user_id)->getOne(T_USERS); //$videouserwallet = $userwallet->balance+$video_cost; $videouserwallet = $userwallet->balance+$uploader_amount; $db->where('id', $video->user_id); $update_balance = $db->update(T_USERS, [ // 'wallet' => $videouserwallet, 'balance' => number_format($videouserwallet, 2, '.', ''), ]); } $db->where('id', $user_id); //$update_wallet = $db->update(T_USERS, [ $update_wallet = $db->update(T_USERS, [ 'wallet' => $wallet, ]); if (($inserted_records == $count_video) && $update_wallet) { $db->commit(); echo json_encode([ 'status' => 200 ]); exit(); } else { $db->rollback(); echo json_encode([ 'status' => 400, 'error' => 'Buy process error' ]); exit(); } } else { echo json_encode([ 'status' => 400, 'error_num' => 1, 'error' => 'Not enough money' ]); exit(); } } else { echo json_encode([ 'status' => 400, 'error' => 'Bad Request, Invalid or missing parameter' ]); exit(); echo('$video_play_price: '.$video_play_price.PHP_EOL); echo('$charge: '.$charge.PHP_EOL); echo('$amout: '.$amout.PHP_EOL); $uploader_amount = $video_play_price - $charge; $uploader_amount = $amout - $charge; exit; echo "$uploader_amount"; }
  16. Thanks so much for your guidance. Greatly appreciated. I added 'PRICE" etc., this to the php: if (!empty($get_videos)) { $len = count($get_videos); foreach ($get_videos as $key => $video) { $video = PT_GetVideoByID($video, 0, 0, 0); $pt->last_video = false; if ($key == $len - 1) { $pt->last_video = true; } $final .= PT_LoadPage('search/list', array( 'ID' => $video->id, 'USER_DATA' => $video->owner, 'THUMBNAIL' => $video->thumbnail, 'URL' => $video->url, 'TITLE' => $video->title, 'DESC' => $video->markup_description, 'VIEWS' => $video->views, 'VIEWS_NUM' => number_format($video->views), 'TIME' => $video->time_ago, 'DURATION' => $video->duration, 'PRICE' => $video_play_price )); } } if (empty($final)) { $final = $list; } Then I replaced the html line to look like this: <div class style="float:left;" data-id="{{ID}}">{{PRICE}}</div> But only see {{PRICE}} displayed. Any suggestion on what I've done incorrectly, will be welcomed. Much thanks again
  17. Thanks for your reply. I believe this file corresponds with the initial code I posted. Does this help: <?php include('/assets/langs/english.php'); if (empty($_GET['keyword'])) { header("Location: " . PT_Link('login')); exit(); } $keyword = PT_Secure($_GET['keyword']); $category_id = (isset($_GET['category_id'])?$_GET['category_id']:0); $list = '<div class="text-center no-content-found empty_state"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video-off"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg>' . $lang->no_videos_found_for_now . '</div>'; $list2 = '<div class="text-center no-content-found empty_state"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video-off"><path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line></svg></div>'; $final = ''; if ($pt->config->total_videos > 1000000) { if($category_id == 0){ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE MATCH (title) AGAINST ('$keyword') OR tags LIKE '%$keyword%' ORDER BY id ASC LIMIT 20"); }else{ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE category_id=$category_id AND ( MATCH (title) AGAINST ('$keyword') OR tags LIKE '%$keyword%' ) ORDER BY id ASC LIMIT 20"); } } else { if($category_id == 0){ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE title LIKE '%$keyword%' OR tags LIKE '%$keyword%' ORDER BY id ASC LIMIT 20"); }else{ $get_videos = $db->rawQuery("SELECT * FROM " . T_VIDEOS . " WHERE category_id=$category_id AND ( title LIKE '%$keyword%' OR tags LIKE '%$keyword%' ) ORDER BY id ASC LIMIT 20"); } } if (!empty($get_videos)) { $len = count($get_videos); foreach ($get_videos as $key => $video) { $video = PT_GetVideoByID($video, 0, 0, 0); $pt->last_video = false; if ($key == $len - 1) { $pt->last_video = true; } $final .= PT_LoadPage('search/list', array( 'ID' => $video->id, 'USER_DATA' => $video->owner, 'THUMBNAIL' => $video->thumbnail, 'URL' => $video->url, 'TITLE' => $video->title, 'DESC' => $video->markup_description, 'VIEWS' => $video->views, 'VIEWS_NUM' => number_format($video->views), 'TIME' => $video->time_ago, 'DURATION' => $video->duration )); } } if (empty($final)) { $final = $list; } $get_users = $db->rawQuery("SELECT * FROM " . T_USERS . " WHERE ((`username` LIKE '%$keyword%') OR CONCAT( `first_name`, ' ', `last_name` ) LIKE '%$keyword%') ORDER BY id ASC LIMIT 50"); if (!empty($get_users)) { $len = count($get_users); foreach ($get_users as $key => $user) { $user = PT_UserData($user, array('data' => true)); $pt->last_user = false; if ($key == $len - 1) { $pt->last_user = true; } $final2 .= PT_LoadPage('search/user-list', array( 'ID' => $user->id, 'USER_DATA' => $user, )); } } if (empty($final2)) { $final2 = $list2; } $pt->videos = $get_videos; $pt->users = $get_users; $pt->page = 'search'; $pt->title = $lang->search . ' | ' . $pt->config->title; $pt->description = $pt->config->description; $pt->keyword = $pt->config->keyword; $pt->content = PT_LoadPage('search/content', array( 'VIDEOS' => $final, 'USERS' => $final2, 'KEYWORD' => $keyword ));
  18. I am using a php web video script which, when searched, displays a list of thumbnail image search results, with a View button, below each image. I'm trying to add the numeric price under each one, but haven't gotten it correct yet. Here is the list.html page code: <div class="col-md-3 col-sm-6 no-padding-right-at-all no-padding-mobile-left"> <div class="video-latest-list video-wrapper" data-id="{{ID}}" data-views="{{VIEWS}}"> <div class="video-thumb"> <img src="{{THUMBNAIL}}" alt="{{TITLE}}"> <div class="video-duration">{{DURATION}}</div> </div> <div class="video-title"> <h4 title="{{TITLE}}">{{TITLE}}</h4> </div> <div class="video-info"> <div style="float:right;"><button class="btn btn-main" data-action="multiple_select_button" data-selected="0" data-id="{{ID}}">View</button></div> <div class style="float:left;" data-id="{{ID}}">{{VIDEOS video_play_price}}</div> </div> </div> </div> In my attempt to display the price, added this line: <div class style="float:left;" data-id="{{ID}}">{{VIDEOS video_play_price}}</div> I am assuming the data-id="{{ID}}" identifies the particular thumbnail/video? and I know that the current price resides in the 'videos' table, in the db, under the column titled 'video_play_price', but with my line of code the only thing that appears under the thumbnail is {{VIDEOS video_play_price}} (as you probably know). Any help to display the numeric price pertaining to each video(thumbnail), will be appreciated.
  19. Thanks again for your reply/suggestion, but I don't know how to code that in particular
  20. I believe I have it working now: $charge = ( $video_cost *0.50 ); if ($wallet >= $amout) { $new_wallet = (string)($wallet - $amout); $db->startTransaction(); $inserted_records = 0; foreach ($id_array as $id) { $video_id = (int)PT_Secure($id); // get video data $video = $db->where('id', $id)->getOne(T_VIDEOS); $video_cost_new = $video->video_play_price?$video->video_play_price:$video_cost; $uploader_amount = ( $video_cost_new *0.50 ); Can you help me with some code that would set the default price as a minimum , so the uploader can't set a price below the default price?
  21. Hi, Thanks again. "try the following" where?
  22. Thanks for your reply. I added: echo('$video_play_price: '.$video_play_price.PHP_EOL); echo('$charge: '.$charge.PHP_EOL); echo('$amout: '.$amout.PHP_EOL); $uploader_amount = $video_play_price - $charge; $uploader_amount = $amout - $charge; exit; to the end of the file. Then added this: display_errors = on to the php.ini file, but don't see anything displayed. Any additional help will be welcomed.
  23. Yes, I've tried this without success: $amout = 0; foreach ($id_array as $id) { $video_id = (int)PT_Secure($id); // get video data $video = $db->where('id', $id)->getOne(T_VIDEOS); $amout += $video->video_play_price?$video->video_play_price:$video_cost; } $charge = ( $amout *0.50 ); if ($wallet >= $amout) { $new_wallet = (string)($wallet - $amout); $db->startTransaction(); $inserted_records = 0; foreach ($id_array as $id) { $video_id = (int)PT_Secure($id); $uploader_amount = $amout - $charge;
  24. Can anyone else help me with this coding, please?
  25. Thank you for your reply, but the code you describe, I don't see it and how it works. I understand, but I can't put it in code that you're suggesting
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.