<?php namespace Akademija\ActiveRecord; include_once 'Theme.php'; include_once 'Themes.php'; include_once 'Comment.php'; include_once 'dbConnection.php'; $db = new dbConnection('localhost', 'root', '', 'akademija-nd'); $db = $db->connect(); $themes = new Themes(); $themes->setDatabaseConnection($db); $themes->loadAll(); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Active record</title> </head> <body> <?php foreach ($themes as $theme) { echo '<b>Tema:</b> ' . $theme->getTitle() . '<br> <b>Data:</b> ' . $theme->getDate() . '<br> <b>Komentaru skaicius:</b> ' . $theme->getCommentCount() . '<br><br>'; echo ' <form action="Add.php" method="POST" enctype="multipart/form-data"> <input type="hidden" name="themeId" value="' . $theme->getId() . '"> Vardas:<br> <input name="author" type="text" value="" size="30"/><br>