You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
198 lines
8.0 KiB
198 lines
8.0 KiB
{template 'header', 'member'}
|
|
{if $action == 'guest'}
|
|
<div style="padding:96px;text-align:center;font-size:16px;color:#666666;">
|
|
您还没有登录,请先 <a href="{$DT[file_login]}" class="b">登录</a> 或 <a href="{$DT[file_register]}" class="b">注册</a></div>
|
|
<script type="text/javascript">Dh('side');Dh('side_oh');</script>
|
|
{elseif $action == 'close'}
|
|
您所在的会员组无权限使用此功能,请先 <a href="account.php?action=group" class="b">升级</a></div>
|
|
<script type="text/javascript">s('message');m('{$menuid}');</script>
|
|
{else}
|
|
<div class="menu">
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td class="tab" id="add"><a href="?action=add"><span>发起交谈</span></a></td>
|
|
<td class="tab" id="s3"><a href="?action=index"><span>站内交谈</span></a></td>
|
|
{if $chat_group}<td class="tab" id="s2"><a href="?action=group"><span>我的群聊</span></a></td>{/if}
|
|
<td class="tab" id="s1"><a href="?action=friend"><span>我的好友</span></a></td>
|
|
{if $action == 'view'}<td class="tab" id="view"><a href="?action=view&chatid={$chatid}"><span>聊天记录</span></a></td>{/if}
|
|
<td class="tab" id="setting"><a href="?action=setting"><span>交谈设置</span></a></td>
|
|
</table>
|
|
</div>
|
|
{if $action == 'add'}
|
|
<form action="chat.php" onsubmit="return check();" target="_blank" id="dform">
|
|
<table cellpadding="10" cellspacing="1" class="tb">
|
|
<tr>
|
|
<td class="tr">
|
|
<span class="f_red">*</span> 会员名
|
|
<input type="text" size="20" name="touser" id="touser"/>
|
|
<input type="submit" value="交谈" class="btn_g"/>
|
|
<input type="button" value="好友" class="btn" onclick="Go('friend.php');"/>
|
|
<span id="dtouser" class="f_red"></span></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<script type="text/javascript">
|
|
function check() {
|
|
if(Dd('touser').value.length < 2) {
|
|
Dmsg('请输入会员名', 'touser');
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
</script>
|
|
<script type="text/javascript">s('im');m('add');</script>
|
|
{elseif $action == 'setting'}
|
|
<form method="post" action="?">
|
|
<input type="hidden" name="action" value="{$action}"/>
|
|
<table cellpadding="10" cellspacing="1" class="tb">
|
|
<tr>
|
|
<td class="tl">黑名单</td>
|
|
<td class="tr f_gray"><textarea name="black" id="black" style="width:90%;height:60px;overflow:visible;">{$user[black]}</textarea><br/>直接输入会员名即可将会员列入黑名单,多个会员名请用空格键隔开</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">自动回复</td>
|
|
<td class="tr f_gray"><textarea name="reply" id="reply" style="width:90%;height:60px;overflow:visible;">{$user[reply]}</textarea><br/>会员首次发起交谈或超过一周没有交谈时,自动回复内容</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl"> </td>
|
|
<td height="50" class="tr"><input type="submit" name="submit" value="更 新" class="btn_g"/></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<script type="text/javascript">s('im');m('setting');</script>
|
|
{elseif $action == 'view'}
|
|
<form action="?">
|
|
<input type="hidden" name="action" value="{$action}"/>
|
|
<input type="hidden" name="chatid" value="{$chatid}"/>
|
|
<div class="tt">
|
|
<input type="text" size="50" name="kw" value="{$kw}" placeholder="关键词"/>
|
|
{dcalendar('fromdate', $fromdate)} 至 {dcalendar('todate', $todate)}
|
|
<input type="submit" value=" 搜 索 " class="btn"/>
|
|
<input type="button" value=" 重 搜 " class="btn" onclick="Go('?action={$action}&chatid={$chatid}');"/>
|
|
</div>
|
|
</form>
|
|
<div class="ls">
|
|
<table cellspacing="0" cellpadding="10" class="tb">
|
|
<tr>
|
|
<th width="60">头像</th>
|
|
<th width="160">会员</th>
|
|
<th width="160">时间</th>
|
|
<th>内容</th>
|
|
{if $admin}
|
|
<th width="40">禁言</th>
|
|
<th width="40">删除</th>
|
|
{/if}
|
|
</tr>
|
|
{loop $lists $k $v}
|
|
<tr align="center">
|
|
<td><img src="{useravatar($v[username])}" style="padding:5px;" width="48" height="48"/></td>
|
|
<td>{if $v[nickname]}{$v[nickname]}@{/if}{$v[username]}</td>
|
|
<td>{$v[date]}</td>
|
|
<td align="left">{$v[word]}</td>
|
|
{if $admin}
|
|
<td><a href="?action=view&mid={$mid}&gid={$gid}&job=ban&itemid={$v[itemid]}" class="t" onclick="if(!confirm('确定要禁言 {$v[username]} 吗?')) return false;">禁言</a></td>
|
|
<td><a href="?action=view&mid={$mid}&gid={$gid}&job=del&itemid={$v[itemid]}" class="t" onclick="if(!confirm('确定要删除聊天记录吗?此操作将不可撤销')) return false;">删除</a></td>
|
|
{/if}
|
|
</tr>
|
|
{/loop}
|
|
</table>
|
|
</div>
|
|
<div class="pages">{$pages}</div>
|
|
<script type="text/javascript">s('im');m('view');</script>
|
|
{elseif $action == 'group'}
|
|
<style type="text/css">
|
|
.chat_list {width:200px;}
|
|
.chat_list table {width:100%;margin:0 0 10px 6px;}
|
|
.chat_list li {height:20px;line-height:20px;overflow:hidden;color:#999999;padding:0 6px 0 0;}
|
|
.chat_list span {color:#999999;}
|
|
.chat_list img {width:48px;height:48px;border-radius:50%;}
|
|
.chat_list p {padding:64px;line-height:48px;font-size:14px;text-align:center;color:#666666;}
|
|
</style>
|
|
<div class="chat_list">
|
|
{if $lists}
|
|
{loop $lists $k $v}
|
|
<table cellpadding="0" cellspacing="0" class="bd-b">
|
|
<tr>
|
|
<td width="60"><a href="{$v[linkurl]}" target="chat_{$v[mid]}_{$v[gid]}"><img src="{$v[thumb]}"/></a></td>
|
|
<td><ul><li><a href="{$v[linkurl]}" target="chat_{$v[mid]}_{$v[gid]}">{$v[title]}</a> <span>({$v[fans]}人)</span></li><li>最后发言:{$v[last]}</li></ul></td>
|
|
</tr>
|
|
</table>
|
|
{/loop}
|
|
{else}
|
|
<p>暂未加入群聊<br/><a href="{$MODULE[$chat_group][linkurl]}" target="_blank" class="b">查找群</a></p>
|
|
{/if}
|
|
</div>
|
|
<script type="text/javascript">s('im');m('s2');</script>
|
|
{elseif $action == 'friend'}
|
|
<style type="text/css">
|
|
.chat_list {width:400px;}
|
|
.chat_list table {margin:0 0 10px 6px;}
|
|
.chat_list li {height:20px;line-height:20px;overflow:hidden;color:#999999;padding:0 6px 0 0;}
|
|
.chat_list span {color:#666666;}
|
|
.chat_list img {width:48px;height:48px;border-radius:50%;}
|
|
.chat_list h2 {padding:10px;margin:0;cursor:pointer;font-size:12px;font-weight:normal;}
|
|
.chat_list p {padding:64px;line-height:48px;font-size:14px;text-align:center;color:#666666;}
|
|
</style>
|
|
<form action="?">
|
|
<div>
|
|
<input type="hidden" name="action" value="{$action}"/>
|
|
<input type="text" size="20" name="kw" value="{$kw}" placeholder="会员名/姓名/公司"/>
|
|
<input type="submit" value="搜索" class="btn_g"/>
|
|
<input type="button" value="重置" class="btn" onclick="Go('?action={$action}');"/>
|
|
<span id="dtouser" class="f_red"></span>
|
|
</div>
|
|
</form>
|
|
<div class="chat_list">
|
|
{if $lists}
|
|
{loop $TYPE $i $t}
|
|
<h2 onclick="$('#f-{$i}').toggle(100);"><b>{$t[typename]}</b> <span>({$t[num]})</span></h2>
|
|
<div id="f-{$i}">
|
|
{loop $lists[$i] $k $v}
|
|
<table cellpadding="0" cellspacing="0" class="bd-b">
|
|
<tr>
|
|
<td width="60"><a href="{$v[linkurl]}" target="chat_{$v[username]}"><img src="{useravatar($v[username])}"/></a></td>
|
|
<td><ul><li><a href="{$v[linkurl]}" target="chat_{$v[username]}">{$v[truename]}</a></li><li>{$v[company]}</li></ul></td>
|
|
</tr>
|
|
</table>
|
|
{/loop}
|
|
</div>
|
|
{/loop}
|
|
{else}
|
|
<p>暂无好友<br/><a href="friend.php?action=add" class="b">添加好友</a></p>
|
|
{/if}
|
|
</div>
|
|
<script type="text/javascript">s('im');m('s1');</script>
|
|
{else}
|
|
<style type="text/css">
|
|
.chat_list {width:280px;}
|
|
.chat_list table {width:100%;margin:0 0 10px 6px;}
|
|
.chat_list li {height:20px;line-height:20px;overflow:hidden;color:#999999;padding:0 6px 0 0;}
|
|
.chat_list span {float:right;color:#999999;}
|
|
.chat_list em {float:right;color:#FFFFFF;font-style:normal;background:#FF6600;border-radius:50%;color:#FFFFFF;font-size:10px;display:block;_display:inline-block;height:15px;line-height:15px;padding:0 3px;}
|
|
.chat_on {background:#FAFAFA;}
|
|
.chat_onl {width:48px;height:48px;border-radius:50%;}
|
|
.chat_off {width:48px;height:48px;border-radius:50%;opacity:0.3;filter:Alpha(Opacity=30);}
|
|
</style>
|
|
<div class="chat_list" id="chat-list"></div>
|
|
<script type="text/javascript">
|
|
function Lchat() {
|
|
$('#chat-list').load('?action=list&reload={$DT_TIME}', function() {
|
|
$('#chat-list table').bind('mouseover', function(event) {
|
|
$(this).css('background-color', '#FAFAFA');
|
|
});
|
|
$('#chat-list table').bind('mouseout', function(event) {
|
|
$(this).css('background-color', '');
|
|
});
|
|
});
|
|
}
|
|
$(function(){
|
|
Lchat();
|
|
setInterval(function() {
|
|
Lchat();
|
|
}, 10000);
|
|
});
|
|
</script>
|
|
<script type="text/javascript">s('im');m('s3');</script>
|
|
{/if}
|
|
{/if}
|
|
{template 'footer', 'member'}
|