Skip to content

Instantly share code, notes, and snippets.

@devloe
Created April 13, 2013 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devloe/5379336 to your computer and use it in GitHub Desktop.
Save devloe/5379336 to your computer and use it in GitHub Desktop.
<div class="wrapper">
<ul class="banners_home">
<?
$banner_query = mysql_query('select id,`title_'.$lc.'`,`content_'.$lc.'`,`image_'.$lc.'`,`link_'.$lc.'`,`type` from ' . TBL_BANNERS .' where `situation`=2 and `status`=1 order by `order` ASC');
while($banner = mysql_fetch_array($banner_query)){
if($banner['link_'.$lc] != '') { ?>
<? if($banner['type'] == 1) { $target = 'target="_blank"'; } else { $target = 'target="_self"'; } ?>
<li>
<a href="<?=$banner['link_'.$lc]?>">
<? } ?>
<div class="pic"><img src="<?=URL_BASE.IMGBAN_DIR.$banner['image_'.$lc]?>" alt="<?=$banner['title_'.$lc]?>" /></div>
<div class="text">
<div class="content"><span class="title"><?=$banner['title_'.$lc]?></span><?=$banner['content_'.$lc]?><span class="btn">[Leer mรกs]</span></div>
<div class="bg"></div>
</div>
<div class="border-top"></div>
<div class="border-bottom"></div>
</a>
</li>
<? if($banner['link_'.$lc] != '') { ?></a><? }
} ?>
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment