+
+elif [ "$channel" -a "$video" -a "$action" = frameuploadprogress ]; then
+ AUTHOR || REDIRECT "$_BASE/$channel/$video/#ERROR_EDIT_NOTALLOWED"
+ printf '%s\r\n' 'Content-Type: text/html' 'Connection: close' ''
+ printf '<!DOCTYPE HTML>
+ <html><head>
+ <title>Upload Progress</title>
+ <style type="text/css"><!--
+ body {
+ text-align: center;
+ }
+ .progress {
+ display: inline-block;
+ width: 20em;
+ position: absolute;
+ background-color: #FFF;
+ }
+ --></style>
+ </head><body>
+ '
+ while [ "$VIDEO_STATUS" = void ]; do
+ printf '<span class=progress>%i</span>\n' "$(stat -c %s "$_DATA/$channel/$video.mp4" 2>&-)"
+ sleep 1
+ read -r VIDEO_ID VIDEO_NAME VIDEO_DESCRIPTION VIDEO_RESX VIDEO_RESY \
+ VIDEO_LENGTH VIDEO_COVER VIDEO_STATUS VIDEO_UPLOADER VIDEO_HITS \
+ VIDEO_DESCR_CACHE VIDEO_FUTUREUSE <<-EOF
+ $(grep "^${video} " "${vid_db}")
+ EOF
+ done
+ printf '<span class=progress>Ready!</span>\n'
+ printf '</body></html>'
+
+elif [ "$channel" -a "$video" -a "$action" = frameupload ]; then
+ AUTHOR || REDIRECT "$_BASE/$channel/$video/#ERROR_EDIT_NOTALLOWED"
+ printf '%s\r\n' 'Content-Type: text/html' ''
+ [ "$VIDEO_STATUS" = void ] && "$_EXEC"/cgilite/html-sh.sed <<-EOF
+ [!DOCTYPE HTML]
+ [html [head
+ [title Upload Form]
+ ][body
+ [form .upload method=POST enctype="multipart/form-data"
+ [input type=file name=upload]
+ [submit "action" "video_upload" Upload]
+ ]
+ ]]
+ EOF
+ [ "$VIDEO_STATUS" != void ] && "$_EXEC"/cgilite/html-sh.sed <<-EOF
+ [!DOCTYPE HTML]
+ [html [head
+ [title Upload Form]
+ ][body
+ [a href="./" target="_parent" . Reload Page!]
+ ]]
+ EOF
+