/*前台页面*/ function ffcms_param_url(){ $input = input() ; $param = []; $input = array_merge($input,$_REQUEST); //$param['id'] = intval($input['id']); $param['page'] = intval($input['page']) <1 ? 1 : intval($input['page']); $param['ajax'] = intval($input['ajax']); $param['tid'] = intval($input['tid']); $param['mid'] = intval($input['mid']); $param['rid'] = intval($input['rid']); $param['pid'] = intval($input['pid']); $param['sid'] = intval($input['sid']); $param['nid'] = intval($input['nid']); $param['uid'] = intval($input['uid']); $param['level'] = intval($input['level']); $param['score'] = intval($input['score']); $param['limit'] = intval($input['limit']); $param['id'] = htmlspecialchars(urldecode(trim($input['id']))); $param['ids'] = htmlspecialchars(urldecode(trim($input['ids']))); $param['wd'] = htmlspecialchars(urldecode(trim($input['wd']))); $param['en'] = htmlspecialchars(urldecode(trim($input['en']))); $param['state'] = htmlspecialchars(urldecode(trim($input['state']))); $param['area'] = htmlspecialchars(urldecode(trim($input['area']))); $param['year'] = htmlspecialchars(urldecode(trim($input['year']))); $param['lang'] = htmlspecialchars(urldecode(trim($input['lang']))); $param['letter'] = htmlspecialchars(trim($input['letter'])); $param['actor'] = htmlspecialchars(urldecode(trim($input['actor']))); $param['director'] = htmlspecialchars(urldecode(trim($input['director']))); $param['tag'] = htmlspecialchars(urldecode(trim($input['tag']))); $param['class'] = htmlspecialchars(urldecode(trim($input['class']))); $param['order'] = htmlspecialchars(urldecode(trim($input['order']))); $param['by'] = htmlspecialchars(urldecode(trim($input['by']))); $param['file'] = htmlspecialchars(urldecode(trim($input['file']))); $param['name'] = htmlspecialchars(urldecode(trim($input['name']))); $param['url'] = htmlspecialchars(urldecode(trim($input['url']))); $param['type'] = htmlspecialchars(urldecode(trim($input['type']))); $param['sex'] = htmlspecialchars(urldecode(trim($input['sex']))); $param['version'] = htmlspecialchars(urldecode(trim($input['version']))); $param['blood'] = htmlspecialchars(urldecode(trim($input['blood']))); $param['starsign'] = htmlspecialchars(urldecode(trim($input['starsign']))); $param['domain'] = htmlspecialchars(urldecode(trim($input['domain']))); return $param; } function ffcms_get_page($page) { if(empty($page)) { $param = ffcms_param_url(); $page = $param['page']; } return $page; } function ffcms_tpl_fetch($model,$tpl,$def='') { return $model . '/' . ( empty($tpl) ? $def : str_replace('.html','',$tpl) ); } function ffcms_get_order($order,$param) { if(!empty($param['order'])) { $order = $param['order']; } if(!in_array($order, ['asc', 'desc'])) { $order = 'desc'; } return $order; } function ffcms_url_img($url) { if(substr($url,0,4) == 'feifeicms:'){ $protocol = $GLOBALS['config']['upload']['protocol']; if(empty($protocol)){ $protocol = 'http'; } $url = str_replace('feifeicms:', $protocol.':',$url); } elseif(substr($url,0,4) != 'http' && substr($url,0,2) != '//' && substr($url,0,1) != '/'){ if($GLOBALS['config']['upload']['mode']=='remote'){ $url = $GLOBALS['config']['upload']['remoteurl'] . $url; } else{ $url = FFCMS_PATH . $url; } } return $url; } function ffcms_url_content_img($content) { $protocol = $GLOBALS['config']['upload']['protocol']; if(empty($protocol)){ $protocol = 'http'; } return str_replace('feifeicms:',$protocol.':',$content); } function ffcms_url($model,$param=[],$info=[]) { foreach($param as $k=>$v){ if(empty($v)){ unset($param[$k]); } } if(!isset($param['page'])) $param['page']=1; if($param['page'] == 1){ $param['page']=''; } ksort($param); $config = $GLOBALS['config']; $replace_from = ['{id}','{en}','{page}','{type_id}','{type_en}','{type_pid}','{type_pen}','{md5}','{year}','{month}','{day}','{sid}','{nid}']; $replace_to = []; $page_sp = $config['path']['page_sp']; $path = ''; switch ($model) { case 'index/index': if($config['view']['index'] == 2){ $path = 'index'; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } } else{ $url = url($model,$param); if($url=='/PAGELINK.html'){ $url = '/index-PAGELINK.html'; } } break; case 'map/index': if($config['view']['map'] == 2){ $path = 'map'; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } } else{ $url = url($model,$param); } break; case strpos($model,'rss/')!==false: if($config['view']['rss'] == 2){ $path = $model; if($param['page'] !=''){ $path .= $page_sp . $param['page']; } $path .= '.xml'; } else{ $url = url($model,$param,'xml'); } break; case strpos($model,'label/')!==false: if($config['view']['label'] == 2){ $path = $model; } else{ $url = url($model,$param); } break; case 'vod/show': case 'art/show': case 'actor/show': case 'website/show': $id = $config['rewrite']['type_id'] ==1 ? 'type_en' : 'type_id'; if(!empty($info[$id])){ $param['id'] = $info[$id]; } $url = url($model,$param); break; case 'vod/type': $replace_to = [$info['type_id'],$info['type_en'],$param['page'], $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'], ]; if($config['view']['vod_type'] == 2){ $path = $config['path']['vod_type']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['type_id']); } if($param['page'] !=''){ $path .= $page_sp . $param['page']; } } else{ $id = $config['rewrite']['type_id'] ==1 ? 'type_en' : 'type_id'; $url = url($model,['id'=>$info[$id],'page'=>$param['page']]); } break; case 'vod/detail': $replace_to = [$info['vod_id'],$info['vod_en'],'', $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'] ]; if($config['view']['vod_detail'] == 2){ $path = $config['path' ]['vod_detail']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['vod_id']); } } else{ $id = $config['rewrite']['vod_id'] ==1 ? 'vod_en' : 'vod_id'; $url = url($model,['id'=> $info[$id] ]); } $replace_to = array_merge($replace_to,[date('Y',$info['vod_time']),date('m',$info['vod_time']),date('d',$info['vod_time'])]); break; case 'vod/play': $replace_to = [ $info['vod_id'],$info['vod_en'],'', $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'], ]; if($config['view']['vod_play'] >=2){ $path = $config['path' ]['vod_play']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['vod_id']); } if($config['view']['vod_play'] ==2){ $path.= '.'. $config['path']['suffix']; $path .= '?'.$info['vod_id'] . '-' . $param['sid'] . '-' . $param['nid'] ; } elseif($config['view']['vod_play'] ==3){ $path .= $config['path']['page_sp'] . $param['sid'] . $config['path']['page_sp'] . $param['nid'] ; } elseif($config['view']['vod_play'] ==4){ $path .= $config['path']['page_sp'] .''. $param['sid'] . $config['path']['page_sp'] . '1'; $path.= '.'. $config['path']['suffix']; $path .= '?'.$info['vod_id'] . '-' . $param['sid'] . '-' . $param['nid'] ; } } else{ $id = $config['rewrite']['vod_id'] ==1 ? 'vod_en' : 'vod_id'; $url = url($model,['id'=>$info[$id],'sid'=>$param['sid'],'nid'=>$param['nid']]); } $replace_to = array_merge($replace_to,[date('Y',$info['vod_time']),date('m',$info['vod_time']),date('d',$info['vod_time']),$param['sid'],$param['nid']]); break; case 'vod/down': $replace_to = [ $info['vod_id'],$info['vod_en'],'', $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'] ]; if($config['view']['vod_down'] == 2){ $path = $config['path' ]['vod_down']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['vod_id']); } if($config['view']['vod_down'] ==3){ $path .= $config['path']['page_sp'] . $param['sid'] . $config['path']['page_sp'] . $param['nid'] ; } elseif($config['view']['vod_down'] ==4){ $path .= $config['path']['page_sp'] .''. $param['sid'] ; } } else{ $id = $config['rewrite']['vod_id'] ==1 ? 'vod_en' : 'vod_id'; $url = url($model,['id'=>$info[$id],'sid'=>$param['sid'],'nid'=>$param['nid']]); } $replace_to = array_merge($replace_to,[date('Y',$info['vod_time']),date('m',$info['vod_time']),date('d',$info['vod_time']),$param['sid'],$param['nid']]); break; case 'vod/role': $replace_to = [$info['vod_id'],$info['vod_en'],'', $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'] ]; if($config['view']['vod_role'] == 2){ $path = $config['path' ]['vod_role']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['vod_id']); } } else{ $id = $config['rewrite']['vod_id'] ==1 ? 'vod_en' : 'vod_id'; $url = url($model,['id'=>$info[$id]]); } $replace_to = array_merge($replace_to,[date('Y',$info['vod_time']),date('m',$info['vod_time']),date('d',$info['vod_time'])]); break; case 'vod/plot': $replace_to = [ $info['vod_id'],$info['vod_en'],$param['page'], $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'] ]; if($config['view']['vod_plot'] == 2){ $path = $config['path' ]['vod_plot']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['vod_id']); } if($param['page']!=''){ $path .= $page_sp . $param['page']; } } else{ $id = $config['rewrite']['vod_id'] ==1 ? 'vod_en' : 'vod_id'; $url = url($model,['id'=>$info[$id],'page'=>$param['page']]); } $replace_to = array_merge($replace_to,[date('Y',$info['vod_time']),date('m',$info['vod_time']),date('d',$info['vod_time'])]); break; case 'art/type': $replace_to = [$info['type_id'],$info['type_en'],$param['page'], $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'], ]; if($config['view']['art_type'] == 2){ $path = $config['path']['art_type']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['type_id']); } if($param['page']!=''){ $path .= $page_sp . $param['page']; } } else{ $id = $config['rewrite']['type_id'] ==1 ? 'type_en' : 'type_id'; $url = url($model,['id'=>$info[$id],'page'=>$param['page']]); } break; case 'art/detail': $replace_to = [ $info['art_id'],$info['art_en'],'', $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'] ]; if($config['view']['art_detail'] == 2){ $path = $config['path' ]['art_detail']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['art_id']); } if($param['page']>1 || $param['page'] =='PAGELINK'){ $path .= $page_sp . $param['page']; } } else{ $id = $config['rewrite']['art_id'] ==1 ? 'art_en' : 'art_id'; $url = url($model,['id'=>$info[$id],'page'=>$param['page']]); } $replace_to = array_merge($replace_to,[date('Y',$info['art_time']),date('m',$info['art_time']),date('d',$info['art_time'])]); break; case 'topic/index': if($config['view']['topic_index'] == 2){ $path = $config['path' ]['topic_index']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if($param['page']>1 || $param['page'] =='PAGELINK'){ $path .= $page_sp . $param['page']; } } else{ $url = url($model,['page'=>$param['page']]); } break; case 'topic/detail': $replace_to = [$info['topic_id'],$info['topic_en'],'','','','','']; if($config['view']['topic_detail'] == 2){ $path = $config['path' ]['topic_detail']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['topic_id']); } } else{ $id = $config['rewrite']['topic_id'] ==1 ? 'topic_en' : 'topic_id'; $url = url($model,['id'=>$info[$id]]); } break; case 'actor/index': if($config['view']['actor_index'] == 2){ $path = $config['path' ]['actor_index']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if($param['page']>1 || $param['page'] =='PAGELINK'){ $path .= $page_sp . $param['page']; } } else{ $url = url($model,['page'=>$param['page']]); } break; case 'actor/type': $replace_to = [$info['type_id'],$info['type_en'],$param['page'], $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'], ]; if($config['view']['actor_type'] == 2){ $path = $config['path']['actor_type']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['type_id']); } if($param['page']!=''){ $path .= $page_sp . $param['page']; } } else{ $id = $config['rewrite']['type_id'] ==1 ? 'type_en' : 'type_id'; $url = url($model,['id'=>$info[$id],'page'=>$param['page']]); } break; case 'actor/detail': $replace_to = [$info['actor_id'],$info['actor_en'],'','','','','']; if($config['view']['actor_detail'] == 2){ $path = $config['path' ]['actor_detail']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['actor_id']); } } else{ $id = $config['rewrite']['actor_id'] ==1 ? 'actor_en' : 'actor_id'; $url = url($model,['id'=>$info[$id]]); } break; case 'role/index': if($config['view']['role_index'] == 2){ $path = $config['path' ]['role_index']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if($param['page']>1 || $param['page'] =='PAGELINK'){ $path .= $page_sp . $param['page']; } } else{ $url = url($model,['page'=>$param['page']]); } break; case 'role/detail': $replace_to = [$info['role_id'],$info['actor_en'],'','','','','']; if($config['view']['role_detail'] == 2){ $path = $config['path' ]['role_detail']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['role_id']); } } else{ $id = $config['rewrite']['role_id'] ==1 ? 'role_en' : 'role_id'; $url = url($model,['id'=>$info[$id]]); } break; case 'plot/index': if($config['view']['plot_index'] == 2){ $path = $config['path' ]['plot_index']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if($param['page']>1 || $param['page'] =='PAGELINK'){ $path .= $page_sp . $param['page']; } } else{ $url = url($model,['page'=>$param['page']]); } break; case 'plot/detail': $replace_to = [ $info['vod_id'],$info['vod_en'],'', $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'] ]; if($config['view']['plot_detail'] == 2){ $path = $config['path' ]['plot_detail']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['vod_id']); } if($param['page']>1 || $param['page'] =='PAGELINK'){ $path .= $page_sp . $param['page']; } } else{ $id = $config['rewrite']['vod_id'] ==1 ? 'vod_en' : 'vod_id'; $url = url($model,['id'=>$info[$id],'page'=>$param['page']]); } $replace_to = array_merge($replace_to,[date('Y',$info['vod_time']),date('m',$info['vod_time']),date('d',$info['vod_time'])]); break; case 'website/index': if($config['view']['website_index'] == 2){ $path = $config['path' ]['website_index']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if($param['page']>1 || $param['page'] =='PAGELINK'){ $path .= $page_sp . $param['page']; } } else{ $url = url($model,['page'=>$param['page']]); } break; case 'website/type': $replace_to = [$info['type_id'],$info['type_en'],$param['page'], $info['type_id'],$info['type']['type_en'],$info['type_1']['type_id'],$info['type_1']['type_en'], ]; if($config['view']['website_type'] == 2){ $path = $config['path']['website_type']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['type_id']); } if($param['page']!=''){ $path .= $page_sp . $param['page']; } } else{ $id = $config['rewrite']['type_id'] ==1 ? 'type_en' : 'type_id'; $url = url($model,['id'=>$info[$id],'page'=>$param['page']]); } break; case 'website/detail': $replace_to = [$info['website_id'],$info['website_en'],'','','','','']; if($config['view']['website_detail'] == 2){ $path = $config['path' ]['website_detail']; if(substr($path,strlen($path)-1,1)=='/'){ $path .= 'index'; } if(strpos($path,'{md5}')!==false){ $replace_to[] = md5($info['website_id']); } } else{ $id = $config['rewrite']['website_id'] ==1 ? 'website_en' : 'website_id'; $url = url($model,['id'=>$info[$id]]); } break; case 'gbook/index': $url = url($model,['page'=>$param['page']]); break; case 'comment/index': $url = url($model,['page'=>$param['page']]); break; default: $url = url($model,$param); break; } if(!empty($path)) { $path = str_replace($replace_from, $replace_to, $path); $path = str_replace('//', '/', $path); $delimiter = false; if(substr($path,strlen($path)-6) =='/index'){ $delimiter = true; $path = substr($path,0, strlen($path)-5); } if($delimiter==false && strpos($path,'.')===false){ $path.= '.'. $config['path']['suffix']; } $url = $path; if(substr($path,0,1)!='/') { $url = FFCMS_PATH . $path; } } else{ if(ENTRANCE!='index'){ $sto= FFCMS_PATH ; if($config['rewrite']['status']==0){ $sto = FFCMS_PATH .'index.php/'; } if(!empty(IN_FILE)){ $url = str_replace(IN_FILE.'/',$sto,$url); $url = str_replace(ENTRANCE.'/','',$url); } } elseif($config['rewrite']['status']==0 && strpos($url,'index.php')===false){ if(FFCMS_PATH !='/'){ $url = str_replace(FFCMS_PATH,'/',$url); } $url = FFCMS_PATH. 'index.php' . $url; } if($config['rewrite']['suffix_hide']==1){ $url = str_replace('.html','/',$url); if(strpos($model,'/show')===false && strpos($model,'/search')===false) { $url = str_replace(['-/','_/','-.','_.'],'/',$url); } } else{ if(strpos($model,'search')===false && strpos($model,'show')===false ) { $url = str_replace(['-.', '/.'], '.', $url); } } } return $url; } function ffcms_url_page($url,$num) { $url = str_replace(FFCMS_PAGE_SP.'PAGELINK',($num>1 ? FFCMS_PAGE_SP.$num : ''),$url); $url = str_replace('PAGELINK',$num,$url); return $url; } function ffcms_url_create($str,$type='actor',$flag='vod',$ac='search',$sp=' ') { if(!$str){ return '未知'; } $res = []; $str = str_replace(array('/','|',',',',',' '),',',$str); $arr = explode(',',$str); foreach($arr as $k=>$v){ $res[$k] = ''.$v.''.$sp; } return implode('',$res); } function ffcms_url_search($param=[],$flag='vod') { return ffcms_url($flag.'/search',$param); } function ffcms_url_type($info,$param=[],$flag='type') { $tab = 'vod'; if($info['type_mid'] == 1){ } else if($info['type_mid'] == 2) { $tab ='art'; } else if($info['type_mid'] == 8) { $tab ='actor'; } else if($info['type_mid'] == 11) { $tab ='website'; } if(empty($param['id'])){ $param['id'] = $info['type_id']; } return ffcms_url($tab.'/'.$flag,$param,$info); } function ffcms_url_topic_index($param=[]) { return ffcms_url('topic/index',['page'=>$param['page']]); } function ffcms_url_topic_detail($info) { return ffcms_url('topic/detail',[],$info); } function ffcms_url_role_index($param=[]) { return ffcms_url('role/index',['page'=>$param['page']]); } function ffcms_url_role_detail($info) { return ffcms_url('role/detail',[],$info); } function ffcms_url_actor_index($param=[]) { return ffcms_url('actor/index',['page'=>$param['page']]); } function ffcms_url_actor_detail($info) { return ffcms_url('actor/detail',[],$info); } function ffcms_url_actor_search($param) { return ffcms_url('actor/search',$param); } function ffcms_url_plot_index($param=[]) { return ffcms_url('plot/index',['page'=>$param['page']]); } function ffcms_url_plot_detail($info,$param=[]) { return ffcms_url('plot/detail',['page'=>$param['page']],$info); } function ffcms_url_vod_plot($info,$param=[]) { return ffcms_url('vod/plot',$param,$info); } function ffcms_url_website_index($param=[]) { return ffcms_url('website/index',['page'=>$param['page']]); } function ffcms_url_website_detail($info) { return ffcms_url('website/detail',[],$info); } function ffcms_url_website_search($param) { return ffcms_url('website/search',$param); } function ffcms_url_art_index($param=[]) { return ffcms_url('art/index',['page'=>$param['page']]); } function ffcms_url_art_detail($info,$param=[]) { return ffcms_url('art/detail',['page'=>$param['page']],$info); } function ffcms_url_art_search($param) { return ffcms_url('art/search',$param); } function ffcms_url_vod_index($param=[]) { return ffcms_url('vod/index',['page'=>$param['page']]); } function ffcms_url_vod_detail($info) { return ffcms_url('vod/detail',[],$info); } function ffcms_url_vod_search($param) { return ffcms_url('vod/search',$param); } function ffcms_url_vod_play($info,$param=[]) { if($param=='first'){ $sid = intval(key($info['vod_play_list'])); $nid = intval(key($info['vod_play_list'][$sid]['urls'])); if($sid==0 || $nid==0){ return ''; } $param=[]; $param['sid'] = $sid; $param['nid'] = $nid; } if(intval($param['sid'])<1){ $param['sid'] =1; } if(intval($param['nid'])<1){ $param['nid']=1; } return ffcms_url('vod/play',['sid'=>$param['sid'],'nid'=>$param['nid']],$info); } function ffcms_url_vod_down($info,$param=[]) { if($param=='first'){ $sid = intval(key($info['vod_down_list'])); $nid = intval(key($info['vod_down_list'][$sid]['urls'])); if($sid==0 || $nid==0){ return ''; } $param=[]; $param['sid'] = $sid; $param['nid'] = $nid; } if(intval($param['sid'])<1){ $param['sid'] =1; } if(intval($param['nid'])<1){ $param['nid']=1; } return ffcms_url('vod/down',['sid'=>$param['sid'],'nid'=>$param['nid']],$info); } function ffcms_label_website_detail($param) { $where = []; if(is_numeric($param['id'])){ $where['website_id'] = ['eq',$param['id']]; } else{ $where['website_en'] = ['eq',$param['id']]; } $where['website_status'] = ['eq',1]; $res = model('Website')->infoData($where,'*',1); $GLOBALS['type_id'] = $res['info']['type_id']; $GLOBALS['type_pid'] = $res['info']['type']['type_pid']; return $res; } function ffcms_label_actor_detail($param) { $where = []; if(is_numeric($param['id'])){ $where['actor_id'] = ['eq',$param['id']]; } else{ $where['actor_en'] = ['eq',$param['id']]; } $where['actor_status'] = ['eq',1]; $res = model('Actor')->infoData($where,'*',1); $GLOBALS['type_id'] = $res['info']['type_id']; $GLOBALS['type_pid'] = $res['info']['type']['type_pid']; return $res; } function ffcms_label_role_detail($param) { $where = []; if(is_numeric($param['id'])){ $where['role_id'] = ['eq',$param['id']]; } else{ $where['role_en'] = ['eq',$param['id']]; } $where['role_status'] = ['eq',1]; $res = model('Role')->infoData($where,'*',1); return $res; } function ffcms_label_topic_detail($param) { $where = []; if(is_numeric($param['id'])){ $where['topic_id'] = ['eq',$param['id']]; } else{ $where['topic_en'] = ['eq',$param['id']]; } $where['topic_status'] = ['eq',1]; $res = model('Topic')->infoData($where,'*',1); return $res; } function ffcms_label_art_detail($param) { $where = []; if(is_numeric($param['id'])){ $where['art_id'] = ['eq',$param['id']]; } else{ $where['art_en'] = ['eq',$param['id']]; } $where['art_status'] = ['eq',1]; $res = model('Art')->infoData($where,'*',1); if($res['code'] ==1){ if($param['page']>$res['info']['art_page_total']){ $param['page'] = $res['info']['art_page_total']; } } $GLOBALS['type_id'] = $res['info']['type_id']; $GLOBALS['type_pid'] = $res['info']['type']['type_pid']; return $res; } function ffcms_label_vod_detail($param) { $where = []; if(is_numeric($param['id'])){ $where['vod_id'] = ['eq',$param['id']]; } else{ $where['vod_en'] = ['eq',$param['id']]; } $where['vod_status'] = ['eq',1]; $res = model('Vod')->infoData($where,'*',1); $GLOBALS['type_id'] = $res['info']['type_id']; $GLOBALS['type_pid'] = $res['info']['type']['type_pid']; return $res; } function ffcms_label_vod_role($param) { $where = []; $where['role_rid'] = $param['rid']; $where['role_status'] = ['eq',1]; $order='role_sort desc,role_id desc'; $res = model('Role')->listData($where,$order,1,999,0,'*',0,0); return $res; } function ffcms_label_type($param) { $type_info = model('Type')->getCacheInfo($param['id']); $GLOBALS['type_id'] =$type_info['type_id']; $GLOBALS['type_pid'] = $type_info['type_pid']; $parent = model('Type')->getCacheInfo($type_info['type_pid']); $type_info['parent'] = $parent; return $type_info; } function ffcms_data_count($tid=0,$range='all',$flag='vod') { if(!in_array($flag,['vod','art','actor','role','topic','website'])) { $flag='vod'; } if(!in_array($range,['all','today','min'])){ $range='all'; } $data = model('Extend')->dataCount(); $key = 'type_'.$range.'_'.$tid; if($tid>0 && in_array($flag,['vod','art']) ){ } else{ $key = $flag.'_'.$range; } return intval($data[$key]); } function ffcms_get_popedom_filter($group_type,$type_list=[]) { if(empty($type_list)){ $type_list = model('Type')->getCache('type_list'); } $type_keys = array_keys($type_list); $group_type = trim($group_type,','); $group_keys = explode(',',$group_type); $cha_keys = array_diff($type_keys, $group_keys); return implode(',',$cha_keys); } function reset_html_filename($htmlfile) { $htmlpath = './'; if(substr($htmlfile,strlen($htmlfile)-1,1)=='/'){ $htmlfile .= 'index'; } if(strpos($htmlfile,'.') ===false){ $htmlfile .= '.'. $GLOBALS['config']['path']['suffix']; } if(strpos($htmlfile,'?')!==false){ $htmlfile = substr($htmlfile,0,strpos($htmlfile,'?')); } $htmlfile = $htmlpath.$htmlfile; $htmlfile = str_replace('//','/', $htmlfile); if(FFCMS_PATH !='/'){ $htmlfile = str_replace('.'.FFCMS_PATH, './', $htmlfile); } $htmlfile = str_replace('//','/', $htmlfile); return $htmlfile; } System Error

致命错误: Call to undefined function app\common\controller\ffcms_param_url()