summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/auth.php36
-rwxr-xr-xbin/backend.php1
-rwxr-xr-xconfig_default.php4
-rw-r--r--index.php (renamed from index.html)7
-rw-r--r--js/istreamdev.js18
-rw-r--r--logos/FRANCE 2.pngbin3490 -> 0 bytes
-rw-r--r--logos/FRANCE 3.pngbin3382 -> 0 bytes
-rw-r--r--logos/TF1.pngbin1809 -> 0 bytes
-rw-r--r--segmenter/Makefile4
9 files changed, 55 insertions, 15 deletions
diff --git a/bin/auth.php b/bin/auth.php
new file mode 100644
index 0000000..7e6eace
--- /dev/null
+++ b/bin/auth.php
@@ -0,0 +1,36 @@
+<?php
+
+global $user, $pass;
+
+session_start();
+
+if (isset($_COOKIE['istreamdev']))
+{
+ if(sha1($pass) == $_COOKIE['istreamdev'] ) {
+ setcookie ("istream", sha1($pass), time()+60*60*24*30);
+ $authorized = true;
+ } else {
+ $authorised = false;
+ }
+}
+
+# checkup login and password
+if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']))
+{
+ if (($user == $_SERVER['PHP_AUTH_USER']) && ($pass == ($_SERVER['PHP_AUTH_PW'])) )
+ {
+ setcookie ("istreamdev", sha1($pass), time()+60*60*24*30);
+ $authorized = true;
+ }
+}
+
+# login
+if (!$authorized)
+{
+ header('WWW-Authenticate: Basic Realm="Login please"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo "Login";
+ exit;
+}
+
+?>
diff --git a/bin/backend.php b/bin/backend.php
index f312ed0..706dd91 100755
--- a/bin/backend.php
+++ b/bin/backend.php
@@ -6,6 +6,7 @@ if (file_exists('../config.php'))
include ('../config.php');
else
include ('../config_default.php');
+include ('./auth.php');
include ('../getid3/getid3.php');
include ('./utils.php');
include ('./files.php');
diff --git a/config_default.php b/config_default.php
index 11aa4a1..df1926f 100755
--- a/config_default.php
+++ b/config_default.php
@@ -27,12 +27,12 @@
$quality=array ( 'edge' => '128k 64k 1 240x160',
'3g' => '350k 64k 1 408x272',
'wifi' => '512k 128k 2 480x320');
- $maxencodingprocesses=10; // Max simultaneous encoding processes
+ $maxencodingprocesses=3; // Max simultaneous encoding processes
// Misc
$ffmpegpath = '/usr/bin/ffmpeg'; //path to ffmpeg binary
$segmenterpath = '/usr/bin/segmenter'; //path to segmenter binary
// Version
- $isdversion = "0.3.7";
+ $isdversion = "1.0-alpha1";
?>
diff --git a/index.html b/index.php
index 79cdea8..f5d0dee 100644
--- a/index.html
+++ b/index.php
@@ -1,3 +1,10 @@
+<?php
+if (file_exists('config.php'))
+ include ('config.php');
+else
+ include ('config_default.php');
+include ('bin/auth.php');
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" manifest="istreamdev.manifest">
<head>
diff --git a/js/istreamdev.js b/js/istreamdev.js
index 1ce37e9..743eee0 100644
--- a/js/istreamdev.js
+++ b/js/istreamdev.js
@@ -95,6 +95,12 @@ function addAudiofiles() {
$('#home_but').tap(function(event) {
event.preventDefault();
$(this).parents('div').find('a').unbind("tap");
+ $('#home').bind('pageAnimationEnd', function(event, info){
+ if (info.direction == 'in') {
+ $('#jqt div[rel="browser"]').remove();
+ $('#home').unbind('pageAnimationEnd');
+ }
+ });
jQT.goTo('#home','flip');
});
@@ -385,6 +391,7 @@ $('#streamchannel span.recButton a').tap(function(event) {
gen_edittimer(id,name,active,channumber,channame,rec_date,starttime,endtime);
return false;
});
+
$('#streamrec span.streamButton a').tap(function(event) {
event.preventDefault();
json_start(this);
@@ -616,17 +623,6 @@ $('div[rel="browser"] a[class="back"]').tap(function(event) {
$(this).parents('div[rel="browser"]').remove();
});
-$('div[rel="browser"] #home_but').tap(function(event) {
- event.preventDefault();
- $(this).parents('div[rel="browser"]').find('ul[rel="filelist"] li[class="arrow"] a').unbind("tap");
- $('#home').bind('pageAnimationEnd', function(event, info){
- $('#jqt div[rel="browser"]').remove();
- $('#home').unbind('pageAnimationEnd');
- });
-});
-
-
-
//Generate browser div according to type
function gen_browser(path,browser,name,foldertype) {
browser_template = '<div class="toolbar"></div>';
diff --git a/logos/FRANCE 2.png b/logos/FRANCE 2.png
deleted file mode 100644
index c77d725..0000000
--- a/logos/FRANCE 2.png
+++ /dev/null
Binary files differ
diff --git a/logos/FRANCE 3.png b/logos/FRANCE 3.png
deleted file mode 100644
index 8f20d16..0000000
--- a/logos/FRANCE 3.png
+++ /dev/null
Binary files differ
diff --git a/logos/TF1.png b/logos/TF1.png
deleted file mode 100644
index 56b1a74..0000000
--- a/logos/TF1.png
+++ /dev/null
Binary files differ
diff --git a/segmenter/Makefile b/segmenter/Makefile
index c9ec717..0c9abd2 100644
--- a/segmenter/Makefile
+++ b/segmenter/Makefile
@@ -5,7 +5,7 @@ clean:
rm segmenter
install: segmenter
- cp segmenter /usr/local/bin/
+ cp segmenter /usr/bin/
uninstall:
- rm /usr/local/bin/segmenter
+ rm /usr/bin/segmenter