Cleans up html code from models and controllers.

main
Yasen Pramatarov 2024-07-29 16:50:16 +03:00
parent 54ddc6577e
commit c0c072884f
7 changed files with 33 additions and 25 deletions

View File

@ -13,9 +13,11 @@ All notable changes to this project will be documented in this file.
- gitlab: https://gitlab.com/lindeas/jilo-web/-/compare/v0.1.1...HEAD - gitlab: https://gitlab.com/lindeas/jilo-web/-/compare/v0.1.1...HEAD
### Added ### Added
- Added front page widgets - Added collapsible front page widgets
- Added widgets to conferences, participants and components pages
### Changed ### Changed
- MVC design - models(classes folder), views(templates folder) and controllers(pages folder)
### Fixed ### Fixed

View File

@ -10,13 +10,13 @@
- - ~~add bootstrap template~~ - - ~~add bootstrap template~~
- - clean up the code to follow model-view--controller style - - ~~clean up the code to follow model-view--controller style~~
- - no HTML inside PHP code - - ~~no HTML inside PHP code~~
- - put all additional functions in files in a separate folder - - put all additional functions in files in a separate folder
- - reduce try/catch usage, use it only for critical errors - - ~~reduce try/catch usage, use it only for critical errors~~
- - move all SQL code in the model classes, one query per method - - move all SQL code in the model classes, one query per method

View File

@ -1,13 +1,5 @@
<?php ?> <?php
<div> include('templates/widget-config.php');
<p>Jilo web configuration</p> ?>
<ul>
<?php foreach ($config as $config_item=>$config_value) { ?>
<li><?php echo htmlspecialchars($config_item) . ': ' . htmlspecialchars($config_value ?? ''); ?></li>
<?php } ?>
</ul>
</div>

View File

@ -80,7 +80,6 @@ if (!empty($conferences['records'])) {
// display the widget // display the widget
include('templates/widget.php'); include('templates/widget.php');
echo "<br />";
// last 10 conferences // last 10 conferences
try { try {

View File

@ -1,11 +1,5 @@
<?php ?> <?php
<div> include('templates/widget-profile.php');
<p>Profile of <?= $user ?></p> ?>
<ul>
<li>username: <?= $_SESSION['username'] ?></li>
</ul>
</div>

View File

@ -0,0 +1,12 @@
<div>
<p>Jilo web configuration</p>
<ul>
<?php foreach ($config as $config_item=>$config_value) { ?>
<li><?php echo htmlspecialchars($config_item) . ': ' . htmlspecialchars($config_value ?? ''); ?></li>
<?php } ?>
</ul>
</div>

View File

@ -0,0 +1,9 @@
<div>
<p>Profile of <?= $user ?></p>
<ul>
<li>username: <?= $_SESSION['username'] ?></li>
</ul>
</div>