-
Notifications
You must be signed in to change notification settings - Fork 1
/
view_doc.php
executable file
·61 lines (52 loc) · 1.43 KB
/
view_doc.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
<?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');
require_once("config.php");
require_once("libs/common.php");
require_once("libs/character_lib.php");
require_once("libs/docs_lib.php");
if(isset($_REQUEST['doc']) && $_REQUEST['doc']!=''){
$docX=new Document(null,intval($_REQUEST['doc']));
$docX->readFromDb();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="author" content="Francesco Stasi"/>
<title>Documentazione</title>
<?php
if(!IS_AJAX) {
?>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/custom-theme/jquery-ui-1.8.13.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.jeditable.js"></script>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<?php
}
?>
</head>
<body>
<?php
if(!isset($docX)){
echo "Documento Inesistente";
}else{
?>
<h1><?php echo $docX->getName(); ?></h1>
<div class="doc_content">
<?php echo $docX->getContent(); ?>
</div>
<?php
}
?>
</body>
</html>