Ejemplo n.º 1
0
<?php

$data = new data();
if (isset($_SESSION['idprofile'])) {
    $id = $_SESSION['idprofile'];
    $_SESSION['idprofile'] = $_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id'];
} else {
    $id = $_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id'];
}
$result = $data->showProfile($id);
$result2 = $data->checkAdmin($_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id']);
if ($result2) {
    $result3 = $data->showFollow($result->id_follow);
}
$today = date('Y-m-d');
if ($result->id_follow != 0) {
    if ($result->data_finish <= $today) {
        $status = "VIP";
    } else {
        $status = "Обыватель";
    }
} else {
    $status = "Обыватель";
}
?>

<div id= "lk">
<div id = "lk-profilebox">
	<p id="lk-name"><?php 
echo $result->name;
?>