一、 上传按钮整合
第一步 找到下面文件
/plugins/vod/tpl/admin/vod_edit.html
第二 打开编辑 vod_edit.html
在头部加入下面代码 见参考文件 vod_edit.html 17 行代码
<link rel="stylesheet" type="text/css" href="/upload/css/upload.css"/>
第三 查找 play.html</li> 在下面加入下面代码 见参考文件 vod_edit.html 229行代码
<div class="uploadmain" style="80%"><div class="shangchuan_biaodan" id="chose0"><div id="chosevideo">上传视频</div><div id="divFileProgressContainer"></div></div></div>
第四 找到 </body> 上面加入下面代码 见参考文件 vod_edit.html 310-320行代码
<script language="javascript">
var ServerUrl = "http://PPVOD视频系统服务器ip:2000/uploads/";
$(document).ready(function(){
var hostname = window.location.hostname
var port = window.location.port || '80';
ServerUrl = "http://PPVOD视频系统服务器ip:2000/uploads";
})
</script>
<script type="text/javascript" src="/upload/js/webuploader.js"></script>
<script type="text/javascript" src="/upload/js/md5.js"></script>
<script type="text/javascript" src="/upload/js/maccms.js"></script>
二、播放器文件整合
<?php
$time=time().'000';
$ip=get_real_ip();
$sign=bin2hex(aes128Encrypt('91flv',"timestamp=".$time."&ip=".$ip));
function aes128Encrypt($key, $data) {
$padding = 16 - (strlen($data) % 16);
$data .= str_repeat(chr($padding), $padding);
$keySize = 16;
$ivSize = 16;
$rawKey = $key;
$genKeyData = '';
do
{
$genKeyData = $genKeyData.md5( $genKeyData.$rawKey, true );
} while( strlen( $genKeyData ) < ($keySize + $ivSize) );
$generatedKey = substr( $genKeyData, 0, $keySize );
$generatedIV = substr( $genKeyData, $keySize, $ivSize );
return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $generatedKey, $data, MCRYPT_MODE_CBC, $generatedIV);
}
function get_real_ip(){
$ip=false;
if(!empty($_SERVER["HTTP_CLIENT_IP"])){
$ip = $_SERVER["HTTP_CLIENT_IP"];
}
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ips = explode (", ", $_SERVER['HTTP_X_FORWARDED_FOR']);
if ($ip) { array_unshift($ips, $ip); $ip = FALSE; }
for ($i = 0; $i < count($ips); $i++) {
if (!eregi ("^(10|172\.16|192\.168)\.", $ips[$i])) {
$ip = $ips[$i];
break;
}
}
}
return ($ip ? $ip : $_SERVER['REMOTE_ADDR']);
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>player</title>
<style type="text/css">body,html,div{background-color:black;padding:0;margin:0;width:100%;height:100%;}</style>
</head>
<body marginwidth="0" marginheight="0">
<div id="player"></div>
<script type="text/javascript" src="player/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript">
var urlplay = '<?php echo $ids;?>?sign=<?php echo $sign;?>';
var flashvars={f:'player/m3u8.swf',a:urlplay,c:0,s:4,p:1,lv:0}
var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always'};
var video=[urlplay];
CKobject.embed('player/ckplayer.swf','player','ckplayer_a1','100%','100%',false,flashvars,video,params);
</script>
</body>
</html>
上面使用的swf、js等文件地址注意路径。
文件里面凡是调用的css、js文件可以直接下载放到网站文件夹里面,文件包里面放了utf8和gbk两个编码版本,对照你网站的编码把css和js文件夹拿出来放到upload文件夹下面即可。
PPVOD视频点播系统下载地址:http://www.ppvod.com/dianbo/xiazai/440.html
PPVOD全能直播软件下载地址:http://www.ppvod.com/zhibo/xiazai/511.html
在线服务QQ:952758888