Post by Luke on May 24, 2011 1:16:14 GMT -8
Global Footers.
<table width="100%" align="center" cellspacing="1" cellpadding="4" class="bordercolor" id="pmTemplate" style="display: none;">
<tr>
<td class="titlebg" colspan="2">Send Personal Message</td>
</tr>
<tr>
<td class="windowbg2" width="20%">Subject:</td>
<td class="windowbg" width="80%"><input type="text" id="pmSubjectness" value="" /></td>
</tr>
<tr>
<td class="windowbg2" width="20%">To:</td>
<td class="windowbg" width="80%"><input type="text" id="pmTowhom" value="" /></td>
</tr>
<tr>
<td class="windowbg2" width="20%">Warning %:</td>
<td class="windowbg" width="80%"><input type="text" id="pmWarning" value="" /></td>
</tr>
<tr>
<td class="windowbg2" width="20%">Reason for warning?:</td>
<td class="windowbg" width="80%"><input type="text" id="reason" value="" /></td>
</tr>
<tr>
<td class="windowbg2" colspan="2"><input type="button" id="pmSubmit" value="Send Message" onclick="submitTemplate()" /></td>
</tr>
</table>
<script type="text/javascript">
<!--
/* PM Warning Template - Luke Mansell
Thanks for the guidance Jordan
[url]codercommunity.proboards.com[/url]
*/
if(pb_username == 'admin'){
if(pb_action == "pmsend") {
function showw(){
document.postForm.style.display = "none";
document.postForm.parentNode.insertBefore(
document.getElementById("pmTemplate"),
document.postForm.nextSibling );
document.getElementById("pmTemplate").style.display = "";
}
function submitTemplate() {
var warning = "Hello, today we have given you a warning, this is because you have either broken the rules or other things.
Your warning level is:";
var warning2 = " The admin has given a reason why you have got your warning: ";
var warning3 = "Thank you, please try to follow the rules.";
document.postForm.subject.value = document.getElementById("pmSubjectness").value;
document.postForm.to.value = document.getElementById("pmTowhom").value;
document.postForm.message.value += warning;
document.postForm.message.value += document.getElementById("pmWarning").value;
document.postForm.message.value += warning2;
document.postForm.message.value += document.getElementById("reason").value;
document.postForm.message.value += warning3;
document.postForm.submit();
}
var button = '<center><a onclick="showw()" href="javascript: void(0)">Show Warning Template</a></center>';
document.write(button);
}
}
//-->
</script>