Зачатки MVC
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
include_once 'functions.php';
|
||||
|
||||
include_once 'models/PresentsModel.php';
|
||||
//$login = urldecode(filter_input(INPUT_SERVER, 'QUERY_STRING'));
|
||||
$login = urldecode($_SERVER['QUERY_STRING']) ?? '';
|
||||
$uid = $_SESSION['uid'] ?? null;
|
||||
@@ -22,6 +22,9 @@ function private_access($uid)
|
||||
return false;
|
||||
}
|
||||
|
||||
$presentsModel = new PresentsModel();
|
||||
$presentsList = $presentsModel->getAllPresents($user->id);
|
||||
|
||||
if (empty($user->id)): ?>
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
@@ -49,7 +52,7 @@ if (empty($user->id)): ?>
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<td style="width: 250px; vertical-align: top;">
|
||||
<?php /*echo showinf_pers($user['id']);*/
|
||||
<?php echo showinf_pers($user['id']);
|
||||
if (!empty($user->married)): ?>
|
||||
<a href="inf.php?<?= $user->married ?>" target=_blank>
|
||||
<img alt="В браке с <?= $user->married ?>" src="i/married.gif"
|
||||
@@ -79,7 +82,7 @@ if (!empty($user->realname)) {
|
||||
?>
|
||||
<p style="font-family: Consolas,monospace;"><?= nl2br($user->info) ?></p>
|
||||
<hr>
|
||||
<?php $user->showPresents(); ?>
|
||||
<?php include_once 'views/presents-list.php'; ?>
|
||||
<?php
|
||||
# Секретный раздел
|
||||
# Если я любой паладин, и смотрю не админа, или я сам админ.
|
||||
|
||||
Reference in New Issue
Block a user