| Server IP : 127.0.0.1 / Your IP : 216.73.216.48 Web Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 System : Windows NT DESKTOP-3H4FHQJ 10.0 build 19045 (Windows 10) AMD64 User : win 10 ( 0) PHP Version : 8.2.12 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/xamppkk/htdocs-coblaa/social/ |
Upload File : |
<!--DOCTYPE html-->
<html>
<head >
<title>craneblue tv</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="main_css/index_tv.css" />
</head>
<?php
include('db.php');
session_start();
?>
<?php
if(isset($_SESSION['id']))
{
$programer_id = $_SESSION['id'];
$programer_name= $_SESSION['programer_name'];
}
?>
<body id="body" onloadk="main_user_tv_player2();" >
<a href="tv_login.php"><button>Login</button></a>
<?php
if(isset($_SESSION['id']))
{
$programer_id = $_SESSION['id'];
$programer_name= $_SESSION['programer_name'];
?>
<input type="text" id="my_id" value="<?php echo"$programer_id";?>" style="display:none;" />
<div id="" class="preview_video_display">
<div id="preview_video_display" class="preview_video_display_output" ></div>
<div id="program_text_css_output" stylek="margin_top:-50%;"></div>
</div>
<div class="main_video_btn_div">
<button id="play_preview_video_btn" class="action_play_btn" >Playx</button>
<button id="play_next_video_btn" class="action_play_btn" >start</button>
<button onclick="package_player();" id="play_online_btn" class="action_play_btn" >play online</button>
<button onclickk="main_user_tv_player();" id="pause_online_btn" class="action_play_btn" >play user</button>
<button onclick="package_player2();" onmousedown="first_player_pause();" id="tangle_play_online_btn" class="action_play_btn" >tangle</button>
<button onclick="loadDoc();" onmousedown="first_player_pause();" idk="tangle_play_online_btn" class="action_play_btn" >tle</button>
</div>
<div id="main_video_output_display" class="main_video_output_display"></div>
<div id="online_tv_player" class="online_tv_player" >
<div id="video_curr_duration_output"></div>
<div id="display_active_video_output"></div>
<div id="tv_video_output" class="tv_video_output" stylek="display:none;"></div>
<div id="tv_video_output2" class="tv_video_output"></div>
</div>
<script>
function preview_video_now(pvn)
{
my_id = document.getElementById('my_id').value;
playing_next_video = pvn;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"&playing_next_video="+playing_next_video+"&status=insert_video_playing_next",false);
xmlhttp.send(null);
/////////////////////////////////////////////////////////////////////////////////////////////////
play_preview_video = document.getElementById('play_preview_video_btn');
play_next_video = document.getElementById('play_next_video_btn');
document.getElementById('preview_video_display').innerHTML="";
curr_preview_viedo = document.createElement('VIDEO');
curr_preview_viedo.setAttribute("src","playing_video/"+pvn);
//curr_preview_viedo.autoplay = true;
curr_preview_viedo.controls = true;
curr_preview_viedo.style="width:100%;height:100%;margin-left:auto;";
//curr_preview_viedo.style="position: absolute;right: 0; bottom: 0;min-width: 100%;min-height: 100%;width: auto; height: auto; z-index: -100;background-size: cover;overflow: hidden;";
document.getElementById('preview_video_display').appendChild(curr_preview_viedo);
play_preview_video.addEventListener("click", disply_video_preview ,false);
play_next_video.addEventListener("click", video_playing_next ,false);
//alert(pvn);
function disply_video_preview()
{
curr_preview_viedo.play();
}
function video_playing_next()
{
/* playing_next_video = pvn;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","ajax_auto.php?my_id="+my_id+"&playing_next_video="+playing_next_video+"&status=insert_video_playing_next",false);
xmlhttp.send(null);
*/
document.getElementById('main_video_output_display').innerHTML="";
play_next_viedo = document.createElement('VIDEO');
play_next_viedo.setAttribute("src","playing_video/"+pvn);
play_next_viedo.play();
play_next_viedo.controls = true;
play_next_viedo.autoplay = true;
play_next_viedo.style="width:100%;height:100%;max-height:100%;margin-left:auto;";
document.getElementById('main_video_output_display').appendChild(play_next_viedo);
play_next_viedo.addEventListener('timeupdate', function() {
curr_duration = play_next_viedo.currentTime;
video_duration_mupercentage = Math.floor(curr_duration / play_next_viedo.duration * 100);
//video_duration = play_next_viedo.currentTime;
//alert(video_duration);
if(video_duration_mupercentage == 100 ){
clearInterval(starting_insertval);
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"&status=reset_insert_video_duration",false);
xmlhttp.send(null);
}
//insert_video_duration_updater();
});
}}
//if(play_next_viedo.pause == true){
//clearInterval(starting_insertval);
// }else{
starting_insertval = setInterval(function(){insert_video_duration_updater() },4000);
// }
setTimeout(function(){
playing_next_video = pvn;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","ajax_auto.php?my_id="+my_id+"&status=delete_video_monitor",false);
xmlhttp.send(null);
}, 10000);
//}
//}
function insert_video_duration_updater()
{
my_id = document.getElementById('my_id').value;
current_duration = curr_duration;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","ajax_auto.php?my_id="+my_id+"¤t_duration="+current_duration+"&status=insert_video_duration",false);
xmlhttp.send(null);
//alert(10);
}
</script>
<div class="source_btn_div">
<form method="post" enctype="multipart/form-data" >
<input type="file" onchange="upload_new_video();" id="video_upload" name="video_upload" style="display:none;" />
</form>
<button onclick="document.getElementById('video_upload').click();" class="add_video_btn" >Add video</button>
<button onclick="show_add_text_div();" class="add_video_btn" >Add Text</button>
<button id="show_text_div_btn" onclick="display_program_text_css();" class="add_video_btn" >Show Text</button>
<button id="hide_text_div_btn" onclick="hide_program_text_css();" class="add_video_btn" style="display:none;" >Hide Text</button>
<?php
if(isset($_SESSION['id']))
{
$programer_id = $_SESSION['id'];
$programer_name= $_SESSION['programer_name'];
?>
<a href="logout.php" ><button class="add_video_btn" >Logout</button></a>
<?php }else{ ?>
<a href="login.php" ><button class="add_video_btn" >Login</button></a>
<?php }?>
<div class="user_name_div" >
<?php
if(isset($_SESSION['id']))
{
$programer_id = $_SESSION['id'];
$programer_name= $_SESSION['programer_name'];
echo $programer_name;
}
?>
</div>
</div>
<div class="video_input_source_div">
<div id="display_pending_video_output" ></div>
<div id="pending_video_option_action_div" class="pending_video_option_action_div" >
<button onClick="remove_pending_video();" class="pending_video_option_action_btn" >Remove</button>
<button onClick="cancle_remove_pending_video();" class="pending_video_option_action_btn" >Cancel</button>
</div>
<!--div id="rat"></div-->
<script>
function preview_video_now(pvn)
{
my_id = document.getElementById('my_id').value;
playing_next_video = pvn;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"&playing_next_video="+playing_next_video+"&status=insert_video_playing_next",false);
xmlhttp.send(null);
/////////////////////////////////////////////////////////////////////////////////////////////////
play_preview_video = document.getElementById('play_preview_video_btn');
play_next_video = document.getElementById('play_next_video_btn');
document.getElementById('preview_video_display').innerHTML="";
curr_preview_viedo = document.createElement('VIDEO');
curr_preview_viedo.setAttribute("src","playing_video/"+pvn);
//curr_preview_viedo.autoplay = true;
curr_preview_viedo.controls = true;
curr_preview_viedo.style="width:100%;height:100%;margin-left:auto;";
//curr_preview_viedo.style="position: absolute;right: 0; bottom: 0;min-width: 100%;min-height: 100%;width: auto; height: auto; z-index: -100;background-size: cover;overflow: hidden;";
document.getElementById('preview_video_display').appendChild(curr_preview_viedo);
play_preview_video.addEventListener("click", disply_video_preview ,false);
play_next_video.addEventListener("click", video_playing_next ,false);
//alert(pvn);
function disply_video_preview()
{
curr_preview_viedo.play();
}
function video_playing_next()
{
/* playing_next_video = pvn;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","ajax_auto.php?my_id="+my_id+"&playing_next_video="+playing_next_video+"&status=insert_video_playing_next",false);
xmlhttp.send(null);
*/
document.getElementById('main_video_output_display').innerHTML="";
play_next_viedo = document.createElement('VIDEO');
play_next_viedo.setAttribute("src","playing_video/"+pvn);
play_next_viedo.play();
play_next_viedo.controls = true;
play_next_viedo.autoplay = true;
play_next_viedo.style="width:100%;height:100%;max-height:100%;margin-left:auto;";
document.getElementById('main_video_output_display').appendChild(play_next_viedo);
play_next_viedo.addEventListener('timeupdate', function() {
curr_duration = play_next_viedo.currentTime;
video_duration_mupercentage = Math.floor(curr_duration / play_next_viedo.duration * 100);
//video_duration = play_next_viedo.currentTime;
//alert(video_duration);
if(video_duration_mupercentage == 100 ){
clearInterval(starting_insertval);
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"&status=reset_insert_video_duration",false);
xmlhttp.send(null);
}
//insert_video_duration_updater();
});
}}
//if(play_next_viedo.pause == true){
//clearInterval(starting_insertval);
// }else{
starting_insertval = setInterval(function(){insert_video_duration_updater() },4000);
// }
setTimeout(function(){
playing_next_video = pvn;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"&status=delete_video_monitor",false);
xmlhttp.send(null);
}, 10000);
//}
//}
function insert_video_duration_updater()
{
my_id = document.getElementById('my_id').value;
current_duration = curr_duration;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"¤t_duration="+current_duration+"&status=insert_video_duration",false);
xmlhttp.send(null);
//alert(10);
}
</script>
<script>
function upload_new_video()
{
new_video = document.getElementById('video_upload').files[0];
video_type = new_video.type;
video_name = new_video.name;
if(video_type !=="video/mp4"){alert('Video Fomate Not Supported');}else{
var formdata = new FormData();
formdata.append('video_upload',new_video);
ajax = new XMLHttpRequest();
ajax.addEventListener("load", completeHandler, false);
ajax.open('POST','video_auto_upload.php');
ajax.send(formdata);
function completeHandler(){
document.getElementById('video_upload').value="";
display_pending_video();
//document.getElementById('rat').innerHTML=ajax.responseText;
}
}
}
display_pending_video();
function display_pending_video()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?status=display_pending_video",false);
xmlhttp.send(null);
// document.getElementById('new_post_input').value="";
document.getElementById('display_pending_video_output').innerHTML =xmlhttp.responseText;
// alert('788');
}
function show_more_option_btn(smob)
{
pend_vid_option_btn ='pending_video_option_btn'+smob;
//pend_video_option_action_btn ='pending_video_option_action_btn'+spvod;
document.getElementById(pend_vid_option_btn).style="color:#fff;";
}
function hide_more_option_btn(hmob)
{
pend_vid_option_btn ='pending_video_option_btn'+hmob;
document.getElementById(pend_vid_option_btn).style="color:#000;";
//alert(hmob);
}
function show_pending_video_option_div(spvod)
{
document.getElementById('pending_video_option_action_div').style.display="block";
new_pending_video_id = spvod;
}
function remove_pending_video()
{
pend_video_id = new_pending_video_id;
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"&pend_video_id="+pend_video_id+"&status=remove_pending_video",false);
xmlhttp.send(null);
display_pending_video();
cancle_remove_pending_video();
}
function cancle_remove_pending_video()
{
document.getElementById('pending_video_option_action_div').style.display="none";
}
</script>
</div><!--end of video_input_source_div-->
<script>
function package_player()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?status=get_video_curr_duration",false);
xmlhttp.send(null);
document.getElementById('video_curr_duration_output').innerHTML =xmlhttp.responseText;
video_active_duration = document.getElementById('video_active_duration').value;
xmlhttp = new XMLHttpRequest();
//pause_online_btn_now = xmlhttp.addEventListener('load', pause_first_player ,false);
xmlhttp.open("GET","auto_page_tv.php?status=display_active_video_url",false);
xmlhttp.send(null);
document.getElementById('display_active_video_output').innerHTML =xmlhttp.responseText;
now_playing_video_url = document.getElementById('online_active_video').value;
// pause_online_btn_now = document.getElementById('pause_online_btn');
// pause_online_btn_now.addEventListener('click', pause_first_player ,false);
//pause_online_btn_now = document.getElementById('tangle_play_online_btn');
//pause_online_btn_now.addEventListener('mousedown', pause_first_player ,false);
document.getElementById('tv_video_output').innerHTML="";
var playing_online_viedo = document.createElement('VIDEO');
playing_online_viedo.setAttribute("src","playing_video/"+now_playing_video_url);
playing_online_viedo.autoplay =true;
playing_online_viedo.controls = true;
playing_online_viedo.currentTime = video_active_duration;
playing_online_viedo.play();
playing_online_viedo.style="width:100%;height:100%;";
//document.getElementById('tv_video_output').style="display:block;";
//document.getElementById('tv_video_output2').style="display:none;";
mag = document.getElementById('tv_video_output').appendChild(playing_online_viedo);
playing_online_viedo.addEventListener('timeupdate', function(){
curr_dur = playing_online_viedo.currentTime;
vid_online_duration_mupercentage = Math.floor(curr_dur / playing_online_viedo.duration * 100);
//video_duration = play_next_viedo.currentTime;
if(vid_online_duration_mupercentage == 100 ){
package_player();
}
});
playing_online_viedo.addEventListener('timeupdate', function(){
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?status=start_video_monitor",false);
xmlhttp.send(null);
active_vid_monitor = xmlhttp.responseText;
active_vid_monitor_length = active_vid_monitor.length;
if(active_vid_monitor_length == 10){
//alert(active_vid_monitor_length);
package_player2();
document.getElementById('tv_video_output2').style="display:block;";
document.getElementById('tv_video_output').style="display:none;";
document.getElementById('play_online_btn').style="display:block;";
document.getElementById('tangle_play_online_btn').style="display:none;";
playing_online_viedo.pause();
//alert('247');
}
});
//alert('247');
}
function package_player2()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?status=get_video_curr_duration",false);
xmlhttp.send(null);
document.getElementById('video_curr_duration_output').innerHTML =xmlhttp.responseText;
video_active_duration = document.getElementById('video_active_duration').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?status=display_active_video_url_two",false);
//xmlhttp.addEventListener('load', checkit_out );
xmlhttp.send(null);
document.getElementById('display_active_video_output').innerHTML =xmlhttp.responseText;
now_playing_video_url = document.getElementById('online_active_video').value;
document.getElementById('tv_video_output2').innerHTML="";
var playing_online_viedo = document.createElement('VIDEO');
playing_online_viedo.setAttribute("src","playing_video/"+now_playing_video_url);
playing_online_viedo.autoplay =true;
playing_online_viedo.controls = true;
playing_online_viedo.currentTime = video_active_duration;
playing_online_viedo.play();
playing_online_viedo.style="width:100%;height:100%;";
//document.getElementById('tv_video_output').style="display:block;";
//document.getElementById('tv_video_output2').style="display:none;";
mag = document.getElementById('tv_video_output2').appendChild(playing_online_viedo);
playing_online_viedo.addEventListener('timeupdate', function(){
curr_dur = playing_online_viedo.currentTime;
vid_online_duration_mupercentage = Math.floor(curr_dur / playing_online_viedo.duration * 100);
//video_duration = play_next_viedo.currentTime;
if(vid_online_duration_mupercentage == 100 ){
package_player2();
//main_user_tv_player();
//alert('vid_online_duration_mupercentage');
}
//start_video_monitor();
});
playing_online_viedo.addEventListener('timeupdate', function(){
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?status=start_video_monitor",false);
xmlhttp.send(null);
active_vid_monitor = xmlhttp.responseText;
active_vid_monitor_length = active_vid_monitor.length;
if(active_vid_monitor_length == 14){
//alert(active_vid_monitor_length);
package_player();
document.getElementById('tv_video_output').style="display:block;";
document.getElementById('tv_video_output2').style="display:none;";
playing_online_viedo.pause();
document.getElementById('play_online_btn').style="display:none;";
document.getElementById('tangle_play_online_btn').style="display:block;";
//alert('244');
}
});
//alert('246');
}
/*
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
//document.getElementById("demo").innerHTML = this.responseText;
alert('Am ready boss');
}
};
xhttp.open("GET", "ajax_auto.php", true);
xhttp.send();
}
*/
function show_add_text_div()
{
document.getElementById("program_text_div").style.display="block";
}
function close_add_text_div()
{
document.getElementById("program_text_div").style.display="none";
}
function add_text()
{
my_id = document.getElementById('my_id').value;
program_text_input = document.getElementById('program_text_input').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","auto_page_tv.php?my_id="+my_id+"&program_text_input="+program_text_input+"&status=insert_text_defult_css",false);
xmlhttp.send(null);
// document.getElementById('display_active_video_output').innerHTML =xmlhttp.responseText;
//alert('input');
dis_user_program_text_edit();
}
function live_css_update()
{
my_id = document.getElementById('my_id').value;
/*text_float= document.getElementById('float').value;
text_position = document.getElementById('text_position').value;
text_div_width = document.getElementById('text_div_width').value;
text_div_height = document.getElementById('text_div_height').value;
line_height = document.getElementById('line_height').value;
margin_left = document.getElementById('margin_left').value;
margin_right = document.getElementById('margin_right').value;
margin_top = document.getElementById('margin_top').value;
margin_bottom = document.getElementById('margin_bottom').value;
padding_left = document.getElementById('padding_left').value;
padding_right = document.getElementById('padding_right').value;
padding_top = document.getElementById('padding_top').value;
padding_bottom = document.getElementById('padding_bottom').value*/
font_size = document.getElementById('font_size').value;
background = document.getElementById('background').value;
font_color = document.getElementById('font_color').value;
//text_align = document.getElementById('text_align').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","ajax_auto.php?my_id="+my_id+"&font_size="+font_size+"&background="+background+"&font_color="+font_color+"&status=update_text_div_width_defult_css",false);
xmlhttp.send(null);
//display_program_text_css();
font_size = document.getElementById('font_size').value="Select Font Size";
background = document.getElementById('background').value="Select Background";
font_color = document.getElementById('font_color').value="Select Font Color";
}
function display_program_text_css()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","ajax_auto.php?my_id="+my_id+"&status=display_program_text_admin",false);
xmlhttp.send(null);
document.getElementById('program_text_css_output').innerHTML =xmlhttp.responseText;
document.getElementById('program_text_css_output').style.display="block";
document.getElementById("show_text_div_btn").style.display="none";
document.getElementById("hide_text_div_btn").style.display="block";
//alert('oop');
}
function hide_program_text_css()
{
my_id = document.getElementById('my_id').value;
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET","ajax_auto.php?my_id="+my_id+"&status=update_text_action_status_offf",false);
xmlhttp.send(null);
document.getElementById('program_text_css_output').innerHTML =xmlhttp.responseText;
document.getElementById('program_text_css_output').style.display="none";
document.getElementById("show_text_div_btn").style.display="block";
document.getElementById("hide_text_div_btn").style.display="none";
}
</script>
<?php } ?>
</body>
</html>