<!--- SmallerPage New Site | ##smp_code --->
<!---
Makes a new site, then redirects to edit page.
(redirect strategy is easy to code, but also prevents
refresh problems, particularly on mobile phones.)
--->
<var OUT = GLOBAL.SP.OUTPUT>
<fake_person>
<h3>Create a SmallerPage Site</h3>
<div style="display:none;"><small></small></div>
<!--- pic --->
<div class="media_frame">
<img src="http://#this_domain#/?&f=routine-#this_id#&picwidth=210" border="0">
</div>
<div> </div>
<p>
<b>You're about to make a new website!</b>
</p>
<div style="display:none;"> </div>
<ul>
<li><div class="sp_box sp_box_2">
<b>New SmallerPage Users: </b>
<br>Is this your very first time at SmallerPage? You'll need to
create an account so the site can remember you next time.
<div><small> </small></div>
<div align="right">
<a href="http://#this_domain#/sign_up"><b>Sign Up for SmallerPage</b></a>
<a href="http://#this_domain#/sign_up"><tag.fico i="plus" style="height:1em;" linkback="off"></a>
</div>
<div><small> </small></div>
</div></li>
</ul>
<div> </div>
<div><small>Did you already sign up for SmallerPage? You can just
<a href="http://#this_domain#/login">log in</a> with your current
email and SmallerPage password.
</small></div>
<div> </div>
<!---
<p>
Questions? Please visit the <a href="http://#this_domain#/faq">SmallerPage FAQ</a> (Frequently Asked Questions) section.
</p>
<div> </div>
--->
<BREAK>
</fake_person>
<postform></postform>
<postform>
<postfail>
<h3>Could not create site.</h3>
<p class="site_color">
The unique title you chose was unavailable. Please choose another
unique title and try again.
</p>
<p>
Tip: make sure your unique title contains only letters and underscores.
</p>
<div> </div>
</postfail>
<postsuccess>
<if POST.n1_posttype EQ "INSERT">
<var idnum = post_n.n1.status>
<else>
<var idnum = listLast(post.n1_where,' ')>
</if>
<if trim(post.n1_gutitle) NEQ "">
<update orb="site" where="site.id = #idnum#">
title="#post.n1_gutitle#">
<if return NEQ "pants">
<goto url="http://#post.n1_gutitle#.#this_domain_main#/edit_site?&o=#idnum#&site_created=1"><!--- &soTransfer=#urlEncodedFormat(client_cookie)# --->
</if>
<else>
<h3>Site Created...</h3>
<p>
<b>...but you still need to choose a url.</b>
</p>
<div> </div>
<div class="unit" style="margin-left:1em;">
<div class="sp_box">
<b>SmallerPage URL:</b>
<br><input name="1_gutitle" id="1_gutitle" style="width:6em;"><span style="font-size:1.12em;">.smallerpage.com</span>
<div style="overflow:auto; overflow-x:hidden; overflow-y:hidden;">
<div id="gutitle_loader" style="padding:10px; display:none; float:left;"></div>
<div id="gutitle_available" style="padding:5px; background:##fff777; display:none;"></div>
</div>
</div>
<div style="margin-top:0.2em;"><small>
Your site's visitors will use this URL to view your site. Your URL must be unique - choose wisely!
</small></div>
</div>
<div> </div>
<input type="hidden" style="display:none;" name="1_posttype" value="UPDATE">
<input type="hidden" style="display:none;" name="1_orb" value="site">
<input type="hidden" style="display:none;" name="1_where" value="site.id = #idnum#">
<input type="hidden" style="display:none;" name="1_user_key_id" value="1">
<div class="unit">
<input type="submit" value="Save and Continue" style="cursor:pointer; color:black; border:1px solid black;">
</div>
<script type="text/javascript">
$(document).ready(function() {
document.getElementById('gutitle_loader').innerHTML = '<tag.ajax_loader_gif> Checking availability...';
document.getElementById('gutitle_available').innerHTML = '<b>Domain available.</b>';
});
</script>
<tag.gutitle_script otype="site" id="0" elId="1_gutitle">
</if>
</postsuccess>
<postneutral>
<h3>1. Choose a URL</h3>
<p>
People will visit your site through its own unique URL on the web. Start with
a SmallerPage URL, and maybe use <b>your own domain*</b> later.
</p>
<div class="unit">
<div class="sp_box">
<b>SmallerPage URL:</b>
<br><input name="1_gutitle" id="1_gutitle" style="width:8em;"><span style="font-size:1.12em;">.smallerpage.com</span>
<div style="overflow:auto; overflow-x:hidden; overflow-y:hidden;">
<div id="gutitle_loader" style="padding:10px; display:none; float:left;"></div>
<div id="gutitle_available" style="padding:5px; background:##fff777; display:none;"></div>
</div>
</div>
<div style="margin-top:0.2em;"><small>
(Please use only letters and underscore characters in your URL.)
</small></div>
</div>
<div> </div>
<input type="hidden" style="display:none;" name="1_routineid_unsignedint" value="2585">
<input type="hidden" style="display:none;" name="1_generator" value="smaller">
<input type="hidden" style="display:none;" name="1_headerhtml" value="<tag.smp_meta>">
<input type="hidden" style="display:none;" name="1_posttype" value="INSERT">
<input type="hidden" style="display:none;" name="1_orb" value="site">
<input type="hidden" style="display:none;" name="1_user_key_id" value="1">
<div class="unit">
<input type="submit" value="Create" style="cursor:pointer; color:black; border:1px solid black;">
</div>
<p align="right"><small>
<b>* Your own domain</b> would be<br>like "yourname.com"
</small></p>
<p>
<a href="http://#this_domain#/dashboard?&o=#get.o#">Back</a>
</p>
<tag.jquery>
<script type="text/javascript">
$(document).ready(function() {
document.getElementById('gutitle_loader').innerHTML = '<tag.ajax_loader_gif> Checking availability...';
document.getElementById('gutitle_available').innerHTML = '<b>Domain available.</b>';
});
</script>
<tag.gutitle_script otype="site" id="0" elId="1_gutitle">
</postneutral>
</postform>