<var o = caller.o>
<var OUT = caller.OUT>
<var DISP = caller.DISP>
<var _sp_page_context = caller._sp_page_context>
<fake_person>
<goto url="http://#this_domain#/?&o=#site_id#">
<BREAK>
</fake_person>
<!--- hmm, i think you should be able to add pages w/o publishing.
<if GLOBAL.SP.SITE.publish EQ "not">
<div align="center" style="border-bottom:1px solid ##999; margin-left:-9px; margin-right:-9px; margin-top:-9px; padding:7px; border-top-width:0px;" class="sweetbox">
<div> </div>
<h3 style="margin:0px;">New Page</h3>
<div> </div>
</div>
<p>
#OUT.icon_err# <b>This site isn't pubished yet.</b>
</p>
<p>
Please publish this site to begin adding pages.
</p>
<div> </div>
<div align="center"><a href="#OUT.top_href#">Home</a> | <a href="http://#this_domain#/upgrade"><b>Publish This Site ></b></a></div>
<div> </div>
<div> </div>
<BREAK>
</if>
--->
<DIV>
<if site_id NEQ 340 AND GLOBAL.SP.SITE_PAGES.recordcount GTE 7 AND _sp_page_context NEQ "smallerpages">
<h3>Too Many Pages!</h3>#OUT.after_header#
<div align="right" class="absr" style="z-index:9999;"><tag.sp_page_prevnext></div>
<div class="unit">
This SmallerPage site is full.
</div>#OUT.clr#
<div>
<div class="unit" style="margin-bottom:0.2em;"><b>What's Next?</b></div>
<div class="ycab">
<div>
<div><a href="http://#this_domain#/pages">#OUT.icon_edit#</a> <a href="http://#this_domain#/pages"><b>Delete Pages</b></a></div>
<div>Remove existing pages from your site before adding another</div>
</div><div><small> </small></div>
<div>
<div><a href="http://#this_domain#/new_site">#OUT.icon_new#</a> <a href="http://#this_domain#/new_site"><b>Make a New Site</b></a></div>
<div>Start fresh with a brand new SmallerPage site</div>
</div>
</div>
</div>#OUT.clr#
<div><small>
<a href="http://#this_domain#/pages">Back</a>
</small></div>#OUT.clr#
</DIV><BREAK>
</if>
<ensure variable="get.first" value="0">
<postform>
<postsuccess>
<var idnum = POST_N.n1.status>
<if site_id NEQ 340 AND site_user_id EQ client_id>
<var _list = ",#GLOBAL.SP.SITE_PAGE_LIST#,#idnum#,">
<update orb="site"
where="site.id = #site_id#"
pageidlist="#_list#">
<var _up = return>
<if _up EQ 1>
<var _url = "http://#this_domain#/pages?&page_created=1">
<goto url="#_url#">
</if>
<else>
<var _url = "http://smallerpage.com/smallerpages?&user=#client_id#&page_created=1">
<goto url="#_url#">
</if>
</postsuccess>
<postfail>
<div class="sp_fail">
<h4>File is Too Large</h4>#OUT.after_header#
<p>
Please try again with a smaller file. The file size limit is 10MB.
</p>
</div>
</postfail>
<postneutral>
<ensure variable="get.type" value="standard">
<VAR get.type = "standard">
<var _fval = "">
<if isdefined("get.routine") AND isValidGutitle(get.routine) EQ 1>
<var _fval = trim(lcase(get.routine)) & "()">
<elseif isdefined("POST.n1_alt_title")>
<var _fval = POST.n1_alt_title>
</if>
<if _fval EQ "" AND NOT (isdefined("get.no_function") AND get.no_function EQ 1)>
<!--- what kind of page? --->
<tag.sp_function_picker>
<div> </div>
<div><small><a href="http://#this_domain#/">back</a></small></div>
<else>
<h3>New Page</h3>#OUT.after_header#
<if _fval NEQ "">
<div class="unit">
<ensure variable="get.routine_id" value="0">
<var _rsrc = "http://smallerpage.com/?&f=site-340">
<if get.routine_id GT 0>
<var _rsrc = "http://smallerpage.com/?&f=routine-#get.routine_id#&f2=site-340">
</if>
<div>
<div style="float:left; width:48px; max-height:56px; overflow:hidden;">
<img src="#_rsrc#&picwidth=48" border="0">
</div>
<div style="margin-left:56px;">
<div><b>Using #escapeMarkup(_fval)#</b></div>
<div style="margin-top:0.2em;"><small>Save your page to use this function.</small></div>
</div>
</div>#OUT.clr#
</div>
<input type="hidden" style="display:none;" name="1_alt_title" value="#escapeDoubleQuotes(_fval)#">
<div class="unit" style="clear:left;">
<div><b>Title:</b></div>
<div class="pop">
<var _t = replace(_fval,"()","") & " page">
<if isdefined("POST.n1_title")>
<var _t = POST.n1_title>
</if>
<input type="text" name="1_title" class="select_on_ready" value="#escapeDoubleQuotes(_t)#">
</div>
</div>#OUT.clr#
<div align="left" class="unit">
<div class="pop">
<input type="submit" value="Save & Continue" style="cursor:pointer;">
</div>
</div>#OUT.clr# #OUT.clr#
<else>
<div class="unit" style="clear:left;">
<div><b>Title:</b></div>
<div class="pop">
<input type="text" name="1_title" class="focusme" value="<if isdefined("POST.n1_title")>#escapeDoubleQuotes(POST.n1_title)#</if>">
</div>
<!--- AHA! NO FUNCTION ON CREATE.
<if get.first NEQ 1>
<div class="pop" style="margin-left:4em;"><small>
<div align="right" style="float:left; clear:left;">Optional - Page Function:</div>
<div align="right" class="pop" style="float:left; clear:left;"">
<input type="text" name="1_alt_title" value="#escapeDoubleQuotes(_fval)#">
<div align="right"><small><a href="http://#this_domain#/new_page?&type=function&more_functions=1">More...</a></small></div>
<!--- to fkl or not to fkl? --->
<if _fval EQ "">
<var GLOBAL.SP_FKLR = "functions">
<var GLOBAL.SP_FKLR_MS = 1800>
</if>
</div>
</small></div>
</if>
--->
</div>#OUT.clr#
<div class="unit">
<div><b>Text:</b></div>
<div class="pop">
<textarea name="1_body" rows="3" cols="56" style="width:72%; height:3em;"><if isdefined("POST.n1_body")>#escapeMarkup(POST.n1_body)#</if></textarea>
</div>
</div>#OUT.clr#
<div class="unit">
<div><b>Picture or Video:</b></div>
<div class="pop">
<input type="file" name="1_file">
</div>
<div><small>
Upload a image (<b>jpg</b> <b>png</b> or <b>gif</b>) or video (<b>mp4</b>).
</small></div>
</div>#OUT.clr#
<div align="left" class="unit">
<div class="pop">
<input type="submit" value="Create Page" style="cursor:pointer;">
</div>
</div>#OUT.clr#
</if>
<div><small><a href="http://#this_domain#/new_page">back</a></small></div>
<input type="hidden" style="display:none;" name="1_user_key_id" value="1">
<input type="hidden" style="display:none;" name="1_posttype" value="INSERT">
<input type="hidden" style="display:none;" name="1_orb" value="smallerpage">
</if>
</postneutral>
</postform>
</DIV>