Файл: 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> ';
}
function quicksmiles()
{
echo '<a href="#form" onclick="javascript:tag(' :D ', '');"><img src="smiles/588.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :crazy ', '');"><img src="smiles/589.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :fu ', '');"><img src="smiles/590.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :klass ', '');"><img src="smiles/598.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :hm ', '');"><img src="smiles/591.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :o ', '');"><img src="smiles/592.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :-p ', '');"><img src="smiles/593.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :poh ', '');"><img src="smiles/594.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :smile ', '');"><img src="smiles/595.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :wink ', '');"><img src="smiles/596.gif" alt="image" /></a> ';
echo '<a href="#form" onclick="javascript:tag(' :zloj ', '');"><img src="smiles/597.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()
{
if($u['bb_code'] == 0) {
echo '' . quickpaste('message');
echo ''.quickbb('message'). '';
}
}
?>