-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.php
More file actions
41 lines (36 loc) · 942 Bytes
/
base.php
File metadata and controls
41 lines (36 loc) · 942 Bytes
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
<?php
require_once 'db.php';
$db = new DB();
session_start();
function sesion(){
if(empty($_SESSION['usuario'])){
$_SESSION['redir'] = $_SERVER['REQUEST_URI'];
redir('login.php');
}
}
function redir($url){
header("Location: $url");
exit;
}
function pag_head($titulo=''){ ?>
<html>
<head>
<title>VxR - <?=$titulo?></title>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/dibujo.js"></script>
<script type="text/javascript" src="js/juego.js"></script>
<script type="text/javascript" src="js/chat.js"></script>
<script type="text/javascript" src="js/websocket.js"></script>
<link rel="stylesheet" type="text/css" href="juego.css">
</head>
<body>
<?php if(!empty($_SESSION['usuario'])) { ?>
<span style="float:right">holo <?=$_SESSION['usuario']['nombre']?> [<a href="logout.php">salir</a>]</span>
<?php }
}
function pag_foot(){ ?>
</body>
</html>
<?php
}
?>