Просмотр файла globalchat/ajax_chat.php

Размер файла: 1.19Kb
<?php
$preventing_quick_msgs = true;
require 'controller/prestart.php';
$gcProcess->addRequest ('firstRequest', 1);
$gcProcess->requestTo ('ajax_chat.php');
require 'controller/start.php';
echo "
<script type='text/javascript'>
gc_user = new Array ();
gc_user.id = $result[myId];
gc_user.nick = '".$result['usersInfo'][$result['myId']]['nick']."';
gc_user.sex = ".$result['usersInfo'][$result['myId']]['sex'].";
gc_user.rights_group = ".$result['usersInfo'][$result['myId']]['rights_group'].";
gc = new Array ();
gc.current_location_base64 = '".base64_encode ($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'])."';
DIV_C_MSGS_LIST = '".DIV_C_MSGS_LIST."';
DIV_C_ERROR = '".DIV_C_ERROR."';
GC_C_FORM_POSITION_CORRECTION = '".(defined ('GC_C_FORM_POSITION_CORRECTION') ? GC_C_FORM_POSITION_CORRECTION : "''")."';
DIV_C_USER_ID = '".DIV_C_USER_ID."';
gc.div_c_user_nick = '".(defined ('DIV_C_USER_NICK') ? DIV_C_USER_NICK : "''")."';
</script>
";

if (empty ($_GET['room_id']))
$room_id = 1;
else
$room_id = (int) $_GET['room_id'];

$gcSmarty->assign ('roomId', $room_id);
$gcSmarty->assign ('rooms', $result['rooms']);
$gcSmarty->display ('ajax_chat.tpl');

require "cms/$gc_cms/foot.php";