<?php
/*
	Copyright © Eleanor CMS
	http://eleanor-cms.ru
	info@eleanor-cms.ru
*/
if(!defined('CMS'))die;
$GLOBALS['head']['chat']='<link rel="stylesheet" href="addons/chat/chat.css" />';
$GLOBALS['jscripts'][]='addons/chat/chat.js';
$data=Eleanor::$Login->IsUser() ? Eleanor::$Login->GetUserValue(array('id','name'),false) : false;
$isa=Eleanor::$Permissions->IsAdmin() ? 1 : 0;
$sign=Eleanor::$root;#Строка-подпись
?>
<div id="ochat-area-all"<?php
if($data)
	echo($isa ? ' data-admin="1"' : ''),
	' data-uid="',$data['id'],'" data-name="',htmlspecialchars($data['name'],ELENT,CHARSET),'" data-sign="',md5(Eleanor::$ip.'-'.$data['id'].'-'.$isa.'-'.$data['name'].'-'.$sign),'"';
?>>
	<div id="ochat-area"></div>
<?php if($data):?>
	<div id="ochat-input">
		<textarea></textarea>
		<div id="ocwarn" style="display:none"></div>
		<a href="#" id="orefresh" title="Обновить окно чата"></a>
		<input class="fbutton" type="button" value="Отправить" title="Отправить" />
		<a href="#" id="osmile" title="Открыть окно смайлов"></a>
	</div>
	<div id="osmile-area">
		<a href="#">Закрыть</a>
		<div>
			<img src="addons/chat/images/osmile/big/1.png" alt=":1:" /><img src="addons/chat/images/osmile/big/2.png" alt=":2:" /><img src="addons/chat/images/osmile/big/3.png" alt=":3:" /><img src="addons/chat/images/osmile/big/4.png" alt=":4:" /><img src="addons/chat/images/osmile/big/5.png" alt=":5:" /><img src="addons/chat/images/osmile/big/6.png" alt=":6:" /><img src="addons/chat/images/osmile/big/7.png" alt=":7:" /><img src="addons/chat/images/osmile/big/8.png" alt=":8:" /><img src="addons/chat/images/osmile/big/9.png" alt=":9:" /><img src="addons/chat/images/osmile/big/10.png" alt=":10:" /><img src="addons/chat/images/osmile/big/11.png" alt=":11:" /><img src="addons/chat/images/osmile/big/12.png" alt=":12:" /><img src="addons/chat/images/osmile/big/13.png" alt=":13:" /><img src="addons/chat/images/osmile/big/14.png" alt=":14:" /><img src="addons/chat/images/osmile/big/15.png" alt=":15:" /><img src="addons/chat/images/osmile/big/16.png" alt=":16:" /><img src="addons/chat/images/osmile/big/17.png" alt=":17:" /><img src="addons/chat/images/osmile/big/18.png" alt=":18:" /><img src="addons/chat/images/osmile/big/19.png" alt=":19:" /><img src="addons/chat/images/osmile/big/20.png" alt=":20:" /><img src="addons/chat/images/osmile/big/21.png" alt=":21:" /><img src="addons/chat/images/osmile/big/22.png" alt=":22:" /><img src="addons/chat/images/osmile/big/23.png" alt=":23:" /><img src="addons/chat/images/osmile/big/24.png" alt=":24:" /><img src="addons/chat/images/osmile/big/25.png" alt=":25:" /><img src="addons/chat/images/osmile/big/26.png" alt=":26:" /><img src="addons/chat/images/osmile/big/27.png" alt=":27:" /><img src="addons/chat/images/osmile/big/28.png" alt=":28:" /><img src="addons/chat/images/osmile/big/29.png" alt=":29:" /><img src="addons/chat/images/osmile/big/30.png" alt=":30:" /><img src="addons/chat/images/osmile/big/31.png" alt=":31:" /><img src="addons/chat/images/osmile/big/32.png" alt=":32:" /><img src="addons/chat/images/osmile/big/33.png" alt=":33:" /><img src="addons/chat/images/osmile/big/34.png" alt=":34:" /><img src="addons/chat/images/osmile/big/35.png" alt=":35:" /><img src="addons/chat/images/osmile/big/36.png" alt=":36:" /><img src="addons/chat/images/osmile/big/37.png" alt=":37:" /><img src="addons/chat/images/osmile/big/38.png" alt=":38:" /><img src="addons/chat/images/osmile/big/39.png" alt=":39:" /><img src="addons/chat/images/osmile/big/40.png" alt=":40:" /><img src="addons/chat/images/osmile/big/41.png" alt=":41:" /><img src="addons/chat/images/osmile/big/42.png" alt=":42:" /><img src="addons/chat/images/osmile/big/43.png" alt=":43:" /><img src="addons/chat/images/osmile/big/44.png" alt=":44:" /><img src="addons/chat/images/osmile/big/45.png" alt=":45:" /><img src="addons/chat/images/osmile/big/46.png" alt=":46:" /><img src="addons/chat/images/osmile/big/47.png" alt=":47:" /><img src="addons/chat/images/osmile/big/48.png" alt=":48:" /><img src="addons/chat/images/osmile/big/49.png" alt=":49:" /><img src="addons/chat/images/osmile/big/50.png" alt=":50:" /><img src="addons/chat/images/osmile/big/51.png" alt=":51:" /><img src="addons/chat/images/osmile/big/52.png" alt=":52:" /><img src="addons/chat/images/osmile/big/53.png" alt=":53:" /><img src="addons/chat/images/osmile/big/54.png" alt=":54:" /><img src="addons/chat/images/osmile/big/55.png" alt=":55:" /><img src="addons/chat/images/osmile/big/56.png" alt=":56:" /><img src="addons/chat/images/osmile/big/57.png" alt=":57:" /><img src="addons/chat/images/osmile/big/58.png" alt=":58:" /><img src="addons/chat/images/osmile/big/59.png" alt=":59:" /><img src="addons/chat/images/osmile/big/60.png" alt=":60:" /><img src="addons/chat/images/osmile/big/61.png" alt=":61:" /><img src="addons/chat/images/osmile/big/62.png" alt=":62:" /><img src="addons/chat/images/osmile/big/63.png" alt=":63:" /><img src="addons/chat/images/osmile/big/64.png" alt=":64:" /><img src="addons/chat/images/osmile/big/65.png" alt=":65:" /><img src="addons/chat/images/osmile/big/66.png" alt=":66:" /><img src="addons/chat/images/osmile/big/67.png" alt=":67:" /><img src="addons/chat/images/osmile/big/68.png" alt=":68:" /><img src="addons/chat/images/osmile/big/69.png" alt=":69:" /><img src="addons/chat/images/osmile/big/70.png" alt=":70:" /><img src="addons/chat/images/osmile/big/71.png" alt=":71:" /><img src="addons/chat/images/osmile/big/72.png" alt=":72:" /><img src="addons/chat/images/osmile/big/73.png" alt=":73:" /><img src="addons/chat/images/osmile/big/74.png" alt=":74:" /><img src="addons/chat/images/osmile/big/75.png" alt=":75:" /><img src="addons/chat/images/osmile/big/76.png" alt=":76:" /><img src="addons/chat/images/osmile/big/77.png" alt=":77:" /><img src="addons/chat/images/osmile/big/78.png" alt=":78:" /><img src="addons/chat/images/osmile/big/79.png" alt=":79:" /><img src="addons/chat/images/osmile/big/80.png" alt=":80:" />
		</div>
	</div>
<?php else: ?>
	<div style="text-align:center">
		<b>Чтобы воспльзоваться чатом, зарегистрируйтесь или войдите.</b>
	</div>
<?php endif?>
</div>