-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathchat.php
52 lines (43 loc) · 1.85 KB
/
chat.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/****************************************************************************************
* LiveZilla chat.php
*
* Copyright 2018 LiveZilla GmbH
* All rights reserved.
* LiveZilla is a registered trademark.
*
* Improper changes to this file may cause critical errors.
***************************************************************************************/
define("IN_LIVEZILLA",true);
if(!defined("LIVEZILLA_PATH"))
define("LIVEZILLA_PATH","./");
@ini_set('session.use_cookies', '0');
@error_reporting(E_ALL);
$html = "";
require(LIVEZILLA_PATH . "_definitions/definitions.inc.php");
require(LIVEZILLA_PATH . "_lib/functions.global.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.protocol.inc.php");
require(LIVEZILLA_PATH . "_definitions/definitions.dynamic.inc.php");
require(LIVEZILLA_PATH . "_lib/functions.external.inc.php");
require(LIVEZILLA_PATH . "_lib/objects.external.inc.php");
Server::InitDataProvider();
Server::DefineURL(FILE_CHAT);
LocalizationManager::AutoLoad();
if(!DBManager::$Connected)
exit("Can't connect to database");
$html = IOStruct::GetFile(PATH_TEMPLATES . "chat_v2.tpl");
$html = str_replace("<!--logor-->","<img src=\"". Server::$Configuration->File["gl_cahi"]."\" border=\"0\">",$html);
$html = str_replace("<!--btop-->",((!empty(Server::$Configuration->File["gl_cali"]) || !empty(Server::$Configuration->File["gl_cahi"])) ? "100px" : "0"),$html);
$cid = Communication::GetParameter("linkid","");
if(strlen($cid)==32 && Configuration::GetCodeById($cid) != null)
{
$html = str_replace("<!--widget-->",Configuration::GetCodeById($cid),$html);
}
else
{
$html = str_replace("<!--widget-->",OverlayChat::GetDefaultScript(true),$html);
$html = str_replace("<!--ptdata-->",OverlayChat::GetPassThruObjectKeys(),$html);
}
$html = str_replace("<!--server-->","<!--server-->server.php",$html);
exit(Server::Replace($html));
?>