<?

/*
// +--------------------------------------------------------------------------+
// | Project:    NVTracker - NetVision BitTorrent Tracker                     |
// +--------------------------------------------------------------------------+
// | This file is part of NVTracker. NVTracker is based on BTSource,          |
// | originally by RedBeard of TorrentBits, extensively modified by           |
// | Gartenzwerg.                                                             |
// |                                                                          |
// | NVTracker is free software; you can redistribute it and/or modify        |
// | it under the terms of the GNU General Public License as published by     |
// | the Free Software Foundation; either version 2 of the License, or        |
// | (at your option) any later version.                                      |
// |                                                                          |
// | NVTracker is distributed in the hope that it will be useful,             |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of           |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            |
// | GNU General Public License for more details.                             |
// |                                                                          |
// | You should have received a copy of the GNU General Public License        |
// | along with NVTracker; if not, write to the Free Software Foundation,     |
// | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA            |
// +--------------------------------------------------------------------------+
// | Obige Zeilen dürfen nicht entfernt werden!    Do not remove above lines! |
// +--------------------------------------------------------------------------+
 */

require "include/bittorrent.php";
dbconn();
stdhead();
begin_frame("Online TV power by <blink>djbrocken</blink>");
begin_table(TRUE);
?>


<script type="text/javascript">
<!--
function bbshout(repdeb, repfin) {
  var input = document.forms['shbox'].elements['shbox_text'];
  input.focus();

  if(typeof document.selection != 'undefined') {

    var range = document.selection.createRange();
    var insText = range.text;
    range.text = repdeb + insText + repfin;

    range = document.selection.createRange();
    if (insText.length == 0) {
      range.move('character', -repfin.length);
    } else {
      range.moveStart('character', repdeb.length + insText.length + repfin.length);
    }
    range.select();
  }

  else if(typeof input.selectionStart != 'undefined')
  {

    var start = input.selectionStart;
    var end = input.selectionEnd;
    var insText = input.value.substring(start, end);
    input.value = input.value.substr(0, start) + repdeb + insText + repfin + input.value.substr(end);

    var pos;
    if (insText.length == 0) {
      pos = start + repdeb.length;
    } else {
      pos = start + repdeb.length + insText.length + repfin.length;
    }
    input.selectionStart = pos;
    input.selectionEnd = pos;
  }

  else
  {

    var pos;
    var re = new RegExp('^[0-9]{0,3}$');
    while(!re.test(pos)) {
      pos = prompt("Insertion à la position (0.." + input.value.length + "):", "0");
    }
    if(pos > input.value.length) {
      pos = input.value.length;
    }

    var insText = prompt("Veuillez entrer le texte à formater:");
    input.value = input.value.substr(0, pos) + repdeb + insText + repfin + input.value.substr(pos);
  }
}

function bbcolor() {
   var colorvalue = document.forms['shbox'].elements['color'].value;
   bbshout("[color="+colorvalue+"]", "[/color]");
}

function bbfont() {
   var fontvalue = document.forms['shbox'].elements['font'].value;
   bbshout("[font="+fontvalue+"]", "[/font]");
}
function bbsize() {
    var sizevalue = document.forms['shbox'].elements['size'].value;
    bbshout("[size="+sizevalue+"]", "[/size]");
}
function bbimg() {
    var imgvalue = document.forms['shbox'].elements['img'].value;
    bbshout("[img="+sizevalue+"]", "[/img]");
}
//-->
</script>
<script language=javascript>
function SmileIT(smile,form,text){
   document.forms[form].elements[text].value = document.forms[form].elements[text].value+" "+smile+" ";
   document.forms[form].elements[text].focus();
}
</script>
<script LANGUAGE="JavaScript"><!--
function mySubmit() {
   setTimeout('document.shbox.reset()',100);
}
function winop1()
{
windop1 = window.open("smilies2.php?form=<?=$form?>&text=<?=$text?>","mywin","height=400,width=400,resizable=yes,scrollbars=yes");
}
//--></SCRIPT>
<?
function quickbbshout(){
echo "<center><table border=0 cellpadding=0 cellspacing=2><tr>";
echo "<tr>";
echo "<td width=22><a href=\"javascript:bbshout('[b]', '[/b]')\"><img src=./pic/bold.png border=0 alt='Bold'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[i]', '[/i]')\"><img src=./pic/italic.png border=0 alt='Italic'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[u]', '[/u]')\"><img src=./pic/underline.png border=0 alt='Underline'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[url]', '[/url]')\"><img src=./pic/url.png border=0 alt='Url'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[img]', '[/img]')\"><img src=./pic/image.png border=0 alt='Img'></a></td>";
echo "<td>
<select name='color' size='0.5' onChange=\"javascript:bbcolor()\">
<option selected='selected'>COLOR</option>
<option value=skyblue style=color:skyblue>sky blue</option>
<option value=royalblue style=color:royalblue>royal blue</option>
<option value=blue style=color:blue>blue</option>
<option value=darkblue style=color:darkblue>dark-blue</option>
<option value=orange style=color:orange>orange</option>
<option value=orangered style=color:orangered>orange-red</option>
<option value=crimson style=color:crimson>crimson</option>
<option value=red style=color:red>red</option>
<option value=firebrick style=color:firebrick>firebrick</option>
<option value=darkred style=color:darkred>dark red</option>
<option value=green style=color:green>green</option>
<option value=limegreen style=color:limegreen>limegreen</option>
<option value=seagreen style=color:seagreen>sea-green</option>
<option value=deeppink style=color:deeppink>deeppink</option>
<option value=tomato style=color:tomato>tomato</option>
<option value=coral style=color:coral>coral</option>
<option value=purple style=color:purple>purple</option>
<option value=indigo style=color:indigo>indigo</option>
<option value=burlywood style=color:burlywood>burlywood</option>
<option value=sandybrown style=color:sandybrown>sandy brown</option>
<option value=sienna style=color:sienna>sienna</option>
<option value=chocolate style=color:chocolate>chocolate</option>
<option value=teal style=color:teal>teal</option>
<option value=silver style=color:silver>silver</option>
</select></td>";
echo "<td>
<select name='font' size='0.5' onChange=\"javascript:bbfont()\">
<option selected='selected'>FONT</option>
<option value=arial>Arial</option>
<option value=comic sans ms>Comic</option>
<option value=courier new>Courier New</option>
<option value=tahoma>Tahoma</option>
<option value=times new roman>Times New Roman</option>
<option value=verdana>Verdana</option>
</select></td>";
echo "<td>
<select name='size' size='0.5' onChange=\"javascript:bbsize()\">
<option selected='selected'>Size</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<option value=7>7</option>
</select></td>";
echo "</tr></table></center>";
}
?>
<?begin_frame("Shoutbox",true,30);?>
<iframe src='./shoutbox.php' width='800%' height='300' align='center' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe><br><br>
<form action='./shoutbox.php' method='get' target='sbox' name='shbox' onSubmit="mySubmit()">
<p align="center">Message: <input type='text' name='shbox_text' size='110'> <input type='submit' class='btn' value=' Shout '>
<input type='hidden' name='sent' value='yes'><br>
<center><font size="1"><a href='./shoutbox.php' target='sbox'type="button" class='btn'>refresh</a><span class="smallfont">&nbsp;&nbsp;<a href='shoutbox2.php?history=1' target='_blank'type="button" class='btn'>History</a>&nbsp;&nbsp;<a href="javascript:winop1(); "type="button" class='btn' border: "1px solid gray" ><b>Mehr Smilies</b></a></center>
  <?
if (get_user_class() >= UC_ADMINISTRATOR)
print("<td colspan=10 width=100%><span class=normalfont><center><b> ..::Wemmser Box::.. <a href=delshout.php><b>[komplett leeren]</b></a></b></center></span></td>");
else
print("<td colspan=10 width=100%><span class=normalfont><center><b> ..::Wemmser Box::.. </b></center></span></td>");
?>


<?
quickbbshout();
?>
<br>
<center><a href="javascript: SmileIT(':kiss:','shbox','shbox_text')"><img src=pic/smilies/kiss.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':-(','shbox','post')"><img src=pic/smilies/sad.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':weep:','shbox','shbox_text')"><img src=pic/smilies/weep.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':-O','shbox','shbox_text')"><img src=pic/smilies/ohmy.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT('8-)','shbox','shbox_text')"><img src=pic/smilies/cool1.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':yawn:','shbox','shbox_text')"><img src=pic/smilies/yawn.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':sly:','shbox','shbox_text')"><img src=pic/smilies/sly.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':greedy:','shbox','shbox_text')"><img src=pic/smilies/greedy.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':weirdo:','shbox','shbox_text')"><img src=pic/smilies/weirdo.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':sneaky:','shbox','shbox_text')"><img src=pic/smilies/sneaky.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':geek:','shbox','shbox_text')"><img src=pic/smilies/geek.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':evil:','shbox','shbox_text')"><img src=pic/smilies/evil.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':yucky:','shbox','shbox_text')"><img src=pic/smilies/yucky.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':shit:','shbox','shbox_text')"><img src=pic/smilies/shit.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':?:','shbox','shbox_text')"><img src=pic/smilies/question.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':!:','shbox','shbox_text')"><img src=pic/smilies/idea.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':smile:','shbox','shbox_text')"><img border=0 src=pic/smilies/smile2.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':-D','shbox','shbox_text')"<img border=0 src=pic/smilies/grin.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':evo:','shbox','shbox_text')"><img src=pic/smilies/evo.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':-|','shbox','shbox_text')"><img border=0 src=pic/smilies/noexpression.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':-/','shbox','shbox_text')"><img border=0 src=pic/smilies/confused.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':-(','shbox','post')"><img border=0 src=pic/smilies/sad.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':nugget:','shbox','shbox_text')"><img border=0 src=pic/smilies/nugget.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':yucky:','shbox','shbox_text')"><img border=0 src=pic/smilies/yucky.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':smart:','shbox','shbox_text')"><img border=0 src=pic/smilies/smart.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':baby:','shbox','shbox_text')"><img src=pic/smilies/baby.gif width="28" height="28" border=0></a>
<a href="javascript: SmileIT(':snap:','shbox','shbox_text')"><img border=0 src=pic/smilies/snap.gif width="28" height="28" border=0></a><center>
<a href="javascript:winopen('smilies.php','1000', '1000')">Mehr Smilies</a>

</td></form>
<br>

<?end_frame();?>