//------------------------------------------------
// require
require "./staffonly/common.php";
//------------------------------------------------
// init
$i = 0;
$ymdhi = gmdate( "YmdHi", time() + 60 * 60 * 9 );
$index_template = "";
$loop_part = "";
$loop_part_wk = "";
$loop_part_re = "";
$array_wk = array();
$data_array = array();
$data_photo = "";
$data_photo_wk = "";
global $site_image;
$data_photo .= <<<_HTML
|
|
|
_HTML;
//----------------------------
// read data
$data_array = read_datafile_all( TEXTDIR );
//----------------------------
// read template
$index_template = join( "", file( "./tpl_temp.html" ));
$index_template = mb_convert_encoding( $index_template, "EUC-JP", "SJIS" );
//----------------------------
// roop part extract
$array_wk = explode( "", $index_template );
$loop_part = $array_wk[1];
$index_template = str_replace( $loop_part, "", $index_template );
//----------------------------
// news
for( $i=0; $i";
$data_photo_wk = str_replace( "", $photo, $data_photo_wk );
}
$loop_part_wk = "";
$loop_part_wk = $loop_part;
$loop_part_wk = str_replace( "", $data_array[$i][title], $loop_part_wk );
$loop_part_wk = str_replace( "", $site_image[$data_array[$i][site]], $loop_part_wk );
$loop_part_wk = str_replace( "", $data_photo_wk, $loop_part_wk );
$loop_part_wk = str_replace( "", sptag_replace( $data_array[$i][text] ), $loop_part_wk );
$loop_part_re .= $loop_part_wk;
}
//----------------------------
// replace
$index_template = str_replace( "charset=shift_jis", "charset=EUC-JP", $index_template );
$index_template = str_replace( "", $loop_part_re, $index_template );
//----------------------------
// show
echo "$index_template";
?>