お知らせ
- ホーム
- お知らせ
0) { $max_page++; } $link_1 = "
"; if ($page == 0){ $next = $page + 1; $link_1 .= ">"; }else{ $next = $page + 1; $prev = $page - 1; if ($next != $max_page){ $link_1 .= "< "; $link_1 .= ">"; }else{ $link_1 .= "<"; } } $link_1 .= "
"; $sql = "SELECT id, disp_date, date_format(disp_date, '%Y') AS disp_year, date_format(disp_date, '%m') AS disp_month, date_format(disp_date, '%d') AS disp_day, title, datatype, file_ext, linktext, other_window, icon_ext FROM eplus_eplus_news WHERE e_id = 1 ORDER BY disp_date DESC"; $res = mysql_query($sql); $data['list'] = array(); while($line_n = mysql_fetch_assoc($res)){ $type_file = ""; $type_link = ""; $type_detail = ""; $type_none = ""; $other_window = ""; switch($line_n['datatype']){ case TYPE_FILE: $type_file = "1"; $li_type = " typefile"; if (file_exists("enkakun_plus/efiles/upfiles/" . $line_n['id'] . $line_n['file_ext'])){ //$naiyo = $config_data['SITE_URL'] . $config_data['ENKAKUN_DIR'] . "upfiles/" . $line_n['id'] . $line_n['file_ext']; $naiyo = "http://" . $domain . "enkakun_plus/efiles/upfiles/" . $line_n['id'] . $line_n['file_ext']; }else{ $naiyo = ""; } break; case TYPE_LINK: $type_link = "1"; $li_type = " typelink"; $naiyo = toDisplayChar($line_n['linktext']); $target = ($line_n['other_window'] == "1")? "_blank": "_self"; break; case TYPE_DETAIL: $type_detail = "1"; $li_type = " typedetail"; $naiyo = "http://" . $domain . "enkakun_plus/efiles/detail/" . $line_n['id'] . ".html"; break; default: $type_none = "1"; $li_type = " typenone"; break; } if (file_exists("../../enkakun_plus/efiles/icon/" . $line_n['id'] . $line_n['icon_ext'])){ //$naiyo = $config_data['SITE_URL'] . $config_data['ENKAKUN_DIR'] . "upfiles/" . $line_n['id'] . $line_n['file_ext']; $icon = "http://" . $domain . "enkakun_plus/efiles/icon/" . $line_n['id'] . $line_n['icon_ext']; }else{ $icon = ""; } $mk = mktime(0, 0, 0, $line_n['disp_month'], $line_n['disp_day'], $line_n['disp_year']); $disp_date = date("Y.m.d", $mk); $data['num'] = $id; array_push($data['list'], array("id" => $line_n['id'], "title" => mb_convert_encoding(toDisplayChar($line_n['title']), $charset), "disp_date" => mb_convert_encoding($disp_date, $charset), "li_class" => $li_class, "type_file" => $type_file, "type_link" => $type_link, "type_detail" => $type_detail, "type_none" => $type_none, "naiyo" => $naiyo, "target" => $target, "li_odd" => $li_odd, "li_row" => $li_row, "li_type" => $li_type, "icon" => $icon)); } $list_1 = htmltemplate::t_buffer("template/news.html", $data); ?>