mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	pulling from ftp
This commit is contained in:
		
							
								
								
									
										0
									
								
								js/iscroll.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								js/iscroll.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								js/list.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								js/list.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								js/search.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								js/search.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								js/visualize.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								js/visualize.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										10
									
								
								js/youtube.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										10
									
								
								js/youtube.js
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							@@ -41,8 +41,16 @@ $(document).ready(function()
 | 
				
			|||||||
	}).responseText;
 | 
						}).responseText;
 | 
				
			||||||
	//console.log(response);
 | 
						//console.log(response);
 | 
				
			||||||
	response = $.parseJSON(response);
 | 
						response = $.parseJSON(response);
 | 
				
			||||||
 | 
						console.log(response["nowPlaying"].length);
 | 
				
			||||||
 | 
						try{	
 | 
				
			||||||
		for(first in response["nowPlaying"]) break;
 | 
							for(first in response["nowPlaying"]) break;
 | 
				
			||||||
		console.log(first);
 | 
							console.log(first);
 | 
				
			||||||
 | 
							response = first;
 | 
				
			||||||
 | 
						}catch(err){
 | 
				
			||||||
 | 
							response = "1";
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	$.ajax({
 | 
						$.ajax({
 | 
				
			||||||
		type: 'get',
 | 
							type: 'get',
 | 
				
			||||||
		url: 'php/timedifference.php',
 | 
							url: 'php/timedifference.php',
 | 
				
			||||||
@@ -54,7 +62,7 @@ $(document).ready(function()
 | 
				
			|||||||
	});
 | 
						});
 | 
				
			||||||
	console.log("timediff:"+timeDifference[0]);
 | 
						console.log("timediff:"+timeDifference[0]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	response = first;
 | 
						
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tag = document.createElement('script');
 | 
						tag = document.createElement('script');
 | 
				
			||||||
	tag.src = "https://www.youtube.com/iframe_api";
 | 
						tag.src = "https://www.youtube.com/iframe_api";
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										0
									
								
								php/admin.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								php/admin.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										33
									
								
								php/change.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										33
									
								
								php/change.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							@@ -14,6 +14,7 @@ else $list=$list[1];
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
$list="../lists/".$list.".json";
 | 
					$list="../lists/".$list.".json";
 | 
				
			||||||
$array = array("nowPlaying" => array(), "songs" => array(), "conf" => array("startTime" => time(), "views" => 0, "skips" => array()));
 | 
					$array = array("nowPlaying" => array(), "songs" => array(), "conf" => array("startTime" => time(), "views" => 0, "skips" => array()));
 | 
				
			||||||
 | 
					$array = json_encode($array);
 | 
				
			||||||
$f = @fopen($list,"x");
 | 
					$f = @fopen($list,"x");
 | 
				
			||||||
if($f){ fwrite($f,$array); fclose($f); }
 | 
					if($f){ fwrite($f,$array); fclose($f); }
 | 
				
			||||||
$file = file_get_contents($list);
 | 
					$file = file_get_contents($list);
 | 
				
			||||||
@@ -35,10 +36,14 @@ if(isset($_REQUEST['thisUrl'])){
 | 
				
			|||||||
            $save = true;
 | 
					            $save = true;
 | 
				
			||||||
            //array_shift($data["songs"]);
 | 
					            //array_shift($data["songs"]);
 | 
				
			||||||
            //array_shift($data["nowPlaying"]);
 | 
					            //array_shift($data["nowPlaying"]);
 | 
				
			||||||
 | 
					            if(!is_null($np[0]["id"])){
 | 
				
			||||||
                array_shift($data["songs"]);
 | 
					                array_shift($data["songs"]);
 | 
				
			||||||
                $data["songs"][$np[0]["id"]] = array("id" => $np[0]["id"], "title" => $np[0]["title"], "votes" => $np[0]["votes"], "added" => time(), "guids" => array());
 | 
					                $data["songs"][$np[0]["id"]] = array("id" => $np[0]["id"], "title" => $np[0]["title"], "votes" => $np[0]["votes"], "added" => time(), "guids" => array());
 | 
				
			||||||
                array_shift($data["nowPlaying"]);
 | 
					                array_shift($data["nowPlaying"]);
 | 
				
			||||||
                $data["nowPlaying"][$firstSong[0]["id"]] = array("id" => $firstSong[0]["id"], "title" => $firstSong[0]["title"], "votes" => 0, "added" => $firstSong[0]["added"], "guids" => $firstSong[0]["guids"]);
 | 
					                $data["nowPlaying"][$firstSong[0]["id"]] = array("id" => $firstSong[0]["id"], "title" => $firstSong[0]["title"], "votes" => 0, "added" => $firstSong[0]["added"], "guids" => $firstSong[0]["guids"]);
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
            //array_push($data["songs"], $add);
 | 
					            //array_push($data["songs"], $add);
 | 
				
			||||||
            $data["conf"]["skips"] = array();
 | 
					            $data["conf"]["skips"] = array();
 | 
				
			||||||
            $data["conf"]["startTime"] = time();
 | 
					            $data["conf"]["startTime"] = time();
 | 
				
			||||||
@@ -53,6 +58,13 @@ if(isset($_REQUEST['thisUrl'])){
 | 
				
			|||||||
            array_shift($firstSong[0]);
 | 
					            array_shift($firstSong[0]);
 | 
				
			||||||
        }*/
 | 
					        }*/
 | 
				
			||||||
        file_put_contents($list, json_encode($data));
 | 
					        file_put_contents($list, json_encode($data));
 | 
				
			||||||
 | 
					     }else if(is_null($np[0]["id"]))
 | 
				
			||||||
 | 
					     {
 | 
				
			||||||
 | 
					        array_shift($data["songs"]);
 | 
				
			||||||
 | 
					        //$data["songs"][$np[0]["id"]] = array("id" => $np[0]["id"], "title" => $np[0]["title"], "votes" => $np[0]["votes"], "added" => time(), "guids" => array());
 | 
				
			||||||
 | 
					        array_shift($data["nowPlaying"]);
 | 
				
			||||||
 | 
					        $data["nowPlaying"][$firstSong[0]["id"]] = array("id" => $firstSong[0]["id"], "title" => $firstSong[0]["title"], "votes" => 0, "added" => $firstSong[0]["added"], "guids" => $firstSong[0]["guids"]);
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
     if($action == "save" && !$save) 			//count views
 | 
					     if($action == "save" && !$save) 			//count views
 | 
				
			||||||
     {
 | 
					     {
 | 
				
			||||||
@@ -67,25 +79,20 @@ else if(isset($_GET['v'])){ //add
 | 
				
			|||||||
    $name = htmlspecialchars($_GET['n']);
 | 
					    $name = htmlspecialchars($_GET['n']);
 | 
				
			||||||
    if(!in_array($video, $data["songs"]))
 | 
					    if(!in_array($video, $data["songs"]))
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        //$arrayAdd = array("id" => array("id" => $video, "title" => $name, "votes" => array()));
 | 
					        if(count($data["nowPlaying"]) > 0) $place = "songs";
 | 
				
			||||||
        //array_push($data[0], $video);
 | 
					        else $place = "nowPlaying";
 | 
				
			||||||
        $data["songs"][$video] = array("id" => $video, "title" => $name, "votes" => 0, "added" => time(), "guids" => array());
 | 
					        $data[$place][$video] = array("id" => $video, "title" => $name, "votes" => 0, "added" => time(), "guids" => array());
 | 
				
			||||||
        $data["songs"][$video]["votes"] = 1;
 | 
					        $data[$place][$video]["votes"] = 1;
 | 
				
			||||||
        array_push($data["songs"][$video]["guids"], $guid);
 | 
					        array_push($data[$place][$video]["guids"], $guid);
 | 
				
			||||||
        $sort = array();
 | 
					        $sort = array();
 | 
				
			||||||
 | 
					        if($place != "nowPlaying")
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            foreach($data["songs"] as $k=>$v) {
 | 
					            foreach($data["songs"] as $k=>$v) {
 | 
				
			||||||
                $sort['votes'][$k] = $v['votes'];
 | 
					                $sort['votes'][$k] = $v['votes'];
 | 
				
			||||||
                $sort['added'][$k] = $v['added'];
 | 
					                $sort['added'][$k] = $v['added'];
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            array_multisort($sort['votes'], SORT_DESC, $sort['added'], SORT_ASC, $data["songs"]);
 | 
					            array_multisort($sort['votes'], SORT_DESC, $sort['added'], SORT_ASC, $data["songs"]);
 | 
				
			||||||
        //array_push($data["songs"], $arrayAdd); 
 | 
					        }
 | 
				
			||||||
        /*$i = array_search(0, $data[2]);
 | 
					 | 
				
			||||||
        if($i == 0)$i=1;
 | 
					 | 
				
			||||||
        else if($i == false)$i=count($data[2]);
 | 
					 | 
				
			||||||
        array_splice($data[3], $i, 0, array($name));
 | 
					 | 
				
			||||||
        array_splice($data[2], $i, 0, array(1));
 | 
					 | 
				
			||||||
        array_splice($data[0],   $i, 0, array($video));
 | 
					 | 
				
			||||||
        file_put_contents($list, json_encode($data));*/
 | 
					 | 
				
			||||||
        file_put_contents($list, json_encode($data));
 | 
					        file_put_contents($list, json_encode($data));
 | 
				
			||||||
        print("added");
 | 
					        print("added");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										0
									
								
								php/convert_lists.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								php/convert_lists.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								php/header.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								php/header.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								php/index.html
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								php/index.html
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										2
									
								
								php/nochan.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								php/nochan.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							@@ -19,7 +19,7 @@ foreach($dir as $files){
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
				<div class="bigchan nomargin">Zöff</div>
 | 
									<div class="bigchan nomargin">Zöff</div>
 | 
				
			||||||
				<form name="ufo" action="" class="daform nomargin" id="base" method="get" onsubmit="null;" >
 | 
									<form name="ufo" action="" class="daform nomargin" id="base" method="get" onsubmit="null;" >
 | 
				
			||||||
					<input list="searches" id="search" name="chan" type="text" class="search_input innbox" spellcheck="false" placeholder="Type Channel Name" autofocus/>
 | 
										<input list="searches" id="search" name="chan" type="text" class="search_input innbox" spellcheck="false" maxlength="15" placeholder="Type Channel Name" autofocus/>
 | 
				
			||||||
					<datalist id="searches">
 | 
										<datalist id="searches">
 | 
				
			||||||
					  <?php foreach($channels as $channel){echo "<option value='".urldecode($channel)."'> ";} ?>
 | 
										  <?php foreach($channels as $channel){echo "<option value='".urldecode($channel)."'> ";} ?>
 | 
				
			||||||
					</datalist>
 | 
										</datalist>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										0
									
								
								php/timedifference.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								php/timedifference.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										0
									
								
								php/videos.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								php/videos.php
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
		Reference in New Issue
	
	Block a user