]> git.plutz.net Git - serve0/blobdiff - pages/view.sh
use validate function from shcgi
[serve0] / pages / view.sh
index 15202705e4433d432c6d8565eab735e49a9e7b70..639bf0af734bf4ecef48d9635322c906bd0aba37 100755 (executable)
@@ -17,7 +17,7 @@
 # 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\"]"
+info="${_GET[i]}"
 . $_EXEC/pages/common.sh
 
 meta="${_DATA}/meta/$info.meta"
@@ -28,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