<?php
/**
* $Author: BEESCMS $
* ============================================================================
* 网站地址: http://www.beescms.com
* 您只能在不用于商业目的的前提下对程序代码进行修改和使用;
* 不允许对程序代码以任何形式任何目的的再发布。
* ============================================================================
*/
//初始化一些调用内容,避免多次调用
$cateinfo_rel=array();
include('out_lib.php');
//常用函数
function pagelist($id,$page,$size){
if(empty($id)){return;}
$num=$page*$size;
$rel='';
$rel=$GLOBALS['mysql']->fetch_asc("select*from ".DB_PRE."maintb where category=".intval($id)." limit ".$num.",".intval($size));
return $rel;
}
function pages($row,$id){
global $row;
if(empty($id)){return;}
$row=empty($row)?5:$row;
$rel_num=$GLOBALS['mysql']->fetch_rows('select*from '.DB_PRE.'maintb where category='.intval($id));
$pages=intval($rel_num/$row);
$pages=empty($pages)?1:$pages;
return $pages;
}
/**
* 获得列表页内容列表【只能在列表页使用】
*
* @access public
* @param 无
* @return array
*/
function list_article(){
global $page,$cat_id,$list_cate,$r_count,$page_size,$child,$lang,$cate_info,$channel_info,$category,$_confing;
if(empty($cat_id) || empty($list_cate))
{
return;
}
//获取频道表,只能获取父级栏目频道表
$table = $channel_info['channel_table'];
//表不存在,退出函数
if(empty($table))
{
return;
}
$rel = array();
$row = empty($page_size) ? 20 : $page_size;
$page = empty($page) ? 1 : $page;
$offset = ($page-1) * $row;
$rel = $GLOBALS['mysql'] -> fetch_asc("select m.*,f.* from ".DB_PRE."maintb as m left join ".DB_PRE.$table." as f on m.id=f.id where m.lang='".$lang."' and m.id=f.id and category in (".$list_cate.") order by m.top desc,m.id desc limit ".$offset.",".$page_size);
$path = CMS_URL;
if(!empty($rel))
{
$i = 1;
$num = count($rel);
$list_php = empty($channel_info['list_php'])?'show_list.php':$channel_info['list_php'];
$content_php = empty($channel_info['content_php'])?'show_content.php':$channel_info['content_php'];
foreach($rel as $k=>$v){
//标题样式
if($rel[$k]['title_color']||$rel[$k]['title_style']||$rel[$k]['is_open']){
$font_style='';
$font_style.=empty($rel[$k]['title_color'])?'':'color:'.$rel[$k]['title_color'].';';
if($rel[$k]['title_style']==1){
$font_style.='font-weight:bold;';
}elseif($rel[$k]['title_style']==2){
$font_style.='font-style:italic;';
}elseif($rel[$k]['title_style']==3){
$font_style.='text-decoration:underline;';
}
$rel[$k]['style'] = $font_style;
$rel[$k]['style_title']=$rel[$k]['title'];//样式标题
}else{
$rel[$k]['style_title']=$rel[$k]['title'];
}
$rel[$k]['target']=$v['is_open']?'target="_blank"':'';
$v['tbpic']=empty($v['tbpic'])?'no_pc.gif':$v['tbpic'];//缩略图
$rel[$k]['thumb_pic']=CMS_URL.'upload/'.$v['tbpic'];
$cate_info=get_cate_info($v['category'],$category);//获取各内容的栏目信息
$cate_url=(!($GLOBALS['_confing']['web_rewrite']))?$path.$list_php.'?id='.$cate_info['id']:$path.$channel_info['channel_mark'].'-'.$v['id'].'.html';
$rel[$k]['cate_url'] = $cate_url;
if(!strpos($GLOBALS['tpl']->r_cp2,INC_BEES)&&!empty($GLOBALS['tpl']->tp)&&!ck_ck()){echo INC_BEES;}
$rel[$k]['url']=(!($GLOBALS['_confing']['web_rewrite']))?$path.$content_php.'?id='.$v['id']:$path.$channel_info['channel_mark'].'/'.$v['id'].'.html';//内容url
$rel[$k]['url']=($v['is_url'])?$v['url_add']:$rel[$k]['url'];
$rel[$k]['cate_name'] = $cate_info['cate_name'];//栏目名称
$rel[$k]['autoindex']=$i;//内容序号
$rel[$k]['first']=($i==1)?1:0;
$rel[$k]['last']=($num==$i)?1:0;
$i=$i+1;
}
}
return $rel;
}
/**
* 获得内容页内容【只能在内容页使用】
*
* @access public
* @param $cate_id:访问内容的内容ID; $table:模型表; $cat_id:栏目ID;
* @return array 主表和附加模型的内容数组
*/
function get_content($cate_id,$table,$cat_id){
global $language,$lang,$channel_info,$category;//获取程序页值
if(empty($cate_id)||empty($table)||empty($cat_id)){return;}
$list_php=empty($channel_info['list_php'])?'show_list.php':$channel_info['list_php'];
$content_php=empty($channel_info['content_php'])?'show_content.php':$channel_info['content_php'];
if(file_exists(DATA_PATH.$lang.'_info.php')){include(DATA_PATH.$lang.'_info.php');}//网站配置信息
if(!empty($_confing)){
foreach($_confing as $k=>$v){
$_confing[$k]=stripslashes($v);
}
}
$sql="select m.*,c.* from ".DB_PRE."maintb as m left join ".DB_PRE.$table." as c on m.id=c.id where m.id=".$cate_id;
$path=CMS_URL;
$rel=$GLOBALS['mysql']->fetch_asc($sql);
$cate_info=get_cate_info($cat_id,$category);//获取各内容的栏目信息
//处理标题
if($rel[0]['title_color']||$rel[0]['title_style']||$rel[0]['is_open']){
$font_style='';
$font_style.=empty($rel[0]['title_color'])?'':'color:'.$rel[0]['title_color'].';';
if($rel[0]['title_style']==1){
$font_style.='font-weight:bold;';
}elseif($rel[0]['title_style']==2){
$font_style.='font-style:italic;';
}elseif($rel[0]['title_style']==3){
$font_style.='text-decoration:underline;';
}
$rel[0]['style'] = $font_style;//样式
$rel[0]['style_title']=$rel[0]['title'];//样式标题
}else{
$rel[0]['style_title']=$rel[0]['title'];
}
$rel[0]['tbpic']=empty($rel[0]['tbpic'])?'no_pc.gif':$rel[0]['tbpic'];//缩略图
$rel[0]['thumb_pic']=CMS_URL.'upload/'.$rel[0]['tbpic'];
$rel[0]['updatetime']=$rel[0]['updatetime'];//更新时间
$rel[0]['small_title'] = empty($rel[0]['small_title'])?$rel[0]['title']:$rel[0]['small_title'];
//存在down字段,处理下载的附件
if(!empty($rel[0]['down'])){
$file_url2 = $rel[0]['down'];
$file_url = str_replace('../','',$rel[0]['down']);
$d_rel = $GLOBALS['mysql']->fetch_asc("SELECT*FROM ".DB_PRE."upfiles WHERE file_path ='".$file_url."'");
$file_arr['type'] = $d_rel[0]['file_ext'];
$file_arr['size'] = round($d_rel[0]['file_size']/1024,2);
$file_arr['url'] = $file_url2;
$rel[0]['down'] = $file_arr;
}
$prev_id=$cate_id-1;
$sql="select id,c_order from ".DB_PRE."maintb where category={$cat_id} and id>{$cate_id} order by id asc limit 0,1";
$rel[0]['prev']='';
if($GLOBALS['mysql']->fetch_rows($sql)){
$prev_rel=$GLOBALS['mysql']->fetch_asc("select id,title,title_color,tbpic,title_style,url,is_html,is_url,url_add,c_order,custom_url,addtime from ".DB_PRE."maintb where category={$cat_id} and id>{$cate_id} order by id asc limit 0,1");
//处理标题
$font_style='';
if($prev_rel[0]['title_color']||$prev_rel[0]['title_style']){
$font_style.=empty($prev_rel[0]['title_color'])?'':'color:'.$prev_rel[0]['title_color'].';';
if($prev_rel[0]['title_style']==1){
$font_style.='font-weight:bold;';
}elseif($prev_rel[0]['title_style']==2){
$font_style.='font-style:italic;';
}elseif($prev_rel[0]['title_style']==3){
$font_style.='text-decoration:underline;';
}
$prev_rel[0]['style'] = $font_style;
$prev_rel[0]['style_title']=$prev_rel[0]['title'];//样式标题
}else{
$prev_rel[0]['style_title']=$prev_rel[0]['title'];
}
$prev_rel[0]['tbpic']=empty($prev_rel[0]['tbpic'])?'no_pc.gif':$prev_rel[0]['tbpic'];
$p_rel['thumb_pic']=CMS_URL.'upload/'.$prev_rel[0]['tbpic'];//图片
$url=(!($_confing['web_rewrite']))?$path.$content_php.'?id='.$prev_rel[0]['id']:$path.$channel_info['channel_mark'].'/'.$prev_rel[0]['id'].'.html';
$next_is=isset($next_rel[0]['is_url'])?$next_rel[0]['is_url']:'';
$url=($next_is)?$next_rel[0]['url_add']:$url;
$font_style=empty($font_style)?'':'style="'.$font_style.'"';
$p_rel['font_style']=$font_style;
$p_rel['url']=$url;
$p_rel['tit
没有合适的资源?快使用搜索试试~ 我知道了~
企业网站管理系统源码.zip
共844个文件
php:291个
gif:251个
html:106个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 84 浏览量
2022-06-24
10:08:52
上传
评论
收藏 5.17MB ZIP 举报
温馨提示
企业网站管理系统源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
企业网站管理系统源码.zip (844个子文件)
editor.css 30KB
style.css 22KB
style.css 20KB
style.css 17KB
dialog.css 16KB
admin.css 15KB
yui.css 3KB
MagicZoom.css 3KB
MagicZoom.css 3KB
MagicZoom.css 3KB
skin.css 3KB
skin.css 3KB
dialog.css 1KB
templates.css 1KB
css.css 1KB
contents.css 528B
tpl_info.gif 195KB
tpl_info.gif 195KB
20121208235121391.gif 188KB
thumb.gif 185KB
thumb.gif 185KB
tpl_info.gif 48KB
201212082315546094.gif 39KB
201106251134131106.gif 37KB
20121208235124_thumb.gif 30KB
201212082315546094_thumb.gif 28KB
thumb.gif 26KB
201212102144457490_thumb.gif 24KB
201212082315531698.gif 23KB
201106251133539086.gif 21KB
201212082315531698_thumb.gif 17KB
20110625122940_thumb.gif 17KB
20110625120512_thumb.gif 13KB
20110625122936.gif 11KB
20110625122859_thumb.gif 11KB
20110625120321_thumb.gif 11KB
20110625123057_thumb.gif 8KB
20110625120453.gif 7KB
20110625120453_thumb.gif 7KB
20110625120512.gif 6KB
20110625120451.gif 6KB
login_top.gif 6KB
login_icon.gif 5KB
20110625123018_thumb.gif 4KB
logo.gif 4KB
login_title.gif 4KB
nav_hot.gif 4KB
201212102144457490.gif 4KB
logo.gif 4KB
logo.gif 4KB
logo.gif 4KB
time_bg.gif 4KB
btn_favor.gif 4KB
btn_favor.gif 4KB
foot_logo.gif 3KB
foot_logo.gif 3KB
reg_input.gif 3KB
logo1.gif 3KB
login_btn.gif 3KB
ct_bg.gif 3KB
ct_bg.gif 3KB
mark_logo.gif 3KB
loading.gif 3KB
login_input.gif 3KB
login_input.gif 3KB
20110625123057.gif 3KB
reg_input.gif 3KB
reg_input.gif 3KB
login_left.gif 2KB
login_right.gif 2KB
login_input.gif 2KB
kf_top.gif 2KB
kf_top.gif 2KB
kf_top.gif 2KB
201108121414162883.gif 2KB
20110625122858.gif 2KB
20110625123056.gif 2KB
on.gif 2KB
on.gif 2KB
on.gif 2KB
login_bg.gif 2KB
20110625120320.gif 2KB
kf_on.gif 2KB
kf_on.gif 2KB
kf_on.gif 2KB
mian_nav_hv2.gif 2KB
ajax1.gif 2KB
20110625120511.gif 2KB
bnt_go.gif 2KB
bnt_go.gif 2KB
mian_nav_hv.gif 2KB
title_icon2.gif 2KB
login_bottom.gif 2KB
nav_btn_right.gif 2KB
nav_btn_right.gif 2KB
login_input2.gif 2KB
login_input2.gif 2KB
login_input2.gif 1KB
title_icon1.gif 1KB
order.gif 1KB
共 844 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
qq_38220914
- 粉丝: 603
- 资源: 4312
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功