include_once("./_common.php");
include_once("$g4[path]/lib/thumb.lib.php");
$g4[title] = "사용후기";
include_once("./_head.php");
$sql_common = " from $g4[yc4_item_ps_table] where is_confirm = '1' ";
$sql_order = " order by is_time desc ";
$sql = " select count(*) as cnt
$sql_common
$sql_search
$sql_order ";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = $config[cf_page_rows];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
?>
|
| 번호 |
상품후기 |
작성자 |
작성일 |
평가점수 |
|
$sql = " select *
$sql_common
$sql_search
$sql_order
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$num = $total_count - ($page - 1) * $rows - $i;
$star = get_star($row[is_score]);
$thumb = new g4_thumb("$g4[path]/data/itemuse", 500);
$is_content = $thumb->run($row[is_content]);
$is_time = substr($row[is_time], 2, 14);
$small_image = $row[it_id]."_s";
$row2 = sql_fetch(" select it_name from $g4[yc4_item_table] where it_id = '$row[it_id]' ");
$it_href = "$g4[shop_path]/item.php?it_id=$row[it_id]";
echo "
| $num |
|
$row[is_name] |
".substr($row[is_time],0,10)." |
 |
$is_content |
|
";
}
if ($i == 0)
echo "| 자료가 없습니다. |
";
?>
=get_paging($config[cf_write_pages], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&page=");?>
include_once("./_tail.php");
?>