<script>// For Send Post
function SendPostAjax(mode){
var sendload=document.getElementById('SendLoad'),
title=document.getElementById('SendTitle'),
descript=document.getElementById('SendDes'),
more=document.getElementById('SendMore'),
xhttp=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP'),
address='';
if(mode==true){
address='title='+encodeURIComponent(title.value)+'&'+
'post='+encodeURIComponent(descript.value)+'&'+
'morepost='+encodeURIComponent(more.value)+'&'+
'pimg&purl&ptags&newtag[post_tag]=none&postsubmit=ارسال';
}
sendload.innerHTML='<center style="color:red;">داره ارسال میشه..یکم وایسا...<\/center>';
xhttp.onreadystatechange=function(){
if(xhttp.readyState==4 && xhttp.status==200){
sendload.innerHTML='<center style="color:green;">کد شما با موفقیت ارسال شد...<\/center>';
}
};
xhttp.open('POST','/New_Post',false);
xhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
xhttp.send(address);
return false;
}
</script>
<!-- Start -->
<div id="SenBackSendBox" style="display: none;">
<div id="SenCodeSendBox">
<div class="closesendimg"></div>
<p>کاربر گرامی شما میتونید با استفاده از این فرم کدها و ابزارهای خود را برای ما بفرستید.</p>
<div style="text-align: justify;">
<form action="/new_post" onsubmit="return SendPostAjax(true);" method="post">
<p>نام کد یا ابزار شما : <input type="text" size="42" dir="rtl" placeholder="مثال : ابزار پخش موسیقی در انجمن" id="SendTitle"></p>
<hr class="hrbg">
<table>
<tbody>
<tr>
<td>توضیحات کد :</td>
<td><textarea dir="rtl" id="SendDes"></textarea></td>
</tr>
<tr>
<td>کد ارسالی شما :</td>
<td><textarea dir="ltr" id="SendMore"></textarea></td>
</tr>
</tbody>
</table>
<hr class="hrbg">
<div style="text-align: left;">
<button type="submit">ارسال کد برای ما</button>
</div>
<div style="text-align: right;">
<div id="SendLoad"></div>
</div>
</form>
</div>
</div>
</div>
<!-- End -->