Removed some logging, and fixed new chan bg

This commit is contained in:
Kasper Rynning-Tønnesen
2015-04-12 16:00:53 +02:00
parent 11c604279d
commit 97934a0d17
3 changed files with 3 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
<?php <?php
$guid=substr(base64_encode(crc32($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_ACCEPT_LANGUAGE'])), 0, 8);
if(isset($_GET['chan'])) {header('Location: '.$_GET['chan']); exit;} if(isset($_GET['chan'])) {header('Location: '.$_GET['chan']); exit;}
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"]))); $list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
if($list[1]==""||!isset($list[1])||count($list)<=1){$list="";include('php/nochan.php');die();} if($list[1]==""||!isset($list[1])||count($list)<=1){$list="";include('php/nochan.php');die();}
@@ -15,7 +15,7 @@
<script src="http://code.jquery.com/jquery-1.11.1.js"></script> <script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script> <script>
var socket = io.connect('http://localhost:3000'); var socket = io.connect('http://localhost:3000');
var guid = "<?php $guid=substr(base64_encode(crc32($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_ACCEPT_LANGUAGE'])), 0, 8); echo $guid; ?>"; var guid = "<?php echo $guid; ?>";
socket.emit('list', '<?php echo $list; ?>,'+guid); socket.emit('list', '<?php echo $list; ?>,'+guid);
</script> </script>
<script src="js/socket_list.js"></script> <script src="js/socket_list.js"></script>

View File

@@ -20,7 +20,6 @@ $(document).ready(function()
$(".search_input").focus(); $(".search_input").focus();
$(".search_input").keyup(function(event) { $(".search_input").keyup(function(event) {
var search_input = $(this).val(); var search_input = $(this).val();
console.log(event.keyCode);
if(event.keyCode == 13 && search_input == "fireplace") if(event.keyCode == 13 && search_input == "fireplace")
{ {
if(!peis) if(!peis)

View File

@@ -87,7 +87,7 @@ io.on('connection', function(socket){
}else }else
{ {
db.createCollection(coll, function(err, docs){ db.createCollection(coll, function(err, docs){
db.collection(coll).insert({"addsongs":false, "adminpass":"", "allvideos":true, "frontpage":true, "longsongs":true, "removeplay": false, "shuffle": false, "skip": true, "skips": [], "startTime":get_time(), "views": [], "vote": false}, function(err, docs) db.collection(coll).insert({"addsongs":"false", "adminpass":"", "allvideos":"true", "frontpage":"true", "longsongs":"true", "removeplay": "false", "shuffle": "false", "skip": "true", "skips": [], "startTime":get_time(), "views": [], "vote": "false"}, function(err, docs)
{ {
db.collection(coll).find().sort({votes:-1}, function(err, docs) { db.collection(coll).find().sort({votes:-1}, function(err, docs) {
socket.emit(coll, docs); socket.emit(coll, docs);