1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <?php
class Article {
private $image,$nom,$montant,$href;
public function __construct($href,$image,$nom,$montant) {
this->href=$href;
this->image=$image;
this->montant=$montant;
this->nom=$nom;
}
public function afficherArticle() {
echo "<div class=\"homecat-box\" style=\"background:transparent url(images//bg-homecat-box.png) no-repeat scroll 0 0;
clear:both;
height:201px;
margin-bottom:20px;
overflow:hidden;
padding:0 0 5px 10px;\">"
+"<dl>"
+"<dt>"
+"<a href=\""+$href+"\">"
+"<img src=\""+$image+"\"//>"
+"<//a>"
+"</dt>"
+"<dd>"
+"<strong>"+$nom+"</strong>"
+"</dd>"
+"<dt class=\"name\"/>"
+"<a href=\""+$href+"\"">"+$nom+"<//a>"
+"<//dt>"
+"<dd class=\"amount\">"+$montant+"<//dd>"
+"<//dl>"
+"<//div>";}
}?> |