Commit d723a8b2 authored by Nico Schallehn's avatar Nico Schallehn

test

parent ca66c631
<?php
// Anmeldung übeprüfen...
if((isset($_SESSION['api-key']) OR (isset($_COOKIE['api-key']) AND isset($_COOKIE['api-secret'])))){
$dologin = false;
if(isset($_SESSION['api-key'])){ // Login aus Session verhanden?
$dologin = true;
}
// Login in Cookie vorhanden?
else if((md5($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR']) == $_COOKIE['api-secret']) AND isset($_COOKIE['api-key'])){
$dologin = true;
$_SESSION['api-key'] = $_COOKIE['api-key'];
}
if($dologin){
$API = new MediaDBAPI ();
if (!$API->APIinit($_SESSION['api-key'])) {
header('location: /');
}
}
}
?><!--A Design by W3layouts
Author: W3layout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment