Файл: default88825/smailes.php
Строк: 66
<script language="JavaScript" type="text/javascript">
function tag(text1, text2) {
if ((document.selection)) {
document.message.msg.focus();
document.message.document.selection.createRange().text = text1+document.message.document.selection.createRange().text+text2;
} else if(document.forms['message'].elements['msg'].selectionStart!=undefined) {
var element = document.forms['message'].elements['msg'];
var str = element.value;
var start = element.selectionStart;
var length = element.selectionEnd - element.selectionStart;
element.value = str.substr(0, start) + text1 + str.substr(start, length) + text2 + str.substr(start + length);
document.forms['message'].elements['msg'].focus();
} else document.message.msg.value += text1+text2;
document.forms['message'].elements['msg'].focus();}</script>
<?
echo "<table width='100%'>n";
echo "<tr>n";
if (!isset($msg2))$msg2=NULL;
echo "<div id='comments' class='tpanel'><div class='tmenu'><a href='/plugins/smiles'>Смайлы</a></div><div class='tmenu'><a href='/plugins/rules/bb-code.php'>Теги</a></div></div>";
?>
<div style="margin:4px;">
<div class='link_s'>
<a href="javascript:tag(':г', 'г')"><img src="/style/smiles/1323.gif" alt="*" title="*"/></a>
<a href="javascript:tag(':D', '')"><img src="/style/smiles/1250.gif" alt="*" title="*"/></a>
<a href="javascript:tag(':ло', 'л')"><img src="/style/smiles/1251.gif" alt="*" title="*"/></a>
<a href="javascript:tag(';)', '')"><img src="/style/smiles/1252.gif" alt="*" title="*"/></a>
<a href="javascript:tag(':плак', 'са')"><img src="/style/smiles/1259.gif" alt="*" title="*" /></a>
<a href="javascript:tag(':рж', 'у')"><img src="/style/smiles/1286.gif" alt="*" title="*"/></a>
<a href="javascript:tag(':незна', 'ет')"><img src="/style/smiles/1493.gif" alt="*" title="*"/></a>
<a href="javascript:tag(':p', '')"><img src="/style/smiles/1255.gif" alt="*" title="*"/></a>
<a href="javascript:tag(':злод', 'ей')"><img src="/style/smiles/1272.gif" alt="*" title="*"/></a>
</div>
<?
echo "<table width='97'> n";
echo "<tr>n";
echo "<td width='97%'>n";
echo '<textarea name="msg" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">'.$otvet.''.$msg2.'</textarea><br />';
?> <script> $.fx.speeds._default = 1000; $( "#dialog" ).dialog({ autoOpen: false, show: "blind", hide: "explode" }); $( "#opener" ).click(function(){ $( "#dialog" ).dialog( "open" ); showContent2('/ajax/php/smiles.php'); return false; }); </script>