Файл: core/panel.php
Строк: 61
<?php
function quickbb()
{
echo '<a href="#form" onclick="javascript:tag(' [b] [/b] ', '');"><img src="ico/bcode.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' [i] [/i] ', '');"><img src="ico/icode.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' [u] [/u] ', '');"><img src="ico/ucode.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' [url] [/url] ', '');"><img src="ico/url.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' [red] [/red] ', '');"><img src="/style/bb/re.png" alt="image" /></a> '; echo '<a href="#form" onclick="javascript:tag(' [green] [/green] ', '');"><img src="/style/bb/gr.png" alt="image" /></a> ';echo '<a href="#form" onclick="javascript:tag(' [blue] [/blue] ', '');"><img src="/style/bb/bl.png" alt="image" /></a> ';
}
function quicksmiles()
{
echo '<a href="#form" onclick="javascript:tag(' :дружба ', '');"><img src="smiles/95.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :-D ', '');"><img src="smiles/23.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :P ', '');"><img src="smiles/30.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :* ', '');"><img src="smiles/47.gif" alt="image" /></a> ';
}
function quickpaste($form) {
echo '<script language="JavaScript" type="text/javascript">
function tag(text1, text2) {
if ((document.selection)) {
document.form.' . $form . '.focus();
document.form.document.selection.createRange().text = text1+document.form.document.selection.createRange().text+text2;
} else if(document.forms['form'].elements['' . $form . ''].selectionStart!=undefined) {
var element = document.forms['form'].elements['' . $form . ''];
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);
} else document.form.' . $form . '.value += text1+text2;
}
</script>';
}
function panel()
{
echo '' . quickpaste('message');
echo ''.quickbb('message'). '';
echo ''.quicksmiles('message'). '';
}
?>