mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Remove some uncessarily files and mak some plugins as deprecated
This commit is contained in:
parent
70b61b2d50
commit
4966b3649b
14 changed files with 4 additions and 1012 deletions
0
SECURITY.md → .github/SECURITY.md
vendored
0
SECURITY.md → .github/SECURITY.md
vendored
36
Dockerfile
36
Dockerfile
|
@ -1,36 +0,0 @@
|
||||||
# Based on the work of @hannah98, thanks for that!
|
|
||||||
# https://github.com/hannah98/avideo-docker
|
|
||||||
# Licensed under the terms of the CC-0 license, see
|
|
||||||
# https://creativecommons.org/publicdomain/zero/1.0/deed
|
|
||||||
|
|
||||||
FROM php:7-apache
|
|
||||||
|
|
||||||
MAINTAINER TheAssassin <theassassin@assassinate-you.net>
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y wget git zip default-libmysqlclient-dev libbz2-dev libmemcached-dev libsasl2-dev libfreetype6-dev libicu-dev libjpeg-dev libmemcachedutil2 libpng-dev libxml2-dev mariadb-client ffmpeg libimage-exiftool-perl python curl python-pip libzip-dev libonig-dev && \
|
|
||||||
docker-php-ext-configure gd --with-freetype=/usr/include --with-jpeg=/usr/include && \
|
|
||||||
docker-php-ext-install -j$(nproc) bcmath bz2 calendar exif gd gettext iconv intl mbstring mysqli opcache pdo_mysql zip && \
|
|
||||||
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* /root/.cache && \
|
|
||||||
a2enmod rewrite
|
|
||||||
|
|
||||||
# patch to use non-root port
|
|
||||||
RUN sed -i "s|Listen 80|Listen 8000|g" /etc/apache2/ports.conf && \
|
|
||||||
sed -i "s|:80|:8000|g" /etc/apache2/sites-available/* && \
|
|
||||||
echo "post_max_size = 10240M\nupload_max_filesize = 10240M" >> /usr/local/etc/php/php.ini
|
|
||||||
|
|
||||||
RUN pip install -U youtube-dl
|
|
||||||
|
|
||||||
RUN rm -rf /var/www/html/*
|
|
||||||
COPY . /var/www/html
|
|
||||||
|
|
||||||
# fix permissions
|
|
||||||
RUN chown -R www-data. /var/www/html
|
|
||||||
|
|
||||||
# create volume
|
|
||||||
RUN install -d -m 0755 -o www-data -g www-data /var/www/html/videos
|
|
||||||
|
|
||||||
# set non-root user
|
|
||||||
USER www-data
|
|
||||||
EXPOSE 8000
|
|
||||||
VOLUME ["/var/www/html/videos"]
|
|
|
@ -1 +0,0 @@
|
||||||
theme: jekyll-theme-cayman
|
|
208
classic.htaccess
208
classic.htaccess
|
@ -1,208 +0,0 @@
|
||||||
# BEGIN Expires Don't forget to enable mod_headers and mod_expires, you can do so by running a2enmod rewrite and a2enmod headers
|
|
||||||
<ifModule mod_expires.c>
|
|
||||||
ExpiresActive On
|
|
||||||
ExpiresDefault "access plus 1 seconds"
|
|
||||||
ExpiresByType text/html "access plus 1 seconds"
|
|
||||||
ExpiresByType image/gif "access plus 2592000 seconds"
|
|
||||||
ExpiresByType image/jpeg "access plus 2592000 seconds"
|
|
||||||
ExpiresByType image/png "access plus 2592000 seconds"
|
|
||||||
ExpiresByType text/css "access plus 604800 seconds"
|
|
||||||
ExpiresByType text/javascript "access plus 216000 seconds"
|
|
||||||
ExpiresByType application/x-javascript "access plus 216000 seconds"
|
|
||||||
</ifModule>
|
|
||||||
<Files routes.php>
|
|
||||||
Order Allow,Deny
|
|
||||||
Deny from all
|
|
||||||
</Files>
|
|
||||||
# END Expires
|
|
||||||
# BEGIN Caching
|
|
||||||
<ifModule mod_headers.c>
|
|
||||||
Header set Access-Control-Allow-Origin: *
|
|
||||||
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
|
|
||||||
Header set Cache-Control "max-age=2592000, public"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(css)$">
|
|
||||||
Header set Cache-Control "max-age=604800, public"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(js)$">
|
|
||||||
Header set Cache-Control "max-age=216000, private"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(xml|txt)$">
|
|
||||||
Header set Cache-Control "max-age=216000, public, must-revalidate"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(html|htm|php)$">
|
|
||||||
Header set Cache-Control "max-age=1, private, must-revalidate"
|
|
||||||
</filesMatch>
|
|
||||||
</ifModule>
|
|
||||||
# END Caching
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine on
|
|
||||||
|
|
||||||
#main Files
|
|
||||||
RewriteRule ^index.php$ view/index.php [NC,L]
|
|
||||||
#RewriteRule ^index.php$ /view/index.php [NC,L]
|
|
||||||
#RewriteRule ^$ view/ [NC,L]
|
|
||||||
RewriteRule ^bootstrap/(.+)$ view/bootstrap/$1 [NC,L]
|
|
||||||
RewriteRule ^js/(.+)$ view/js/$1 [NC,L]
|
|
||||||
RewriteRule ^css/(.+)$ view/css/$1 [NC,L]
|
|
||||||
RewriteRule ^img/(.+)$ view/img/$1 [NC,L]
|
|
||||||
RewriteRule ^page/([0-9]+)/?$ view/?page=$1 [QSA]
|
|
||||||
RewriteRule ^videoOnly/?$ view/?type=video [NC,L]
|
|
||||||
RewriteRule ^audioOnly/?$ view/?type=audio [NC,L]
|
|
||||||
RewriteRule ^download$ view/downloadExternalVideo.php [NC,L]
|
|
||||||
RewriteRule ^info$ view/info.php [NC,L]
|
|
||||||
RewriteRule ^downloadNow$ objects/downloadVideo.php [NC,L]
|
|
||||||
RewriteRule ^getDownloadProgress$ objects/downloadVideoProgress.php [NC,L]
|
|
||||||
RewriteRule ^status$ objects/status.json.php [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^about$ view/about.php [NC,L]
|
|
||||||
RewriteRule ^contact$ view/contact.php [NC,L]
|
|
||||||
RewriteRule ^sendEmail$ objects/sendEmail.json.php [NC,L]
|
|
||||||
RewriteRule ^captcha$ objects/getCaptcha.php [NC,L]
|
|
||||||
RewriteRule ^monitor/(.+)$ objects/ServerMonitor/$1 [NC,L]
|
|
||||||
RewriteRule ^videosList$ view/videosList.php [NC,L]
|
|
||||||
RewriteRule ^videosList/video/([A-Za-z0-9-_.]+)/page/([0-9]+)/?$ view/videosList.php?videoName=$1&page=$2 [QSA]
|
|
||||||
RewriteRule ^videosList/cat/([A-Za-z0-9-]+)/video/([A-Za-z0-9-_.]+)/page/([0-9]+)/?$ view/videosList.php?catName=$1&videoName=$2&page=$3 [QSA]
|
|
||||||
|
|
||||||
#for the category name
|
|
||||||
RewriteRule ^cat/([A-Za-z0-9-]+)/?$ view/?catName=$1 [NC,L,QSA]
|
|
||||||
RewriteRule ^cat/([A-Za-z0-9-]+)/page/([0-9]+)/?$ view/?catName=$1&page=$2 [NC,L,QSA]
|
|
||||||
|
|
||||||
|
|
||||||
#for the video name
|
|
||||||
RewriteRule ^video/([A-Za-z0-9-_.]+)/?$ view/?videoName=$1 [QSA]
|
|
||||||
RewriteRule ^v/([0-9]+)/?$ view/?v=$1 [QSA]
|
|
||||||
RewriteRule ^video/([A-Za-z0-9-_.]+)/page/([0-9]+)/??$ view/?videoName=$1&page=$2 [QSA]
|
|
||||||
|
|
||||||
#for the video name
|
|
||||||
RewriteRule ^cat/([A-Za-z0-9-]+)/video/([A-Za-z0-9-_.]+)/?$ view/?catName=$1&videoName=$2 [QSA]
|
|
||||||
RewriteRule ^cat/([A-Za-z0-9-]+)/video/([A-Za-z0-9-_.]+)/page/([0-9]+)/?$ view/?catName=$1&videoName=$2&page=$3 [QSA]
|
|
||||||
#for the embeded video name
|
|
||||||
RewriteRule ^videoEmbeded/([A-Za-z0-9-_.]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
|
|
||||||
RewriteRule ^videoEmbed/([A-Za-z0-9-_.]+)/?$ view/videoEmbeded.php?videoName=$1 [QSA]
|
|
||||||
RewriteRule ^vEmbed/([0-9]+)/?$ view/videoEmbeded.php?v=$1 [QSA]
|
|
||||||
|
|
||||||
RewriteRule ^plugin/([A-Za-z0-9-_.]+)/(.*)?$ plugin/$1/$2 [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^upload$ view/mini-upload-form/ [NC,L]
|
|
||||||
RewriteRule ^fileUpload$ view/mini-upload-form/upload.php [NC,L]
|
|
||||||
RewriteRule ^uploadPoster/([0-9]+)/(jpg|gif)$ objects/uploadPoster.php?video_id=$1&type=$2 [NC,L]
|
|
||||||
|
|
||||||
#edit your own user
|
|
||||||
RewriteRule ^user$ view/user.php [NC,L]
|
|
||||||
|
|
||||||
#manager user
|
|
||||||
RewriteRule ^users$ view/managerUsers.php [NC,L]
|
|
||||||
RewriteRule ^users.json$ objects/users.json.php [NC,L]
|
|
||||||
RewriteRule ^updateUser$ objects/userUpdate.json.php [NC,L]
|
|
||||||
RewriteRule ^savePhoto$ objects/userSavePhoto.php [NC,L]
|
|
||||||
RewriteRule ^saveBackground$ objects/userSaveBackground.php [NC,L]
|
|
||||||
RewriteRule ^addNewUser$ objects/userAddNew.json.php [NC,L]
|
|
||||||
RewriteRule ^deleteUser$ objects/userDelete.json.php [NC,L]
|
|
||||||
RewriteRule ^recoverPass$ objects/userRecoverPass.php [NC,L]
|
|
||||||
RewriteRule ^saveRecoverPassword$ objects/userRecoverPassSave.json.php [NC,L]
|
|
||||||
RewriteRule ^signUp$ view/signUp.php [NC,L]
|
|
||||||
RewriteRule ^createUser$ objects/userCreate.json.php [NC,L]
|
|
||||||
|
|
||||||
|
|
||||||
RewriteRule ^usersGroups$ view/managerUsersGroups.php [NC,L]
|
|
||||||
RewriteRule ^usersGroups.json$ objects/usersGroups.json.php [NC,L]
|
|
||||||
RewriteRule ^addNewUserGroups$ objects/userGroupsAddNew.json.php [NC,L]
|
|
||||||
RewriteRule ^deleteUserGroups$ objects/userGroupsDelete.json.php [NC,L]
|
|
||||||
|
|
||||||
#manager category
|
|
||||||
RewriteRule ^categories$ view/managerCategories.php [NC,L]
|
|
||||||
RewriteRule ^categories.json$ objects/categories.json.php [NC,L]
|
|
||||||
RewriteRule ^addNewCategory$ objects/categoryAddNew.json.php [NC,L]
|
|
||||||
RewriteRule ^deleteCategory$ objects/categoryDelete.json.php [NC,L]
|
|
||||||
|
|
||||||
#manager plugin
|
|
||||||
RewriteRule ^plugins$ view/managerPlugins.php [NC,L]
|
|
||||||
RewriteRule ^plugins.json$ objects/plugins.json.php [NC,L]
|
|
||||||
RewriteRule ^pluginsAvailable.json$ objects/pluginsAvailable.json.php [NC,L]
|
|
||||||
RewriteRule ^pluginImport.json$ objects/pluginImport.json.php [NC,L]
|
|
||||||
RewriteRule ^switchPlugin$ objects/pluginSwitch.json.php [NC,L]
|
|
||||||
RewriteRule ^addDataObjectPlugin.json$ objects/pluginAddDataObject.json.php [NC,L]
|
|
||||||
RewriteRule ^runDBScriptPlugin.json$ objects/pluginRunDatabaseScript.json.php [NC,L]
|
|
||||||
|
|
||||||
#manager playList
|
|
||||||
RewriteRule ^playLists.json$ objects/playlists.json.php [NC,L]
|
|
||||||
RewriteRule ^playListsVideos.json$ objects/playlistsVideos.json.php [NC,L]
|
|
||||||
RewriteRule ^playListsFromUser.json/([0-9]+)/?$ objects/playlistsFromUser.json.php?users_id=$1 [NC,L]
|
|
||||||
RewriteRule ^addNewPlayList$ objects/playlistAddNew.json.php [NC,L]
|
|
||||||
RewriteRule ^playListAddVideo.json$ objects/playListAddVideo.json.php [NC,L]
|
|
||||||
RewriteRule ^playlist/([0-9]+)/([0-9]+)/?$ view/?playlist_id=$1&playlist_index=$2 [NC,L]
|
|
||||||
RewriteRule ^playlist/([0-9]+)/?$ view/?playlist_id=$1 [NC,L]
|
|
||||||
RewriteRule ^removeVideoFromPlaylist/?$ objects/playlistRemoveVideo.php [NC,L]
|
|
||||||
RewriteRule ^removePlaylist/?$ objects/playlistRemove.php [NC,L]
|
|
||||||
RewriteRule ^renamePlaylist/?$ objects/playlistRename.php [NC,L]
|
|
||||||
RewriteRule ^sortPlaylist/?$ objects/playlistSort.php [NC,L]
|
|
||||||
RewriteRule ^channel/([^/]+)/?$ view/channel.php?channelName=$1 [NC,L]
|
|
||||||
RewriteRule ^channel/?$ view/channel.php [NC,L]
|
|
||||||
RewriteRule ^channels/?$ view/channels.php [NC,L]
|
|
||||||
|
|
||||||
#manager videos
|
|
||||||
RewriteRule ^orphanFiles$ view/orphanFiles.php [NC,L]
|
|
||||||
RewriteRule ^mvideos$ view/managerVideos.php [NC,L]
|
|
||||||
RewriteRule ^videos.json$ objects/videos.json.php [NC,L]
|
|
||||||
RewriteRule ^videosAndroid.json$ objects/videosAndroid.json.php [NC,L]
|
|
||||||
RewriteRule ^videoAndroid.json$ objects/videoAndroid.json.php [NC,L]
|
|
||||||
RewriteRule ^deleteVideo$ objects/videoDelete.json.php [NC,L]
|
|
||||||
RewriteRule ^addNewVideo$ objects/videoAddNew.json.php [NC,L]
|
|
||||||
RewriteRule ^refreshVideo$ objects/videoRefresh.json.php [NC,L]
|
|
||||||
RewriteRule ^setStatusVideo$ objects/videoStatus.json.php [NC,L]
|
|
||||||
RewriteRule ^setCategoryVideo$ objects/videoCategory.json.php [NC,L]s
|
|
||||||
RewriteRule ^rotateVideo$ objects/videoRotate.json.php [NC,L]
|
|
||||||
|
|
||||||
|
|
||||||
# Subscribes
|
|
||||||
RewriteRule ^subscribes$ view/managerSubscribes.php [NC,L]
|
|
||||||
RewriteRule ^subscribes.json$ objects/subscribes.json.php [NC,L]
|
|
||||||
RewriteRule ^subscribe.json$ objects/subscribe.json.php [NC,L]
|
|
||||||
RewriteRule ^notifySubscribers.json$ objects/notifySubscribers.json.php [NC,L]
|
|
||||||
|
|
||||||
|
|
||||||
RewriteRule ^aVideoQueueEncoder.json$ objects/aVideoQueueEncoder.json.php [NC,L]
|
|
||||||
RewriteRule ^aVideoEncoder.json$ objects/aVideoEncoder.json.php [NC,L]
|
|
||||||
|
|
||||||
#comment
|
|
||||||
RewriteRule ^comments$ view/managerComments.php [NC,L]
|
|
||||||
RewriteRule ^saveComment$ objects/commentAddNew.json.php [NC,L]
|
|
||||||
RewriteRule ^comments.json/([0-9]+)$ objects/comments.json.php?video_id=$1 [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^login$ objects/login.json.php [NC,L]
|
|
||||||
RewriteRule ^logoff$ objects/logoff.php [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^like$ objects/like.json.php?like=1 [QSA]
|
|
||||||
RewriteRule ^dislike$ objects/like.json.php?like=-1 [QSA]
|
|
||||||
|
|
||||||
|
|
||||||
#manager configuration
|
|
||||||
|
|
||||||
RewriteRule ^update/?$ view/update.php [NC,L]
|
|
||||||
RewriteRule ^siteConfigurations$ view/configurations.php [NC,L]
|
|
||||||
RewriteRule ^updateConfig$ objects/configurationUpdate.json.php [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^charts$ view/charts.php [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^help$ view/help.php [NC,L]
|
|
||||||
|
|
||||||
# YouTube Sync
|
|
||||||
RewriteRule ^youtubeUpload$ objects/youtubeUpload.json.php [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^googleAdView$ view/googleAdView.php [NC,L]
|
|
||||||
|
|
||||||
RewriteRule ^notifications.json$ objects/notifications.json.php [NC,L]
|
|
||||||
|
|
||||||
# It must be before image not found
|
|
||||||
<IfModule mod_xsendfile.c>
|
|
||||||
RewriteRule ^videos/([A-Za-z0-9-_.]+)$ view/xsendfile.php?file=$1 [QSA]
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
# if image do not exists
|
|
||||||
RewriteCond %{REQUEST_URI} \.(jpg|jpeg|gif|png|ico)$ [NC]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule .*$ img/image404.php [NC,L]
|
|
||||||
|
|
||||||
</IfModule>
|
|
|
@ -1,39 +0,0 @@
|
||||||
<VirtualHost *:80>
|
|
||||||
php_value upload_max_filesize 900M
|
|
||||||
php_value post_max_size 900M
|
|
||||||
php_value memory_limit 512M
|
|
||||||
php_value max_execution_time 7200
|
|
||||||
|
|
||||||
# The ServerName directive sets the request scheme, hostname and port that
|
|
||||||
# the server uses to identify itself. This is used when creating
|
|
||||||
# redirection URLs. In the context of virtual hosts, the ServerName
|
|
||||||
# specifies what hostname must appear in the request's Host: header to
|
|
||||||
# match this virtual host. For the default virtual host (this file) this
|
|
||||||
# value is not decisive as it is used as a last resort host regardless.
|
|
||||||
# However, you must set it for any further virtual host explicitly.
|
|
||||||
#ServerName localhost
|
|
||||||
|
|
||||||
ServerAdmin webmaster@localhost
|
|
||||||
DocumentRoot /var/www/html
|
|
||||||
|
|
||||||
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
|
|
||||||
# error, crit, alert, emerg.
|
|
||||||
# It is also possible to configure the loglevel for particular
|
|
||||||
# modules, e.g.
|
|
||||||
#LogLevel info ssl:warn
|
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
||||||
|
|
||||||
# For most configuration files from conf-available/, which are
|
|
||||||
# enabled or disabled at a global level, it is possible to
|
|
||||||
# include a line for only one particular virtual host. For example the
|
|
||||||
# following line enables the CGI configuration for this host only
|
|
||||||
# after it has been globally disabled with "a2disconf".
|
|
||||||
#Include conf-available/serve-cgi-bin.conf
|
|
||||||
<Directory /var/www/html>
|
|
||||||
Options Indexes FollowSymLinks
|
|
||||||
AllowOverride All
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
</VirtualHost>
|
|
54
new.htaccess
54
new.htaccess
|
@ -1,54 +0,0 @@
|
||||||
# BEGIN Expires Don't forget to enable mod_headers and mod_expires, you can do so by running a2enmod rewrite and a2enmod headers
|
|
||||||
<ifModule mod_expires.c>
|
|
||||||
ExpiresActive On
|
|
||||||
ExpiresDefault "access plus 1 seconds"
|
|
||||||
ExpiresByType text/html "access plus 1 seconds"
|
|
||||||
ExpiresByType image/gif "access plus 2592000 seconds"
|
|
||||||
ExpiresByType image/jpeg "access plus 2592000 seconds"
|
|
||||||
ExpiresByType image/png "access plus 2592000 seconds"
|
|
||||||
ExpiresByType text/css "access plus 604800 seconds"
|
|
||||||
ExpiresByType text/javascript "access plus 216000 seconds"
|
|
||||||
ExpiresByType application/x-javascript "access plus 216000 seconds"
|
|
||||||
</ifModule>
|
|
||||||
# END Expires
|
|
||||||
# BEGIN Caching
|
|
||||||
<ifModule mod_headers.c>
|
|
||||||
Header set Access-Control-Allow-Origin: *
|
|
||||||
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
|
|
||||||
Header set Cache-Control "max-age=2592000, public"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(css)$">
|
|
||||||
Header set Cache-Control "max-age=604800, public"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(js)$">
|
|
||||||
Header set Cache-Control "max-age=216000, private"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(xml|txt)$">
|
|
||||||
Header set Cache-Control "max-age=216000, public, must-revalidate"
|
|
||||||
</filesMatch>
|
|
||||||
<filesMatch "\.(html|htm|php)$">
|
|
||||||
Header set Cache-Control "max-age=1, private, must-revalidate"
|
|
||||||
</filesMatch>
|
|
||||||
</ifModule>
|
|
||||||
# END Caching
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine on
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule ^.*$ index.php [L,QSA]
|
|
||||||
|
|
||||||
# from official example
|
|
||||||
# RewriteEngine on
|
|
||||||
# RewriteCond %{SCRIPT_FILENAME} !-f
|
|
||||||
# RewriteCond %{SCRIPT_FILENAME} !-d
|
|
||||||
# RewriteCond %{SCRIPT_FILENAME} !-l
|
|
||||||
# RewriteRule ^(.*)$ index.php/$1
|
|
||||||
</IfModule>
|
|
||||||
<IfModule mod_xsendfile.c>
|
|
||||||
RewriteRule ^videos/([A-Za-z0-9-_.]+)$ view/xsendfile.php?file=$1 [QSA]
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
<Files routes.php>
|
|
||||||
Order Allow,Deny
|
|
||||||
Deny from all
|
|
||||||
</Files>
|
|
|
@ -5,7 +5,7 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||||
class FBTube extends PluginAbstract {
|
class FBTube extends PluginAbstract {
|
||||||
|
|
||||||
public function getDescription() {
|
public function getDescription() {
|
||||||
return "Make the first page works as a facebook page";
|
return "<b>(Deprecated, will be removed in next version)</b> Make the first page works as a facebook page";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ class LiveChat extends PluginAbstract{
|
||||||
|
|
||||||
public function getDescription() {
|
public function getDescription() {
|
||||||
global $global;
|
global $global;
|
||||||
$desc = "This plugin is Discontinued. you should move to Chat2 plugin.<br>A live chat for multiple propouses<br>Initiate it on terminal with the command <code>nohup php {$global['systemRootPath']}plugin/LiveChat/chat-server.php &</code>";
|
$desc = "<b>(Deprecated, will be removed next version)</b> This plugin is Discontinued. you should move to Chat2 plugin.<br>A live chat for multiple propouses<br>Initiate it on terminal with the command <code>nohup php {$global['systemRootPath']}plugin/LiveChat/chat-server.php &</code>";
|
||||||
$desc .= $this->isReadyLabel(array('Live'));
|
$desc .= $this->isReadyLabel(array('Live'));
|
||||||
return $desc;
|
return $desc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ require_once $global['systemRootPath'] . 'plugin/Plugin.abstract.php';
|
||||||
class ShareSocialButtonsOnEmbed extends PluginAbstract {
|
class ShareSocialButtonsOnEmbed extends PluginAbstract {
|
||||||
|
|
||||||
public function getDescription() {
|
public function getDescription() {
|
||||||
return "Enable Or disable Share Social Buttons on Embed videos";
|
return "<b>(Deprecated, will be removed next version)</b> Enable Or disable Share Social Buttons on Embed videos";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
||||||
class YouTube extends PluginAbstract {
|
class YouTube extends PluginAbstract {
|
||||||
|
|
||||||
public function getDescription() {
|
public function getDescription() {
|
||||||
return "Make the first page works as a YouTube";
|
return "<b>(Deprecated, will be removed in next version)</b> Make the first page works as a YouTube";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
|
|
535
routes.php
535
routes.php
|
@ -1,535 +0,0 @@
|
||||||
<?php
|
|
||||||
require_once 'objects/simple-php-router/vendor/autoload.php';
|
|
||||||
$basePath = parse_url ($global['webSiteRootURL'], PHP_URL_PATH);
|
|
||||||
use Pecee\SimpleRouter\SimpleRouter;
|
|
||||||
|
|
||||||
// At the beginning, so that no plugin can overwrite the defined rules.
|
|
||||||
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
|
||||||
AVideoPlugin::addRoutes();
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath, function() {
|
|
||||||
require_once "view/index.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "info", function() {
|
|
||||||
require_once "view/info.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
/*SimpleRouter::post($basePath . "subscribes.json", function() {
|
|
||||||
require_once "objects/subscribe.json.php";
|
|
||||||
});*/
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "siteConfigurations", function() {
|
|
||||||
require_once "view/configurations.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "signUp", function() {
|
|
||||||
require_once "view/signUp.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "categories", function() {
|
|
||||||
require_once "view/managerCategories.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "about", function() {
|
|
||||||
require_once "view/about.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "orphanFiles", function() {
|
|
||||||
require_once "view/orphanFiles.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "contact", function() {
|
|
||||||
require_once "view/contact.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "user", function() {
|
|
||||||
require_once "view/user.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "users", function() {
|
|
||||||
require_once "view/managerUsers.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "usersGroups", function() {
|
|
||||||
require_once "view/managerUsersGroups.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "mvideos", function() {
|
|
||||||
require_once "view/managerVideos.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "videosAndroid.json", function() {
|
|
||||||
require_once "objects/videosAndroid.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "videoAndroid.json", function() {
|
|
||||||
require_once "objects/videoAndroid.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "captcha", function() {
|
|
||||||
require_once "objects/getCaptcha.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "logoff", function() {
|
|
||||||
require_once "objects/logoff.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "charts", function() {
|
|
||||||
require_once "view/charts.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "update", function() {
|
|
||||||
require_once "view/update.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "update", function() {
|
|
||||||
require_once "view/update.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "googleAdView", function() {
|
|
||||||
require_once "view/googleAdView.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "notifications.json", function() {
|
|
||||||
require_once "objects/notifications.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "notifySubscribers.json", function() {
|
|
||||||
require_once "objects/notifySubscribers.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "subscribes", function() {
|
|
||||||
require_once "view/managerSubscribes.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "videosList", function() {
|
|
||||||
require_once "view/videosList.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "getDownloadProgress", function() {
|
|
||||||
require_once "objects/downloadVideoProgress.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "downloadNow", function() {
|
|
||||||
require_once "objects/downloadVideo.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "comments", function() {
|
|
||||||
require_once "view/managerComments.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "videoOnly", function() {
|
|
||||||
$_GET['type'] = "video";
|
|
||||||
require_once "view/index.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "audioOnly", function() {
|
|
||||||
$_GET['type'] = "audio";
|
|
||||||
require_once "view/index.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "comments.json/{videoId}", function($videoId) {
|
|
||||||
$_GET['video_id'] = $videoId;
|
|
||||||
require_once "objects/comments.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Eventually incomplete
|
|
||||||
SimpleRouter::post($basePath . "status", function() {
|
|
||||||
require_once "objects/status.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "plugins", function() {
|
|
||||||
require_once "view/managerPlugins.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "aVideoQueueEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoQueueEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "aVideoEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "aVideoQueueEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoQueueEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "aVideoEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "plugins.json", function() {
|
|
||||||
require_once "objects/plugins.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "channels", function() {
|
|
||||||
require_once "view/channels.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "help", function() {
|
|
||||||
require_once "view/help.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "like", function() {
|
|
||||||
$_GET['like'] = '1';
|
|
||||||
require_once "objects/like.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "dislike", function() {
|
|
||||||
$_GET['like'] = '-1';
|
|
||||||
require_once "objects/like.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "channel/{channelName?}", function ($channelName = '') {
|
|
||||||
$_GET['channelName'] = $channelName;
|
|
||||||
require_once 'view/channel.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "cat/{catName?}", function ($catName = '') {
|
|
||||||
$_GET['catName'] = $catName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "upload", function () {
|
|
||||||
require_once 'view/mini-upload-form/index.php';
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "cat/{catName}/video/{videoName?}", function ($catName, $videoName = '') {
|
|
||||||
$_GET['catName'] = $catName;
|
|
||||||
$_GET['videoName'] = $videoName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "cat/{catName?}", function ($catName = '') {
|
|
||||||
$_GET['catName'] = $catName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "video/{videoName?}", function ($videoName = '') {
|
|
||||||
$_GET['videoName'] = $videoName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "v/{videoName?}", function ($videoName = '') {
|
|
||||||
$_GET['v'] = $videoName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
// If it's used externally, by encoder or so on.
|
|
||||||
SimpleRouter::post($basePath . "login", function() {
|
|
||||||
require_once "objects/login.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "login", function() {
|
|
||||||
require_once "objects/login.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Translated!
|
|
||||||
SimpleRouter::get($basePath . __("info"), function() {
|
|
||||||
require_once "view/info.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
/*SimpleRouter::post($basePath . "subscribes.json", function() {
|
|
||||||
require_once "objects/subscribe.json.php";
|
|
||||||
});*/
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("siteConfigurations"), function() {
|
|
||||||
require_once "view/configurations.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("signUp"), function() {
|
|
||||||
require_once "view/signUp.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("categories"), function() {
|
|
||||||
require_once "view/managerCategories.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("about"), function() {
|
|
||||||
require_once "view/about.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("orphanFiles"), function() {
|
|
||||||
require_once "view/orphanFiles.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("contact"), function() {
|
|
||||||
require_once "view/contact.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("user"), function() {
|
|
||||||
require_once "view/user.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("users"), function() {
|
|
||||||
require_once "view/managerUsers.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("usersGroups"), function() {
|
|
||||||
require_once "view/managerUsersGroups.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("mvideos"), function() {
|
|
||||||
require_once "view/managerVideos.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "videosAndroid.json", function() {
|
|
||||||
require_once "objects/videosAndroid.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "videoAndroid.json", function() {
|
|
||||||
require_once "objects/videoAndroid.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "captcha", function() {
|
|
||||||
require_once "objects/getCaptcha.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("logoff"), function() {
|
|
||||||
require_once "objects/logoff.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("charts"), function() {
|
|
||||||
require_once "view/charts.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("update"), function() {
|
|
||||||
require_once "view/update.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "googleAdView", function() {
|
|
||||||
require_once "view/googleAdView.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "notifications.json", function() {
|
|
||||||
require_once "objects/notifications.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "notifySubscribers.json", function() {
|
|
||||||
require_once "objects/notifySubscribers.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("subscribes"), function() {
|
|
||||||
require_once "view/managerSubscribes.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . __("videosList"), function() {
|
|
||||||
require_once "view/videosList.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "getDownloadProgress", function() {
|
|
||||||
require_once "objects/downloadVideoProgress.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "downloadNow", function() {
|
|
||||||
require_once "objects/downloadVideo.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "comments", function() {
|
|
||||||
require_once "view/managerComments.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("videoOnly"), function() {
|
|
||||||
$_GET['type'] = "video";
|
|
||||||
require_once "view/index.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("audioOnly"), function() {
|
|
||||||
$_GET['type'] = "audio";
|
|
||||||
require_once "view/index.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "comments.json/{videoId}", function($videoId) {
|
|
||||||
$_GET['video_id'] = $videoId;
|
|
||||||
require_once "objects/comments.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Eventually incomplete
|
|
||||||
SimpleRouter::post($basePath . "status", function() {
|
|
||||||
require_once "objects/status.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "plugins", function() {
|
|
||||||
require_once "view/managerPlugins.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "aVideoQueueEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoQueueEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "aVideoEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "aVideoQueueEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoQueueEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "aVideoEncoder.json", function() {
|
|
||||||
require_once "objects/aVideoEncoder.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "plugins.json", function() {
|
|
||||||
require_once "objects/plugins.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "channels", function() {
|
|
||||||
require_once "view/channels.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("help"), function() {
|
|
||||||
require_once "view/help.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "like", function() {
|
|
||||||
$_GET['like'] = '1';
|
|
||||||
require_once "objects/like.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::post($basePath . "dislike", function() {
|
|
||||||
$_GET['like'] = '-1';
|
|
||||||
require_once "objects/like.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("channel")."/{channelName?}", function ($channelName = '') {
|
|
||||||
$_GET['channelName'] = $channelName;
|
|
||||||
require_once 'view/channel.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("cat")."/{catName?}", function ($catName = '') {
|
|
||||||
$_GET['catName'] = $catName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "upload", function () {
|
|
||||||
require_once 'view/mini-upload-form/index.php';
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("cat")."/{catName}/video/{videoName?}", function ($catName, $videoName = '') {
|
|
||||||
$_GET['catName'] = $catName;
|
|
||||||
$_GET['videoName'] = $videoName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("cat")."/{catName?}", function ($catName = '') {
|
|
||||||
$_GET['catName'] = $catName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "video/{videoName?}", function ($videoName = '') {
|
|
||||||
$_GET['videoName'] = $videoName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . "v/{videoName?}", function ($videoName = '') {
|
|
||||||
$_GET['v'] = $videoName;
|
|
||||||
require_once 'view/index.php';
|
|
||||||
exit;
|
|
||||||
}, ['defaultParameterRegex' => '[\w\-]+']);
|
|
||||||
|
|
||||||
// If it's used externally, by the encoder or so on.
|
|
||||||
SimpleRouter::post($basePath . __("login"), function() {
|
|
||||||
require_once "objects/login.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
||||||
|
|
||||||
SimpleRouter::get($basePath . __("login"), function() {
|
|
||||||
require_once "objects/login.json.php";
|
|
||||||
exit;
|
|
||||||
});
|
|
8
test.txt
8
test.txt
|
@ -1,8 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* To change this license header, choose License Headers in Project Properties.
|
|
||||||
* To change this template file, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
|
|
127
youphptube.yaml
127
youphptube.yaml
|
@ -1,127 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: jitsi #or name it how do you want
|
|
||||||
become: true
|
|
||||||
pre_tasks:
|
|
||||||
- name: Update apt cache
|
|
||||||
apt: update_cache=yes cache_valid_time=3600
|
|
||||||
|
|
||||||
handlers:
|
|
||||||
- name: restart apache
|
|
||||||
service: name=apache2 state=restarted
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: install some packages
|
|
||||||
apt: name={{ item }} state=present
|
|
||||||
with_items:
|
|
||||||
- software-properties-common
|
|
||||||
- dirmngr
|
|
||||||
- sudo
|
|
||||||
- python-mysqldb
|
|
||||||
|
|
||||||
- name: add key
|
|
||||||
command:
|
|
||||||
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
|
|
||||||
|
|
||||||
- name: add repo
|
|
||||||
apt_repository:
|
|
||||||
repo: deb [arch=amd64,i386,ppc64el] http://ftp.osuosl.org/pub/mariadb/repo/10.2/debian stretch main
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: install mariadb
|
|
||||||
apt:
|
|
||||||
name: mariadb-server
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: remove test database
|
|
||||||
mysql_db: db=test state=absent
|
|
||||||
|
|
||||||
- name: create aVideo database
|
|
||||||
mysql_db: db=aVideo state=present
|
|
||||||
|
|
||||||
- name: create user avideo
|
|
||||||
mysql_user:
|
|
||||||
name: avideo
|
|
||||||
password: passw0rd
|
|
||||||
priv: 'aVideo.*:ALL,GRANT'
|
|
||||||
host: localhost
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: create aVideoEncoder database
|
|
||||||
mysql_db: db=aVideo-Encoder state=present
|
|
||||||
|
|
||||||
- name: create user aVideoEncoder
|
|
||||||
mysql_user:
|
|
||||||
name: avideoencoder
|
|
||||||
password: passw0rd
|
|
||||||
priv: 'aVideo-Encoder.*:ALL,GRANT'
|
|
||||||
host: localhost
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: install packages
|
|
||||||
apt: name={{ item }} state=present
|
|
||||||
with_items:
|
|
||||||
- curl
|
|
||||||
- apache2
|
|
||||||
- php7.0
|
|
||||||
- libapache2-mod-php7.0
|
|
||||||
- php7.0-mysql
|
|
||||||
- php7.0-curl
|
|
||||||
- php7.0-gd
|
|
||||||
- php7.0-intl
|
|
||||||
- ffmpeg
|
|
||||||
- git
|
|
||||||
- libimage-exiftool-perl
|
|
||||||
- python
|
|
||||||
|
|
||||||
- name: get aVideo
|
|
||||||
git:
|
|
||||||
repo: https://github.com/WWBN/AVideo.git
|
|
||||||
dest: /var/www/html/AVideo
|
|
||||||
clone: yes
|
|
||||||
|
|
||||||
- name: get aVideoEncoder
|
|
||||||
git:
|
|
||||||
repo: https://github.com/WWBN/AVideo-Encoder.git
|
|
||||||
dest: /var/www/html/AVideo-Encoder
|
|
||||||
clone: yes
|
|
||||||
|
|
||||||
- name: get youtube-dl and set rights
|
|
||||||
command: "{{ item }}"
|
|
||||||
warn: False
|
|
||||||
with_items:
|
|
||||||
- curl -L https://youtube-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
|
|
||||||
- chmod a+rx /usr/local/bin/youtube-dl
|
|
||||||
- a2enmod rewrite
|
|
||||||
notify: restart apache
|
|
||||||
|
|
||||||
- name: create folder videos in aVideo
|
|
||||||
file:
|
|
||||||
path: /var/www/html/AVideo/videos
|
|
||||||
state: directory
|
|
||||||
owner: www-data
|
|
||||||
group: www-data
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: create folder videos in aVideoEncoder
|
|
||||||
file:
|
|
||||||
path: /var/www/html/AVideo-Encoder/videos
|
|
||||||
state: directory
|
|
||||||
owner: www-data
|
|
||||||
group: www-data
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: modify php.ini and apache2.conf
|
|
||||||
lineinfile:
|
|
||||||
dest: "{{ item.dest}}"
|
|
||||||
regexp: "{{ item.regexp }}"
|
|
||||||
line: "{{ item.line }}"
|
|
||||||
backrefs: yes
|
|
||||||
with_items:
|
|
||||||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'post_max_size = 8M', line: 'post_max_size = 1000M'}
|
|
||||||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'upload_max_filesize = 2M', line: 'upload_max_filesize = 1000M'}
|
|
||||||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'max_execution_time = 30', line: 'max_execution_time = 7200'}
|
|
||||||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'memory_limit = 128M', line: 'memory_limit = 512M'}
|
|
||||||
- {dest: '/etc/apache2/apache2.conf', regexp: 'AllowOverride None', line: 'AllowOverride All', insertbefore='<Directory /srv/>' }
|
|
||||||
notify: restart apache
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue