【发布时间】:2014-05-11 14:40:51
【问题描述】:
我想改变这个表的 div 的颜色(数据库中所有 status = no 的记录),这意味着未读消息应该有不同的 div 类。我不知道该怎么做,我使用 codeigniter 作为我的框架
我的看法
<div class="row">
<div class="span10 box" style="padding: 10px;">
<?php echo form_open('admin/messages'); ?><!-- start of the form -->
<p>Recent Messages</p>
<table class="table hovered">
<thead>
<tr class="selected">
<th class="text-left">Name</th>
<th class="text-left">Email</th>
<th class="text-left">Phone</th>
<th class="text-left">Message</th>
</tr>
</thead>
<tbody>
<?php
if(isset($records)) :
foreach($records as $row) :
?>
<tr>
<td class="right"><?php echo $row->contactus_name; ?></td>
<td class="right"><?php echo $row->contactus_email; ?></td>
<td class="right"><?php echo $row->contactus_phone; ?></td>
<td class="right tertiary-text-secondary text-justify"><?php echo $row->contactus_comment; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
<tfoot></tfoot>
</table>
<?php else : ?>
<p>No records</p>
<?php endif; ?>
</div>
<div class="span3">
<nav class="sidebar dark">
<ul>
<li>
<a href="#">
<i class="icon-home"></i>
Inbox <strong>
<?php if(isset($count)){echo '<div class="brand"><div class="badge bg-red">'.$count.'</div></div>';}?>
</strong>
</a>
</li>
<li>
<a href="#">
<i class="icon-home"></i>
Send
</a>
</li>
<li>
<a href="#">
<i class="icon-home"></i>
Newsletter/Ad
</a>
</li>
</ul>
</nav>
</div>
<?php echo form_close(); ?><!-- END of the form -->
</div>
【问题讨论】:
标签: php jquery html css codeigniter