getConnect(); //$this->replace = new Replace; if($_REQUEST['no'] == ""){ // 該当データがない場合 header("Location:" . URL_TOP . "tyis/wn/index.php"); exit; } if($_REQUEST['no'] != ""){ //数字チェック if(!preg_match("/^\d+$/", $_REQUEST['no'])) { header("Location:" . URL_TOP . "tyis/"); exit; } $no = $_REQUEST['no']; $upload_path = BASEDIR . "upimage/".$no."/"; $src_url = URL_TOP . "tyis/upimage/".$no."/"; $row = array(); $prev_no = ""; $next_no = ""; $sql = "SELECT " . "page_no, " . "belong_no, " . "title, " . "sub_title, " . "list_text, " . "link_text, " . "view_date " . "FROM t_page_article " . "WHERE belong_no = '2' "//TYIS . "AND approval = '0' " . "AND delete_flg = '0' " . "AND view_date <= now() " . "AND pagetype_flg = '2'" . "ORDER BY view_date DESC, update_date DESC "; $rows = $db->getAll($sql); //mb_convert_variables('UTF-8', 'EUC-JP', $rows); // 前へ、次へリンク作成 if(is_array($rows)){ $i = 0; foreach($rows as $key=>$val){ $new_rows[$i][$key] = $val; $i++; } foreach($rows as $key => $value){ if($value['page_no'] == $no){ $row = $value; $crt_key = $key; break; } } if(!isset($row['page_no'])){ // 該当データがない場合 header("Location:" . URL_TOP . "tyis/"); exit; } $row['view_date'] = mb_substr($row['view_date'],0,10); $row['view_date'] = str_replace('-', '.', $row['view_date']); $row['view_date_y'] = mb_substr($row['view_date'],0,4); //古いニュース if(isset($rows[($crt_key+1)]['page_no'])){ $prev_link = "/tyis/wn/detail.php?no=" . $rows[($crt_key+1)]['page_no']; } //新しいニュース if(isset($rows[($crt_key-1)]['page_no'])){ $next_link = "/tyis/wn/detail.php?no=" . $rows[($crt_key-1)]['page_no']; } } //記事の年を取得 $sql1 = "SELECT distinct to_char(view_date,'YYYY') as yyyy FROM t_page_article " . "WHERE belong_no = '2' "//TYIS . "AND approval = '0' " . "AND delete_flg = '0' " . "AND view_date <= now() " . "ORDER BY yyyy desc"; $years = $db->getAll($sql1); } $DBSurvey->setDisConnect($db); ?> What's New! - Tokyo YMCA International School

What's New!

Home>What's New!

Accepting Applications 2012-2013 School Year and 2012 Spring Enrollment Program

What's New!

\n"; foreach($years as $key => $value) { echo "
  • {$value['yyyy']}
  • \n"; } echo " \n"; } ?>

    Accredited by Western Assosiation of Schools and Colleges

    Contact us