template_dir = "../lib/templates"; $smarty->compile_dir = "../lib/templates_c"; $smarty->cache_dir = "../lib/cache"; //テンプレートがsjisの場合変換 function pre01($buff, &$smarty) { return mb_convert_encoding($buff,"EUC-JP","SJIS"); } function post01($buff, &$smarty) { return mb_convert_encoding($buff,"SJIS","EUC-JP"); } $smarty->register_prefilter('pre01'); $smarty->register_postfilter('post01'); list($data,$links)=make_page_link($cdata,10); //変数アサイン $smarty->assign(parentcate,$parentcate); $smarty->assign(parentno,$parentno); $smarty->assign(cate,$cate); $smarty->assign(cateinfo,$cateinfo); $smarty->assign(data,$data); $smarty->assign(links,$links[all]); //テンプレート表示 $smarty->display("gallery.tpl"); ?>