<!DOCTYPE html>
<html lang="de">

<head>

<!--

ET-Chat Copyright by SEDesign | ET-Chat v3.x.x Lizenz: CCPL | Autor: Evgeni Tcherkasski (info@s-e-d.de)

ET-Chat_T-FISH-MOD Weiterentwicklung des ET-Chats durch Tommy (Thomas Kuhn) und Harlekin (Bernd Witte)

Die Weiterentwicklungen, Optimierungen und Ergänzungen am Code sind das geistige Eigentum von Tommy (Thomas Kuhn) und Harlekin (Bernd Witte).

-->

<?php
$iconPath = 'img/favicon.ico';
$iconExists = file_exists($iconPath);
if ($iconExists) {
echo '<link rel="icon" href="' . $iconPath . '" type="image/x-icon"/>';
echo '<link rel="shortcut icon" href="' . $iconPath . '" type="image/x-icon?v=2"/>';
} else {
echo '<link rel="icon" type="image/png" href="img/favicon.png"/>';
}
?>

<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>

<title><?php echo $_SESSION['etchat_'.$this->_prefix.'radio_name']; ?></title>

<link href="styles/<?php echo $_SESSION['etchat_'.$this->_prefix.'style']; ?>/style.css" rel="stylesheet" type="text/css"/>
<link href="styles/<?php echo $_SESSION['etchat_'.$this->_prefix.'style']; ?>/style-mobil.css" rel="stylesheet" type="text/css"/>
<link href="styles/default_2create_win.css" rel="stylesheet" type="text/css"/>

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="keywords" content="ET-Chat_T-FISH-MOD, ET-Chat, T-FISH-MOD, T-FISH, MOD, ET-Chat Erweiterung, ET-Chat PHP8">
<meta name="description" content="ET-Chat_T-FISH-MOD ET-Chat Erweiterung Webradio-Style">
<meta name="robots" content="index,follow"/>

<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js" type="text/javascript"></script>
<script src="js/chat.js" type="text/javascript"></script>
<script src="./?MessagesForJs" type="text/javascript"></script>
<script type="text/javascript" src="js/window.js"></script>


<script type="text/javascript">
window.onload = function() {
var chatObj = new ET_Chat();
	chatObj.messages_im_chat=<?php echo $_SESSION['etchat_'.$this->_prefix.'anz_messages_im_chat']; ?>;
	chatObj.u_bild=<?php echo $_SESSION['etchat_'.$this->_prefix.'av']; ?>;
	chatObj.radio_wb=<?php echo $_SESSION['etchat_'.$this->_prefix.'radio_wb']; ?>;
	chatObj.radio_wb_li='<?php echo $_SESSION['etchat_'.$this->_prefix.'radio_wb_li']; ?>';
	chatObj.reload_interval=<?php echo $_SESSION['etchat_'.$this->_prefix.'config_reloadsequenz']; ?>;
	chatObj.co_admin='<?php echo $_SESSION['etchat_'.$this->_prefix.'admin_color']; ?>';
	chatObj.co_mod='<?php echo $_SESSION['etchat_'.$this->_prefix.'mod_color']; ?>';
	chatObj.co_user='<?php echo $_SESSION['etchat_'.$this->_prefix.'user_color']; ?>';
	chatObj.co_gast='<?php echo $_SESSION['etchat_'.$this->_prefix.'gast_color']; ?>';
	chatObj.username='<?php echo $_SESSION['etchat_'.$this->_prefix.'username']; ?>';
	chatObj.user_id='<?php echo $_SESSION['etchat_'.$this->_prefix.'user_id']; ?>';
	chatObj.userPrivilegienGlobal='<?php echo $_SESSION['etchat_'.$this->_prefix.'user_priv']; ?>';
	chatObj.win_style='<?php echo $_SESSION['etchat_'.$this->_prefix.'style']; ?>';
	chatObj.anbindung_an_userverwaltung=<?php echo (!empty($_SESSION['etchat_'.$this->_prefix.'logout_url'])) ? "true" : "false"; ?>;
	chatObj.show_history_all_user=<?php echo ($this->_show_history_all_user) ? "true" : "false"; ?>;
	chatObj.allowed_privates_in_chat_win=<?php echo ($this->_allowed_privates_in_chat_win) ? "true" : "false"; ?>;
	chatObj.allowed_privates_in_separate_win=<?php echo ($this->_allowed_privates_in_separate_win) ? "true" : "false"; ?>;
	chatObj.interval_for_inactivity=<?php echo $this->_interval_for_inactivity; ?>;
	chatObj.set_dynamic_height=true; // sonst hat das ganze Chat eine feste Hoehe
	chatObj.allow_nick_registration=<?php echo ($this->_allow_nick_registration) ? "true" : "false"; ?>;
	chatObj.textcolor='<?php echo $_SESSION['etchat_'.$this->_prefix.'textcolor']; ?>';
	chatObj.sound_status = '<?php echo $this->_messages_sound; ?>';
	chatObj.set_sys_messages = <?php echo ($_SESSION['etchat_'.$this->_prefix.'sys_messages']) ? "true" : "false"; ?>;
	chatObj.random_user_number = <?php echo $_SESSION['etchat_'.$this->_prefix.'random_user_number']; ?>;
	chatObj.set_an_time=<?php echo ($_SESSION['etchat_'.$this->_prefix.'an-time']) ? "true" : "false"; ?>;
	chatObj.set_ch_an_privi=<?php echo $_SESSION['etchat_'.$this->_prefix.'ch-an-privi']; ?>;
	chatObj.set_ch_an_gender=<?php echo $_SESSION['etchat_'.$this->_prefix.'ch-an-gender']; ?>;
	chatObj.set_ol_an_privi=<?php echo $_SESSION['etchat_'.$this->_prefix.'ol-an-privi']; ?>;
	chatObj.set_be_info_pic=<?php echo $_SESSION['etchat_'.$this->_prefix.'be_info_pic']; ?>;
	chatObj.set_chat_pic=<?php echo $_SESSION['etchat_'.$this->_prefix.'chat_pic']; ?>;
	chatObj.set_wuza=<?php echo $_SESSION['etchat_'.$this->_prefix.'wuza']; ?>;
	chatObj.set_wupau=<?php echo $_SESSION['etchat_'.$this->_prefix.'wupau']; ?>;
	chatObj.set_dj_box_li='<?php echo $_SESSION['etchat_'.$this->_prefix.'dj_box_li']; ?>';
	chatObj.set_dj_box=<?php echo $_SESSION['etchat_'.$this->_prefix.'dj_box']; ?>;
	chatObj.set_sendeplan_li='<?php echo $_SESSION['etchat_'.$this->_prefix.'sendeplan_li']; ?>';
	chatObj.set_sendeplan=<?php echo $_SESSION['etchat_'.$this->_prefix.'sendeplan']; ?>;
	chatObj.set_chatbot=<?php echo $_SESSION['etchat_'.$this->_prefix.'etchat_bot']; ?>;
	chatObj.TAB_AWAY_DELAY = <?php echo $_SESSION['etchat_'.$this->_prefix.'tab_away_delay']; ?>;
	chatObj.start();
	chatObj.userOnline();
}	
	setTimeout(function () {
    if (window.ET_Broadcast && typeof ET_Broadcast.start === 'function') {
        ET_Broadcast.start();
    }
	}, 2000);
	
	setTimeout(function () {
    if (window.ET_OnlinePing) {
        ET_OnlinePing.start();
    }
	}, 2000);
</script>

<script type="text/javascript">
window.BROADCAST_CONFIG = {
    user_id: <?php echo (int)$_SESSION['etchat_'.$this->_prefix.'user_id']; ?>,
    interval: <?php echo (int)$_SESSION['etchat_'.$this->_prefix.'config_reloadsequenz']; ?>
};
</script>

</head>

<body id="body" style="cursor: default;">


<div id="rahmen_um_alles">

<div id="kopf">

<table class="tab_kopf">
	<tr>
		<td>&nbsp;</td>
		<td><center><div id="kopf"><?php echo $this->lang->hallo_user[0]->tagData; ?> <b><?php echo $_SESSION['etchat_'.$this->_prefix.'username']; ?></b>!</div></center></td>
		<td>&nbsp;</td>
		<td>

	<?php
		if ($_SESSION['etchat_'.$this->_prefix.'radio_wb'] == '1') {
	?>

<a id="Wunschbox" class="img_wunschbox" style="color: rgba(0, 0, 0, 0);">
<img id="Wunschbox" class="img_button" src="img/Grussbox.png" width="40" height="40" frameborder="0" style="border:0px solid #333333" align="middle" alt="<?php echo $this->lang->wunschbox[0]->tagData; ?>" title="<?php echo $this->lang->wunschbox[0]->tagData; ?>" /></a>

	<?php
		}	else {echo'<img id="Wunschbox">';}
		if ($_SESSION['etchat_'.$this->_prefix.'online_li'] =='1'){
	?>

<a id="onlineuser" class="onlineuser" style="color: rgba(0, 0, 0, 0);">
<img class="img_button" src="img/Userliste.png" width="40" height="40" frameborder="0"
style="border:0px" align="middle" alt="Userliste An / Aus" title="Userliste An / Aus" /></a>

	<?php
		} else {echo '<a id="onlineuser">';}
	?>


		</td>
		<td>&nbsp;</td>
		<td>
<a id="open-modal" class="button_userliste" class="triger-modal" data-triger="modal-userliste" style="color: rgba(0, 0, 0, 0);">
<img class="img_button" src="img/Userliste.png" width="40" height="40" frameborder="0" style="border:0px solid #333333" align="middle" alt="<?php echo $this->lang->userlist[0]->tagData; ?>" title="<?php echo $this->lang->userlist[0]->tagData; ?>" /></a>
		</td>
		<td>&nbsp;</td>
		<td  rowspan="2"><center id="banner_chat">

	<?php
		include_once("class/Banner.class.php");
	?>

		</center></td>
		<td>&nbsp;</td>
		<td id="uhrzeit" rowspan="2">

	<?php
		include_once("zeit.php");
	?>

		</td>
		<td>&nbsp;</td>
	</tr>
		<tr>
		<td>&nbsp;</td>
		<td colspan="5"><?php echo $_SESSION['etchat_'.$this->_prefix.'radio_name']; ?></td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
</table></div>
	<?php include_once("cache/Ankuendigung.cache.php");	?>
<div class="modal-wrap" id="modal-userliste">
<div class="modal-container">
<div id="mobile" class="modal-header"><h2 class="modal-title">Userliste</h2><button class="close-modal">X</button></div>
<div class="modal-content">

<div id="onlinelist">

<?php
		if ($_SESSION['etchat_'.$this->_prefix.'radio_box'] == '1') {
?>
<div class="iframe-wrapper">
<iframe id='dj_online' src='<?php echo $_SESSION['etchat_'.$this->_prefix.'radio_box_li']; ?>' scrolling='no' frameborder='0'  marginheight='1' marginwidth='1' style='width:100%; height:<?php echo $_SESSION['etchat_'.$this->_prefix.'radio_box_hi']; ?>px;'></iframe>
</div>

<style>
/* Wrapper sorgt dafür, dass wir Höhe animieren können */
.iframe-wrapper {
  overflow: hidden;
  max-height: 400px;  /* normale Höhe */
  transition: max-height 0.5s ease-in-out;
}

.iframe-wrapper iframe {
  width: 100%;
  height: <?php echo $_SESSION['etchat_'.$this->_prefix.'radio_box_hi']; ?>px;
  border: none;
}

/* Wenn ausgeblendet, wird Höhe auf 0 animiert */
.iframe-wrapper.collapsed {
  max-height: 0;
}
.header-toggle-bar {
  cursor: pointer;
  font-weight: bold;
  padding: 5px;
  background: #4e4a4ab0;
  text-align: center;
  border-radius: 5px;
  user-select: none;
}

/*Icon Kurzbefehl */
.command-wrapper {
    position: relative;
    display: inline-block;
}

.command-button {
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.command-menu {
    display: none;
    position: absolute;
    bottom: 35px;     /* statt top */
    left: 0;
    background: #222;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #555;
    z-index: 9999;    /* wichtig falls etwas Überlappt */
}


.command-menu div {
    padding: 5px 10px;
    cursor: pointer;
    color: #f5e34a;
}

.command-menu div:hover {
    background: #444;
}

.command-wrapper:hover .command-menu {
    display: block;
}


</style>

<div class="header-toggle-bar">&uArr; Player ausblenden &uArr;</div>


<?php
	}
?>

<div id="onlineausgabe"><center><img src="img/ajax-loader.gif" alt="" /></center></div></div></div></div></div>

<div id="splitpane"></div>

<div id="chatinhalt"></div>

<div id="form">

<form id="message_form" style="display:inline;" action="">

<div id="form_left">

<div id="privat_anzeige"><?php echo $this->lang->privat_anzeige[0]->tagData; ?></div>

<input type="hidden" name="room" id="room" value="1" />
<input type="hidden" name="privat" id="privat" value="" />
<input type="hidden" name="bold" id="bold" value="normal" />
<input type="hidden" name="italic" id="italic" value="normal" />
<input type="hidden" name="color" id="color" value="#<?php echo $_SESSION['etchat_'.$this->_prefix.'textcolor']; ?>" />

	<?php
		if ($_SESSION['etchat_'.$this->_prefix.'scroll'] == '1') {
	?>

<input type="hidden" id="scroll_toggle" value="1">
<a href="#" id="scroll_toggle_btn" onclick="toggleScroll(); return false;" style="position: relative; top: -6px;">Scroll aus</a>

	<?php
		}	else {echo'&nbsp;<input name="message" id="message" type="text" class="input" placeholder="" autocomplete="off"  style="position: relative; height: 11px;" >';}
		if ($_SESSION['etchat_'.$this->_prefix.'scroll'] == '1') {
	?>

<input name="message" id="message" type="text" class="input" placeholder="" autocomplete="off"  style="position: relative; top: -2px; height: 11px;" />

	<?php
		}
	?>
</div>

<div id="form_right">
<img id="link_sagen" class="img_button" src="img/Checked.png" width="40" height="40" border="0" alt="<?php echo $this->lang->sagen[0]->tagData; ?>" title="<?php echo $this->lang->sagen[0]->tagData; ?>" />&nbsp;
<img id="link_smileys" class="img_button" src="img/Smiley_Cool.png" width="40" height="40" border="0" alt="<?php echo $this->lang->smileys[0]->tagData; ?>" title="<?php echo $this->lang->smileys[0]->tagData; ?>" />

<?php
		if ($_SESSION['etchat_'.$this->_prefix.'bi'] == '1') {
?>
<img id="link_picture" class="img_button" src="img/picture.png" width="40" height="40" border="0" alt="<?=$this->lang->picture[0]->tagData; ?>" title="<?php echo $this->lang->picture[0]->tagData; ?>" /><span id="link_picture2"></span>
<?php
	}	else {echo'<img id="link_picture">';}

		if ($_SESSION['etchat_'.$this->_prefix.'yo'] == '1') {
?>
	<img id="link_video" class="img_button" src="img/video.png" width="40" height="40" border="0" alt="<?=$this->lang->video[0]->tagData; ?>" title="<?php echo $this->lang->video[0]->tagData; ?>" /><span id="link_video2"></span>
<?php
	}	else {echo'<img id="link_video">';}
?>
	<img id="link_color" class="img_button" src="img/Colors.png" width="40" height="40" border="0" alt="<?php echo $this->lang->color[0]->tagData; ?>" title="<?php echo $this->lang->color[0]->tagData; ?>" />
	<img id="link_prop" class="img_button" src="img/Display.png" width="40" height="40" border="0" alt="<?php echo $this->lang->prop[0]->tagData; ?>" title="<?php echo $this->lang->prop[0]->tagData; ?>" />
<?php
		if ($_SESSION['etchat_'.$this->_prefix.'wu'] == '1') {
?>
	<img id="wuerfel" class="img_button" src="img/wuerfel.gif" width="40" height="40" border="0"  alt="<?php echo $this->lang->wuerfel[0]->tagData; ?>" title="<?php echo $this->lang->wuerfel[0]->tagData; ?>">
<?php
	}	else {echo'<img id="wuerfel">';}

	if ($_SESSION['etchat_'.$this->_prefix.'vollbild'] == '1') {
?>
	<a onclick="toggleFullScreen(document.body)" class="img_fullscreen"><img class="img_button" src="img/Vollbild.png" width="40" height="40" border="0" alt="<?php echo $this->lang->vollbi[0]->tagData; ?>" title="<?php echo $this->lang->vollbi[0]->tagData; ?>" /></a><span id="img_fullscreen2"></span>
<?php
	}
		if (($_SESSION['etchat_'.$this->_prefix.'biup'] == '1') && ($_SESSION['etchat_'.$this->_prefix.'user_priv'] != 'gast')){
?>

<div class="filesend-menu">
<img id="filesend-menu" class="img_button" src="img/Bild.png" width="40" height="40" border="0">
<div class="filesend-menu-content">
<a class="img_filesend" style="color: rgba(0, 0, 0, 0);">
<img id="link_gallery" class="img_button" src="img/Gallery.png" width="40" height="40" border="0"
alt="Gallery öffnen" title="Gallery öffnen"></a>
<a class="img_filesend" style="color: rgba(0, 0, 0, 0);">
<img id="link_filesend" class="img_button" src="img/Bild.png" width="40" height="40" border="0"
alt="Bild in den Chat hochladen" title="Bild in den Chat hochladen" /></a>
</div></div>

<?php
	}	else {echo'<img id="link_filesend"><img id="link_gallery">';}


?>

<div id="befehle" class="command-wrapper">
    <img src="img/gear.png" class="img_button"  width="40" height="40" border="0" alt="Befehle" title="Befehle">

    <div class="command-menu">
        <div onclick="sendCommand('.hallo')">.hallo</div>
        <div onclick="sendCommand('.bye')">.bye</div>
		
<?php
$allowedRoles = ['admin', 'co_admin', 'chatwache', 'mod', 'grafik'];

if (in_array($_SESSION['etchat_'.$this->_prefix.'user_priv'], $allowedRoles)) {
?>
		<div onclick="sendCommand('.time')">.time</div>
		<div onclick="sendCommand('.version')">.version</div>
		<div onclick="sendCommand('.chatregeln')">.chatregeln</div>
		<div onclick="sendCommand('.reg')">.reg</div>
<?php
			}
?>

		
    </div>
</div>

&nbsp;<img id="link_logout" class="img_button" src="img/Delete_big.png" width="40" height="40" border="0" alt="<?php echo $this->lang->logout[0]->tagData; ?>" title="<?php echo $this->lang->logout[0]->tagData; ?>" />&nbsp;

<?php
// Werte aus Session holen und prüfen
$team  = isset($_SESSION['etchat_'.$this->_prefix.'team'])  && $_SESSION['etchat_'.$this->_prefix.'team']  == '1';
$bewer = isset($_SESSION['etchat_'.$this->_prefix.'bewer']) && $_SESSION['etchat_'.$this->_prefix.'bewer'] == '1';

// Haupt-Icon w?en
$mainIcon = $team ? 'img/team.png' : ($bewer ? 'img/bewerbung.png' : 'img/team.png');

// Wenn beide aus sind -> nur die IDs ausgeben, keine sichtbare Box
if (!$team && !$bewer): ?>
    <img id="link_bewerbung" style="display:none">
    <img id="link_team" style="display:none">
<?php else: ?>
    <div class="filesend-menu">
        <img id="filesend-menu" class="img_button"
             src="<?php echo $mainIcon; ?>" width="40" height="40" border="0">

        <div class="filesend-menu-content">
            <a class="img_filesend" style="color: rgba(0, 0, 0, 0);">
                <img id="link_bewerbung" class="img_button"
                     src="img/bewerbung.png" width="40" height="40" border="0"
                     alt="Bewerbung" title="Bewerbung"
                     <?php if (!$bewer) echo 'style="display:none"'; ?>>
            </a>

            <a class="img_filesend" style="color: rgba(0, 0, 0, 0);">
                <img id="link_team" class="img_button"
                     src="img/team.png" width="40" height="40" border="0"
                     alt="Team" title="Team"
                     <?php if (!$team) echo 'style="display:none"'; ?>>
            </a>
        </div>
    </div>
<?php endif;


// Werte aus Session holen und prüfen
$sende  = isset($_SESSION['etchat_'.$this->_prefix.'sendeplan'])  && $_SESSION['etchat_'.$this->_prefix.'sendeplan']  == '1';

$titellist = isset($_SESSION['etchat_'.$this->_prefix.'titelliste']) && $_SESSION['etchat_'.$this->_prefix.'titelliste'] == '1' && $_SESSION['etchat_'.$this->_prefix.'etchat_radio_box'] == '1';

// Haupt-Icon w?en
//$mainIcon = $sende ? 'img/sendeplan.gif' : ($titellist ? 'img/playlist.png' : 'img/sendeplan.gif');
$mainIcon = $sende ? 'img/sendeplan.gif' : ($titellist ? 'img/playlist.png' : '');


// Wenn beide aus sind -> nur die IDs ausgeben, keine sichtbare Box
if (!$sende && !$titellist): ?>
    <img id="link_titellist" style="display:none">
    <img id="Sendeplan" style="display:none">
<?php else: ?>
<span id="Sendeplanan">
    <div class="filesend-menu">
        <img id="filesend-menu" class="img_button"
             src="<?php echo $mainIcon; ?>" width="40" height="40" border="0">

        <div class="filesend-menu-content">
            <a class="img_filesend" style="color: rgba(0, 0, 0, 0);">
                <img id="link_titellist" class="img_button"
                     src="img/playlist.png" width="40" height="40" border="0"
                     alt="Titelliste" title="Titellist"
                     <?php if (!$titellist) echo 'style="display:none"'; ?>>
            </a>

            <a class="img_filesend" style="color: rgba(0, 0, 0, 0);">
                <img id="Sendeplan" class="img_button"
                     src="img/sendeplan.gif" width="40" height="40" border="0"
                     alt="Sendeplan" title="Sendeplan"
                     <?php if (!$sende) echo 'style="display:none"'; ?>>
            </a>
        </div>
    </div>
    </span>
<?php endif;

	include_once("class/Menu.class.php");
?>
<img id="link_profil" />



</div>

<div class="img_home new_link">
<?php
		if ($_SESSION['etchat_'.$this->_prefix.'top_user_onoff'] == '1') {
echo '<img id="top_list" class="img_button" src="img/top_list.png" width="40" height="40" border="0"  alt="Top Liste" title="Top Liste">';
		}else {
	echo '<img id="top_list" >';
		}
?>
</div>

</div></form></div></div>

<div id="broadcast-modal" style="display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #000000; padding: 20px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); z-index: 9999; min-width: 300px; text-align: center; border: 3px solid #d9534f;">
<h3 style="color: #d9534f; margin-top: 0;">System Nachricht</h3>
<p id="broadcast-content" style="margin: 15px 0; font-size: 14px; line-height: 1.4; color: white;"></p>
<button id="confirm-broadcast" style="padding: 8px 20px; background: #5cb85c; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px;">OK</button>
</div>
<div id="broadcast-overlay" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9998;"></div>

</body></html>

<footer>

<a onclick="self.location.href='#info'"><?php echo $this->lang->version[0]->tagData; ?></a>
<div class="popup" id="info">
<div class="popup_text">
<iframe class="info" src="./info.php"
style="position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%)"></iframe>
</div>
<a class="popup_close" onclick="self.location.href='#'">X</a>
</div>

</footer>