PHP Classes

File: boot.php

Recommend this page to a friend!
  Classes of dav y   Telex   boot.php   Download  
File: boot.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Telex
Publish and share messages like with Twitter
Author: By
Last change: stable

added appx, framework of apps
Date: 6 years ago
Size: 861 bytes
 

Contents

Class file image Download
<?php
error_reporting
(E_ALL);
ini_set('display_errors',1);
setlocale(LC_TIME,'fr_FR');
if(!isset(
$_SESSION['enc']) or !isset($_SESSION['connect']) or isset($_GET['reload'])){
   
$f='cnfg/'.str_replace('www.','',$_SERVER['HTTP_HOST']).'.php'; include($f);
   
$_SESSION['connect']=$f; $_SESSION['enc']=$utf8;
   
$_SESSION['index']=$index; $_SESSION['updated']=0;
    if(isset(
$_COOKIE['lng']))$_SESSION['lng']=$_COOKIE['lng'];
    elseif(isset(
$_SERVER['HTTP_ACCEPT_LANGUAGE']))
       
$_SESSION['lng']=substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
    else
$_SESSION['lng']='fr';}
//lib
if(isset($_GET['dev']))$_SESSION['dev']=$_GET['dev']=='='?'prog':'prod';
if(!isset(
$_SESSION['dev']))$_SESSION['dev']='prod';
require(
$_SESSION['dev'].'/lib.php');
if(isset(
$_GET['logout'])){Auth::logout(); reload('/');}
if(!isset(
$_SESSION['time']))Auth::autolog();
$_SESSION['time']=time();
?>