La communauté ALL HTML c'est 58828 membres à ce jour dont 1 inscrits aujourd'hui et 30 depuis une semaine.
Retrouvez les publications relatives à ces discussions dans nos rubriques PHP, SQL.
liste des forums liste des discussions Participer à la discussion
Message publié le jeudi 25 septembre 2008 à 16 h 33 par kitten75. Cordialement {if $ad.SPECIAL}{/if} .exemple{
background: #E6CCFF;
} <table cellspacing="0" class="box2" style="clear:both;">
{foreach item=ad from=$ads}
<tr onmouseout='this.className="alt";' onmouseover='this.className="class1";'>
<!-- ********************* ici probleme je n'arrive pas *********************************** -->
<td>{$ad.IMAGEYESNO}</td>
<td class="pointer"><a href="{$ad.LINK}" title="{$ad.TITLE|escape}">{$ad.TITLE|truncate:35:"...":true}</a><a href="{$ad.LINK}" style="text-decoration:none; color: #000; font: 13px verdana, sans-serif;" class="description">{$ad.DESCRIPTION|truncate:200:"...":true}</a></td>
<!-- ********************* fin *********************************** -->
<!-- ********************* ici c'est bon ca fonctionne *********************************** -->
{if $ad.SPECIAL}<td class="exemple"><a href="{$ad.LINK}" style="text-decoration:none; color: #000; font: 13px verdana, sans-serif; display: block; font-weight:bold;">{if $e.islink}{/if}{$ad.e_2.value|commify:2} Eur</a></td>{/if}
{foreach item=extraval from=$ad.EXTRA_VALUES} {if $ad.SPECIAL}<td class="exemple">{$extraval|truncate:20:"...":true} </td>{/if}{/foreach}
{if $ad.SPECIAL}<td class="exemple"><a href="{$ad.LINK}" style="text-decoration:none; color: #000; font: 13px verdana, sans-serif; display: block;">{$ad.REGDATE}</a></td>{/if}
<!-- ********************* fin *********************************** -->
</tr>
{/foreach}
</table>.box2 {
margin: 5px 0px;
border-top: 5px solid #eeeeee;
background: #fff;
}
.box2 td {
padding: 5px 0px !important;
border-bottom: 1px solid #E5E5EA;
}
.box2 td.category {
background: url("../layout_images/new/folder.gif") 14px 9px no-repeat;
padding-left: 36px !important;
}
.box2 tr.alt td.category {
background: #e7ebf0 url("../layout_images/new/folder.gif") 14px 9px no-repeat;
padding-left: 36px !important;
}
.box2 th {
height: 23px;
padding: 5px 14px !important;
padding: 2px 14px;
white-space: nowrap;
text-align: left;
vertical-align: middle;
color:#848484;
font-size:11px;
font-weight:bold;
padding:5px 3px 3px;
}
.box2 th a {
color:#848484;
font-size:11px;
font-weight:bold;
padding:5px 3px 3px;
}
.box2 th a:hover {
text-decoration: underline;
}
.box2 td a, #content a {
text-decoration: underline;
display: block;
}
.box2 td a strong {
font-size: 110%;
}
.box2 td a:hover, .box td a:hover strong, #content a:hover {
display: block;
}
.box2 tr.alt {
background: #fff;
}
.box2 td.pointer {
background: 14px 10px no-repeat;
padding-left: 0px !important;
border-bottom: 1px solid #E5E5EA;
}
.box2 tr.alt td.pointer {
background: #fff 14px 10px no-repeat;
padding-left: 0px !important;
border-bottom: 1px solid #E5E5EA;
}
.exemple{
background: #E6CCFF;
}
Message publié le jeudi 25 septembre 2008 à 18 h 02 par mdr. <?php
if ($ad == 'valeur annonce premium')
$class = 'maClasse1';
else
$class = 'maClasse2';
// ou aussi avec opérateur ternaire
$class = ($ad == 'valeur annonce premium') ? 'maClasse1' : 'maClasse2';
echo '<td class="'.$class.'">...</td>';
// ....
// ....
?>
Message publié le jeudi 25 septembre 2008 à 18 h 04 par telnes. toujours revenir au debut - http://telnesmaster.free.fr/allhtml/index2.html - http://telnesmaster.free.fr/litetemplate - http://www.hotcontest.org
Message publié le jeudi 25 septembre 2008 à 18 h 20 par kitten75. Cordialement
Message publié le jeudi 25 septembre 2008 à 18 h 27 par kitten75. Cordialement <?php if ($ad == 'valeur annonce premium') $class = 'maClasse1'; else $class = 'maClasse2'; // ou aussi avec opérateur ternaire $class = ($ad == 'valeur annonce premium') ? 'maClasse1' : 'maClasse2'; echo '<td class="'.$class.'">...</td>'; // .... // .... ?>
Message publié le jeudi 25 septembre 2008 à 20 h 10 par kitten75. Cordialement
{if $ad.SPECIAL} <---- si le resultat correspond alors on affiche
<td class="exemple">{mon_image}</td> <---- ceci
{else} <---- ou sinon on affiche
<td>{mon_image}</td> <---- ceci
{/if}
liste des forums liste des discussions Participer à la discussion
Vous devez obligatoirement vous identifier en tant que membre pour participer à cette discussion.