View file sad/system/panel.php

File size: 2.45Kb
<?php

function quicksmiles(){

echo '<a href="#form" onclick="javascript:tag(\' .1. \', \'\');"><img src="'.ROOT.'/img/smiles/1.gif" alt="image" /></a> ';

echo '<a href="#form" onclick="javascript:tag(\' .2. \', \'\');"><img src="'.ROOT.'/img/smiles/2.gif" alt="image" /></a> ';

echo '<a href="#form" onclick="javascript:tag(\' .3. \', \'\');"><img src="'.ROOT.'/img/smiles/3.gif" alt="image" /></a> ';

echo '<a href="#form" onclick="javascript:tag(\' .4. \', \'\');"><img src="'.ROOT.'/img/smiles/4.gif" alt="image" /></a> ';

echo '<a href="#form" onclick="javascript:tag(\' .5. \', \'\');"><img src="'.ROOT.'/img/smiles/5.gif" alt="image" /></a> ';

echo '<a href="#form" onclick="javascript:tag(\' .6. \', \'\');"><img src="'.ROOT.'/img/smiles/6.gif" alt="image" /></a> ';

echo '<a href="#form" onclick="javascript:tag(\' .12. \', \'\');"><img src="'.ROOT.'/img/smiles/12.gif" alt="image" /></a> ';

//echo '<a href="#form" onclick="javascript:tag(\' .12. \', \'\');"><img src="'.ROOT.'/img/smiles/12.gif" alt="image" /></a> ';

//echo '<a href="#form" onclick="javascript:tag(\' .18. \', \'\');"><img src="'.ROOT.'/img/smiles/18.gif" alt="image" /></a> ';

//echo '<a href="#form" onclick="javascript:tag(\' .20. \', \'\');"><img src="'.ROOT.'/img/smiles/20.gif" alt="image" /></a> ';

//echo '<a href="#form" onclick="javascript:tag(\' .21. \', \'\');"><img src="'.ROOT.'/img/smiles/21.gif" alt="image" /></a> ';

//echo '<a href="#form" onclick="javascript:tag(\' .26. \', \'\');"><img src="'.ROOT.'/img/smiles/26.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 '<div class="menu">' . quickpaste('text');

echo ''.quicksmiles('text'). '</div>';

}

?>