<var C = GLOBAL.Def.Style.color>
<fake_person>
<!--- pic --->
<tag.spf_picdiv src="http://#this_domain#/file:/image-spf_feet" w="240" h="179"
style="float:left;">
</tag.spf_picdiv>
<!--- login --->
<tag.spf_login_column heading="Steve's Set List">
<div style="clear:both;"> </div>
<BREAK>
</fake_person>
<var _band_mode = 0>
<if listFindNoCase("fentriss",client_gutitle) GT 0>
<var _band_mode = 1>
</if>
<!--- pic --->
<tag.spf_picdiv src="http://#this_domain#/file:/image-spf_tree_stumps_panorama" w="800" h="134">
</tag.spf_picdiv>
<div> </div>
<!--- sidebar --->
<tag.spf_haven_sidebar title="Set List">
</tag.spf_haven_sidebar>
<!--- tunes --->
<div style="margin-left:280px; padding:7px; background:white; border-radius:7px;">
<ensure variable="get.sort" value="">
<if listFindNoCase("author,feel,dance,alpha_asc,alpha_desc",get.sort) EQ 0>
<var get.sort = "author">
</if>
<!--- prepare sort --->
<small><div>
<form method="get" enctype="application/x-www-form-urlencoded" action="http://#this_domain#/#so_slash_string#"><input type="hidden" name="x" value="" style="display:none;">
<select name="sort" onchange="$(this).parents('form:first').submit();">
<option value="author" <if get.sort EQ 'author'> selected </if>>By Author</option>
<option value="feel" <if get.sort EQ 'feel'> selected </if>>By Feel</option>
<option value="dance" <if get.sort EQ 'dance'> selected </if>>By Dance-Friendliness</option>
<option value="alpha_asc" <if get.sort EQ 'alpha_asc'> selected </if>>By Title (A-Z)</option>
<option value="alpha_desc" <if get.sort EQ 'alpha_desc'> selected </if>>By Title (Z-A)</option>
</select>
<input type="submit" value="Update" style="cursor:pointer;">
<var Sort = StructNew()>
<if get.sort EQ "author">
<var Sort.title = "Sorted by Author">
<var Sort.arr = DeSerializeJSON('[
{
"heading": "Steve''s Originals",
"where": "tune.author LIKE(''Steve Fentriss%'')",
"orderby": "tune.title ASC"
},
{
"heading": "Covers",
"where": "tune.author NOT LIKE(''Steve Fentriss%'')",
"orderby": "tune.title ASC"
}
]')>
<elseif get.sort EQ "feel">
<var Sort.title = "Sorted by Feel">
<var Sort.arr = DeSerializeJSON('[
{
"heading": "Upbeat Tunes",
"where": "tune.notes LIKE (''%|upbeat|%'')",
"orderby": "tune.title ASC"
},
{
"heading": "Soft Tunes",
"where": "tune.notes LIKE (''%|soft|%'')",
"orderby": "tune.title ASC"
}
]')>
<elseif get.sort EQ "dance">
<var Sort.title = "Sorted by Dance-Friendliness">
<var Sort.arr = DeSerializeJSON('[
{
"heading": "Dancing Tunes",
"where": "tune.notes LIKE (''%|dance|%'')",
"orderby": "tune.title ASC"
},
{
"heading": "Listening Tunes",
"where": "tune.notes LIKE (''%|listen|%'')",
"orderby": "tune.title ASC"
}
]')>
<elseif get.sort EQ "alpha_asc">
<var Sort.title = "Listed in Alphabetical Order">
<var Sort.arr = DeSerializeJSON('[
{
"heading": "All Tunes",
"where": "tune.title <> ''",
"orderby": "tune.title ASC"
}
]')>
<elseif get.sort EQ "alpha_desc">
<var Sort.title = "Listed in Reverse Alphabetical Order">
<var Sort.arr = DeSerializeJSON('[
{
"heading": "All Tunes",
"where": "tune.title <> ''",
"orderby": "tune.title DESC"
}
]')>
<else>
<p>Unknown Sort.</p>
</if>
</form>
</div></small>
<if _band_mode EQ 1><small><small><p align="right" style="color:##69e; padding:3px;">
#escapeMarkup(client_name)#: private notes are available on certain tunes.
</p></small></small></if>
<div> </div>
<!--- output --->
<if isDefined("sort.title")>
<div style="margin-left:0em;">
<loop from="1" to="#arrayLen(Sort.arr)#" index="x">
<var Obj = Sort.arr[x]>
<h4>#Obj.heading#</h4>
<div style="width:360px;">
<set orb="tune" select="tune.id,tune.title,tune.notes,tune.body,tune.name,tune.author,tune.bandnotes" where="#Obj.where# AND ( tune.user_id = 7 )" orderby="#Obj.orderby#">
<if set.recordcount EQ 0>
<p style="margin-left:2.5em;">
(none)
</p>
<else>
<ul style="list-style-type:none; margin-bottom:2em;">
<setcrawl>
<li class="tune" style="position:relative;">
<div class="tune_title">
#escapeMarkup(set.title)#
</div>
<small><small><div class="tune_info" style="position:absolute; right:0px; top:3px;">
<if _band_mode EQ 1 AND set.bandnotes NEQ "">
<span class="tune_bandnotes_link_container">
<a href="##" class="tune_bandnotes_link" style="color:##69e;">Notes</a>
<span class="tune_bandnotes" style="display:none !important;"><h4 style="margin-bottom:0px;">#escapeMarkup(set.title)# - NOTES</h4><small><small><div style="padding-top:2px; color:#C.g3#;">© #escapeMarkup(set.author)#</div></small></small><div> </div>#escapeMarkup(set.bandnotes,1)#</span>
</span>
|
</if>
<if left(set.name,7) EQ "http://">
<a style="color:inherit;" href="#escapeDoubleQuotes(escapeMarkup(set.name))#">Web</a>
|
</if>
<span class="tune_lyrics_link_container">
<a href="##" class="tune_lyrics_link">Lyrics</a>
<span class="tune_lyrics" style="display:none !important;"><h4 style="margin-bottom:0px;">#escapeMarkup(set.title)#</h4><small><small><div style="padding-top:2px; color:#C.g3#;">© #escapeMarkup(set.author)#</div></small></small><div> </div>#escapeMarkup(set.body,1)#</span>
</span>
</div></small></small>
<if get.sort NEQ "author" OR set.author NEQ "Steve Fentriss">
<small><small><div style="padding-top:2px; color:#C.g3#;">
#escapeMarkup(set.author)#
</div></small></small>
</if>
</li>
</setcrawl>
</ul>
</if>
</set>
</div>
</loop>
</div>
</if>
<div> </div>
</div>