diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..f4b48cd00c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/nbproject/private/ +/videos/ \ No newline at end of file diff --git a/install/index.php b/install/index.php index 5f9cac332f..c5521889ee 100644 --- a/install/index.php +++ b/install/index.php @@ -1,447 +1,462 @@ -= 0) { - return true; - } else { - return false; - } -} - -function modRewriteEnabled() { - return in_array('mod_rewrite', apache_get_modules()); -} - -function isFFMPEG() { - return trim(shell_exec('which ffmpeg')); -} - -function getPathToApplication() { - return str_replace("install/index.php", "", $_SERVER["SCRIPT_FILENAME"]); -} - -function getURLToApplication() { - $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; - $url = str_replace("install/index.php", "", $url); - return $url; -} - -//max_execution_time = 7200 -function check_max_execution_time() { - $max_size = ini_get('max_execution_time'); - $recomended_size = 7200; - if ($recomended_size > $max_size) { - return false; - } else { - return true; - } -} - -//post_max_size = 100M -function check_post_max_size() { - $max_size = parse_size(ini_get('post_max_size')); - $recomended_size = parse_size('100M'); - if ($recomended_size > $max_size) { - return false; - } else { - return true; - } -} - -//upload_max_filesize = 100M -function check_upload_max_filesize() { - $max_size = parse_size(ini_get('upload_max_filesize')); - $recomended_size = parse_size('100M'); - if ($recomended_size > $max_size) { - return false; - } else { - return true; - } -} - -//memory_limit = 100M -function check_memory_limit() { - $max_size = parse_size(ini_get('memory_limit')); - $recomended_size = parse_size('100M'); - if ($recomended_size > $max_size) { - return false; - } else { - return true; - } -} - -//var_dump($_SERVER);exit; -?> - - - - Install YouPHPTube - - - - - - - - - -
-

- - Your system is installed, remove the install directory to continue -
- Go to the main page -

-
- -
- Logo -
-
- -
- - is Present -
- -
- - Your server is , you must install Apache -
- - - - -
- - PHP is Present -
- -
- - Your PHP version is , you must install PHP 5.6.x or greater -
- - - - -
- - Mod Rewrite module is Present -
- -
- - Mod Rewrite is not enabled -
- In order to use mod_rewrite you can type the following command in the terminal:
- a2enmod rewrite
- Restart apache2 after
- /etc/init.d/apache2 restart -
-
- - - -
- - FFMPEG is Present -
- -
- - FFmpeg is not enabled -
- FFmpeg has been removed from Ubuntu 14.04 and was replaced by Libav. This decision has been reversed so that FFmpeg is available now in Ubuntu 15.04 again, but there is still no official package for 14.04. In this tutorial, I will show you how to install FFmpeg from mc3man ppa. Add the mc3man ppa: -
- sudo add-apt-repository ppa:mc3man/trusty-media -
- And confirm the following message by pressing <enter>: -
- - Also note that with apt-get a sudo apt-get dist-upgrade is needed for initial setup & with some package upgrades - More info: https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media - Press [ENTER] to continue or ctrl-c to cancel adding it - -
- Update the package list. -
- - sudo apt-get update - sudo apt-get dist-upgrade - -
- Now FFmpeg is available to be installed with apt: -
- sudo apt-get install ffmpeg - -
-
- - - - -
- - Your videos directory is writable -
- -
- - Your videos directory must be writable -
- you can set the permissions. -
- sudo chmod -R 777 /var/www/[YouPHPTube Dir]/videos -
-
- - - - -
- - Your max_execution_time is -
- -
- - Your max_execution_time is , it must be at least 7200 -
- - - -
- - Your post_max_size is -
- -
- - Your post_max_size is , it must be at least 100M -
- - - -
- - Your upload_max_filesize is -
- -
- - Your upload_max_filesize is , it must be at least 100M -
- - - -
- - Your memory_limit is -
- -
- - Your memory_limit is , it must be at least 100M -
- -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - - -
- -
- - -
-
- - -
- - -
-
-
- -
- - - - - - - - - += 0) { + return true; + } else { + return false; + } +} + +function modRewriteEnabled() { + return in_array('mod_rewrite', apache_get_modules()); +} + +function isFFMPEG() { + return trim(shell_exec('which ffmpeg')); +} + +function getPathToApplication() { + return str_replace("install/index.php", "", $_SERVER["SCRIPT_FILENAME"]); +} + +function getURLToApplication() { + $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + $url = str_replace("install/index.php", "", $url); + return $url; +} + +//max_execution_time = 7200 +function check_max_execution_time() { + $max_size = ini_get('max_execution_time'); + $recomended_size = 7200; + if ($recomended_size > $max_size) { + return false; + } else { + return true; + } +} + +//post_max_size = 100M +function check_post_max_size() { + $max_size = parse_size(ini_get('post_max_size')); + $recomended_size = parse_size('100M'); + if ($recomended_size > $max_size) { + return false; + } else { + return true; + } +} + +//upload_max_filesize = 100M +function check_upload_max_filesize() { + $max_size = parse_size(ini_get('upload_max_filesize')); + $recomended_size = parse_size('100M'); + if ($recomended_size > $max_size) { + return false; + } else { + return true; + } +} + +//memory_limit = 100M +function check_memory_limit() { + $max_size = parse_size(ini_get('memory_limit')); + $recomended_size = parse_size('100M'); + if ($recomended_size > $max_size) { + return false; + } else { + return true; + } +} + +//var_dump($_SERVER);exit; +?> + + + + Install YouPHPTube + + + + + + + + + +
+

+ + Your system is installed, remove the install directory to continue +
+ Go to the main page +

+
+ +
+ Logo +
+
+ +
+ + is Present +
+ +
+ + Your server is , you must install Apache +
+ + + + +
+ + PHP is Present +
+ +
+ + Your PHP version is , you must install PHP 5.6.x or greater +
+ + + + +
+ + Mod Rewrite module is Present +
+ +
+ + Mod Rewrite is not enabled +
+ In order to use mod_rewrite you can type the following command in the terminal:
+ a2enmod rewrite
+ Restart apache2 after
+ /etc/init.d/apache2 restart +
+
+ + + +
+ + FFMPEG is Present +
+ +
+ + FFmpeg is not enabled +
+ FFmpeg has been removed from Ubuntu 14.04 and was replaced by Libav. This decision has been reversed so that FFmpeg is available now in Ubuntu 15.04 again, but there is still no official package for 14.04. In this tutorial, I will show you how to install FFmpeg from mc3man ppa. Add the mc3man ppa: +
+ sudo add-apt-repository ppa:mc3man/trusty-media +
+ And confirm the following message by pressing <enter>: +
+ + Also note that with apt-get a sudo apt-get dist-upgrade is needed for initial setup & with some package upgrades + More info: https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media + Press [ENTER] to continue or ctrl-c to cancel adding it + +
+ Update the package list. +
+ + sudo apt-get update + sudo apt-get dist-upgrade + +
+ Now FFmpeg is available to be installed with apt: +
+ sudo apt-get install ffmpeg + +
+
+ + + + +
+ + Your videos directory is writable +
+ +
+ + Your videos directory must be writable +
+ If the video directory does not exists create it! +
+ sudo mkdir /var/www/[YouPHPTube Dir]/videos +
+ Then you can set the permissions. +
+ sudo chmod -R 777 /var/www/[YouPHPTube Dir]/videos +
+
+ + + + +
+ + Your max_execution_time is +
+ +
+ + Your max_execution_time is , it must be at least 7200 +
+ + + +
+ + Your post_max_size is +
+ +
+ + Your post_max_size is , it must be at least 100M +
+ + + +
+ + Your upload_max_filesize is +
+ +
+ + Your upload_max_filesize is , it must be at least 100M +
+ + + +
+ + Your memory_limit is +
+ +
+ + Your memory_limit is , it must be at least 100M +
+ +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + +
+ +
+ + +
+
+ + +
+ + +
+
+
+ +
+ + + + + + + + + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000000..8b7302cf23 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,7 @@ +include.path=${php.global.include.path} +php.version=PHP_54 +source.encoding=UTF-8 +src.dir=. +tags.asp=false +tags.short=false +web.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000000..79c3c619c3 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.php.project + + + YouPHPTube + + + diff --git a/view/index.php b/view/index.php index db5253808d..4feec15294 100644 --- a/view/index.php +++ b/view/index.php @@ -1,249 +1,249 @@ - - - - - <?php echo $global['webSiteTitle']; ?> :: <?php echo $video['title']; ?> - - - - - -
- - -
-
-
-
- -
- -
- -
-
-
-
-
-
-
- <?php echo $video['title']; ?> -
-
-

- -

-

- : -

-
:
-
:
-
-
-
-
- - -
-

:

- - - - - - - - -
- - -
-
-

:

-
';
-                                            echo htmlentities($code);
-                                            ?>
-
- -
-
- - - -
    -
- -
- -
-
- -
-
-
- - - -
    -
- -
- -
-
- -
- ! . -
- - - -
- - + + + + + <?php echo $global['webSiteTitle']; ?> :: <?php echo $video['title']; ?> + + + + + +
+ + +
+
+
+
+ +
+ +
+ +
+
+
+
+
+
+
+ <?php echo $video['title']; ?> +
+
+

+ +

+

+ : +

+
:
+
:
+
+
+
+
+ + +
+

:

+ + + + + + + + +
+ + +
+
+

:

+
';
+                                            echo htmlentities($code);
+                                            ?>
+
+ +
+
+ + + +
    +
+ +
+ +
+
+ +
+
+
+ + + +
    +
+ +
+ +
+
+ +
+ ! . +
+ + + +
+ +