========================================================================================== * * 2012-10-10 开始由4.2升级到大神版 * * 愿我的妻子儿女、家人、朋友身体安康,天天快乐! -> 同时也祝您使用愉快! */ define('APPTYPEID', 55); define('CURSCRIPT', 'vhome'); define('IN_HSK', true); //--以上是系统静态,以下是程序静态 define('PDIR', 'vhome.php'); define('PINC', './v/include'); define('JSDIR', './v/javascript'); require './source/class/class_core.php'; require './v/function/function.func.php'; $discuz = & discuz_core::instance(); $discuz->init(); //------------获取网页传递的参数-------------------------------------------// $fid = intval($_GET['fid']); $sid = intval($_GET['sid']); if(!intval($_GET['vid'])){ //载N $vid = intval(substr($_GET['vid'], 1)); $locid = 1; }else{ $vid = intval($_GET['vid']); } $page = intval($_GET['page']); $types = dhtmlspecialchars($_GET['types']); $m = intval($_GET['m']); //------------获取系统全局变量-------------------------------------------// $uid = intval($_G['uid']); //用户ID $username=$discuz_user = $_G['username']; //用户ID $adminid = $_G['adminid']; //系统管理员 $timestamp = TIMESTAMP; //时间 $timeoffset = $_G['member']['timeoffset']; //时间差 $grouptitle = $_G['group']['grouptitle']; $credits = $_G['member']['credits']; $attachdir = $_G['setting']['attachdir']; $attachurl = $_G['setting']['attachurl']; $clientip = $_G['clientip']; $maxprice = $_G['group']['maxprice']; //最多能卖多少钱 $mygroupid = $_G['member']['groupid']; //自已的组ID $creditstax = $_G['setting']['creditstax']; //这个是收取的利率 $modarray = array( 'release', //发布 'abpost', //连发模式 'list', //视频列表 'tag', //标签显示 'ablist', //专辑列表 'view', //观看视频 'feed', //分享小窗口 'getajax', //AJAX获取某些视频数据 'getablist', //关联专辑用的弹出窗口 'getpic', //截图资源 'goto', //跳转专用 'acshow', //跳转功能 'my', //我的视频列表 'polls', //提取评论内容 'manage', //管理专用 'actor', //演员 'author', //用户视频列表 'topicadmin', //外部管理 'reply', //回复 'omment', //加载评论 'loadsid', //加载同类视频 'loadsup', //加载专辑内视频 'loadtag', //加载TAG类视频 'loadtype', //加载分类选择 'search', //搜索 'import', //导入TXT视频数据 'relesid', //加载发布视频时的分类 'focue', //提取 导演和演员资料 'getlist', //AJAX提取专辑、公共专辑 'today', //今日更新 'hdstyle', //改变CMP4的高清类型 'sendtv', 'teamablist', 'deleplay', 'teamview', 'abvodlist', 'frank', 'danmu', 'rules', //采集 'focue_tag', 'batchrelease', 'audit',//审核 'tvideo', //帖子相关视频 'yout' ); $mod = !in_array($discuz->var['mod'], $modarray) ? null : $discuz->var['mod']; $modpage = $mod ? "?mod=$mod" : null; define('MYDIR', 'vhome.php'.$modpage); //------->以下部分为加载各项配置和缓存----------语言包---> @include(DISCUZ_ROOT.'./source/language/'.CURSCRIPT.'/lang_template.php'); //检查安装是否完成 if(!file_exists(DISCUZ_ROOT.'./data/hskcenter/install.lock')){ header('location: data/hskcenter/install'); } $runagain = 0; //检查配置文件是否存在 if(!file_exists(DISCUZ_ROOT.'./data/hskcenter/hsk_config.inc.php')){ makeconfig(); $runagain = 1; }else{ //加载配置文件 @require DISCUZ_ROOT.'./data/hskcenter/hsk_config.inc.php'; makeglobals($_HSKCONFIG); } //-------开启2级域名---------- if($hsk_vdomain){ $hsk_vdomain = str_replace('http://', '', $hsk_vdomain); $domainbase = $_SERVER['HTTP_HOST']; if($hsk_vdomain && ($hsk_vdomain != $domainbase)){ $url = $_SERVER['URL'] ? $_SERVER['URL'] : $_SERVER['REQUEST_URI']; $url = 'http://'.$hsk_vdomain.$url; header("HTTP/1.1 301 Moved Permanently"); header("location: $url"); } } //---- $hsk_templateid = $hsk_templateid && $mod!='rules' ? $hsk_templateid : 'default'; define('MDIR', './template/jitashe/vhome/'.$hsk_templateid.'/images'); define('NOIMG', './template/jitashe/vhome/'.$hsk_templateid.'/images/noimages.jpg'); define('TEMP', 'vhome/'.$hsk_templateid); //------------判断权限---------------------------------------------// //把权限提出来 1=使用权,2=发布权,3=审核权 if($adminid == 1){ $groupon_1 = $groupon_2 = $groupon_3 = $groupon_4 = 1; }else{ $theusergp_1 = (array)unserialize($hsk_theusergp_1); $groupon_1 = in_array('', $theusergp_1) ? TRUE : (in_array($mygroupid, $theusergp_1) ? TRUE : FALSE); $theusergp_2 = (array)unserialize($hsk_theusergp_2); $groupon_2 = in_array('', $theusergp_2) ? TRUE : (in_array($mygroupid, $theusergp_2) ? TRUE : FALSE); $theusergp_3 = (array)unserialize($hsk_theusergp_3); $groupon_3 = in_array('', $theusergp_3) ? TRUE : (in_array($mygroupid, $theusergp_3) ? TRUE : FALSE); $theusergp_4 = (array)unserialize($hsk_theusergp_4); $groupon_4 = in_array('', $theusergp_4) ? TRUE : (in_array($mygroupid, $theusergp_4) ? TRUE : FALSE); $danmu_group = (array)unserialize($hsk_danmu_group); $hsk_isdanmuopen = $hsk_isdanmuopen && in_array('', $danmu_group) ? TRUE : (in_array($mygroupid, $danmu_group) ? TRUE : FALSE); if(!$groupon_1) showmessage($lang['nopermission'], '', array(), array('login' => true)); if(!$hsk_isopen) showmessage($lang['hackclose'], '', array(), array('login' => true)); } //------------获取 各种缓存数据 ---------------------------------------------// if(file_exists(DISCUZ_ROOT.'./data/hskcenter/_sort.inc.php')){ @require DISCUZ_ROOT.'./data/hskcenter/_sort.inc.php'; }else{ hsk_stylewrite(); $runagain = 1; } if($runagain){ showmessage($lang['setconfigok'], PDIR); } //---------->以下为初始全局使用的值---------------> $dvlist = (array)unserialize(stripslashes($_G['cookie']['vgallery_list'])); $dvcount = count($dvlist)>0; //----------------视频出售方面的东西-------------------------------------------// if(!$hsk_getfree){ //未绑定积分时不允许使用系统! showmessage($lang['bandcredits']); } $money_id = 'extcredits'.$hsk_getfree; $money_name = $_G['setting']['extcredits'][$hsk_getfree]['title']; $money_unit = $_G['setting']['extcredits'][$hsk_getfree]['unit']; if($uid){ $query = DB::query("SELECT m.*, u.$money_id FROM ".DB::table('vgallery_member')." m LEFT JOIN ".DB::table('common_member_count')." u ON u.uid=m.mid WHERE m.mid='$uid'"); if($userinfo = DB::fetch($query)){ $_mymoney = $userinfo[$money_id]; //我的钱 $_myshare = $userinfo['shares']; //分享视频数 $_myhots = $userinfo['hots']; //我的热点 $_myablist = $userinfo['ablists']; //我的专辑 $_mychkup = $userinfo['pushup']; //顶 踩 $_mychkdown = $userinfo['pushdown']; $_myplaylist = $userinfo['favsum']; //收藏视频数 }else{ //不是视频 中心的用户,自动加入 DB::query("INSERT INTO ".DB::table('vgallery_member')." (mid) VALUES ('$uid')"); $_myshare = 0; $_myhots = 0; $_myablist =0; //showmessage($lang['joingok'], PDIR); } } if(file_exists(DISCUZ_ROOT.'./data/hskcenter/cache/_totalfun.cache.php')){ @require DISCUZ_ROOT.'./data/hskcenter/cache/_totalfun.cache.php'; $todays = mktime(0,0,0,date("m"),date("d"),date("Y")); if($_TOTALFUN[3] < $todays){ $_TOTALFUN[2] = 0; } }else{ $_TOTALFUN[1] = $_TOTALFUN[2] = 0; } if($mod == 'index' || !$mod){ if(file_exists(DISCUZ_ROOT.'./data/hskcenter/hsk_index_set.inc.php')){ @require DISCUZ_ROOT.'./data/hskcenter/hsk_index_set.inc.php'; $index_close['top']['subject'] = trim(stripslashes($index_close['top']['subject'])); $index_close['top']['moremsg'] = trim(stripslashes($index_close['top']['moremsg'])); } } if(!$index_close['hot']['close'] && ($mod == 'index' || !$mod)){ if(file_exists(DISCUZ_ROOT.'./data/hskcenter/cache/_index_album_0.cache.php')){ @require DISCUZ_ROOT.'./data/hskcenter/cache/_index_album_0.cache.php'; $indexalbum = count($_INDEXALBUM)>0 && is_array($_INDEXALBUM[0]); $indexalbumcount = count($_INDEXALBUM); } } if(!$index_close['top']['close'] && ($mod == 'index' || !$mod)){ if(file_exists(DISCUZ_ROOT.'./data/hskcenter/cache/_index_top.cache.php')){ @require DISCUZ_ROOT.'./data/hskcenter/cache/_index_top.cache.php'; $indextop = count($_INDEXTOP)>0 && is_array($_INDEXTOP[0]); } } //播客达人 $bokehot = 0; if(file_exists(DISCUZ_ROOT.'./data/hskcenter/cache/_hotuser.cache.php')){ @require DISCUZ_ROOT.'./data/hskcenter/cache/_hotuser.cache.php'; $bokehot = 1; } //最新视频 if(file_exists(DISCUZ_ROOT.'./data/hskcenter/cache/_newlist.cache.php')){ @require DISCUZ_ROOT.'./data/hskcenter/cache/_newlist.cache.php'; } //最新专辑 if(file_exists(DISCUZ_ROOT.'./data/hskcenter/cache/_newablist.cache.php')){ @require DISCUZ_ROOT.'./data/hskcenter/cache/_newablist.cache.php'; } //首页定制 if(file_exists(DISCUZ_ROOT.'./data/hskcenter/_block.inc.php')){ @require DISCUZ_ROOT.'./data/hskcenter/_block.inc.php'; if($blockget){ //block_get($blockget); } } //广告 if(file_exists(DISCUZ_ROOT.'./data/hskcenter/_adlist.inc.php')){ @require DISCUZ_ROOT.'./data/hskcenter/_adlist.inc.php'; } $rwfile = DISCUZ_ROOT.'./data/hskcenter/hsk_hskrewrite.inc.php'; if(file_exists($rwfile)){ @require "$rwfile"; }else{ $_HSKREWRITES = array ( 'list' => array ( 'val' => 'vhome.php?mod=list&action={fs}&id={fsid}&types={tyid}&m={mid}&s={stid}&address={aid}&years={yid}&page={page}', 'vfucan' => '0', ), 'ablist' => array ( 'val' => 'vhome.php?mod=ablist&vid={vid}&t={tyid}&s={stid}&page={page}', 'vfucan' => '0', ), 'view' => array ( 'val' => 'vhome.php?mod=view&vid={vid}', 'vfucan' => '0', ), 'tag' => array ( 'val' => 'vhome.php?mod=tag&vid={tid}&types={tyid}&page={page}', 'vfucan' => '0', ), 'actor' => array ( 'val' => 'vhome.php?mod=actor&action={fs}&aid={fsid}&page={page}', 'vfucan' => '0', ), 'acshow' => array ( 'val' => 'vhome.php?mod=acshow&action={acvalue}&vid={vid}', 'vfucan' => '0', ), 'author' => array ( 'val' => 'vhome.php?mod=author&uid={uid}&page={page}', 'vfucan' => '0', ), 'today' => array ( 'val' => 'vhome.php?mod=today&page={page}', 'vfucan' => '0', ), 'yesterday' => array ( 'val' => 'vhome.php?mod=today&yt=1&page={page}', 'vfucan' => '0', ), 'theme' => array ( 'val' => 'vhome.php?mod=theme&eid={eid}', 'vfucan' => '0', ), ); } //=====================================主程序开始 $sortcolor = array(0=>'',1=>'Red',2=>'Orange',3=>'Yellow',4=>'Green',5=>'Cyan',6=>'Blue',7=>'Purple',8=>'Gray'); $search_hot = explode("\n", $hsk_hotsearch); $_G['setting']['search'] = 1; $_G['setting']['allowwidthauto'] = 1; $_G['setting']['switchwidthauto'] = 0; $version = $_G['setting']['version']; //mongodb $mongodb=getMongo(); if (!$mongodb) { showmessage('系统错误,请稍后再试.'); } $c_video = $mongodb->video; $c_valbum = $mongodb->valbum; $c_vuser = $mongodb->vuser; $c_valbumvideo = $mongodb->valbumvideo; $c_videoreply = $mongodb->videoreply; $c_albumreply = $mongodb->albumreply; $c_videokeyword=$mongodb->videokeyword; //$mod=$mod?$mod:'index'; $wp_w=true; runhooks(); if($mod){ define('CURMODULE', $mod); require_once(libfile('vhome/'.$mod, 'module')); }else{ list($navtitle, $metakeywords, $metadescription, $seohead) = hsk_getseo(); include template(hsk_template("vhome")); } ?>