Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
s_ibanshou
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋林
s_ibanshou
Commits
d935dd52
Commit
d935dd52
authored
Nov 11, 2017
by
杨培
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
7797d073
33ecb5cb
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
702 additions
and
23 deletions
+702
-23
index.html
appdownload/index.html
+11
-10
build.xml
build.xml
+1
-0
ecmsinfo.php
e/admin/ecmsinfo.php
+5
-0
db_sql.php
e/class/db_sql.php
+1
-1
hinfofun.php
e/class/hinfofun.php
+135
-4
config.php
e/config/config.php
+3
-3
ElasContent.php
e/extend/internalApi/ucenter/ElasContent.php
+47
-0
index.php
e/member/iframe/index.php
+2
-2
es_content.php
e/tasks/es_content.php
+71
-0
index.php
e/tool/gbook/index.php
+1
-1
banshou.css
skin/default/css/banshou.css
+87
-0
style.css
skin/default/css/style.css
+46
-2
videoClass.js
skin/default/js/videoClass.js
+292
-0
No files found.
appdownload/index.html
View file @
d935dd52
...
@@ -16,6 +16,15 @@
...
@@ -16,6 +16,15 @@
<!-- Css -->
<!-- Css -->
<link
rel=
"stylesheet"
href=
"css/basic.css"
>
<link
rel=
"stylesheet"
href=
"css/basic.css"
>
<link
rel=
"stylesheet"
href=
"css/style.css"
>
<link
rel=
"stylesheet"
href=
"css/style.css"
>
<script>
var
_hmt
=
_hmt
||
[];
(
function
()
{
var
hm
=
document
.
createElement
(
"script"
);
hm
.
src
=
"https://hm.baidu.com/hm.js?59926961b935e067a1cb86d52ce44500"
;
var
s
=
document
.
getElementsByTagName
(
"script"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
})();
</script>
<body>
<body>
<div
class=
"warp"
>
<div
class=
"warp"
>
<div
class=
"pic-hand"
>
<div
class=
"pic-hand"
>
...
@@ -45,20 +54,12 @@
...
@@ -45,20 +54,12 @@
<div
class=
"phone-box"
>
<div
class=
"phone-box"
>
<a
href=
"javascript:;"
>
<a
href=
"javascript:
location.reload()
;"
>
<img
src=
"img/download_phone_img.jpg"
>
<img
src=
"img/download_phone_img.jpg"
>
</a>
</a>
</div>
</div>
<script>
var
_hmt
=
_hmt
||
[];
(
function
()
{
var
hm
=
document
.
createElement
(
"script"
);
hm
.
src
=
"https://hm.baidu.com/hm.js?59926961b935e067a1cb86d52ce44500"
;
var
s
=
document
.
getElementsByTagName
(
"script"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
})();
</script>
<script
type=
"application/javascript"
src=
"js/mobile-detect.min.js"
></script>
<script
type=
"application/javascript"
src=
"js/mobile-detect.min.js"
></script>
<script
type=
"application/javascript"
src=
"js/index.js"
></script>
<script
type=
"application/javascript"
src=
"js/index.js"
></script>
</body>
</body>
...
...
build.xml
View file @
d935dd52
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
<include
name=
"skin/**"
/>
<include
name=
"skin/**"
/>
<include
name=
"environments/**"
/>
<include
name=
"environments/**"
/>
<include
name=
"vendor/**"
/>
<include
name=
"vendor/**"
/>
<include
name=
"appdownload/**"
/>
</patternset>
</patternset>
</fileset>
</fileset>
<filelist
dir=
"."
files=
"init,build.xml,build.properties,build_win.properties"
/>
<filelist
dir=
"."
files=
"init,build.xml,build.properties,build_win.properties"
/>
...
...
e/admin/ecmsinfo.php
View file @
d935dd52
...
@@ -9,6 +9,11 @@ require("../class/copypath.php");
...
@@ -9,6 +9,11 @@ require("../class/copypath.php");
require
(
"../class/t_functions.php"
);
require
(
"../class/t_functions.php"
);
require
(
"../data/dbcache/class.php"
);
require
(
"../data/dbcache/class.php"
);
require
(
"../data/dbcache/MemberLevel.php"
);
require
(
"../data/dbcache/MemberLevel.php"
);
require
'../config/config_ibanshou.php'
;
require
'../extend/internalApi/autoload.php'
;
\internalApi\base\Client
::
config
(
$config
[
'wxh.internal'
][
'client'
]);
$link
=
db_connect
();
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$empire
=
new
mysqlquery
();
$enews
=
$_POST
[
'enews'
];
$enews
=
$_POST
[
'enews'
];
...
...
e/class/db_sql.php
View file @
d935dd52
e/class/hinfofun.php
View file @
d935dd52
...
@@ -336,6 +336,39 @@ function AddNews($add,$userid,$username){
...
@@ -336,6 +336,39 @@ function AddNews($add,$userid,$username){
}
}
$GLOBALS['ecmsadderrorurl']
=
$ecmsfrom
.
$addecmscheck
;
$GLOBALS['ecmsadderrorurl']
=
$ecmsfrom
.
$addecmscheck
;
insert_dolog("
classid
=
$add
[
classid
]
<
br
>
id
=
".
$id
."
<
br
>
title
=
".
$add[title]
,
$pubid
);//操作日志
insert_dolog("
classid
=
$add
[
classid
]
<
br
>
id
=
".
$id
."
<
br
>
title
=
".
$add[title]
,
$pubid
);//操作日志
//添加es数据
if(empty(!empty(
$add['checked']
))){
global
$dbtbpre
,
$ecms_config
;
$tablenews
= "
{
$dbtbpre
}
ecms_news
";
$tableDatas
= "
{
$dbtbpre
}
ecms_news_data_1
";
$sql
= "
select
$tableDatas
.
newstext
,
$tablenews
.*
from
$tablenews
left
JOIN
$tableDatas
on
$tablenews
.
id
=
$tableDatas
.
id
where
$tablenews
.
id
=
$id
";
$data
=
$empire->fetch1
(
$sql
);
$content
= cutstr_html(
$data['newstext']
);
$id
=
$data['id']
;
$title
=
$data['title']
;
$from
= 's';
$createAt
=
$data['newstime']
;
$url
=
$ecms_config['site_url'].$data['titleurl']
;
//获取图片
$img
=
$data['titlepic']
;
if (!
$img
) {
$newstext
= stripslashes(
$data['newstext']
);
preg_match('/src="
([
^
"]+?)"
/
i
', $newstext, $match);
$img = isset($match[1]) ? $match[1] : '';
}
if ($img && !preg_match('
/^
https
?:/
', $img)) {
$img = $ecms_config['
site_url
'] . $img;
}
$extra = [
'
classid
'=>$data['
classid
'],
];
\internalApi\ucenter\ElasContent::replace($id,$title,$content,$img,$url,$from,$createAt,$extra);
}
printerror("AddNewsSuccess","AddNews.php?enews=AddNews&ecmsnfrom=$add[ecmsnfrom]&bclassid=$add[bclassid]&classid=$add[classid]".$addecmscheck.hReturnEcmsHashStrHref2(0));
printerror("AddNewsSuccess","AddNews.php?enews=AddNews&ecmsnfrom=$add[ecmsnfrom]&bclassid=$add[bclassid]&classid=$add[classid]".$addecmscheck.hReturnEcmsHashStrHref2(0));
}
}
else
else
...
@@ -344,6 +377,20 @@ function AddNews($add,$userid,$username){
...
@@ -344,6 +377,20 @@ function AddNews($add,$userid,$username){
}
}
}
}
function cutstr_html($string)
{
$string = strip_tags($string);
$string = trim($string);
$string = mb_ereg_replace("\t", "", $string);
$string = mb_ereg_replace("\r\n", "", $string);
$string = mb_ereg_replace("\r", "", $string);
$string = mb_ereg_replace("\n", "", $string);
$string = mb_ereg_replace(" ", "", $string);
return trim($string);
}
//修改信息
//修改信息
function EditNews($add,$userid,$username){
function EditNews($add,$userid,$username){
global $empire,$class_r,$class_zr,$bclassid,$public_r,$dbtbpre,$emod_r;
global $empire,$class_r,$class_zr,$bclassid,$public_r,$dbtbpre,$emod_r;
...
@@ -589,6 +636,46 @@ function EditNews($add,$userid,$username){
...
@@ -589,6 +636,46 @@ function EditNews($add,$userid,$username){
{
{
$ecmsfrom
=
"ListNews.php?bclassid=
$add[bclassid]&classid=$add[classid]
"
.
hReturnEcmsHashStrHref2
(
0
);
$ecmsfrom
=
"ListNews.php?bclassid=
$add[bclassid]&classid=$add[classid]
"
.
hReturnEcmsHashStrHref2
(
0
);
}
}
//添加elas
$from
=
's'
;
$id
=
$index_checkr
[
'id'
];
if
(
empty
(
$newchecked
)){
//删除
\internalApi\ucenter\ElasContent
::
delete
(
$id
,
$from
);
}
else
{
//修改
global
$dbtbpre
,
$ecms_config
;
$tablenews
=
"
{
$dbtbpre
}
ecms_news"
;
$tableDatas
=
"
{
$dbtbpre
}
ecms_news_data_1"
;
$sql
=
"select
$tableDatas
.newstext,
$tablenews
.* from
$tablenews
left JOIN
$tableDatas
on
$tablenews
.id =
$tableDatas
.id where
$tablenews
.id =
$id
"
;
$data
=
$empire
->
fetch1
(
$sql
);
$content
=
cutstr_html
(
$data
[
'newstext'
]);
$id
=
$data
[
'id'
];
$title
=
$data
[
'title'
];
$createAt
=
$data
[
'newstime'
];
$url
=
$ecms_config
[
'site_url'
]
.
$data
[
'titleurl'
];
//获取图片
$img
=
$data
[
'titlepic'
];
if
(
!
$img
)
{
$newstext
=
stripslashes
(
$data
[
'newstext'
]);
preg_match
(
'/src="([^"]+?)"/i'
,
$newstext
,
$match
);
$img
=
isset
(
$match
[
1
])
?
$match
[
1
]
:
''
;
}
if
(
$img
&&
!
preg_match
(
'/^https?:/'
,
$img
))
{
$img
=
$ecms_config
[
'site_url'
]
.
$img
;
}
$extra
=
[
'classid'
=>
$data
[
'classid'
],
];
\internalApi\ucenter\ElasContent
::
replace
(
$id
,
$title
,
$content
,
$img
,
$url
,
$from
,
$createAt
,
$extra
);
}
insert_dolog
(
"classid=
$add[classid]<br>id=".$add[id]."<br>title=".$add[title]
,
$pubid
);//操作日志
insert_dolog
(
"classid=
$add[classid]<br>id=".$add[id]."<br>title=".$add[title]
,
$pubid
);//操作日志
printerror("
EditNewsSuccess
",
$ecmsfrom
.
$addecmscheck
);
printerror("
EditNewsSuccess
",
$ecmsfrom
.
$addecmscheck
);
}
}
...
@@ -756,6 +843,45 @@ function EditInfoSimple($add,$userid,$username){
...
@@ -756,6 +843,45 @@ function EditInfoSimple($add,$userid,$username){
$ecmsfrom
=
"ListNews.php?bclassid=
$add[bclassid]&classid=$add[classid]
"
.
hReturnEcmsHashStrHref2
(
0
);
$ecmsfrom
=
"ListNews.php?bclassid=
$add[bclassid]&classid=$add[classid]
"
.
hReturnEcmsHashStrHref2
(
0
);
}
}
$ecmsfrom
=
$ecmsfrom
.
$addecmscheck
;
$ecmsfrom
=
$ecmsfrom
.
$addecmscheck
;
//添加elas
$from
=
's'
;
$id
=
$index_checkr
[
'id'
];
if
(
empty
(
$newchecked
)){
//删除
\internalApi\ucenter\ElasContent
::
delete
(
$id
,
$from
);
}
else
{
//修改
global
$dbtbpre
,
$ecms_config
;
$tablenews
=
"
{
$dbtbpre
}
ecms_news"
;
$tableDatas
=
"
{
$dbtbpre
}
ecms_news_data_1"
;
$sql
=
"select
$tableDatas
.newstext,
$tablenews
.* from
$tablenews
left JOIN
$tableDatas
on
$tablenews
.id =
$tableDatas
.id where
$tablenews
.id =
$id
"
;
$data
=
$empire
->
fetch1
(
$sql
);
$content
=
cutstr_html
(
$data
[
'newstext'
]);
$id
=
$data
[
'id'
];
$title
=
$data
[
'title'
];
$createAt
=
$data
[
'newstime'
];
$url
=
$ecms_config
[
'site_url'
]
.
$data
[
'titleurl'
];
//获取图片
$img
=
$data
[
'titlepic'
];
if
(
!
$img
)
{
$newstext
=
stripslashes
(
$data
[
'newstext'
]);
preg_match
(
'/src="([^"]+?)"/i'
,
$newstext
,
$match
);
$img
=
isset
(
$match
[
1
])
?
$match
[
1
]
:
''
;
}
if
(
$img
&&
!
preg_match
(
'/^https?:/'
,
$img
))
{
$img
=
$ecms_config
[
'site_url'
]
.
$img
;
}
$extra
=
[
'classid'
=>
$data
[
'classid'
],
];
\internalApi\ucenter\ElasContent
::
replace
(
$id
,
$title
,
$content
,
$img
,
$url
,
$from
,
$createAt
,
$extra
);
}
insert_dolog
(
"classid=
$add[classid]<br>id=".$add[id]."<br>title=".$add[title]
,
$pubid
);//操作日志
insert_dolog
(
"classid=
$add[classid]<br>id=".$add[id]."<br>title=".$add[title]
,
$pubid
);//操作日志
printerror("
EditNewsSuccess
",
$closeurl
,8);
printerror("
EditNewsSuccess
",
$closeurl
,8);
}
}
...
@@ -878,6 +1004,11 @@ function DelNews($id,$classid,$userid,$username){
...
@@ -878,6 +1004,11 @@ function DelNews($id,$classid,$userid,$username){
$returl
="
ListNews
.
php
?
bclassid
=
$adddatar
[
bclassid
]
&
classid
=
$adddatar
[
classid
]
".
$addecmscheck
.hReturnEcmsHashStrHref2(0);
$returl
="
ListNews
.
php
?
bclassid
=
$adddatar
[
bclassid
]
&
classid
=
$adddatar
[
classid
]
".
$addecmscheck
.hReturnEcmsHashStrHref2(0);
}
}
}
}
//添加es
$from
= 's';
\internalApi\ucenter\ElasContent::delete(
$id
,
$from
);
insert_dolog("
classid
=
$classid
<
br
>
id
=
".
$id
."
<
br
>
title
=
".
$r[title]
,
$pubid
);//操作日志
insert_dolog("
classid
=
$classid
<
br
>
id
=
".
$id
."
<
br
>
title
=
".
$r[title]
,
$pubid
);//操作日志
printerror("
DelNewsSuccess
",
$returl
);
printerror("
DelNewsSuccess
",
$returl
);
}
}
...
...
e/config/config.php
View file @
d935dd52
...
@@ -132,7 +132,7 @@ $ecms_config['sets']['realplayertype']=',.rm,.ra,.rmvb,.mp4,.mov,.avi,.wav,.ram,
...
@@ -132,7 +132,7 @@ $ecms_config['sets']['realplayertype']=',.rm,.ra,.rmvb,.mp4,.mov,.avi,.wav,.ram,
//------------e_public
//------------e_public
$public_r
=
array
(
'sitename'
=>
'扳手 - 征集slogan'
,
$public_r
=
array
(
'sitename'
=>
'扳手 - 征集slogan'
,
'newsurl'
=>
'/'
,
'newsurl'
=>
'/'
,
'filetype'
=>
'|.gif|.jpg|.swf|.rar|.zip|.mp3|.wmv|.txt|.doc|'
,
'filetype'
=>
'|.gif|.jpg|.swf|.rar|.zip|.mp3|.
mp4|.
wmv|.txt|.doc|'
,
'filesize'
=>
2048
,
'filesize'
=>
2048
,
'relistnum'
=>
8
,
'relistnum'
=>
8
,
'renewsnum'
=>
100
,
'renewsnum'
=>
100
,
...
@@ -242,7 +242,7 @@ $public_r=array('sitename'=>'扳手 - 征集slogan',
...
@@ -242,7 +242,7 @@ $public_r=array('sitename'=>'扳手 - 征集slogan',
'gbkey_ok'
=>
0
,
'gbkey_ok'
=>
0
,
'fbkey_ok'
=>
0
,
'fbkey_ok'
=>
0
,
'newaddinfotime'
=>
0
,
'newaddinfotime'
=>
0
,
'classnavs'
=>
'<a href=\"/news/\">新闻</a> | <a href=\"/pinlei/\">品类</a> | <a href=\"/pinpai/\">品牌</a> | <a href=\"/huandeng/\">首页幻灯</a>'
,
'classnavs'
=>
'<a href=\"/news/\">新闻</a> | <a href=\"/pinlei/\">品类</a> | <a href=\"/pinpai/\">品牌</a> | <a href=\"/huandeng/\">首页幻灯</a>
| <a href=\"/ceshi/\">测试</a>
'
,
'adminstyle'
=>
',1,2,'
,
'adminstyle'
=>
',1,2,'
,
'docnewsnum'
=>
300
,
'docnewsnum'
=>
300
,
'openschall'
=>
1
,
'openschall'
=>
1
,
...
@@ -408,7 +408,7 @@ $emod_r[1]=Array('mid'=>1,
...
@@ -408,7 +408,7 @@ $emod_r[1]=Array('mid'=>1,
'qeditdofunf'
=>
'||'
,
'qeditdofunf'
=>
'||'
,
'definfovoteid'
=>
0
,
'definfovoteid'
=>
0
,
'orderf'
=>
''
,
'orderf'
=>
''
,
'sonclass'
=>
'|2|3|10|28|11|12|13|14|15|16|29|'
,
'sonclass'
=>
'|2|3|10|28|11|12|13|14|15|16|29|
32|
'
,
'tid'
=>
1
,
'tid'
=>
1
,
'tbname'
=>
'news'
);
'tbname'
=>
'news'
);
$emod_r
[
2
]
=
Array
(
'mid'
=>
2
,
$emod_r
[
2
]
=
Array
(
'mid'
=>
2
,
...
...
e/extend/internalApi/ucenter/ElasContent.php
0 → 100644
View file @
d935dd52
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 11/10/2017
* Time: 5:03 PM
*/
namespace
internalApi\ucenter
;
use
internalApi\base\Client
;
class
ElasContent
extends
Client
{
/**
* @param $id //数据id
* @param $title //标题
* @param $contentData //纯文本内容
* @param $pic //图片 没有预览图去文本第一章
* @param $url
* @param $from bbs xue s
* @param $createdAt //创建时间
* @param $extra //额外属性 array
* @return mixed
*/
public
static
function
replace
(
$id
,
$title
,
$contentData
,
$pic
,
$url
,
$from
,
$createdAt
,
$extra
){
return
self
::
call
(
'elasContent.replace'
,
compact
(
'id'
,
'title'
,
'contentData'
,
'pic'
,
'url'
,
'from'
,
'createdAt'
,
'extra'
));
}
/**
* delete
* @param $id
* @param $from bbs xue s
* @return mixed
*/
public
static
function
delete
(
$id
,
$from
){
return
self
::
call
(
'elasContent.delete'
,
compact
(
'id'
,
'from'
));
}
}
\ No newline at end of file
e/member/iframe/index.php
View file @
d935dd52
...
@@ -58,12 +58,12 @@ if($mhavelogin==1)
...
@@ -58,12 +58,12 @@ if($mhavelogin==1)
{
{
?>
?>
document.write("
»
<font
color=
red
><b>
<?=
$myusername
?>
</b></font>
<a
href=
\"/e/member/my/\"
target=
\"_parent\"
>
<?=
$groupname
?>
</a>
<?=
$havemsg
?>
<a
href=
\"/e/space/?userid=
<?=
$myuserid
?>
\"
target=
_blank
>
我的空间
</a>
<a
href=
\"/e/member/msg/\"
target=
_blank
>
短信息
</a>
<a
href=
\"/e/member/fava/\"
target=
_blank
>
收藏夹
</a>
<a
href=
\"/e/member/cp/\"
target=
\"_parent\"
>
控制面板
</a>
<a
href=
\"/e/member/doaction.php?enews=exit&ecmsfrom=9\"
onclick=
\"return
confirm
(\'确认要退出?\');\"
>
退出
</a>
");
document.write("
»
<font
color=
red
><b>
<?=
$myusername
?>
</b></font>
<a
href=
\"/e/member/my/\"
target=
\"_parent\"
>
<?=
$groupname
?>
</a>
<?=
$havemsg
?>
<a
href=
\"/e/space/?userid=
<?=
$myuserid
?>
\"
target=
_blank
>
我的空间
</a>
<a
href=
\"/e/member/msg/\"
target=
_blank
>
短信息
</a>
<a
href=
\"/e/member/fava/\"
target=
_blank
>
收藏夹
</a>
<a
href=
\"/e/member/cp/\"
target=
\"_parent\"
>
控制面板
</a>
<a
href=
\"/e/member/doaction.php?enews=exit&ecmsfrom=9\"
onclick=
\"return
confirm
(\'确认要退出?\');\"
>
退出
</a>
");
<?
php
<?
}
}
else
else
{
{
?>
?>
document.write("
<form
name=
login
method=
post
action=
\"/e/member/doaction.php\"
>
<input
type=
hidden
name=
enews
value=
login
>
<input
type=
hidden
name=
ecmsfrom
value=
9
>
用户名:
<input
name=
\"username\"
type=
\"text\"
class=
\"inputText\"
size=
\"16\"
/>
密码:
<input
name=
\"password\"
type=
\"password\"
class=
\"inputText\"
size=
\"16\"
/>
<input
type=
\"submit\"
name=
\"Submit\"
value=
\"登陆\"
class=
\"inputSub\"
/>
<input
type=
\"button\"
name=
\"Submit2\"
value=
\"注册\"
class=
\"inputSub\"
onclick=
\"window.open(\'/e/member/register/\');\"
/></form>
");
document.write("
<form
name=
login
method=
post
action=
\"/e/member/doaction.php\"
>
<input
type=
hidden
name=
enews
value=
login
>
<input
type=
hidden
name=
ecmsfrom
value=
9
>
用户名:
<input
name=
\"username\"
type=
\"text\"
class=
\"inputText\"
size=
\"16\"
/>
密码:
<input
name=
\"password\"
type=
\"password\"
class=
\"inputText\"
size=
\"16\"
/>
<input
type=
\"submit\"
name=
\"Submit\"
value=
\"登陆\"
class=
\"inputSub\"
/>
<input
type=
\"button\"
name=
\"Submit2\"
value=
\"注册\"
class=
\"inputSub\"
onclick=
\"window.open(\'/e/member/register/\');\"
/></form>
");
<?
php
<?
}
}
?>
?>
\ No newline at end of file
e/tasks/es_content.php
0 → 100644
View file @
d935dd52
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 14/10/2017
* Time: 4:52 PM
*/
require
'../class/connect.php'
;
require
'../class/db_sql.php'
;
require
'../class/q_functions.php'
;
require
'../extend/internalApi/autoload.php'
;
require
'../config/config_ibanshou.php'
;
\internalApi\base\Client
::
config
(
$config
[
'wxh.internal'
][
'client'
]);
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$tablenews
=
"
{
$dbtbpre
}
ecms_news"
;
$tableDatas
=
"
{
$dbtbpre
}
ecms_news_data_1"
;
$offset
=
0
;
$limit
=
100
;
$start
=
0
;
$count
=
0
;
while
(
$start
==
0
or
$count
>=
$limit
){
$sql
=
"select
$tableDatas
.newstext,
$tablenews
.* from
$tablenews
left JOIN
$tableDatas
on
$tablenews
.id =
$tableDatas
.id where
$tablenews
.id >
$start
limit
$limit
offset
$offset
"
;
$query
=
$empire
->
query
(
$sql
);
$count
=
$empire
->
num1
(
$query
);
while
(
$data
=
$empire
->
fetch
(
$query
)){
$content
=
cutstr_html
(
$data
[
'newstext'
]);
$id
=
$data
[
'id'
];
$title
=
$data
[
'title'
];
$from
=
's'
;
$createAt
=
$data
[
'newstime'
];
$url
=
$ecms_config
[
'site_url'
]
.
$data
[
'titleurl'
];
//获取图片
$img
=
$data
[
'titlepic'
];
if
(
!
$img
)
{
$newstext
=
stripslashes
(
$data
[
'newstext'
]);
preg_match
(
'/src="([^"]+?)"/i'
,
$newstext
,
$match
);
$img
=
isset
(
$match
[
1
])
?
$match
[
1
]
:
''
;
}
if
(
$img
&&
!
preg_match
(
'/^https?:/'
,
$img
))
{
$img
=
$ecms_config
[
'site_url'
]
.
$img
;
}
$extra
=
[
'classid'
=>
$data
[
'classid'
],
];
\internalApi\ucenter\ElasContent
::
replace
(
$id
,
$title
,
$content
,
$img
,
$url
,
$from
,
$createAt
,
$extra
);
echo
"
{
$data
[
'id'
]
}
{
$data
[
'title'
]
}
\n
"
;
$start
=
$data
[
'id'
];
}
}
function
cutstr_html
(
$string
)
{
$string
=
strip_tags
(
$string
);
$string
=
trim
(
$string
);
$string
=
mb_ereg_replace
(
"
\t
"
,
""
,
$string
);
$string
=
mb_ereg_replace
(
"
\r\n
"
,
""
,
$string
);
$string
=
mb_ereg_replace
(
"
\r
"
,
""
,
$string
);
$string
=
mb_ereg_replace
(
"
\n
"
,
""
,
$string
);
$string
=
mb_ereg_replace
(
" "
,
""
,
$string
);
return
trim
(
$string
);
}
e/tool/gbook/index.php
View file @
d935dd52
...
@@ -160,7 +160,7 @@ if($r[retext])
...
@@ -160,7 +160,7 @@ if($r[retext])
</table>
</table>
<br
/>
<br
/>
<?
php
<?
}
}
?>
?>
...
...
skin/default/css/banshou.css
View file @
d935dd52
...
@@ -307,6 +307,12 @@
...
@@ -307,6 +307,12 @@
.portal-news-info
span
.time
{
.portal-news-info
span
.time
{
padding-left
:
0
;
padding-left
:
0
;
}
}
.portal-news-info
span
.time
b
{
font-weight
:
normal
;
border
:
1px
solid
#ccc
;
padding
:
2px
4px
;
border-radius
:
3px
;
}
.pb-none
{
.pb-none
{
padding-bottom
:
0
!important
;
padding-bottom
:
0
!important
;
}
}
...
@@ -319,6 +325,26 @@
...
@@ -319,6 +325,26 @@
border-radius
:
6px
;
border-radius
:
6px
;
}
}
.portal-course
.img-item
{
position
:
relative
;
}
.portal-course
.img-item
i
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
margin-left
:
-25px
;
margin-top
:
-25px
;
display
:
inline-block
;
width
:
50px
;
height
:
50px
;
background-color
:
rgba
(
0
,
0
,
0
,
.5
);
border-radius
:
100%
;
color
:
#fff
;
line-height
:
50px
;
text-align
:
center
;
font-size
:
20px
;
}
.hot-nav
ul
li
a
i
{
.hot-nav
ul
li
a
i
{
display
:
inline-block
;
display
:
inline-block
;
width
:
40px
;
width
:
40px
;
...
@@ -346,4 +372,65 @@
...
@@ -346,4 +372,65 @@
background-color
:
#ffa42f
;
background-color
:
#ffa42f
;
}
}
/*hot news*/
.related-news
{
border-top
:
1px
solid
#f3f3f3
;
}
.px-line
{
height
:
10px
;
border
:
1px
solid
#f0f0f0
;
background-color
:
#f3f3f3
;
}
.related-news
.rl-tit
{
padding
:
20px
15px
10px
;
font-size
:
16px
;
font-weight
:
500
;
background-color
:
#fff
;
}
.related-news
.rl-tit
span
{
text-transform
:
uppercase
;
padding-left
:
5px
;
color
:
#07c706
;
font-size
:
12px
;
font-weight
:
normal
;
}
.related-news
.news-item
{
border-bottom
:
none
;
}
.related-news
.news-item
a
.content
.tit
{
font-size
:
16px
;
}
.related-news
.rl-info
{
position
:
absolute
;
line-height
:
20px
;
font-size
:
12px
;
color
:
#999
;
left
:
15px
;
bottom
:
10px
;
}
.related-news
.rl-info
span
{
padding-right
:
10px
;
}
.related-news
.one-picture
a
.content
{
padding
:
10px
110px
10px
15px
;
}
.related-news
.one-picture
a
.content
.img-item-box
.img-item
{
top
:
10px
;
}
.related-news
.one-picture
a
.content
.img-item-box
.img-item
img
{
border-radius
:
3px
;
}
.comment-box
.rl-tit
{
padding
:
20px
0
10px
;
font-size
:
16px
;
font-weight
:
500
;
background-color
:
#fff
;
}
.comment-box
.rl-tit
span
{
text-transform
:
uppercase
;
padding-left
:
5px
;
color
:
#07c706
;
font-size
:
12px
;
font-weight
:
normal
;
}
skin/default/css/style.css
View file @
d935dd52
...
@@ -410,8 +410,9 @@
...
@@ -410,8 +410,9 @@
/*CONTENT*/
/*CONTENT*/
.main-content
{
.main-content
{
padding
:
15px
15px
0
;
padding
:
15px
;
background-color
:
#fff
;
background-color
:
#fff
;
border-bottom
:
1px
solid
#e7e7e7
;
}
}
.main-content
.tit
h1
{
.main-content
.tit
h1
{
font-family
:
PingFang
SC
,
Lantinghei
SC
,
Helvetica
Neue
,
Helvetica
,
Arial
,
Microsoft
YaHei
,
\\
5
FAE
\
8
F6F
\
96
C5
\
9
ED1
,
STHeitiSC-Light
,
simsun
,
\\
5
B8B
\
4
F53
,
WenQuanYi
Zen
Hei
,
WenQuanYi
Micro
Hei
,
"sans-serif"
;
font-family
:
PingFang
SC
,
Lantinghei
SC
,
Helvetica
Neue
,
Helvetica
,
Arial
,
Microsoft
YaHei
,
\\
5
FAE
\
8
F6F
\
96
C5
\
9
ED1
,
STHeitiSC-Light
,
simsun
,
\\
5
B8B
\
4
F53
,
WenQuanYi
Zen
Hei
,
WenQuanYi
Micro
Hei
,
"sans-serif"
;
...
@@ -438,7 +439,6 @@
...
@@ -438,7 +439,6 @@
color
:
#3d464d
;
color
:
#3d464d
;
font-size
:
16px
;
font-size
:
16px
;
line-height
:
30px
;
line-height
:
30px
;
text-align
:
justify
;
padding-bottom
:
26px
;
padding-bottom
:
26px
;
}
}
...
@@ -833,6 +833,10 @@
...
@@ -833,6 +833,10 @@
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
}
}
.detail-top-nav
a
.close
{
left
:
50px
;
top
:
0
;
}
.detail-top-nav
a
.menu
{
.detail-top-nav
a
.menu
{
right
:
0
;
right
:
0
;
top
:
0
;
top
:
0
;
...
@@ -844,6 +848,40 @@
...
@@ -844,6 +848,40 @@
padding
:
10px
0
30px
;
padding
:
10px
0
30px
;
}
}
/*video-detail*/
.portal-video-box
{
position
:
fixed
;
width
:
100%
;
top
:
0
;
z-index
:
2
;
}
.portal-video-box
.nav
{
position
:
relative
;
}
.portal-video-box
.nav
a
{
display
:
inline-block
;
position
:
absolute
;
top
:
0
;
height
:
50px
;
width
:
50px
;
text-align
:
center
;
line-height
:
50px
;
color
:
#fff
;
}
.portal-video-box
.nav
a
.back
{
left
:
0
;
}
.portal-video-box
.nav
a
.menu
{
right
:
0
;
}
.portal-video-box
.main
img
{
width
:
100%
;
vertical-align
:
top
;
}
.video-empty-block
{
background-color
:
#fff
;
}
/*适配电脑端*/
/*适配电脑端*/
@media
screen
and
(
min-width
:
900px
){
@media
screen
and
(
min-width
:
900px
){
html
{
html
{
...
@@ -868,4 +906,10 @@
...
@@ -868,4 +906,10 @@
left
:
50%
;
left
:
50%
;
margin-left
:
-450px
;
margin-left
:
-450px
;
}
}
.portal-video-box
{
width
:
900px
;
}
.portal-video-box
.main
img
{
width
:
900px
;
}
}
}
skin/default/js/videoClass.js
0 → 100644
View file @
d935dd52
var
newsid
=
$
(
"input[name='newsid']"
).
val
();
//评论
$
(
".send-pl"
).
click
(
function
()
{
var
data
=
{
'newsid'
:
newsid
,
'content'
:
$
.
trim
(
$
(
"textarea[name='content']"
).
val
())
};
var
self
=
this
;
if
(
!
data
[
'newsid'
])
{
pop
(
'参数错误'
);
return
false
;
}
if
(
!
data
[
'content'
])
{
pop
(
'评论内容不能为空'
);
return
false
;
}
$
(
self
).
attr
(
"disabled"
,
true
);
$
.
post
(
"/e/action/news/comment.php?mod=create"
,
data
,
function
(
e
)
{
$
(
self
).
attr
(
"disabled"
,
false
);
if
(
e
.
status
)
{
$
(
"textarea[name='content']"
).
val
(
''
);
var
html
=
tpl
(
e
.
data
);
$
(
".comment-list"
).
prepend
(
html
);
$
(
".comment-send-box"
).
hide
();
$
(
'.mask'
).
hide
();
}
else
{
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
function
comments
()
{
var
lastplid
=
$
(
".comment-list li:last-child"
).
attr
(
'data-id'
);
lastplid
=
lastplid
?
lastplid
:
0
;
$
.
post
(
"/e/action/news/comment.php"
,
{
newsid
:
newsid
,
lastplid
:
lastplid
},
function
(
e
)
{
if
(
!
$
.
isEmptyObject
(
e
.
data
))
{
var
comments
=
e
.
data
;
var
html
=
''
;
for
(
i
in
comments
)
{
html
+=
tpl
(
comments
[
i
]);
}
$
(
".comment-list"
).
html
(
html
);
}
},
'json'
);
}
function
tpl
(
comment
)
{
var
html
=
'<li data-id="'
+
comment
.
id
+
'">
\
<img src="'
+
comment
.
avatar
+
'">
\
<div class="name">'
+
comment
.
nickname
+
'</div>
\
<div class="comment-main">'
+
comment
.
content
+
'</div>
\
<div class="comment-footbar clearfix">
\
<span>'
+
comment
.
created_at
+
'</span>
\
<a href="javascript:popReplyComment('
+
comment
.
id
+
');" class="pl-reply"><i class="iconfont icon-comment_light"></i>回复</a>
\
<a href="javascript:likeComment('
+
comment
.
id
+
', '
+
comment
.
islike
+
');" class="pl-zan"><i class="iconfont '
+
(
comment
.
islike
?
"icon-zan-fill"
:
"icon-zan"
)
+
'"></i>赞</a>
\
</div>'
;
if
(
!
$
.
isEmptyObject
(
comment
.
reply
))
{
var
replys
=
comment
.
reply
;
html
+=
'<div class="comment-replay">'
;
for
(
i
in
replys
)
{
html
+=
'<div class="comment-replay-list"><span>'
+
replys
[
i
].
nickname
+
':</span>'
+
replys
[
i
].
content
+
' <span>'
+
replys
[
i
].
created_at
+
'</span></div>'
;
}
html
+=
'</div>'
;
}
return
html
+
'</li>'
;
}
//回复弹窗
function
popReplyComment
(
id
)
{
var
parent
=
$
(
'.comment-list'
).
find
(
'> li[data-id='
+
id
+
']'
);
var
name
=
parent
.
find
(
'> .name'
).
text
()
+
':'
;
var
content
=
parent
.
find
(
'> .comment-main'
).
text
();
$
(
'#reply-name'
).
text
(
name
);
$
(
'#reply-content'
).
text
(
content
);
$
(
"#maskCommon"
).
show
();
$
(
".comment-reply"
).
show
();
$
(
"input[name='plid']"
).
val
(
id
);
}
//回复评论
$
(
".reply-pl"
).
click
(
function
()
{
var
data
=
{
'newsid'
:
newsid
,
'plid'
:
$
(
"input[name='plid']"
).
val
(),
'content'
:
$
.
trim
(
$
(
"textarea[name='replycontent']"
).
val
())
};
var
self
=
this
;
if
(
!
data
[
'newsid'
]
||
!
data
[
'plid'
])
{
pop
(
'参数错误'
);
return
false
;
}
if
(
!
data
[
'content'
])
{
pop
(
'评论内容不能为空'
);
return
false
;
}
$
(
self
).
attr
(
"disabled"
,
true
);
$
.
post
(
"/e/action/news/comment.php?mod=reply"
,
data
,
function
(
e
)
{
$
(
self
).
attr
(
"disabled"
,
false
);
if
(
e
.
status
)
{
handelReplyComment
(
data
.
plid
,
e
.
data
);
$
(
"textarea[name='replycontent']"
).
val
(
''
);
$
(
".comment-reply"
).
hide
();
$
(
'.mask'
).
hide
();
}
else
{
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
function
handelReplyComment
(
plid
,
comment
)
{
$
.
each
(
$
(
'.comment-list li'
),
function
(){
if
(
$
(
this
).
attr
(
'data-id'
)
==
plid
)
{
var
html
=
''
;
if
(
$
(
this
).
children
(
".comment-replay"
).
html
())
{
html
=
'<div class="comment-replay-list"><span>'
+
comment
.
nickname
+
':</span>'
+
comment
.
content
+
' <span>'
+
comment
.
created_at
+
'</span></div>'
;
$
(
this
).
children
(
".comment-replay"
).
append
(
html
);
}
else
{
html
=
'<div class="comment-replay">
\
<div class="comment-replay-list"><span>'
+
comment
.
nickname
+
':</span>'
+
comment
.
content
+
' <span>'
+
comment
.
created_at
+
'</span></div>
\
</div>'
;
$
(
this
).
append
(
html
);
}
}
});
}
//评论点赞
function
likeComment
(
plid
,
islike
)
{
if
(
islike
)
{
return
false
;
}
$
.
post
(
"/e/action/news/comment.php?mod=like"
,
{
plid
:
plid
},
function
(
e
)
{
if
(
e
.
status
)
{
$
.
each
(
$
(
'.comment-list li'
),
function
(){
if
(
$
(
this
).
attr
(
'data-id'
)
==
plid
)
{
$
(
this
).
find
(
".icon-zan"
).
addClass
(
"icon-zan-fill"
).
removeClass
(
"icon-zan"
);
}
});
}
else
{
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
}
function
pop
(
msg
,
islogin
)
{
if
(
islogin
===
'nologin'
)
{
location
.
href
=
"/e/member/login"
;
return
false
;
}
layer
.
msg
(
msg
);
}
var
isLoading
=
false
;
var
scrollLoad
=
$
(
"#scrollLoad"
);
var
spinner
=
"/skin/default/images/spinner-rosetta-blue-26x26.gif"
;
var
preload
=
new
Image
();
preload
.
src
=
spinner
;
function
scrollLoading
()
{
var
currentBottom
=
parseFloat
(
$
(
window
).
height
())
+
parseFloat
(
$
(
window
).
scrollTop
());
if
(
$
(
document
).
height
()
<=
currentBottom
)
{
if
(
!
isLoading
)
{
isLoading
=
true
;
var
lastplid
=
$
(
".comment-list li:last-child"
).
attr
(
'data-id'
);
lastplid
=
lastplid
?
lastplid
:
0
;
scrollLoad
.
html
(
"<img src='"
+
spinner
+
"'>"
);
$
.
post
(
"/e/action/news/comment.php"
,
{
newsid
:
newsid
,
lastplid
:
lastplid
},
function
(
e
)
{
if
(
!
$
.
isEmptyObject
(
e
.
data
))
{
var
comments
=
e
.
data
;
var
html
=
''
;
for
(
i
in
comments
)
{
html
+=
tpl
(
comments
[
i
]);
}
$
(
".comment-list"
).
append
(
html
);
}
else
{
scrollLoad
.
html
(
"全部加载完毕"
);
$
(
window
).
off
(
"scroll"
,
scrollLoading
);
setTimeout
(
function
()
{
scrollLoad
.
slideUp
();
},
1000
);
}
isLoading
=
false
;
},
'json'
);
}
}
}
if
(
scrollLoad
.
length
>
0
)
{
comments
();
$
(
window
).
on
(
"scroll"
,
scrollLoading
);
scrollLoading
();
}
//init
$
.
post
(
"/e/action/news/index.php?mod=init"
,
{
newsid
:
newsid
},
function
(
e
)
{
//点赞
if
(
e
.
data
.
isdiggtop
)
{
$
(
"#zan"
).
find
(
'i'
).
removeClass
(
'icon-zan'
).
addClass
(
'icon-zan-fill'
);
}
else
{
diggtop
();
}
//收藏
if
(
e
.
data
.
isfava
)
{
$
(
'#favor'
).
find
(
'i'
).
removeClass
(
'icon-favor'
).
addClass
(
'icon-favor-fill'
);
}
},
'json'
);
//点赞
function
diggtop
()
{
$
(
'#zan'
).
one
(
'click'
,
function
()
{
$
.
post
(
"/e/action/news/index.php?mod=diggtop"
,
{
newsid
:
newsid
},
function
(
e
)
{
if
(
e
.
status
)
{
$
(
"#zan"
).
find
(
'i'
).
removeClass
(
'icon-zan'
).
addClass
(
'icon-zan-fill'
);
$
(
'.zan-tip'
).
animate
({
opacity
:
"1"
,
top
:
"-=30"
},
500
).
animate
({
opacity
:
"0"
,
top
:
"-30"
},
"slow"
);
}
else
{
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
}
//收藏
$
(
'#favor'
).
click
(
function
()
{
var
self
=
this
;
var
fill
=
$
(
self
).
find
(
"i"
).
hasClass
(
"icon-favor"
);
$
.
post
(
"/e/action/news/index.php?mod=favorite"
,
{
newsid
:
newsid
},
function
(
e
)
{
if
(
e
.
status
)
{
if
(
fill
)
{
$
(
self
).
find
(
'i'
).
removeClass
(
'icon-favor'
).
addClass
(
'icon-favor-fill'
);
}
else
{
$
(
self
).
find
(
'i'
).
removeClass
(
'icon-favor-fill'
).
addClass
(
'icon-favor'
);
}
}
else
{
pop
(
e
.
msg
,
e
.
data
);
}
},
'json'
);
});
(
function
(
$
)
{
//加载乐视视频
$
(
"div.lecloud-video"
).
each
(
function
()
{
var
width
=
640
,
height
=
360
,
rate
=
width
/
height
;
var
video
=
createVideoElement
(
width
,
height
);
$
(
"#videoPlayer"
).
append
(
video
);
//按设定的比例调整大小
var
pNode
=
video
.
parentNode
,
toWidth
=
pNode
.
clientWidth
>=
1024
?
1024
:
pNode
.
clientWidth
,
toHeight
=
toWidth
/
rate
;
//视频浮动站位
$
(
'.video-empty-block'
).
height
(
toHeight
);
setVideo
(
video
,
$
(
this
).
attr
(
'vu'
),
toWidth
,
toHeight
);
$
(
this
).
remove
();
});
function
createVideoElement
(
w
,
h
)
{
var
node
=
document
.
createElement
(
'iframe'
);
node
.
setAttribute
(
"allowfullscreen"
,
true
);
node
.
setAttribute
(
"allowtransparency"
,
true
);
node
.
setAttribute
(
"frameborder"
,
"0"
);
node
.
setAttribute
(
"scrolling"
,
"no"
);
//node.setAttribute("width", w);
//node.setAttribute("height", h);
node
.
style
.
maxWidth
=
"100%"
;
return
node
;
}
function
setVideo
(
node
,
vu
,
w
,
h
)
{
node
.
setAttribute
(
"width"
,
w
);
node
.
setAttribute
(
"height"
,
h
);
node
.
src
=
'http://yuntv.letv.com/bcloud.html?uu=pjseptwfce&vu='
+
vu
+
'&pu=510360dfc7&auto_play=1&width='
+
w
+
'&height='
+
h
+
'&lang=zh_CN'
;
}
})(
jQuery
);
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment