View file album.php

File size: 23.23Kb
<?php
/**********************************************/
/* Автор скрипта: Александр Есин              */
/* E-Mail: [email protected] ([email protected]) */
/* ICQ: 6464729                               */
/* Site: http://ticlove.ru                    */
/**********************************************/
?>
<?php define ('SECURED', true); ?>
<?php require (dirname(__FILE__).'/_inc/sql.php'); ?>
<?php require (dirname(__FILE__).'/_inc/config.php'); ?>
<?php require (dirname(__FILE__).'/_inc/function.php'); ?>
<?php
$mode = isset($_GET['mode']) ? $_GET['mode'] : NULL;
if ($mode == 'comments') {
$title_page = 'Комментарии к фото';
$description_page = 'Комментарии к фото';
$keywords_page = 'Комментарии к фото'; 
}
else if ($mode == 'add') {
$title_page = 'Загрузить фотографию';
$description_page = 'Загрузить фотографию';
$keywords_page = 'Загрузить фотографию'; 
}
else
{
$title_page = 'Мой фотоальбом';
$description_page = 'Мой фотоальбом';
$keywords_page = 'Мой фотоальбом'; 
}
?>
<?php
if (!isset($_SESSION['auth_id'])) {
   header('Location: /');
   exit;
}
?>
<?php
/************************************************************************************************************/
// разрешены форматы для загразки
$allowed_extensions = array("jpg", "jpeg");
if (isset($_POST['upload'])) {
if (!isset($_SESSION['rand'])) {
header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
exit;
}
unset($_SESSION['rand']);

$photo_name = $_FILES['photo']['name'];
$photo_size = $_FILES['photo']['size'];
$photo_tmp_name = $_FILES['photo']['tmp_name'];
$photo_error = $_FILES['photo']['error'];
$photo_giz = getimagesize($photo_tmp_name);
$razr = explode('x', MIN_FOTO_RAZR);
$photo_type = strtolower(end(explode(".", $photo_name)));
$dir = DIR_PHOTOS.'/'.$_SESSION['auth_id'].'/';
$name_file = $_SESSION['auth_id'].time();
$name_file = md5($name_file);
$name_file = substr($name_file, 0, 8);
$name_file = $name_file.'_'.str_replace('.', '_', $_SERVER["HTTP_HOST"]);

$tip_photo = intval($_POST['tip']);
if ($tip_photo < 1 or $tip_photo > 2) $tip_photo = 1;

              if (!is_uploaded_file($photo_tmp_name))
	      {
	           $_SESSION['error'] = 'Вы не выбрали файл.';
		   header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
		   exit;
	      }
	      
	      else if (!(in_array($photo_type, $allowed_extensions) or in_array(strtolower($photo_type), $allowed_extensions)) and $photo_name)
	      {
	           $_SESSION['error'] = 'Разрешены форматы '.implode($allowed_extensions, ', ').'. Все остальные типы файлов запрещены.';
		   header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
		   exit;
	      }
	      
	      else if (MAX_FOTO <= mysql_result(mysql_query("SELECT COUNT(*) FROM `q_photo` WHERE `id_user` = '".$_SESSION['auth_id']."';"), 0, 0))
	      {
	           $_SESSION['error'] = 'Разрешено загружать не более <strong>'.MAX_FOTO.'</strong> фотографий.';
		   header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
		   exit;
	      }
	      
	      else if ($photo_size > ((MAX_FOTO_MB * 1024) * 1024))
	      {
	           $_SESSION['error'] = 'Размер файла превышает '.MAX_FOTO_MB.'Mb.';
		   header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
		   exit;
	      }
	      
	      else if ($photo_giz[0] < $razr[0] && $photo_giz[1] < $razr[1])
	      {
	           $_SESSION['error'] = 'Фотография слишком маленькая! Минимальное разрешение – '.MIN_FOTO_RAZR.' точек';
		   header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
		   exit;
	      }
	      
	      else if ($photo_error)
	      {
	           $_SESSION['error'] = 'Произошла ошибка! Файл не был загружен.';
		   header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
		   exit;
	      }
	      
	      
	      
	      else if ($tip_photo < 1 or $tip_photo > 2)
	      {
	           $_SESSION['error'] = 'Вы не выбрали тип фотографии';
		   header('Location: '.$_SERVER['PHP_SELF'].'?mode=add');
		   exit;
	      }
	      
	      
	      
	      if (empty($error))
	      {
	           if (!file_exists(DIR_PHOTOS.'/')) @mkdir(DIR_PHOTOS.'/', 0777);
	           if (!file_exists($dir)) @mkdir($dir, 0777);
	           if (copy($photo_tmp_name, $dir.$name_file.'.'.$photo_type))
		   {
	                function_creat_foto($dir.$name_file.'.'.$photo_type, $dir.$name_file.'.'.$photo_type, '');
	                function_small_foto($dir.$name_file.'.'.$photo_type, $dir.$name_file.'_p.'.$photo_type, $x = 110, $y = 250, '');
	                function_small_foto($dir.$name_file.'.'.$photo_type, $dir.$name_file.'_s.'.$photo_type, $x = 50, $y = 100, '');
	           }
	           
	           $sql = mysql_query("SELECT `avatar` FROM `q_users` WHERE `id_user` = '".$_SESSION['auth_id']."' LIMIT 1;");
		   $avatar = mysql_result($sql, 0);
	           if (empty($avatar)) {
	           mysql_query("UPDATE `q_users` SET `avatar` = '".function_sql($name_file.'_s.'.$photo_type)."' WHERE `id_user` = '".$_SESSION['auth_id']."';");
	           }
	           mysql_query("INSERT INTO `q_photo` (`id_user`, `name`, `tip`, `time`) VALUES ('".$_SESSION['auth_id']."', '".$name_file.".".$photo_type."', '".$tip_photo."', '".time()."');");
	           mysql_query("UPDATE `q_users` SET `photo` = `photo` + 1 WHERE `id_user` = '".$_SESSION['auth_id']."';");
		   header('Location: '.$_SERVER['PHP_SELF']);
		   exit;
	      }
}
/************************************************************************************************************/
?>
<?php include (dirname(__FILE__).'/include/header.php'); ?>
<div id="block_left">
<?php include (dirname(__FILE__).'/include/lider.php'); ?>
</div>
<div id="block_center">
<h3><?php echo $title_page; ?></h3>
<?php
switch ($mode)
{
case 'add':
$_SESSION['rand'] = rand(1000, 9999);
?>
<?php if (!empty($_SESSION['error'])) { ?>
<div id="error"><?php echo $_SESSION['error']; ?></div>
<?php unset($_SESSION['error']); ?>
<?php } ?>
<form enctype="multipart/form-data" action="<?php echo str_replace('&', '&amp;', $_SERVER['REQUEST_URI']); ?>" method="post">
<input type="hidden" name="upload" value="1" />
<label for="add"><strong>1. Выберите фотографию</strong></label><br/>
<input id="add" type="file" name="photo" /><br/>
<?php
/*
<div style="padding: 8px 0 2px 0;"><strong>2. Укажите тип фотографии</strong></div>
<div>
<input id="tip_1" type="radio" name="tip" value="1" checked="checked" /><label for="tip_1"> Обычная фотография</label>
</div>
<div style="padding: 8px 0;">
<input id="tip_2" type="radio" name="tip" value="2" /><label for="tip_2"> Фотография с элементами эротики</label><br/>
<small>(просмотр доступен только для зарегистрированных пользователей c <strong>VIP</strong> статусом)</small>
</div>
*/
?>
<div style="padding: 3px 0;">
<input type="submit" class="submit" value="Загрузить" />
</div>
<div style="padding-top: 10px;">Загружая фотографии на сервис вы соглашаетесь с <a href="javascript:void(0)" onclick="javascript:photo_rules()">условиями</a> их размещения</div>
<script type="text/javascript">
function photo_rules() {
     $.arcticmodal({
     type: 'ajax',
     url: '/moduls/photo_rules.php',
     ajax: {
          type: 'POST',
          data: { user_id: <?php echo $_SESSION['auth_id']; ?> },
          dataType: 'html',
          success: function(data, el, responce) {
               var h = $(responce);
               $('B', h).html(responce.title);
               $('P:last', h).html(responce.text);
               data.body.html(h);
          }
     }
});
};
</script>
<?php
break;



case 'comments':
$id_photo = intval($_GET['photo_id']);
$sql = mysql_query("SELECT * FROM `q_photo` WHERE `id_photo` = '".$id_photo."' AND `id_user` = '".$_SESSION['auth_id']."' LIMIT 1;");
if (mysql_num_rows($sql) == 0) {
?>
<script type="text/javascript">
location="/";
</script>
<?php
}
$array_foto = mysql_fetch_array($sql);
$name_photo = explode('.', $array_foto['name']);
$photo = str_replace($name_photo[0], $name_photo[0].'_p', $array_foto['name']);
?>
<div class="left">
<a href="/album.php"><img class="photo_bor" src="<?php echo DIR_PHOTOS; ?>/<?php echo $array_foto['id_user']; ?>/<?php echo $photo; ?>" alt="" /></a>
</div>
<div class="left" style="margin-left: 10px; width: 330px;">
<?php if (!empty($array_foto['about'])) { ?>
<strong>Описание:</strong> <?php echo htmlspecialchars(function_bigword($array_foto['about'], 45), ENT_QUOTES); ?>
<?php } ?>
</div>
<div class="clear"></div>
<?php
$col = COMMENTS_PAGE;
if (isset($_GET['start'])) $start = abs(intval($_GET['start']));
else $start = 0;
$count_p = mysql_result(mysql_query("SELECT COUNT(*) FROM `q_photo_comm` WHERE `id_foto` = '".$id_photo."';"), 0);
if ($count_p > 0) {
echo '<div style="padding-bottom: 10px; font-size: 16px; color: #ff6633; font-weight: bold;">Комментарии к фотографии:</div>';
if ($start >= $count_p) $start = 0;
$q = mysql_query("SELECT * FROM `q_photo_comm` INNER JOIN `q_users` ON `q_users`.`id_user` = `q_photo_comm`.`id_user` WHERE `q_photo_comm`.`id_foto` = '".$id_photo."' ORDER BY `q_photo_comm`.`id_comm` DESC LIMIT ".$start.", ".$col);
$i = 1;
while ($array = mysql_fetch_array($q)) { ?>
<table width="100%" cellspacing="5" cellpadding="0" <?php if ($array['new'] == 0) echo 'bgcolor="#eeeeee"'; ?> >
<tr>
<td width="60" valign="top">
<a href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/id<?php echo $array['id_user']; ?>">
<?php if (!empty($array['avatar'])) { ?>
<img class="<?php echo ($array['vip_status'] == 1 ? 'photo_bor_vip' : 'photo_bor'); ?>" src="<?php echo DIR_PHOTOS; ?>/<?php echo $array['id_user']; ?>/<?php echo $array['avatar']; ?>" alt="" />
<?php } else { ?>
<img class="<?php echo ($array['vip_status'] == 1 ? 'photo_bor_vip' : 'photo_bor'); ?>" src="/images/no_photo_small.png" alt="" />
<?php } ?>
</a><br/>
<?php if (function_online($array['online']) == TRUE) { ?>
<img src="/images/on.gif" alt="Онлайн" title="Онлайн" />
<?php } ?>
</td>
<td valign="top">
<?php if ($array['vip_status'] == 1) { ?>
<img src="/images/vip.gif" alt="" width="16" height="16" title="VIP-пользователь" /> 
<?php } ?>
<a class="<?php echo ($array['pol'] == 1 ? 'm_color' : 'zh_color'); ?>" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>/id<?php echo $array['id_user']; ?>"><?php echo htmlspecialchars($array['name'], ENT_QUOTES); ?></a>, <span class="vozrast"><?php echo function_vozrast_n($array['god'].'-'.$array['mes'].'-'.$array['day']); ?></span><br/>
<span class="city"><?php echo htmlspecialchars($array['city'], ENT_QUOTES); ?>, <?php echo htmlspecialchars($array['country'], ENT_QUOTES); ?></span><br/>
<span style="font-size: 11px; color: #069de5;">Написал<?php echo ($array['pol'] == 1 ? '' : 'а'); ?> <?php echo function_vizit($array['time']); ?></span><br/>
<?php echo function_smile(htmlspecialchars(function_bigword($array['msg'], 45), ENT_QUOTES)); ?>
</td>
<td valign="top" align="right">
<div><a class="red" href="javascript:void(0)" onclick="javascript:photo_delete_comm('<?php echo $array['id_comm']; ?>')">Удалить</a></div>
</td>
</tr>
</table>
<?php if ($i <> $col) { ?>
<div style="margin: 10px 0; border-top: 5px dotted #ccc; font-size: 16px; color: #ff6633; width: 100%;"></div>
<?php } ?>
<?php $i++; ?>
<?php } ?>
<?php function_page($_SERVER['PHP_SELF'].'?mode=comments&amp;user_id='.$user_id.'&amp;photo_id='.$id_photo.'&amp;', $col, $start, $count_p); ?>
<?php } else { ?>
<div style="font-size: 18px; text-align : center; padding: 0 0 30px 0;">Комментариев нет</div>
<?php } ?>
<div class="clear"></div>
<script type="text/javascript">
var ie=document.all?1:0;
var ns=document.getElementById&&!document.all?1:0;

function InsertSmile(SmileId)
{
	      if(ie)
	      {
	           document.all.message.focus();
	           document.all.message.value+=" "+SmileId+" ";
	      }
	      else if(ns)
	      {
	           document.forms['forma'].elements['message'].focus();
	           document.forms['forma'].elements['message'].value+=" "+SmileId+" ";
	      }
	      else alert("Ваш браузер не поддерживается!");
}
</script>
<script type="text/javascript">
$(document).ready(function() {
	$('#add').click(function() {
		$('#comm-status').hide();
		$.ajax({
		type: "POST",
		url: "/moduls/photo_my_comm_add.php",
		data: { user_id: <? echo $_SESSION['auth_id']; ?>, fid: <?php echo $id_photo; ?>, msg: $('#msg').val() },
		beforeSend: function() {
		     $('#comm-status').fadeIn(900);
		     $("#comm-status").html('<span class="green">Ваш запрос обрабатывается...</span>');
		},
		success: function(data) {
		     $("#comm-status").html(data);
		     $('#comm-status').fadeOut(1200);
		}
		});
	});
});	
</script>
<script type="text/javascript">
function smiles() {
$(document).ready(function() {
     $.arcticmodal({
     type: 'ajax',
     url: '/moduls/smiles.php',
     ajax: {
          type: 'POST',
          data: { user_id: <?php echo $_SESSION['auth_id']; ?> },
          dataType: 'html',
          success: function(data, el, responce) {
               var h = $(responce);
               $('B', h).html(responce.title);
               $('P:last', h).html(responce.text);
               data.body.html(h);
          }
     }
});
});
};
</script>
<div style="background-color: #eee; padding: 20px 10px;">
<div id="comm-status" style="text-align: center;"></div>
<form action="javascript:void(0)" name="forma">
Добавление нового комментария:
<div style="padding: 5px 0;">
<script type="text/javascript">
jQuery.fn.maxlength = function(options) {
		   var settings = jQuery.extend({
		   maxChars: 1000, // максимальное колличество символов
		   leftChars: "символов" // текст в конце строки информера
		   }, options);
		   return this.each(function() {
		   var me = $(this);
		   var l = settings.maxChars;
		   me.bind('keydown keypress keyup',function(e) {
		   if(me.val().length>settings.maxChars) me.val(me.val().substr(0,settings.maxChars));
		   l = settings.maxChars - me.val().length;
		   me.next('span').html(l + ' ' + settings.leftChars);
		   });
		   me.after('Осталось <span class="maxlen">' + settings.maxChars + ' ' + settings.leftChars + '</span>');
		   });
};
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#msg").maxlength();
});
</script>
<textarea style="width:95%; max-width:95%; min-width:95%; padding: 5px;" name="message" id="msg" rows="4" cols="20"></textarea>
</div>
<input type="hidden" id="uname" value="<?php echo htmlspecialchars($user_array['name']); ?>" />
<input type="submit" class="submit" id="add" value="Добавить комментарий" /> <input type="submit" class="submit_green" onclick="javascript:smiles()" value="Смайлики" />
</form>
</div>
<script type="text/javascript">
function photo_delete_comm(cid) {
$(document).ready(function()
{
     $.arcticmodal({
     type: 'ajax',
     url: '/moduls/photo_my_delete_comm.php',
     ajax: {
          type: 'POST',
          data: { user_id: <?php echo $_SESSION['auth_id']; ?>, cid: cid },
          dataType: 'html',
          success: function(data, el, responce) {
               var h = $(responce);
               $('B', h).html(responce.title);
               $('P:last', h).html(responce.text);
               data.body.html(h);
          }
     }
});
});
};

function photo_delete_comm_update(cid) {
$(document).ready(function()
{
$.ajax({
     type: "POST",
     url: "/moduls/photo_my_delete_comm.php?page=update",
     data: { user_id: <?php echo $_SESSION['auth_id']; ?>, cid: cid },
     beforeSend: function()
     {
          $("#photo_del_comm_status").html('<img src="/images/ajax.gif" alt="" />');
     },
     success: function(data)
     {
          $("#photo_del_comm_status").html(data);
          setTimeout('location="<?php echo $_SERVER["REQUEST_URI"]; ?>"', 1000);
     }
});
});
};
</script>
<?php
mysql_query("UPDATE `q_photo_comm` SET `new` = '1' WHERE `id_foto` = '".$id_photo."' AND `uid_user` = '".$_SESSION['auth_id']."';");
break;


default:
?>
<div style="padding: 10px 0 20px 0;"><a class="upload_photo" href="/album.php?mode=add">Загрузить фотографию</a></div>
<?php
$sql = mysql_query("SELECT * FROM `q_photo` WHERE `id_user` = '".$_SESSION['auth_id']."' ORDER BY `preor` DESC;");
$num_rows = mysql_num_rows($sql);
if ($num_rows > 0) {
$_SESSION['allFoto'] = $num_rows;
?>
<?php
$n = 0;
while ($array = mysql_fetch_array($sql)) {
$name_photo = explode('.', $array['name']);
$photo = str_replace($name_photo[0], $name_photo[0].'_p', $array['name']);
?>
<div class="left" style="padding-left: 30px;">
<a href="javascript:void(0)" onclick="javascript:photo('<?php echo $array['id_photo']; ?>', '<?php echo $n; ?>')"><img class="photo_bor" src="<?php echo DIR_PHOTOS; ?>/<?php echo $array['id_user']; ?>/<?php echo $photo; ?>" alt="" /></a>
</div>
<div class="left" style="padding-left: 10px;">
<div style="padding-bottom: 5px;">Добавлена <?php echo function_vizit($array['time']); ?></div>
<div style="padding-bottom: 5px;">
<?php if (!empty($array['preor'])) { ?>
<strong>Главное фото</strong>
<?php } else { ?>
<a href="javascript:void(0)" onclick="javascript:photo_top('<?php echo $array['id_photo']; ?>')">Сделать главным</a>
<?php } ?>
</div>
<div style="padding-bottom: 5px;"><a href="javascript:void(0)" onclick="javascript:photo_desc('<?php echo $array['id_photo']; ?>')">Изменить описание</a></div>
<div style="padding-bottom: 5px;"><a href="javascript:void(0)" onclick="javascript:photo_delete('<?php echo $array['id_photo']; ?>')">Удалить фото</a></div>
<div style="padding-bottom: 5px;"><a href="/album.php?mode=comments&amp;photo_id=<?php echo $array['id_photo']; ?>"><?php echo ($array['all_comm'] > 0 ? 'Комментарии ('.$array['all_comm'].')' : 'Комментировать'); ?></a></div>
</div>
<div class="clear" style="padding-top: 5px;"></div>

<?php $n++; ?>
<?php } ?>
<script type="text/javascript">
function photo(str, n) {
$(document).ready(function()
{
     $.arcticmodal({
     type: 'ajax',
     url: '/moduls/photo.php',
     ajax: {
          type: 'POST',
          data: { user_id: <?php echo $_SESSION['auth_id']; ?>, user_uid: <?php echo $_SESSION['auth_id']; ?>, foto: str, n: n },
          dataType: 'html',
          success: function(data, el, responce) {
               var h = $(responce);
               $('B', h).html(responce.title);
               $('P:last', h).html(responce.text);
               data.body.html(h);
          }
     }
});
});
};

function photo_id(n) {
$(document).ready(function()
{
$.ajax({
     type: "POST",
     url: "/moduls/photo_id.php",
     data: { user_id: <?php echo $_SESSION['auth_id']; ?>, user_uid: <?php echo $_SESSION['auth_id']; ?>, n: n },
     beforeSend: function()
     {
          $("#load_content_foto").addClass('load_content_foto');
	  $("#content_fade").fadeTo(700, 0.4);
	  $("#load_content_foto").css({'margin-left':'20px'});
     },
     success: function(data)
     {
	  $("#foto_id_status").html(data);
     }
});
});
};

function photo_top(fid) {
$(document).ready(function()
{
     $.arcticmodal({
     type: 'ajax',
     url: '/moduls/photo_top.php',
     ajax: {
          type: 'POST',
          data: { user_id: <?php echo $_SESSION['auth_id']; ?>, fid: fid },
          dataType: 'html',
          success: function(data, el, responce) {
               var h = $(responce);
               $('B', h).html(responce.title);
               $('P:last', h).html(responce.text);
               data.body.html(h);
          }
     }
});
});
};

function photo_top_update(fid) {
$(document).ready(function()
{
$.ajax({
     type: "POST",
     url: "/moduls/photo_top.php?page=update",
     data: { user_id: <?php echo $_SESSION['auth_id']; ?>, fid: fid },
     beforeSend: function()
     {
          $("#photo_top_status").html('<img src="/images/ajax.gif" alt="" />');
     },
     success: function(data)
     {
          $("#photo_top_status").html(data);
          setTimeout('location="<?php echo $_SERVER["REQUEST_URI"]; ?>"', 1200);
     }
});
});
};

function photo_desc(fid) {
$(document).ready(function()
{
     $.arcticmodal({
     type: 'ajax',
     url: '/moduls/photo_desc.php',
     ajax: {
          type: 'POST',
          data: { user_id: <?php echo $_SESSION['auth_id']; ?>, fid: fid },
          dataType: 'html',
          success: function(data, el, responce) {
               var h = $(responce);
               $('B', h).html(responce.title);
               $('P:last', h).html(responce.text);
               data.body.html(h);
          }
     }
});
});
};

function photo_desc_update(fid) {
$(document).ready(function()
{
$.ajax({
     type: "POST",
     url: "/moduls/photo_desc.php?page=update",
     data: { user_id: <?php echo $_SESSION['auth_id']; ?>, fid: fid, desc: $('#desc').val() },
     beforeSend: function()
     {
          $("#photo_desc_status").html('<img src="/images/ajax.gif" alt="" />');
     },
     success: function(data)
     {
          $("#photo_desc_status").html(data);
          setTimeout('location="<?php echo $_SERVER["REQUEST_URI"]; ?>"', 1200);
     }
});
});
};

function photo_delete(fid) {
$(document).ready(function()
{
     $.arcticmodal({
     type: 'ajax',
     url: '/moduls/photo_delete.php',
     ajax: {
          type: 'POST',
          data: { user_id: <?php echo $_SESSION['auth_id']; ?>, fid: fid },
          dataType: 'html',
          success: function(data, el, responce) {
               var h = $(responce);
               $('B', h).html(responce.title);
               $('P:last', h).html(responce.text);
               data.body.html(h);
          }
     }
});
});
};

function photo_delete_update(fid) {
$(document).ready(function()
{
$.ajax({
     type: "POST",
     url: "/moduls/photo_delete.php?page=update",
     data: { user_id: <?php echo $_SESSION['auth_id']; ?>, fid: fid },
     beforeSend: function()
     {
          $("#photo_delete_status").html('<img src="/images/ajax.gif" alt="" />');
     },
     success: function(data)
     {
          $("#photo_delete_status").html(data);
          setTimeout('location="<?php echo $_SERVER["REQUEST_URI"]; ?>"', 1200);
     }
});
});
};
</script>
<?php
} else echo 'Фотографий нет.';
break;
}
?>
</div>
<div id="block_right">
<?php include (dirname(__FILE__).'/include/chat.php'); ?>
</div>
<div class="clear"></div>
<?php include (dirname(__FILE__).'/include/footer.php'); ?>