<postsuccess>
<var _idnum = POST_N.n1.status>
<set j="/#_tbl#-#_idnum#">
<setcrawl>
<if listFindNoCase("jpg,png,gif",set.extension) EQ 0>
<delete orb="#_tbl#" where="#_tbl#.id = #set.id#">
<if set.extension EQ "">
<var _msg = "Please select a file to upload.">
<else>
<var _msg = "Invalid photo file of type ""<b>#escapeMarkup(set.extension)#</b>""">
</if>
</if>
</setcrawl>
</set>
<if _msg EQ "">
<tag.smp_new_addto_handler>
<if return NEQ "pants">
<goto url="http://smallerpage.com/j:/#_tbl#-#_idnum#">
</if>
<BREAK>
</if>
</postsuccess>
<postfail>
<var _msg = "Upload failed. The file may be too large, or the system may have encountered an error. Please try again and make sure your file is smaller than <b>50MB</b>.">
</postfail>