-
Notifications
You must be signed in to change notification settings - Fork 1
/
irpg_service.php
executable file
·69 lines (48 loc) · 1.51 KB
/
irpg_service.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/* I codici qui inseriti sono proprietà di
* Francesco Stasi, pertanto ne è vietata la
* vendita e la cessione a terzi senza previa
* autorizzazione dell' autore.
*/
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
if(!IS_AJAX) {
exit("Pagina caricabile solo con ajax.");
}
require_once("config.php");
require_once("libs/common.php");
require_once("libs/character_lib.php");
require_once("libs/pm_lib.php");
require_once("libs/docs_lib.php");
require_once("libs/chat_lib.php");
//comunico alla pagina che utilizzerò delle session
if(!isset($_SESSION))
{
session_start();
}
logged();
$ref_id=$_SESSION['id'];
if ($bind_pm_char)
$ref_id=$_SESSION['char_id'];
$newPM=pm_countNew($ref_id,true);
echo "<span id=\"newPM\" last_pm=\"{$newPM[0]}\">{$newPM[1]}</span>";
if(isset($_REQUEST['n'])){
$news1=new Document(null,5);
$news2=new Document(null,6);
$news1->readFromDb();
$news2->readFromDb();
echo "<span id=\"news1\">{$news1->getContent()}</span>";
echo "<span id=\"news2\">{$news2->getContent()}</span>";
}
if(isset($_REQUEST['o'])){
echo "<div id=\"onlineResult\">";
show_onlineList($_REQUEST['o'],1);
echo "</div>";
}
if(isset($_SESSION['room_id'])){
$room=new Room(intval($_SESSION['room_id']));
$room->readFromDb($room->getId());
$img=$room->getThumb();
if($img!='')
echo "<span id=\"roomthumb\">{$room->getThumb()}</span>";
}
?>