{"id":133,"date":"2021-01-27T08:46:46","date_gmt":"2021-01-27T08:46:46","guid":{"rendered":"https:\/\/www.donoalerts.com\/kfcbelly\/?page_id=133"},"modified":"2025-08-13T03:45:10","modified_gmt":"2025-08-13T10:45:10","slug":"133-2","status":"publish","type":"page","link":"https:\/\/www.donoalerts.com\/deepak\/","title":{"rendered":""},"content":{"rendered":"\r\n<script type=\"text\/javascript\">\r\n\r\nfunction ulClear(){\r\n         var unloadFile=document.getElementById(\"ulPHPclear\");\r\n         document.getElementById(\"file1\").value=\"\";\r\n         unloadFile.innerHTML=\"Local file cleared...\";\r\n         console.log(unloadFile.innerHTML);\r\n         document.getElementById(\"start-time\").value='00:00';\r\n}\r\n\r\nfunction ulClear_notime(){\r\n         var unloadFile=document.getElementById(\"ulPHPclear\");\r\n         document.getElementById(\"file1\").value=\"\";\r\n         unloadFile.innerHTML=\"Local file cleared...\";\r\n         \/\/console.log(unloadFile.innerHTML);\r\n}\r\n\r\n\/\/ for media converstion test\r\nfunction completeHandler2(event){\r\n         \/\/_(\"status\").innerHTML=event.target.responseText;\r\n         document.getElementById(\"status\").innerHTML=event.target.responseText;\r\n         \/\/_(\"progressBar\").value=0;\r\n         document.getElementById(\"progressBar\").value=0;\r\n}\r\n\r\n\/\/ presumes file copy completed...\r\nfunction ulLoaded(){\r\n         \/\/--------------------media converstion test-----------------------\r\n         var uFname=document.getElementById(\"file1\").files[0].name;\r\n         var ulMsg=document.getElementById(\"ulPHPclear\");\r\n         ulMsg.innerHTML=uFname+' '+'file loaded and ready...';\r\n\r\n\r\n\/\/ only for video files, (uncomment outer backslashes)\r\n\/\/ try to merge all media under one php file, besides file_upload_parser.php and mov_to_mp4.php\r\n         \/\/if(uFname.slice(-3).toLowerCase()==\"mov\"){\r\n\/\/         $.ajax({\r\n\/\/         type:\"POST\",\r\n\/\/         url:\"mov_to_mp4.php\",\r\n         \/\/contentType:\"text\/plain\",\r\n         \/\/contentType:\"application\/x-www-form-urlencoded\",\r\n         \/\/contentType:\"multipart\/form-data\",\r\n         \/\/contentType:\"application\/json;charset=utf-8\",\r\n         \/\/contentType:\"application\/json\",\r\n         \/\/dataType:\"text\",\r\n\/\/         dataType:\"html\",\r\n         \/\/dataType:\"json\",\r\n         \/\/ data to post, data can parameters or json???\r\n         \/\/ belowis parameter???\r\n         \/\/data:{'mov_file':uFname},\r\n         \/\/ below is json\r\n\/\/         data:JSON.stringify({'mov_file':uFname}),\r\n         \/\/ use msg to obtain returned results for text???\r\n         \/*success:function(msg){\r\n                              alert(msg);\r\n                              console.log(msg);\r\n                 }\r\n         });*\/\r\n         \/\/success returns values from target, get, gets target value, post, add new value to target???\r\n\/\/         success:function(data){\r\n\/\/                               console.log(data);\r\n\/\/                 }\r\n\/\/         });\r\n\r\n           \/\/var form=document.getElementById(\"file1\");\r\n           \/\/ to append whole form\r\n           \/\/var formdata=new FormData(form);\r\n\r\n\/\/           uFname=uFname.slice(0,-3)+'mp4';\r\n\/\/           var file=document.getElementById(\"file1\");\r\n\/\/           var file=file.files[0];\r\n\/\/           console.log('file.files[0].name is '+file.name);\r\n\/\/           var formdata=new FormData();\r\n\/\/           \/\/ first paremeter file1 is the target, the second is the object for the new value ???\r\n\/\/           formdata.append(\"file1\",file);\r\n\r\n\/\/           var ajax=new XMLHttpRequest();\r\n\/\/           ajax.upload.addEventListener(\"progress\",progressHandler,false);\r\n\/\/           ajax.addEventListener(\"load\",completeHandler2,false);\r\n\/\/           ajax.addEventListener(\"error\",errorHandler,false);\r\n\/\/           ajax.addEventListener(\"abort\",abortHandler,false);\r\n\/\/           ajax.open(\"POST\",\"file_upload_parser.php\");\r\n\/\/           ajax.send(formdata);\r\n\/\/           console.log('document file is '+document.getElementById(\"file1\").files[0].name);\r\n\/\/           var ulMsg=document.getElementById(\"ulPHPclear\");\r\n\/\/           ulMsg.innerHTML=uFname+' '+'file loaded and ready...';\r\n\/\/           console.log(ulMsg.innerHTML);\r\n\/\/           return 0;\r\n\/\/         }else{\r\n\/\/           var uFname=document.getElementById(\"file1\").files[0].name;\r\n\/\/           var ulMsg=document.getElementById(\"ulPHPclear\");\r\n\/\/           console.log('uFname is '+uFname);\r\n\/\/           console.log('ulMsg is '+ulMsg);\r\n\/\/           if(uFname==(null || '' || \"\" || undefined)){\r\n\/\/             return 0;\r\n\/\/           }else{\r\n\/\/             ulMsg.innerHTML=uFname+' '+'file loaded and ready...';\r\n\/\/             console.log(ulMsg.innerHTML);\r\n\/\/             return 0;\r\n\/\/           }\r\n\/\/         }\r\n         return 0;\r\n\/\/       }\r\n}\r\n\r\n\r\n<\/script>\r\n\r\n<!-- web alert -->\r\n<script type=\"text\/javascript\">\r\nfunction alertTest(){\r\n  alert('entered the alerTest...');\r\n}\r\n<\/script>\r\n\r\n<!-- web redirect -->\r\n<script type=\"text\/javascript\">\r\nfunction donoPAGE(ns_user){\r\n  location.replace('\/'+ns_user+'\/pro\/paypal-dono-pro\/');\r\n}\r\n<\/script>\r\n\r\n<!-- ajax requires jquery -->\r\n<script src=\"https:\/\/code.jquery.com\/jquery-3.4.1.min.js\" integrity=\"sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=\"crossorigin=\"anonymous\"><\/script>\r\n\r\n<script type=\"text\/javascript\">\r\nfunction submitForm(){\r\n  console.log('entered submitForm...');\r\n  \/\/document.getElementById(\"buttonID\").submit();\r\n  \/\/document.forms[\"callIf\"].submit();\r\n  \/\/document.buttonID.submit();\r\n  \/\/ #hiddenBtn is the ID???\r\n  $('#hiddenBtn').click();\r\n}\r\n<\/script>\r\n\r\n<script>\r\n\/\/when the window has been completed loaded, we search for all textbox with time-input CSS class\r\nwindow.onload = function(e){\r\n\t\/\/perform a for loop to add the event handler\r\n\tArray.from(document.getElementsByClassName(\"time-input\")).forEach(\r\n\t\tfunction(element, index, array) {\r\n\t\t\t\/\/Add the event handler to the time input\r\n\t\t\telement.addEventListener(\"blur\", inputTimeBlurEvent);\r\n\t\t}\r\n\t);\r\n}\r\n\r\ninputTimeBlurEvent = function(e){\r\n\tvar newTime = \"\";\r\n\tvar timeValue = e.target.value;\r\n\tvar numbers = [];\r\n\tvar splitTime = [];\r\n\t\r\n\t\/\/1st condition: if the value entered is empty, we set the default value\r\n\tif(timeValue.trim() == \"\"){\r\n\t\te.target.value = \"00:00\";\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t\/\/2nd condition: only allow numbers, dot and double dot. If not match set the default value. Example => 23a55\r\n\tvar regex = \/^[0-9.:]+$\/;\r\n\tif( !regex.test(timeValue) ) {\r\n\t\te.target.value = \"00:00\";\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t\/\/3rd condition: replace the dot with double dot. Example => 23.55\r\n\te.target.value = e.target.value.replace(\".\", \":\").replace(\/\\.\/g,\"\");\r\n\ttimeValue = e.target.value;\r\n\t\r\n\t\/\/4th condition: auto add double dot if the input entered by user contains numbers only (no dot or double dot symbol found)\r\n\t\/\/example => 2344 or 933\r\n\tif(timeValue.indexOf(\".\") == -1 && timeValue.indexOf(\":\") == -1){\r\n\t\t\/\/check if the length is more than 4 we strip it up to 4\r\n\t\tif(timeValue.trim().length > 4){\r\n\t\t\ttimeValue = timeValue.substring(0,4);\r\n\t\t}\r\n\t\tvar inputTimeLength = timeValue.trim().length;\r\n\t\tnumbers = timeValue.split('');\r\n\t\tswitch(inputTimeLength){\r\n\t\t\t\/\/Example => 2\r\n\t\t\tcase 1:\r\n\t\t\t      if(parseInt(timeValue) <= 9){\r\n\t\t\t\t      e.target.value = \"00:0\" + timeValue;\r\n\t\t\t      }\r\n\t\t              break;\r\n\t\t\t\/\/Example => 23\r\n\t\t\tcase 2:\r\n\t\t\t\tif(parseInt(timeValue) <= 0){\r\n\t\t\t\t\te.target.value = \"00:00\";\r\n\t\t\t\t}else if(parseInt(timeValue) >= 60){\r\n\t\t\t\t\te.target.value = \"00:00\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\/\/e.target.value = timeValue + \":00\";\r\n\t\t\t\t\te.target.value = \"00:\" + timeValue;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\/\/Example => 234\r\n\t\t\tcase 3:\r\n\t\t\t\tnewTime = \"0\" + numbers[0] + \":\";\r\n\t\t\t\tif(parseInt(numbers[1] + numbers[2]) > 59){\r\n\t\t\t\t\tnewTime += \"00\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewTime += numbers[1] + numbers[2];\r\n\t\t\t\t}\r\n\t\t\t\te.target.value = newTime;\r\n\t\t\t\tbreak;\r\n\t\t\t\/\/Example 2345\r\n\t\t\tcase 4:\r\n\t\t\t\tif(parseInt(numbers[0] + numbers[1]) >= 60){\r\n\t\t\t\t\tnewTime = \"00:\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewTime = numbers[0] + numbers[1] + \":\";\r\n\t\t\t\t}\r\n\t\t\t\tif(parseInt(numbers[2] + numbers[3]) > 59){\r\n\t\t\t\t\tnewTime += \"00\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnewTime += numbers[2] + numbers[3];\r\n\t\t\t\t}\r\n\t\t\t\te.target.value = newTime;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t\/\/5th condition: if double dot found\r\n\tvar doubleDotIndex = timeValue.indexOf(\":\");\r\n\t\/\/if user doesnt enter the first part of hours example => :35\r\n\tif(doubleDotIndex == 0){\r\n\t\tnewTime = \"00:\";\r\n\t\tsplitTime = timeValue.split(':');\r\n\t\tnumbers = splitTime[1].split('');\r\n\t\tif(parseInt(numbers[0] + numbers[1]) > 59){\r\n\t\t\tnewTime += \"00\";\r\n\t\t}else{\r\n\t\t\tnewTime += numbers[0] + numbers[1];\r\n\t\t}\r\n\t\te.target.value = newTime;\r\n\t\treturn;\r\n\t}else{\r\n\t\t\/\/if user enter not full time example=> 9:3\r\n\t\tsplitTime = timeValue.split(':');\r\n\t\tvar partTime1 = splitTime[0].split('');\r\n\t\tif(partTime1.length == 1){\r\n\t\t\tnewTime = \"0\" + partTime1[0] + \":\";\r\n\t\t}else{\r\n\t\t\tif(parseInt(partTime1[0] + partTime1[1]) > 23){\r\n\t\t\t\tnewTime = \"00:\";\r\n\t\t\t}else{\r\n\t\t\t\tnewTime = partTime1[0] + partTime1[1] + \":\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tvar partTime2 = splitTime[1].split('');\r\n\t\tif(partTime2.length == 1){\r\n\t\t\tnewTime += \"0\" + partTime2[0];\r\n\t\t}else{\r\n\t\t\tif(parseInt(partTime2[0] + partTime2[1]) > 59){\r\n\t\t\t\tnewTime += \"00\";\r\n\t\t\t}else{\r\n\t\t\t\tnewTime += partTime2[0] + partTime2[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\te.target.value = newTime;\r\n\t\treturn;\r\n\t}\r\n}\r\n\r\n<\/script>\r\n\r\n<script type=\"text\/javascript\">\r\nfunction checkSpace(event){\r\n  if(event.which==32){\r\n    event.preventDefault();\r\n    return false;\r\n   }\r\n}\r\n<\/script>\r\n\r\n<form id=\"callIf\" name=\"callIf\" accept-charset=\"UTF-8\" method=\"POST\" enctype=\"multipart\/form-data\" action=\"\">\r\n  <label for=\"web_user\" style=\"float:left;font-size:16px;font-family:Times New Roman;\">Name to use:<\/label>\r\n  <input type=\"text\" required pattern=\"\\S(.*\\S)?\" id=\"web_user\" name=\"web_user\" onkeypress=\"checkSpace(event)\" maxlength=\"40\" style=\"float:left;width:250px;box-shadow: 5px 5px #888888;border-radius:5px;\" placeholder=\"Name\"><br><br><br>\r\n\r\n  <label for=\"price\" style=\"float:left;font-size:16px;font-family:Times New Roman;\">Amount to enter:<br>Min <span style=\"color:green;\">$<\/span>3 TTS, Min <span style=\"color:green;font-size:12px;font-family:Times New Roman;\">$<\/span>5 Media (60 seconds)<br>Amount per second after is 0.04 USD\/second.<\/label>\r\n  <input type=\"number\" required=\"\" id=\"price\" name=\"price\" size=\"20\" maxlength=\"6\" style=\"float:left;width:150px;margin-left:15px;box-shadow: 5px 5px #888888;border-radius:5px;\" placeholder=\"Enter USD\" min=3 max=\"100\" step=\".01\"><br><br><br><br><br>\r\n\r\n  <textarea id=\"tts_message\" name=\"tts_message\" rows=\"4\" cols=\"40\" maxlength=\"255\" placeholder=\"TTS Message (optional)\" style=\"box-shadow: 5px 5px #888888;border-radius:5px;\"><\/textarea><br><br>\r\n\r\n  <label style=\"font-weight:bold;float:left;font-size:20px;font-family:Times New Roman;\">For media, type or paste URL or Browse media file, set \"Media Start Time\" ONLY AT BOTTOM PAGE IF NEEDED:<\/label><br><br>\r\n\r\n  <label for=\"yt_url\" style=\"font-size:16px;font-family:Times New Roman;float:left;\">Media URL (YT only) option:<\/label>\r\n  <input type=\"url\" id=\"yt_url\" name=\"yt_url\" size=\"60\" maxlength=\"100\" style=\"font-size:20px;float:left;box-shadow: 5px 5px #888888;border-radius:5px;\" placeholder=\"(no age-restricted or blocked media)...\"><br><br>\r\n  <label style=\"margin-top:50px;font-size:16px;font-family:Times New Roman;float:left;\">Upload MP3\/M4A (audio) alternative option (Max file size is 15MB):<\/label><br><br><br><br><br>\r\n\r\n<input type=\"file\" id=\"file1\" name=\"file1\" style=\"float:left;box-shadow: 5px 5px #888888;\">\r\n\r\n<h5 id=\"ulPHPclear\" style=\"text-align:left;font-size:20px;\"><\/h5>\r\n<input type=\"button\" value=\"Clear Uploaded File\" onclick=\"ulClear();\" style=\"margin-top:25px;float:left;color:black;border:1px solid black;background-color:#e7e7e7;font-size:16px;height:50px;length:50px;box-shadow: 5px 5px #888888;\"><br><br>\r\n\r\n  <label for=\"start-time\" style=\"margin-top:25px;float:right;font-size:16px;font-weight:bold;\">Media Start Time (Minutes:Seconds)<\/label><br><br>\r\n  <input id=\"start-time\" name=\"start-time\" type=\"text\" maxlength=\"5\" value=\"00:00\" class=\"time-input\" style=\"margin-left:50px;margin-right:10px;float:right;font-size:18px;padding:10px;border-radius:5px;border:solid 1px #ccc;width:80px;box-shadow: 5px 5px #888888;\"\/><br><br>\r\n\r\n  <label style=\"float:left;font-weight:bold;font-size:16px;margin-right:15px;\">Click Submit to Continue.<\/label><br><br>\r\n\r\n<input type=\"submit\" id=\"callIf\" name=\"callIf\" value=\"Submit\" style=\"float:left;margin-right:15px;margin-bottom:15px;font-size:16px;box-shadow: 5px 5px #888888;\">\r\n\r\n\r\n<\/form>\r\n\r\n<br><br><br>\r\n<br><br>\r\n<a href=\"https:\/\/www.donoalerts.com\/deepak\/tosp\/\" style=\"text-align:center;display:block;\">Terms of Service and Privacy<\/a>\r\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/pages\/133"}],"collection":[{"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/comments?post=133"}],"version-history":[{"count":184,"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/pages\/133\/revisions"}],"predecessor-version":[{"id":4202,"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/pages\/133\/revisions\/4202"}],"wp:attachment":[{"href":"https:\/\/www.donoalerts.com\/deepak\/wp-json\/wp\/v2\/media?parent=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}