# You should have received a copy of the GNU Affero General Public License
# along with Busy. If not, see <http://www.gnu.org/licenses/>.
-reason=$(egrep -o '(^|&)r=.+(&|$)' <<<"${QUERY_STRING}" |sed 's,&,,g;s,r=,,')
+[ -z "$reason" ] && reason=$(egrep -o '(^|&)r=.+(&|$)' <<<"${QUERY_STRING}" |sed 's,&,,g;s,r=,,')
[ -z "$reason" ] && reason="other"
-echo '<h2>Error</h2>'
+echo "
+<div id='MAIN'>
+<h2>Error</h2>
+"
case "${reason}" in
tooSmall) echo 'You need to select a file for uploading.'
;;
*) echo 'Unknown generic fuckup :-('
;;
esac
+echo "</div>"