Mini protection

This commit is contained in:
Michel Roux 2013-10-16 21:16:17 +02:00
parent 6d56f1faaf
commit 2f97f00fd5
4 changed files with 15 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/nbproject/private/ /nbproject/private/
/config/config.php /config.php

View File

@ -1,7 +1,7 @@
<?php <?php
require_once 'config/config.php'; require_once 'config.php';
require_once 'config/color.php'; require_once 'utils.php';
require_once 'Net/SSH2.php'; require_once 'Net/SSH2.php';
global $servers; global $servers;
$gitstatus = 'git fetch && git status'; $gitstatus = 'git fetch && git status';

View File

@ -1,5 +1,5 @@
<?php <?php
require_once 'config/config.php'; require_once 'config.php';
global $servers; global $servers;
?><!doctype html> ?><!doctype html>
<html> <html>

View File

@ -1,5 +1,16 @@
<?php <?php
session_start();
if (defined('ONGITLAB') && ONGITLAB) {
if (!isset($_SESSION['remember_user_token'])) {
if (dirname(__FILE__) != '/') {
header('Location: /');
}
exit;
}
}
function ansi2html($string) { function ansi2html($string) {
$dictionary = array( $dictionary = array(
'[30m' => '<span style="color:blue">', '[30m' => '<span style="color:blue">',