Example #1
0
 public function actionNews()
 {
     $articleList = array();
     $articleList = Article::getAllNews();
     require_once ROOT . '/views/index.php';
     return true;
 }
Example #2
0
<?php

include_once ROOT . '/models/Article.php';
$articleList = array();
$articleList = Article::getAllNews();
$counter = 1;
?>

<?php 
include ROOT . '/views/headerAdmin.php';
?>
<body>




<a href="/admin/add" class="button24" style="width: 413px; text-align: center">Добавить публикацию</a>
<a href="/admin/exit" class="button24" style="text-align: center; width: 255px; ">Выход</a>
<form method="post">
<table>
    <tr>
        <th class="title">Заголовок</th>
        <th class="date">Дата публикации</th>
        <th class="del">Удалить</th>
        <th class="edit">Ред.</th>
    </tr>

    <?php 
foreach ($articleList as $article) {
    ?>
    <tr class="<?php