Файл: javascript/icon.php
Строк: 52
<?php
echo "
<script language="javascript" type="text/javascript">
function icon(text1, text2, text3) {
if ((document.selection)) {
document.form.msg.focus();
document.form.document.selection.createRange().text = text3+text1+document.form.document.selection.createRange().text+text2+text3;
} else if(document.forms['post'].elements['".$inputName."'].selectionStart!=undefined) {
var element = document.forms['post'].elements['".$inputName."'];
var str = element.value;
var start = element.selectionStart;
var length = element.selectionEnd - element.selectionStart;
element.value = str.substr(0, start) + text3 + text1 + str.substr(start, length) + text2 + text3 + str.substr(start + length);
} else document.form.msg.value += text3+text1+text2+text3;}
</script>
n";
$dir = opendir('../images/ico');
while ($icon = readdir($dir))
{
if (!is_dir('../images/ico/'.$icon) AND $icon != '.htaccess' AND $icon != 'index.php' AND $icon != '..' AND $icon != '.')
{
echo " <a href="javascript:icon('".$icon."','','')"><img src="/images/ico/".$icon.""></a>n";
}
}
?>