<var C = GLOBAL.Def.Style.color>
<var _tables = "">
<loop list="#GLOBAL.Def.Client.tables_get#" index="x" delimiters="|#CHR(10)#"><if x NEQ "answer">
<var _tables = _tables & "-" & x>
</if></loop>
<var _tbl_already_selected = 0>
<ensure variable="get.s2" value="">
<if listFindNoCase(_tables,get.s2,"-") EQ 0 OR isValidGutitle(get.s2) EQ 0 OR get.s2 EQ "user">
<var get.s2 = "text">
<else>
<var _tbl_already_selected = 1>
</if>
<tag.unit_css>
<postform>
<postsuccess>
<var _tbl = POST.n1_orb>
<var _idnum = POST_N.n1.status>
<if _tbl EQ "update">
<!--- update update title and go to dashboard --->
<update orb="#_tbl#" where="#_tbl#.id = #_idnum#"
title="#client_name# - Status Update, #dateFormat(now(),'full')#">
<if return NEQ "pants">
<goto url="http://iqtpi.com/">
</if>
<else>
<!--- update client ici and go to content --->
<tag.ici function="ensure" user_id="#client_id#">
<tag.ici function="update" user_id="#client_id#">
<if return NEQ "pants">
<if isDefined("get.back_to_dashboard") AND get.back_to_dashboard EQ 1>
<goto url="http://iqtpi.com/">
<else>
<goto url="http://iqtpi.com/j:/#_tbl#-#_idnum#">
</if>
</if>
</if>
<break>
</postsuccess>
<div align="center" style="padding:2em; min-height:8em;">
<div align="left" style="width:560px;">
<postfail>
<div style="padding:7px; margin-bottom:7px; background:red; color:white;">
<h3>Upload Error - Please Try Again.</h3>
<p>
Are you uploading a file that's larger than 250MB?
</p>
</div>
</postfail>
<div align="center" id="new_head" style="padding-bottom:5px; border-bottom:1px solid #C.pri#; font-size:1.2em;">
This new
<select name="1_orb" id="1_orb">
<if _tbl_already_selected EQ 1>
<set j="/table-#get.s2#">
<setcrawl>
<option value="#get.s2#" selected>#escapeMarkup(set.notes)#</option>
</setcrawl>
<setempty>
<option value="#get.s2#" selected>#get.s2#</option>
</setempty>
</set>
</if>
<set j="/table#_tables#">
<var _counter = 1>
<loop list="#_tables#" index="x" delimiters="-"><if (_tbl_already_selected EQ 0 OR x NEQ get.s2 ) AND x NEQ "answer" AND x NEQ "user"><setcrawl><if set.gutitle EQ x>
<option value="#x#"<if _tbl_already_selected EQ 0 AND _counter EQ 1> selected</if>>#escapeMarkup(set.notes)#</option>
<var _counter = _counter + 1>
<break></if></setcrawl></if></loop>
</set>
<if _tbl_already_selected EQ 0 AND _tables EQ "">
<option value="text" selected>Blog Post</option>
</if>
</select>
is called
<input id="1_title" name="1_title" value="" autocomplete="off">
</div>
<div style="height:11px;"> </div>
<div id="new_body" style="display:none;">
<div class="unit">
<div class="unit_left">
<span id="media_file">Media File</span>:
</div>
<div class="unit_right">
<input type="file" name="1_file">
</div>
</div>
<div class="unit">
<div class="unit_left">
Body Text:
</div>
<div class="unit_right">
<textarea name="1_body" id="1_body" style="width:95%; height:7em; border:1px solid ##999;"></textarea>
</div>
</div>
<if GLOBAL.Def.iqtpi_age_num LTE 1>
<input type="hidden" style="display:none;" name="1_iqtpi_age_num_double" value="1">
<else>
<div class="unit">
<div class="unit_left">
Age Level:
</div>
<div class="unit_right">
<select id="1_iqtpi_age_num_double" name="1_iqtpi_age_num_double">
<if GLOBAL.Def.iqtpi_age_num GT 2>
<option value="3" selected>Grown Ups and Way Grown Ups Only</option>
</if>
<option value="2"<if GLOBAL.Def.iqtpi_age_num EQ 2> selected</if>>Suitable for Teens and Older</option>
<option value="1">Safe for All Ages</option>
</select>
<span id="age_note"></span>
</div>
</div>
</if>
<div class="unit">
<div class="unit_left">
Reach:
</div>
<div class="unit_right">
<select name="1_user_key_id" id="1_user_key_id">
<option value="0" selected>Only I can see this (private)</option>
<option value="9"<if GLOBAL.Def.Client.key_content_protected_unsignedint EQ 9> selected</if>>Only my friends can see this</option>
<option value="5"<if GLOBAL.Def.Client.key_content_protected_unsignedint EQ 5> selected</if>>Friends and followers can see this</option>
<option value="1"<if GLOBAL.Def.Client.key_content_protected_unsignedint EQ 1> selected</if>>Everyone can see this post</option>
</select>
<div style="font-size:0.72em; color:#C.g3#;">Only items with reach: "everyone" will appear in iqtpi content search results.</div>
</div>
</div>
<tag.i
q='/icode@#client_id#'
t='get.query'
p=''
i=''>
<var Codes = return>
<if Codes.recordcount GT 0>
<div class="unit">
<div class="unit_left">
Access Code:
</div>
<div class="unit_right">
<select name="1_ic_unsignedint" id="1_ic_unsignedint">
<option value="0" selected>No Code</option>
<loop query="Codes">
<option value="#Codes.id#">#Codes.title# (#client_gutitle#-#Codes.utoken#)</option>
</loop>
</select>
<div class="unit_note">
Note that codes override reach settings.
<div style="padding-top:3px;">
<a target="_blank" href="http://#this_domain#/#client_id#?&tab=codes">Go to Codes</a>
<img src="http://#this_domain#/file:/image-ext" border="0" style="height:0.88em;">
</div>
</div>
</div>
</div>
</if>
<div class="unit">
<div class="unit_left">
Publish To:
</div>
<div class="unit_right">
<if GLOBAL.Def.Client.acct_flavor_protected EQ "snowseats">
<select name="1_notes" id="1_notes">
<option value="|snowseats|" selected>Snow Seats</option>
<option value="">iqtpi only</option>
</select>
<else>
<select name="1_notes" id="1_notes">
<option value="" selected>iqtpi only</option>
<option value="|snowseats|">Snow Seats</option>
</select>
</if>
</div>
</div>
<div class="unit">
<div class="unit_left">
</div>
<div class="unit_right">
<input type="submit" id="submit_btn" value="I'm Proud of This" style="cursor:pointer; font-size:1.2em; border-width:2px;" class="gorgeous_borders">
</div>
</div>
</div>
</div>
</div>
<input type="hidden" style="display:none;" name="1_posttype" value="INSERT">
</postform>
<tag.jquery>
<script type="text/javascript">
$(document).ready(function() {
$('##1_title').keydown(function(e) {
if (e.keyCode == 13) {
return false;
}
});
$('##1_orb').bind('change', function() {
change_submit_btn_txt();
});
DID_THE_BODY = 0;
$('##1_title').bind('keyup focus change', function() {
if (!this.disabled) {
if ($(this).val().length > 0 && DID_THE_BODY == 0) {
DID_THE_BODY = 1;
$('##new_body').slideDown(360);
}
else if ($(this).val().length == 0 && DID_THE_BODY == 1) {
DID_THE_BODY = 0;
$('##new_body').slideUp(180);
}
}
});
<if GLOBAL.Def.iqtpi_age_num GT 1>
$('##1_iqtpi_age_num_double').bind('change', function() {
var _v = '';
$(this).find('option').each(function() {
if (this.selected == true) {
_v = $(this).val();
return false;
}
});
if (_v.toString() == '1') {
$('##age_note').html('<div style="font-size:0.72em; color:#C.g3#;">iqtpi will review this item before making it available to younger users.</div>');
}
else {
$('##age_note').html('');
}
});
</if>
change_submit_btn_txt();
if ($('##1_title').val().length > 0 && DID_THE_BODY == 0) {
DID_THE_BODY = 1;
$('##new_body').slideDown(360, function() {
$('##1_body').focus();
});
}
else {
<if _tbl_already_selected EQ 1>
if (!$('##1_title')[0].disabled) {
$('##1_title').focus();
}
else {
$('##1_body').focus();
}
<else>
$('##1_orb').focus();
</if>
}
});
function change_submit_btn_txt() {
var _v = '';
$('##1_orb').find('option').each(function() {
if (this.selected == true) {
_v = $(this).val();
return false;
}
});
if (_v == 'text') {
$('##submit_btn').val('I\'m Proud of This Post');
$('##media_file').html('Media File');
}
<set j="/table#_tables#">
<loop list="#_tables#" index="x" delimiters="-"><if x NEQ "user" AND x NEQ "answer" AND x NEQ "text"><setcrawl><if set.gutitle EQ x>
else if (_v == '#x#') {
$('##submit_btn').val('Create #escapeSingleQuotes(escapeMarkup(set.notes))#');
$('##media_file').html('Media File');
}
<break></if></setcrawl></if></loop>
</set>
else {
$('##submit_btn').val('Create ' + _v);
}
if (_v == 'update') {
$('##1_title').val('');
$('##1_title')[0].disabled = true;
if (DID_THE_BODY == 0) {
DID_THE_BODY = 1;
$('##new_body').slideDown(360, function() {
$('##1_body').focus();
});
}
}
else {
$('##1_title')[0].disabled = false;
if (DID_THE_BODY == 1 && jQuery.trim($('##1_title').val()) == '') {
DID_THE_BODY = 0;
$('##new_body').slideUp(180);
}
$('##1_title').focus();
$('##1_title').select();
}
}
</script><var C = GLOBAL.Def.Style.color>
<if isDefined("get.subscribe") AND isValidGutitle(get.subscribe) EQ 1>
<tag.i
q='/table'
t='post.subscribe'
p='{
"table": "#get.subscribe#",
"method": "get"
}'
i=''>
<tag.iqtpi_get_client fresh="1">
</if>
<var _tables = "">
<loop list="#GLOBAL.Def.Client.tables_get#" index="x" delimiters="|#CHR(10)#"><if x NEQ "answer">
<var _tables = _tables & "-" & x>
</if></loop>
<var _tbl_already_selected = 0>
<ensure variable="get.s2" value="">
<if listFindNoCase(_tables,get.s2,"-") EQ 0 OR isValidGutitle(get.s2) EQ 0 OR get.s2 EQ "user">
<var get.s2 = "text">
<else>
<var _tbl_already_selected = 1>
</if>
<tag.unit_css>
<postform>
<postsuccess>
<var _tbl = POST.n1_orb>
<var _idnum = POST_N.n1.status>
<if _tbl EQ "site">
<!--- create home routine and go to content --->
<var _did = 0>
<set j="/#_tbl#-#_idnum#.iqtpi_age_num_double">
<setcrawl>
<var _did = 1>
<insert orb="routine" title="#set.title#" user_key_id="#set.user_key_id#" iqtpi_age_num_double="#set.iqtpi_age_num_double#">
<var _rid = return>
<if isNumeric(_rid) AND _rid GT 1>
<update orb="#_tbl#" where="#_tbl#.id = #_idnum#"
soloroutineid_unsignedint="#_rid#">
</if>
</setcrawl>
</set>
<if _did NEQ "pants">
<goto url="http://iqtpi.com/j:/#_tbl#-#_idnum#?&edit_mode=1">
</if>
<elseif _tbl EQ "table">
<!--- update qprice --->
<update orb="#_tbl#" where="#_tbl#.id = #_idnum#" qprice_unsignedint="5">
<!--- update client ici and go to content --->
<tag.ici function="ensure" user_id="#client_id#">
<tag.ici function="update" user_id="#client_id#">
<if return NEQ "pants">
<if isDefined("get.back_to_dashboard") AND get.back_to_dashboard EQ 1>
<goto url="http://iqtpi.com/">
<else>
<goto url="http://iqtpi.com/j:/#_tbl#-#_idnum#?&edit_mode=1">
</if>
</if>
<else>
<!--- update client ici and go to content --->
<tag.ici function="ensure" user_id="#client_id#">
<tag.ici function="update" user_id="#client_id#">
<if return NEQ "pants">
<if isDefined("get.back_to_dashboard") AND get.back_to_dashboard EQ 1>
<goto url="http://iqtpi.com/">
<else>
<goto url="http://iqtpi.com/j:/#_tbl#-#_idnum#?&edit_mode=1">
</if>
</if>
</if>
<break>
</postsuccess>
<div align="center" style="padding:2em; min-height:8em;">
<div align="left" style="width:600px;">
<postfail>
<div style="padding:7px; margin-bottom:7px; background:red; color:white;">
<h3>Upload Error - Please Try Again.</h3>
<p>
Are you uploading a file that's larger than 250MB?
</p>
</div>
</postfail>
<div align="center" id="new_head" style="padding-bottom:5px; border-bottom:1px solid #C.pri#; font-size:1.2em;">
This new
<select name="1_orb" id="1_orb">
<if _tbl_already_selected EQ 1>
<set j="/table-#get.s2#">
<setcrawl>
<option value="#get.s2#" selected>#escapeMarkup(set.notes)#</option>
</setcrawl>
<setempty>
<option value="#get.s2#" selected>#get.s2#</option>
</setempty>
</set>
</if>
<set j="/table#_tables#">
<var _counter = 1>
<loop list="#_tables#" index="x" delimiters="-"><if (_tbl_already_selected EQ 0 OR x NEQ get.s2 ) AND x NEQ "answer" AND x NEQ "user"><setcrawl><if set.gutitle EQ x>
<option value="#x#"<if _tbl_already_selected EQ 0 AND _counter EQ 1> selected</if>>#escapeMarkup(set.notes)#</option>
<var _counter = _counter + 1>
<break></if></setcrawl></if></loop>
</set>
<if _tbl_already_selected EQ 0 AND _tables EQ "">
<option value="text" selected>Blog Post</option>
<var _tbl_already_selected = 1>
</if>
<option value="-customize-tables-">Customize Tables...</option>
</select>
is called
<input id="1_title" name="1_title" value="" autocomplete="off">
</div>
<div style="height:11px;"> </div>
<div id="new_body" style="display:none;"><div style="margin-right:3em;">
<!---
<div class="unit">
<div class="unit_left">
<span id="media_file">Media File</span>:
</div>
<div class="unit_right">
<input type="file" name="1_file">
</div>
</div>
<div class="unit">
<div class="unit_left">
Body Text:
</div>
<div class="unit_right">
<textarea name="1_body" id="1_body" style="width:95%; height:7em; border:1px solid ##999;"></textarea>
</div>
</div>
--->
<div class="sticky_stuff">
<div class="sticky_content"><div style="padding:1px;">
<if GLOBAL.Def.iqtpi_age_num LTE 1>
<input type="hidden" style="display:none;" name="1_iqtpi_age_num_double" value="1">
<else>
<div class="unit">
<div class="unit_left">
Age Level:
</div>
<div class="unit_right">
<select id="1_iqtpi_age_num_double" name="1_iqtpi_age_num_double">
<if GLOBAL.Def.iqtpi_age_num GT 2>
<option value="3" selected>Grown Ups and Way Grown Ups Only</option>
</if>
<option value="2"<if GLOBAL.Def.iqtpi_age_num EQ 2> selected</if>>Suitable for Teens and Older</option>
<option value="1">Safe for All Ages</option>
</select>
<span id="age_note"></span>
</div>
</div>
</if>
<div class="unit">
<div class="unit_left">
Reach:
</div>
<div class="unit_right">
<select name="1_user_key_id" id="1_user_key_id">
<option value="0" selected>Only I can see this (private)</option>
<option value="9"<if GLOBAL.Def.Client.key_content_protected_unsignedint EQ 9> selected</if>>Only my friends can see this</option>
<option value="5"<if GLOBAL.Def.Client.key_content_protected_unsignedint EQ 5> selected</if>>Friends and followers can see this</option>
<option value="1"<if GLOBAL.Def.Client.key_content_protected_unsignedint EQ 1> selected</if>>Everyone can see this post</option>
</select>
<div style="font-size:0.72em; color:#C.g3#;">Only items with reach: "everyone" will appear in iqtpi content search results.</div>
</div>
</div>
<tag.i
q='/icode@#client_id#'
t='get.query'
p=''
i=''>
<var Codes = return>
<if Codes.recordcount GT 0>
<div class="unit">
<div class="unit_left">
Access Code:
</div>
<div class="unit_right">
<select name="1_ic_unsignedint" id="1_ic_unsignedint">
<option value="0" selected>No Code</option>
<loop query="Codes">
<option value="#Codes.id#">#Codes.title# (#client_gutitle#-#Codes.utoken#)</option>
</loop>
</select>
<div class="unit_note">
Note that codes override reach settings.
<div style="padding-top:3px;">
<a target="_blank" href="http://#this_domain#/#client_id#?&tab=codes">Go to Codes</a>
<img src="http://#this_domain#/file:/image-ext" border="0" style="height:0.88em;">
</div>
</div>
</div>
</div>
</if>
<div class="unit">
<div class="unit_left">
Publish To:
</div>
<div class="unit_right">
<if GLOBAL.Def.Client.acct_flavor_protected EQ "snowseats">
<select name="1_notes" id="1_notes">
<option value="|snowseats|" selected>Snow Seats</option>
<option value="">iqtpi only</option>
</select>
<else>
<select name="1_notes" id="1_notes">
<option value="" selected>iqtpi only</option>
<option value="|snowseats|">Snow Seats</option>
</select>
</if>
</div>
</div>
</div></div>
<div class="sticky_summary" style="display:none; text-align:center; font-size:0.72em;"></div>
</div>
<div class="unit">
<div class="unit_left">
</div>
<div class="unit_right" align="right">
<input type="submit" id="submit_btn" value="I'm Proud of This" style="cursor:pointer; font-size:1.2em; border-width:2px;" class="gorgeous_borders">
</div>
</div>
</div></div>
</div>
</div>
<input type="hidden" style="display:none;" name="1_posttype" value="INSERT">
</postform>
<tag.jquery>
<script type="text/javascript">
$(document).ready(function() {
$('.sticky_summary').css('cursor','pointer');
$('.sticky_summary').click(function() {
show_sticky_content();
return false;
});
$('.sticky_summary').hover(
function() { $(this).css('text-decoration','underline'); },
function() { $(this).css('text-decoration','none'); }
);
$('##1_title').keydown(function(e) {
if (e.keyCode == 13) {
if (DID_THE_BODY == 1) {
return true;
}
else {
return false;
}
}
});
$('##1_orb').bind('change', function() {
if ($(this).val() == '-customize-tables-') {
window.location = 'http://iqtpi.com/Tables';
return false;
}
change_submit_btn_txt();
});
DID_THE_BODY = 0;
$('##1_title').bind('keyup focus change', function() {
if (!this.disabled) {
if ($(this).val().length > 0 && DID_THE_BODY == 0) {
DID_THE_BODY = 1;
$('##new_body').slideDown(360);
}
else if ($(this).val().length == 0 && DID_THE_BODY == 1) {
DID_THE_BODY = 0;
$('##new_body').slideUp(180);
}
}
});
<if GLOBAL.Def.iqtpi_age_num GT 1>
$('##1_iqtpi_age_num_double').bind('change', function() {
var _v = '';
$(this).find('option').each(function() {
if (this.selected == true) {
_v = $(this).val();
return false;
}
});
if (_v.toString() == '1') {
$('##age_note').html('<div style="font-size:0.72em; color:#C.g3#;">iqtpi will review this item before making it available to younger users.</div>');
}
else {
$('##age_note').html('');
}
});
</if>
change_submit_btn_txt();
if ($('##1_title').val().length > 0 && DID_THE_BODY == 0) {
DID_THE_BODY = 1;
$('##new_body').slideDown(360, function() {
//$('##1_body').focus();
$('##submit_btn').focus();
});
}
else {
<if _tbl_already_selected EQ 1>
if (!$('##1_title')[0].disabled) {
$('##1_title').focus();
}
else {
//$('##1_body').focus();
$('##submit_btn').focus();
}
<else>
$('##1_orb').focus();
</if>
}
hide_sticky_content();
});
function change_submit_btn_txt() {
var _v = '';
$('##1_orb').find('option').each(function() {
if (this.selected == true) {
_v = $(this).val();
return false;
}
});
if (_v == 'text') {
$('##submit_btn').val('Create Blog Post');
$('##media_file').html('Media File');
}
<set j="/table#_tables#">
<loop list="#_tables#" index="x" delimiters="-"><if x NEQ "user" AND x NEQ "answer" AND x NEQ "text"><setcrawl><if set.gutitle EQ x>
else if (_v == '#x#') {
$('##submit_btn').val('Create #escapeSingleQuotes(escapeMarkup(set.notes))#');
$('##media_file').html('Media File');
}
<break></if></setcrawl></if></loop>
</set>
else {
$('##submit_btn').val('Create ' + _v);
}
if (_v == 'update') {
$('##1_title').val('');
$('##1_title')[0].disabled = true;
if (DID_THE_BODY == 0) {
DID_THE_BODY = 1;
$('##new_body').slideDown(360, function() {
//$('##1_body').focus();
$('##submit_btn').focus();
});
}
}
else {
$('##1_title')[0].disabled = false;
if (DID_THE_BODY == 1 && jQuery.trim($('##1_title').val()) == '') {
DID_THE_BODY = 0;
$('##new_body').slideUp(180);
}
$('##1_title').focus();
$('##1_title').select();
}
}
function show_sticky_content() {
$('.sticky_content').slideDown(180);
$('.sticky_summary').slideUp(180);
}
function hide_sticky_content(_do_it) {
var _sticky_txt = '';
$('.sticky_stuff').find('select').each(function() {
$(this).find('option').each(function() {
if (this.selected == true) {
if (_sticky_txt !== '') {
_sticky_txt = _sticky_txt + ' / ';
}
_sticky_txt = _sticky_txt + $(this).text();
return false;
}
});
});
$('.sticky_summary').html('<div style="padding:2.32em; padding-top:1em;">' + _sticky_txt + '</div>');
$('.sticky_content').slideUp(180);
$('.sticky_summary').slideDown(180);
}
</script>