spacecp_pm.htm
2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!--{template common/header}-->
<!--{if $op != ''}-->
<div class="bm_c">{lang user_mobile_pm_error}</div>
<!--{else}-->
<form id="pmform_{$pmid}" name="pmform_{$pmid}" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=pm&op=send&touid=$touid&pmid=$pmid&mobile=2" >
<input type="hidden" name="referer" value="{echo dreferer();}" />
<input type="hidden" name="pmsubmit" value="true" />
<input type="hidden" name="formhash" value="{FORMHASH}" />
<!-- header start -->
<header class="header">
<div class="nav">
<span class="y"><button id="pmsubmit_btn" class="btn_pn btn_pn_grey" disable="true"><span>{lang sendpm}</span></button></span>
<input type="hidden" name="pmsubmit_btn" value="yes" />
<a href="home.php?mod=space&do=pm" class="z"><img src="{STATICURL}image/mobile/images/icon_back.png" /></a>
<span>{lang send_pm}</span>
</div>
</header>
<!-- header end -->
<!-- main post_msg_box start -->
<div class="wp">
<div class="post_msg_from">
<ul>
<!--{if !$touid}-->
<li class="bl_line"><input type="text" value="" tabindex="1" class="px" size="30" autocomplete="off" id="username" name="username" placeholder="{lang addressee}"></li>
<!--{/if}-->
<li class="bl_none area">
<textarea class="pt" tabindex="2" autocomplete="off" value="" id="sendmessage" name="message" cols="80" rows="7" placeholder="{lang thread_content}"></textarea>
</li>
</ul>
</div>
</div>
<!-- main postbox start -->
</form>
<script type="text/javascript">
(function() {
$('#sendmessage').on('keyup input', function() {
var obj = $(this);
if(obj.val()) {
$('.btn_pn').removeClass('btn_pn_grey').addClass('btn_pn_blue');
$('.btn_pn').attr('disable', 'false');
} else {
$('.btn_pn').removeClass('btn_pn_blue').addClass('btn_pn_grey');
$('.btn_pn').attr('disable', 'true');
}
});
var form = $('#pmform_{$pmid}');
$('#pmsubmit_btn').on('click', function() {
var obj = $(this);
if(obj.attr('disable') == 'true') {
return false;
}
$.ajax({
type:'POST',
url:form.attr('action') + '&handlekey='+form.attr('id')+'&inajax=1',
data:form.serialize(),
dataType:'xml'
})
.success(function(s) {
popup.open(s.lastChild.firstChild.nodeValue);
})
.error(function() {
popup.open('{lang networkerror}', 'alert');
});
return false;
});
})();
</script>
<!--{/if}-->
<!--{eval $nofooter = true;}-->
<!--{template common/footer}-->