示例#1
0
 //echo "<span class=\"glyphicon glyphicon-th-list\"></span> ";
 $href = mw_seo_url($bo_table, $row['wr_id']);
 echo "<a href=\"{$href}\">";
 echo "<div class=\"item\">";
 //echo "[{$board['bo_subject']}] ";
 echo "{$row['subject']}";
 if ($row['wr_comment']) {
     echo "&nbsp;<span class=\"comment\">+{$row['wr_comment']}</span>";
 }
 echo "</div>\n";
 echo "</a>";
 if (($i + 1) % $block == 0) {
     if ($is_img) {
         echo "<div class=\"thumb\">";
         for ($j = floor($i / $block) * 3, $m = count($file) / ($rows / $block) * (($i + 1) / $block); $j < $m; ++$j) {
             $file[$j][subject] = mw_builder_reg_str($file[$j][subject]);
             $href = mw_seo_url($bo_table, $file[$j]['wr_id']);
             echo "<div class='img'><a href=\"{$href}\"><img src=\"{$file[$j]['path']}\" alt=\"\"></a>";
             echo "<div class='cap'>{$file[$j]['subject']}";
             if ($file[$j]['wr_comment']) {
                 echo "&nbsp;<span class=\"comment\">+{$file[$j]['wr_comment']}</span>";
             }
             echo "</div></div>";
         }
         echo "</div>";
     }
     if ($page % ($rows / $block) == 0) {
         $bo_count++;
     }
     if ($page < $count * ($rows / $block)) {
         echo "</div>";
示例#2
0
}
// 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows;
// 시작 열을 구함
$sql = "select *\n        {$sql_common}\n        {$sql_search}\n        {$sql_order}\n        limit {$from_record}, {$rows} ";
$qry = sql_query($sql);
$list = array();
for ($i = 0; $row = sql_fetch_array($qry); ++$i) {
    $list[$i] = mw_moa_row($row);
    $row2 = sql_fetch("select wr_subject from {$g4['write_prefix']}{$row['bo_table']} where wr_id = '{$row['wr_parent']}'", false);
    if (!$row2) {
        $list[$i]['msg'] = "삭제되었습니다.";
    }
    $list[$i]['subject'] = conv_subject($row2['wr_subject'], 30, "…");
    if (function_exists("mw_builder_reg_str")) {
        $list[$i]['subject'] = mw_builder_reg_str($list[$i]['subject']);
    } else {
        if ($member['mb_id']) {
            $list[$i]['subject'] = str_replace("{닉네임}", $member['mb_nick'], $list[$i]['subject']);
            $list[$i]['subject'] = str_replace("{별명}", $member['mb_nick'], $list[$i]['subject']);
        } else {
            $list[$i]['subject'] = str_replace("{닉네임}", "회원", $list[$i]['subject']);
            $list[$i]['subject'] = str_replace("{별명}", "회원", $list[$i]['subject']);
        }
    }
    $board = sql_fetch("select bo_subject from {$g4['board_table']} where bo_table = '{$row['bo_table']}' ");
    $list[$i]['msg'] = preg_replace("/^/", "<span class='board'>{$board['bo_subject']}</span> 게시판에 ", $list[$i]['msg']);
    $list[$i]['msg'] = preg_replace("/게시물에/", "게시물 '<span class='subject'>{$list[$i]['subject']}</span>' 에", $list[$i]['msg']);
}
$list_count = count($list);
$write_pages = get_paging(10, $page, $total_page, "{$_SERVER['PHP_SELF']}?is_mobile={$_GET['is_mobile']}&page=");