]> git.plutz.net Git - serve0/blobdiff - pages/view.sh
use validate function from shcgi
[serve0] / pages / view.sh
index 8bbd434cd831e51a0ed48e8dcf0409e7edafc4c5..639bf0af734bf4ecef48d9635322c906bd0aba37 100755 (executable)
 # You should have received a copy of the GNU Affero General Public License
 # along with Serve0.  If not, see <http://www.gnu.org/licenses/>. 
 
+info="${_GET[i]}"
 . $_EXEC/pages/common.sh
 
-info="$_GET[\"i\"]"
-
 meta="${_DATA}/meta/$info.meta"
 video="${_DATA}/videos/$info"
 tags="$(sed -n '2p' "$meta")"
@@ -29,15 +28,3 @@ length=0; width=0; height=0;
 eval $(mplayer -noconsolecontrols -input file=/dev/null -slave -really-quiet -identify -frames 0 -ao null -vo null "$video" 2>/dev/null\
 | sed -rn 's:ID_VIDEO_WIDTH=(.*):width=\1:p;s:ID_VIDEO_HEIGHT=(.*):height=\1:p;s:ID_LENGTH=(.*)(\..*)$:length=\1:p;')
 video="videos/$info"
-
-case "$1" in
-  title)
-    echo "Videos"
-  ;;
-  css)
-    . ${_EXEC}/templates/common.css.sh
-  ;;
-  body)
-    . ${_EXEC}/templates/view.html.sh
-  ;;
-esac