Location: PHPKode > projects > Uchome and Discuz > template/default/cp_poke.htm
<!--{template header}-->

<!--{eval 
$icons = array(
	0 => 'Just PM',
	1 => '<img src="image/poke/cyx.gif" /> Poke',
	2 => '<img src="image/poke/wgs.gif" /> Hand Shake',
	3 => '<img src="image/poke/wx.gif" /> Smile',
	4 => '<img src="image/poke/jy.gif" /> Come on',
	5 => '<img src="image/poke/pmy.gif" /> Flirt',
	6 => '<img src="image/poke/yb.gif" /> Hug',
	7 => '<img src="image/poke/fw.gif" /> Kiss',
	8 => '<img src="image/poke/nyy.gif" /> Tickle',
	9 => '<img src="image/poke/gyq.gif" /> Punch',
	10 => '<img src="image/poke/dyx.gif" /> E-Shock',
	11 => '<img src="image/poke/yw.gif" /> Attach',
	12 => '<img src="image/poke/ppjb.gif" /> Touch',
	13 => '<img src="image/poke/yyk.gif" /> Bite'
);
}-->

<!--{if $op == 'send' || $op == 'reply'}-->

<!--{if $_SGLOBAL[inajax]}-->

	<h1>Poke/Greetings</h1>
	<a href="javascript:hideMenu();" title="¹Ø±Õ" class="float_del">¹Ø±Õ</a>

<!--{else}-->

	<h2 class="title"><img src="image/icon/poke.gif">Poke</h2>
	<div class="tabs_header">
		<ul class="tabs">
			<li><a href="cp.php?ac=poke"><span>Received Poke</span></a></li>
			<li class="null"><a href="cp.php?ac=poke&op=send">My Poke</a></li>
		</ul>
	</div>
<!--{/if}-->

<div class="popupmenu_inner" id="__pokeform_{$tospace[uid]}">
<form method="post" id="pokeform_{$tospace[uid]}" name="pokeform_{$tospace[uid]}" action="cp.php?ac=poke&op=$op&uid=$tospace[uid]">
	<table cellspacing="0" cellpadding="3">
		<tr>
		<!--{if $tospace[uid]}-->
			<th width="52"><div class="avatar48"><a href="space.php?uid=$tospace[uid]"><!--{avatar($tospace[uid],small)}--></div></th>
		<!--{else}-->
			<th></th><td class="l_status">Username: <input type="text" name="username" value=""></td></tr>
			<tr><th></th>
		<!--{/if}-->
			<td>
				<!--{if $tospace[uid]}-->
					Poked <strong>{$_SN[$tospace[uid]]}</strong>: <br />
				<!--{/if}-->
				<ul class="list2col" style="width:300px;">
					<!--{loop $icons $k $v}-->
					<li><input type="radio" name="iconid" id="poke_$k" value="{$k}" /><label for="poke_$k">{$v}</label></li>
					<!--{/loop}-->
				</ul>
				<input type="text" name="note" id="note" value="" size="16" class="t_input" onkeydown="ctrlEnter(event, 'pokesubmit_btn', 1);" style="width: 300px;" maxlength="25" />
				<div class="gray">(Message is optional,but you can type own maximum 25 Char)</div>
			</td>
		</tr>
		<tr>
			<th>&nbsp;</th>
			<td>
				<input type="hidden" name="refer" value="$_SGLOBAL[refer]">
				<input type="hidden" name="pokesubmit" value="true" />
				<!--{if $_SGLOBAL[inajax]}-->
				<input type="button" name="pokesubmit_btn" id="pokesubmit_btn" value="Send" class="submit" onclick="ajaxpost('pokeform_{$tospace[uid]}', 'poke_send', 2000)" />
				<!--{else}-->
				<input type="submit" name="pokesubmit_btn" id="pokesubmit_btn" value="Send" class="submit" />
				<!--{/if}-->
			</td>
	</table>
	<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{else}-->

<h2 class="title"><img src="image/icon/poke.gif">Poke</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="cp.php?ac=poke"><span>Received Poke</span></a></li>
		<li class="null"><a href="cp.php?ac=poke&op=send">My Poke</a></li>
	</ul>
</div>

<div class="h_status">You can reply or ignore!<span class="pipe">|</span><a href="cp.php?ac=poke&op=ignore" id="a_poke" onclick="ajaxmenu(event, this.id, 0, 2000, 'mypoke_all')">Ignore All</a></div>

<!--{if $list}-->
<style>
.list_td td { border-bottom: 1px solid #EBE6C9; padding: 0.5em; }
.list_td img { vertical-align: middle; }
</style>
<div class="c_form" id="poke_ul">
	<table cellpadding="0" cellspacing="0" width="100%" class="list_td">
		<!--{loop $list $key $value}-->
		<tbody id="poke_$value[uid]">
		<tr>
			<td width="70">
				<div class="avatar48">
				<a href="space.php?uid=$value[uid]"><!--{avatar($value[uid],small)}--></a>
				</div>
			</td>
			<td>
				<p><a href="space.php?uid=$value[uid]">{$_SN[$value[uid]]}</a> <span class="gray"><!--{date('d-m H:i',$value[dateline],1)}--></span></p>
				
				<div style="padding:10px 0 10px 0;font-size:14px;">
				<!--{if $value[iconid]}-->{$icons[$value[iconid]]}<!--{else}-->Poke back<!--{/if}-->
				<!--{if $value[note]}-->£¬Msg: $value[note]<!--{/if}-->
				</div>
				<div style="padding:10px 0 10px 0;">
				<a href="cp.php?ac=poke&op=reply&uid=$value[uid]" id="a_p_r_$value[uid]" onclick="ajaxmenu(event, this.id, 1)" class="submit">Poke back</a> 
				<!--{if !$value['isfriend']}--><a href="cp.php?ac=friend&op=add&uid=$value[uid]" id="a_friend_$key" onclick="ajaxmenu(event, this.id, 1)" class="submit">Add as Friend</a> <!--{/if}-->
				</div>

			</td>
			<td align="right" width="80">
			<a href="cp.php?ac=poke&op=ignore&uid=$value[uid]" id="a_p_i_$value[uid]" onclick="ajaxmenu(event, this.id, 0, 2000, 'mypoke')" class="button">Ignore</a>
			</td>
		</tr>
		</tbody>
		<!--{/loop}-->
	</table>
	<div class="page">$multi</div>
</div>

<!--{else}-->
<div class="c_form">
	There is no Poke. List is empty!
</div>
<!--{/if}-->

<script>
	function mypoke(id) {
		var liid = id.substr(6);
		$('poke_'+liid).style.display = "none";
	}
	function mypoke_all(id) {
		$('poke_ul').innerHTML = "All pokes ignored";
	}
</script>

<!--{/if}-->

<!--{template footer}-->
Return current item: Uchome and Discuz