Re: dumb Logic Wall...
Posted: Sat Dec 27, 2008 12:35 am
ok... little farther...
still trying to figure out how to generalize this area as it's 99% repeatitive....
thanks for the help...
jeremyBass
Code: Select all
<h2>Search Completed</h2>
{if isset($fld_36) && ($fld_36 neq 'No Default')}<strong>Stylist/Salon by State </strong>: {$fld_36}<br />
{assign var=State value=1}{else}{assign var=State value=0}
{/if}
{if isset($fld_39) && ($fld_39 neq '[unspecified]')}<strong>city</strong>: {$fld_39}<br />
{assign var=city value=1}{else}{assign var=city value=0}
{/if}
{if isset($fld_40) && ($fld_40 neq '[unspecified]')}<strong>Hair Stylist Name</strong>: {$fld_40}<br />
{assign var=Name value=1}{else}{assign var=Name value=0}
{/if}
{if isset($fld_41) && ($fld_41 neq '[unspecified]')}<strong>Hair Salon name</strong>: {$fld_41}<br />
{assign var=Salon value=1}{else}{assign var=Salon value=0}
{/if}
{if isset($fld_43) && ($fld_43 neq '[unspecified]')}<strong>zip</strong>: {$fld_43}<br />
{assign var=zip value=1}{else}{assign var=zip value=0}
{/if}
<h4>{$State}{$city}{$Name}{$Salon}{$zip}</h4>
<br/><br/>
{assign var=selector value=$State$city$Name$Salon$zip}
{$selector}
<br/><br/>
<br/>
{$feu_smarty->get_users_by_groupname('members','mymembers')}
<h3>Matching Members:</h3>
<hr/>
{assign var=noMATCH value='<h4>No Matches!!!!</h4>'}
{assign var=ISone value=false}
{assign var=blankMATCH value='<a href="javascript: history.go(-1)"><h4>Sorry the search form was blank</h4></a><br/><br/>'}
{assign var=ISblank value=false}
{foreach from=$mymembers item=entry}
{$feu_smarty->get_user_properties($entry.id,'userprops')}
{if $selector eq '00000'}
{assign var=ISblank value=true}
{elseif $selector eq '10000'}
{if $userprops.state|lower eq $fld_36|lower}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif $selector eq '11000'}
{if ($userprops.state|lower eq $fld_36|lower) and ($userprops.city|lower eq $fld_39|lower)}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif ($selector eq '00010')|($selector eq '11011')|($selector eq '01011')|($selector eq '00011')|($selector eq '10011')|($selector eq '11010')}
{if ($userprops.company|lower eq $fld_41|lower)}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif $selector eq '10010'}
{if ($userprops.company|lower eq $fld_41|lower) && ($userprops.state|lower eq $fld_36|lower)}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif ($selector eq '00100')|($selector eq '11101')|($selector eq '01101')|($selector eq '00101')|($selector eq '10101')|($selector eq '10100')|($selector eq '11100')}
{if $entry.username|lower eq $fld_40|lower}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif $selector eq '01000'}
{if $userprops.city|lower eq $fld_39|lower}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif $selector eq '01010'}
{if ($userprops.city|lower eq $fld_39|lower) and ($userprops.company|lower eq $fld_41|lower)}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif $selector eq '00001'}
{if ($userprops.zip|lower eq $fld_43|lower)}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{elseif $selector eq '11001'}
{if ($userprops.city|lower eq $fld_39|lower) and ($userprops.zip|lower eq $fld_43|lower) and ($userprops.state|lower eq $fld_36|lower)}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}<strong>Salon name</strong>:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}<strong>email</strong>:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}<strong>State</strong>:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}<strong>City</strong>:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}<strong>Zip</strong>:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
{/if}
{/foreach}
{if $ISone eq false}
{$noMATCH}
{/if}
{if $ISblank eq true}
{$blankMATCH}
{/if}
<hr/>
<a href="javascript: history.go(-1)"><h4>New Search??</h4></a><br/><br/>
still trying to figure out how to generalize this area as it's 99% repeatitive....
Code: Select all
{if ($userprops.city|lower eq $fld_39|lower) and ($userprops.zip|lower eq $fld_43|lower) and ($userprops.state|lower eq $fld_36|lower)}
<span style="float:left; width:250px;">{$entry.username}<br/><br/></span>
<span style="background-color:#990000;float:left; ">
{if isset($userprops.company)}Salon name:{$userprops.company}<br/>{/if}
{if isset($userprops.email)}email:{$userprops.email}<br/>{/if}
{if isset($userprops.state)}State:{$userprops.state}<br/>{/if}
{if isset($userprops.city)}City:{$userprops.city}<br/>{/if}
{if isset($userprops.zip)}Zip:{$userprops.zip}<br/>{/if}
{get_feu_properties username=$entry.username property="avatar" method="assign"}
{if isset($avatar)}avatar:{$avatar}<br/>{/if}
</span><br style="clear:left;"/><hr/><br/>
{assign var=ISone value=true}
{/if}
thanks for the help...
jeremyBass