예제 #1
0
파일: _comment.php 프로젝트: sauger/forbes
<table cellspacing="1">
		<tr class="itable_title">
			<td width="8%">留言人</td><td width="10%">IP</td><td width="15%">标题</td><td width="%10">新闻类别</td><td width="25%">留言内容</td><td width="12%">留言时间</td><td width="10%">操作</td>
		</tr>
		<?php 
$comment = new table_class("fb_comment");
$record = $comment->paginate("all", $conditions, 30);
$category = new category_class('news');
$db = get_db();
$count_record = count($record);
//--------------------
for ($i = 0; $i < $count_record; $i++) {
    $db->query("select short_title,category_id from fb_news where id={$record[$i]->resource_id}");
    if ($db->move_first()) {
        $cat = implode('=>', $category->tree_map_name($db->field_by_name('category_id')));
        $title = $db->field_by_index(0);
    }
    ?>
				<tr class=tr3 id=<?php 
    echo $record[$i]->id;
    ?>
 >
					<td>
						<?php 
    echo $record[$i]->nick_name;
    ?>
					</td>
					<td><?php 
    echo $record[$i]->ip;
    ?>
</td>