Exemple #1
0
$title = "Connection";
$keywords = "Computer science, Architecture, Java, Linux";
$description = "Website of computer sciences news and articles";
include "header.php";
$page_title = "C là qu'on parle aussi bien des Pythons que des Perl";
?>


<?php 
include "leftIndex.php";
?>

<?php 
include_once "control/ArticleControls.php";
$firstArticle = new ArticleControls();
$firstArticle->print_Article();
?>
										<div class="box">
						<h2>
							<?php 
echo $firstArticle->getArticle()->News_title;
?>
						</h2>
						<img src="images/pic01.jpg" width="150" height="150" alt="" class="left" />
						<p>
						<?php 
echo $firstArticle->getArticle()->News_content;
?>
							
	
									</p>
Exemple #2
0
		
<?php 
include "leftIndex.php";
include_once "control/ArticleControls.php";
$cat_id = $_GET["cat_id"];
?>
			
					<div class="box">
						<h2>
							Liste des articles
						</h2>
						<img src="images/News.jpg" width="150" height="150" alt="" class="left" />
						<p>
							<?php 
$object = new ArticleControls();
$list = $object->print_Article($cat_id);
if ($list) {
    echo "<ul>";
    foreach ($list as $article) {
        echo '<li><a href="news.php?art_id=' . $article->News_id . '">' . $article->News_title . '</a></li><br/>';
        echo '<p>' . $article->News_sumup . '</p><br/>';
    }
    echo "<li></li></ul>";
} else {
    ?>
								<h3>
								Pas encore d'article dans cette section
								</h3>
								
							<?php 
}