I need a help badly for one of our website's coding.
There are queries like "trfBuyLink" "trfBuylink2" "trfBuylink3" and "trfBuyLink4" in our database. I don't want to see any link or button generated if one of these queries are empty. Here the current code, i need help badly :( thanks.
<?php if ($rowTarife['trfBuyLink']['trfBuyLink2']['trfBuyLink3']['trfBuyLink4'] != ""): ?>
<a href="#" data-toggle="modal" data-target="#modal<?php echo $rowTarife['trfId']; ?>" class="link-button btn" style="width:120px;margin-top:10px;background: url('<?php echo $configArray['imgUrl']."/".$defTarifeColors[$rowTarife['trfColor']]['filename']."-small.png" ;?>') repeat-x;"><?php echo _lang("HEMEN_AL"); ?></a>
<div class="modal fade" id="modal<?php echo $rowTarife['trfId']; ?>" tabindex="-1" role="dialog" aria-labelledby="modal<?php echo $rowTarife['trfId']; ?>Label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body" style="">
<a href="<?php echo $rowTarife['trfBuyLink']?>" target="_blank" class="link-button btn" style="width:320px;font-weight:bold;margin-top:10px;background: url('<?php echo $configArray['imgUrl']."/red-dark-small.png" ;?>') repeat-x;"><?php echo _lang("TELEKOM_MUSTERISIYIM"); ?></a><br />
<a href="<?php echo $rowTarife['trfBuyLink2']?>" target="_blank" class="link-button btn" style="width:320px;font-weight:bold;margin-top:10px;background: url('<?php echo $configArray['imgUrl']."/blue-dark-small.png" ;?>') repeat-x;"><?php echo _lang("TELEKOM_MUSTERISI_DEGILIM"); ?></a><br />
<a href="<?php echo $rowTarife['trfBuyLink3']?>" target="_blank" class="link-button btn" style="width:320px;font-weight:bold;margin-top:10px;background: url('<?php echo $configArray['imgUrl']."/red-dark-small.png" ;?>') repeat-x;"><?php echo _lang("TELEKOM_MUSTERISIYIM_FATURALI"); ?></a><br />
<a href="<?php echo $rowTarife['trfBuyLink4']?>" target="_blank" class="link-button btn" style="width:320px;font-weight:bold;margin-top:10px;background: url('<?php echo $configArray['imgUrl']."/blue-dark-small.png" ;?>') repeat-x;"><?php echo _lang("TELEKOM_MUSTERISI_DEGILIM_FATURALI"); ?></a>
</div>
</div>
</div>
</div>
<?php elseif ($rowTarife['trfBuyLink'] != ""): ?>
<a href="<?php echo $rowTarife['trfBuyLink']?>" target="_blank" class="link-button btn" style="width:120px;margin-top:10px;background: url('<?php echo $configArray['imgUrl']."/".$defTarifeColors[$rowTarife['trfColor']]['filename']."-small.png" ;?>') repeat-x;"><?php echo _lang("HEMEN_AL"); ?></a>
<?php endif; ?>
Aucun commentaire:
Enregistrer un commentaire