View file template/m/group.tpl

File size: 6.72Kb
{if $id}
<div class="shade">
{$group.grp}<br/>
{if $group.level == 0}{lng p="open"} {else}{if $group.level == 1}{lng p="closed"} {else}{if $group.level == 2}{lng p="private"} {/if}{/if}{/if} {lng p="group"}
</div>
<div class="shader">
{if $do}<a href="{$selfurl}?ac=gop&amp;id={$id}&amp;sid={$sid}">{lng p="group"}</a> &nbsp; {/if}
<a href="{$selfurl}?ac=gop&amp;id={$id}&amp;do=abt&amp;sid={$sid}">{lng p="about"}</a> 
&nbsp; <a href="{$selfurl}?ac=gop&amp;id={$id}&amp;do=pho&amp;sid={$sid}">{lng p="photos"}</a> &nbsp; 
<a href="{$selfurl}?ac=gop&amp;id={$id}&amp;do=mbs&amp;sid={$sid}">{lng p="members"}</a>
</div>
{if $do==abt}
{if $err}
<div class="error">
{$err}
</div>
{/if}
<form action="{$selfurl}?ac=gop&amp;id={$id}&amp;do=abt&amp;sid={$sid}" method="post">
<div class="shade">
{lng p="group"} {lng p="name"}<br/>
<input type="text" name="group" value="{$group.grp}"/>
</div>
<div class="shader">
{lng p="group"} {lng p="description"}<br/>
<textarea name="describe" cols="30" rows="3">{$group.description}</textarea>
</div>
<div class="shade">
{lng p="privacy"}<br/>
<input type="radio" name="priv" value="0"{if $group.level == 0} checked="checked"{/if}/> {lng p="open"} 
<input type="radio" name="priv" value="1"{if $group.level == 1} checked="checked"{/if}/> {lng p="closed"} 
<input type="radio" name="priv" value="2"{if $group.level == 2} checked="checked"{/if}/> {lng p="private"}<br/>
<input type="submit" class="login" value="{lng p="update"}"/>
</div>
</form>
{else}
{if $do==add}
<div class="shader"><b>{lng p="add"} {lng p="member"}</b>
<form action="{$selfurl}?ac=gop&amp;id={$id}&amp;do=add&amp;sid={$sid}" method="post">
<input type="text" name="friend"{if $friend} value="{$friend}"{/if}/>
<input type="submit" class="login" value="{lng p="search"}"/>
</form>
</div>
{if $Co > 0}
<form action="{$selfurl}?ac=gop&amp;id={$id}&amp;do=add&amp;sid={$sid}" method="post">
{foreach from=$user item=us key=usID}
<div class="blank">
<input type="checkbox" name="sel[]" value="{$usID}" />
<img src="{$selfurl}{if $us.photo > 0}?ac=tub&amp;img={/if}{$us.url}{if $us.photo > 0}&amp;y=50&amp;x=50&amp;sid={$sid}{/if}" 
class="search"  alt="{$us.username}"/> 
<a href="{$selfurl}?ac=prf&amp;id={$usID}&amp;sid={$sid}">{$us.username}</a>
</div>
<hr/>
{/foreach}
<div class="blank">
<input type="submit" class="register" value="{lng p="add_selected"}"/>
</div>
</form>
{else}
<div class="error">
{lng p="no_friends_to_add"}
</div>
{/if}
{else}
{if $do==mbs}
<div class="shade">
<a href="{$selfurl}?ac=gop&amp;id={$id}&amp;do=add&amp;sid={$sid}">{lng p="add_people_to_group"}</a>
</div>
{foreach from=$member item=mem key=memID}
<div class="blank">
<img src="{$selfurl}{if $mem.photo > 0}?ac=tub&amp;img={/if}{$mem.url}{if $mem.photo > 0}&amp;y=50&amp;x=50&amp;sid={$sid}{/if}" 
class="search" alt="{$mem.username}"/> 
<a href="{$selfurl}?ac=prf&amp;id={$memID}&amp;sid={$sid}">{$mem.username}</a> 
{if $userlog.id != $memID}
{if $mem.friend == 3} 
<a style="float: right; margin-right: 10px; margin-top: 10px;" href="{$selfurl}?ac=msg&amp;mid={$memID}&amp;sid={$sid}">
<input type="button" class="blue" value="{lng p="message"}"/></a>
{/if}
{if $mem.friend == 0} 
<a style="float: right; margin-right: 10px; margin-top: 10px;" href="{$selfurl}?ac=fnd&amp;id={$memID}&amp;sid={$sid}">
<input type="button" class="green" value="{lng p="add"}"/></a>
{/if}
{/if}
</div>
{/foreach}
{if $older}
<div class="shader">
<a href="{$selfurl}?ac=gop&amp;id={$id}&amp;do={$do}&amp;pg={$older}&amp;sid={$sid}">{lng p="see_more"}</a>
</div>
{/if}
{else}
<form action="{$selfurl}?ac=gop&amp;id={$id}&amp;sid={$sid}" method="post">
<div class="shade">
{lng p="whats_on_your_mind"}?<br/>
<textarea name="post" cols="30" rows="3"></textarea>
<input type="submit" style="vertical-align: top;" class="login" value="{lng p="post"}"/>
</div>
</form>
{foreach from=$grop item=gp key=gpID}
<div class="blank">
<b><a href="{$selfurl}?ac=prf&amp;id={$gp.userid}&amp;sid={$sid}">{$gp.username}</a>
{if $gp.shrid}</b> via <b><a href="{$selfurl}?ac=prf&amp;id={$gp.suserid}&amp;sid={$sid}">{$gp.suser}</a>{/if}</b><br/>
{$gp.message}
{if $gp.shrid}
<span style="color: #FF8040;">{$gp.smessage}</span><br/>
{/if}
<span style="color: #8f8f8f;">{$gp.dtm} ago</span> &nbsp;
{if $gp.like > 0}
<a href="{$selfurl}?ac=cmt&amp;stid={$gpID}&amp;sid={$sid}">{if $gp.like == 1}{$gp.like} {lng p="like"}{else}{if $gp.like > 1}{$gp.like} {lng p="likes"}{/if}{/if}</a> &nbsp; {/if}
<a href="{$selfurl}?ac=lke&amp;wid={$gpID}&amp;sid={$sid}">{if $gp.ulike > 0}{lng p="unlike"}{else}{lng p="like"}{/if}</a> &nbsp;
<a href="{$selfurl}?ac=cmt&amp;stid={$gpID}&amp;sid={$sid}">{if $gp.comment == 0}{lng p="comment"}{else}{if $gp.comment==1}{$gp.comment} {lng p="comment"}
{else}{if $gp.comment > 1}{$gp.comment} {lng p="comments"}{/if}{/if}{/if}</a> &nbsp; 
{if $gp.userid != $userlog.id} &nbsp; <a href="{$selfurl}?ac=sae&amp;stid={$gpID}">{lng p="share"}</a>{/if}<br/>
</div>
<hr/>
{/foreach}
{if $older}
<div class="shade">
<a href="{$selfurl}?ac=gop&amp;id={$id}&amp;pg={$older}&amp;sid={$sid}">{lng p="see_more_post"}</a>
</div>
{/if}
{/if}
{/if}
{/if}
{else}
{if $do == cae}
{if $err}
<div class="error">
{$err}
</div>
{/if}
<form action="{$selfurl}?ac=gop&amp;do=cae&amp;sid={$sid}" method="post">
<div class="shade">
{lng p="group"} {lng p="name"}<br/>
<input type="text" name="group"/>
</div>
<div class="shader">
{lng p="group"} {lng p="description"}<br/>
<textarea name="describe" cols="30" rows="3"></textarea>
</div>
<div class="shade">
{lng p="privacy"}<br/>
<input type="radio" name="priv" value="0" checked="checked"/> {lng p="open"} <input type="radio" name="priv" value="1"/> {lng p="closed"} 
<input type="radio" name="priv" value="2"/> {lng p="private"}<br/>
<input type="submit" class="login" value="{lng p="create"}"/>
</div>
</form>
{else}
<div class="shade">
<a href="{$selfurl}?ac=gop&amp;do=cae&amp;sid={$sid}">{lng p="create"} {lng p="group"}</a>
</div>
<div class="shader">
<b>{lng p="recommended"} {lng p="groups"}</b>
</div>
{if $recc == 0}
<div class="error">
{lng p="no_group_available"}
</div>
{else}
{foreach from=$rec item=re key=reID}
<div class="blank">
<a href="{$selfurl}?ac=gop&amp;id={$reID}&amp;sid={$sid}">{$re.group}</a>
</div>
<div class="notify">{$re.description}</div>
{/foreach}
{/if}
{if $Count}
<div class="shader">
<b>{lng p="groups"}</b>
</div>
{foreach from=$grp item=gr key=grID}
<div class="blank">
<b><a href="{$selfurl}?ac=gop&amp;id={$grID}&amp;sid={$sid}">{$gr.group}</a></b>
</div>
<div class="notify">{$gr.description}</div>
{/foreach}
{if $older}
<div class="shade">
<a href="{$selfurl}?ac=gop&amp;pg={$older}&amp;sid={$sid}">{lng p="see_more"}</a>
</div>
{/if}
{/if}
{/if}
{/if}