?php /** */ //if(!file_exists("../data/install.lock") || !file_exists("../data/confing.php")){header("location:../install/index.php"); exit();} define('CMS', true); require_once('../includes/init.php'); require_once('../includes/fun.php'); require_once('../includes/lib.php'); $id = isset($_GET['id']) ? intval($_GET['id']) : ''; if(empty($id)){header('location:../index.php');} if(!$mysql -> fetch_rows("select id from ".DB_PRE."maintb where id={$id}")){header('location:../index.php');}//?????? $cate=$mysql->get_row("select category from ".DB_PRE."maintb where id={$id}");//?????? $cat_id=$cateid=$cate;//??id? $parent_id=get_cate_last_parent($cat_id);//???????? $cate_info=get_cate_info($cate,$category);//?????? $lang=$cate_info['lang'];//?????????? if(file_exists(DATA_PATH.'cache_cate/cate_list_'.$lang.'.php')){include(DATA_PATH.'cache_cate/cate_list_'.$lang.'.php');}//???????? if(file_exists(LANG_PATH.'lang_'.$lang.'.php')){include(LANG_PATH.'lang_'.$lang.'.php');}//?????,??$language $_confing=get_confing($lang);//???????? $channel_info=get_cate_info($cate_info['cate_channel'],$channel);//???????? $channel_table=$channel_info['channel_table'];//????? $content=get_content($id,$channel_info['channel_table'],$cate_info['id']);//???? $content=$content[0]; //???????????????? $key_arr = empty($content['keywords'])?'':explode(',',$content['keywords']); $relave_key = $key_arr[0]; $view_is=isset($_SESSION['member_purview'])?$_SESSION['member_purview']:'';//???? if($content['purview']!=$view_is&&$content['purview']){die($language['msg_info7']."?back?");} if($content['verify']){die($language['msg_info8']."?Back?");} $tpl->template_dir=TP_PATH.$_confing['web_template'].'/';//???? $tpl->template_lang=$lang;//?? $cache_time=$content['cache_time']?$content['cache_time']:$_confing['cache_time'];//???? //???????? if($_confing['is_cache']){ $tpl->template_is_cache=1;//?? $tpl->template_time=$cache_time?$cache_time:30;//??????????????30? }else{ $tpl->template_is_cache=0; } $page=empty($page)?1:intval($page); //????,????????? $body_content=$content['content']; $content_arr=preg_split('/
\s* <\/span><\/div>/i',$body_content); $content_arr_num=count($content_arr); $content_arr_num=($content_arr_num>1)?$content_arr_num:0; if($content_arr_num){ for($i=0;$i<$content_arr_num;$i++){ if($page==($i+1)){ $content_focus=$i; $content['content']=$content_arr[$i]; $content['title']=$content['title'].'('.($i+1).')'; $content['style_title']=$content['style_title'].'('.($i+1).')'; $tpl_rel=explode('.',$cate_info['cate_tpl_content']); $tpl->display($tpl_rel[0]);//?????? } } }else{ $tpl_rel=explode('.',$cate_info['cate_tpl_content']); $tpl->display($tpl_rel[0]);//?????? } ?>