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
9abcc436
Commit
9abcc436
authored
Jul 06, 2017
by
汪波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
64bec677
c78b177b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
110 additions
and
20 deletions
+110
-20
build.xml
build.xml
+2
-0
firstnews.js
d/js/js/firstnews.js
+1
-1
goodnews.js
d/js/js/goodnews.js
+1
-1
newnews.js
d/js/js/newnews.js
+1
-1
connect.php
e/class/connect.php
+3
-7
comments.php
e/pl/comments.php
+91
-0
index.html
index.html
+10
-9
style.css
skin/default/css/style.css
+1
-1
No files found.
build.xml
View file @
9abcc436
...
...
@@ -30,6 +30,8 @@
<patternset>
<exclude
name=
"e/config/"
/>
<exclude
name=
"e/back_conf/"
/>
<exclude
name=
"d/"
/>
<exclude
name=
"index.html"
/>
<include
name=
"**/**"
/>
</patternset>
...
...
d/js/js/firstnews.js
View file @
9abcc436
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/changshang/2017-06-20/84.html
\"
title=
\"
让台湾观众坠入了美的旋涡
\"
>让台湾观众坠入了美的旋涡</a></li><li><a href=
\"
/shifu/24.html
\"
title=
\"
年轻时遇到了一些艳遇 回想起来依然记忆犹新
\"
>年轻时遇到了一些艳遇 回想起来依</a></li>"
);
\ No newline at end of file
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/shifu/24.html
\"
title=
\"
年轻时遇到了一些艳遇 回想起来依然记忆犹新
\"
>年轻时遇到了一些艳遇 回想起来依</a></li>"
);
\ No newline at end of file
d/js/js/goodnews.js
View file @
9abcc436
document
.
write
(
"<li><a href=
\"
/changshang/88.html
\"
title=
\"
美的空调全智能工厂:200台机器人有条不紊地工作
\"
>美的空调全智能工厂:200台机器人有</a></li><li><a href=
\"
http://code.ibanshou.cn
\"
title=
\"
首页幻灯[扳手快查]
\"
>首页幻灯[扳手快查]</a></li><li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/shifu/69.html
\"
title=
\"
细节决定成败
\"
>细节决定成败</a></li>"
);
\ No newline at end of file
document
.
write
(
"<li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/shifu/69.html
\"
title=
\"
细节决定成败
\"
>细节决定成败</a></li>"
);
\ No newline at end of file
d/js/js/newnews.js
View file @
9abcc436
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/changshang/88.html
\"
title=
\"
美的空调全智能工厂:200台机器人有条不紊地工作
\"
>美的空调全智能工厂:200台机器人有</a></li><li><a href=
\"
http://code.ibanshou.cn
\"
title=
\"
首页幻灯[扳手快查]
\"
>首页幻灯[扳手快查]</a></li><li><a href=
\"
/changshang/2017-06-20/84.html
\"
title=
\"
让台湾观众坠入了美的旋涡
\"
>让台湾观众坠入了美的旋涡</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/hangye/82.html
\"
title=
\"
公牛全线产品完成新国标升级:未来加大自动化投入
\"
>公牛全线产品完成新国标升级:未来加</a></li><li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/hangye/80.html
\"
title=
\"
插座国家标准又升级了 你还在用老的万能孔吗?
\"
>插座国家标准又升级了 你还在用老</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/hangye/75.html
\"
title=
\"
智能家电售后问题凸显 掘金未来需要新思路
\"
>智能家电售后问题凸显 掘金未来需</a></li>"
);
\ No newline at end of file
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/hangye/82.html
\"
title=
\"
公牛全线产品完成新国标升级:未来加大自动化投入
\"
>公牛全线产品完成新国标升级:未来加</a></li><li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/hangye/80.html
\"
title=
\"
插座国家标准又升级了 你还在用老的万能孔吗?
\"
>插座国家标准又升级了 你还在用老</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/hangye/75.html
\"
title=
\"
智能家电售后问题凸显 掘金未来需要新思路
\"
>智能家电售后问题凸显 掘金未来需</a></li><li><a href=
\"
/hangye/74.html
\"
title=
\"
中国制造加速走向全球 GMCC向世界展示中国“芯”
\"
>中国制造加速走向全球 GMCC向世界</a></li><li><a href=
\"
/hangye/73.html
\"
title=
\"
长虹制造云平台获国家“互联网+”重大工程支持项目
\"
>长虹制造云平台获国家“互联网+”</a></li><li><a href=
\"
/hangye/71.html
\"
title=
\"
网约家电维修 不想却遇“山寨”维修
\"
>网约家电维修 不想却遇“山寨”维</a></li>"
);
\ No newline at end of file
e/class/connect.php
View file @
9abcc436
...
...
@@ -128,12 +128,9 @@ function db_connect(){
function
do_dbconnect
(
$dbhost
,
$dbport
,
$dbusername
,
$dbpassword
,
$dbname
){
global
$ecms_config
;
$dblocalhost
=
$dbhost
;
//端口
if
(
$dbport
)
{
$dblocalhost
.=
':'
.
$dbport
;
}
$dblink
=@
mysqli_connect
(
$dblocalhost
,
$dbusername
,
$dbpassword
);
$dbport
=
$dbport
?
:
3306
;
$dblink
=@
mysqli_connect
(
$dblocalhost
,
$dbusername
,
$dbpassword
,
$dbname
,
$dbport
);
if
(
!
$dblink
)
{
echo
"Cann't connect to DB!"
;
...
...
@@ -156,7 +153,6 @@ function do_dbconnect($dbhost,$dbport,$dbusername,$dbpassword,$dbname){
@
mysqli_query
(
$dblink
,
'SET '
.
$q
);
}
}
@
mysqli_select_db
(
$dblink
,
$dbname
);
return
$dblink
;
}
...
...
e/pl/comments.php
0 → 100644
View file @
9abcc436
<?php
require
(
"../class/connect.php"
);
require
(
"../class/db_sql.php"
);
require
(
"../member/class/user.php"
);
require
(
"../class/q_functions.php"
);
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$user
=
islogin
();
if
(
empty
(
$user
))
{
returnmsg
(
false
,
'请登录'
);
}
if
(
$_POST
[
'mod'
]
==
'create'
)
{
$newsid
=
isset
(
$_POST
[
'newsid'
])
?
$_POST
[
'newsid'
]
:
0
;
$newsid
=
$newsid
+
0
;
$content
=
isset
(
$_POST
[
'content'
])
?
$_POST
[
'content'
]
:
''
;
if
(
$newsid
==
0
)
{
returnmsg
(
false
,
'newsid参数错误'
);
}
if
(
$content
==
''
)
{
returnmsg
(
false
,
'评论内容不能为空'
);
}
}
$result
=
newspls
(
89
,
100
);
echo
"<pre>"
;
print_r
(
$result
);
function
createComments
(
$user
,
$newsid
,
$content
,
$plid
=
0
)
{
global
$empire
,
$dbtbpre
;
$table
=
$dbtbpre
.
'ecms_comments'
;
$sql
=
"select id,classid from
{
$dbtbpre
}
ecms_news where id=
{
$newsid
}
"
;
$news
=
$empire
->
fetch1
(
$sql
);
if
(
empty
(
$news
))
{
returnmsg
(
false
,
'该内容不存在'
);
}
$ip
=
$_SERVER
[
'REMOTE_ADDR'
];
$now
=
time
();
$sql
=
"insert into
{
$table
}
(user_id,classid,newsid,content,ip,created_at,updated_at) VALUES (
{
$user
[
'userid'
]
}
,
{
$news
[
'classid'
]
}
,
{
$newsid
}
, '
{
$content
}
', '
{
$ip
}
',
{
$now
}
,
{
$now
}
)"
;
$empire
->
query
(
$sql
);
$id
=
$empire
->
lastid
();
if
(
!
$id
)
{
returnmsg
(
false
,
'评论失败'
);
}
else
{
returnmsg
(
true
,
'评论成功'
);
}
}
function
newspls
(
$newsid
,
$num
)
{
global
$empire
,
$dbtbpre
;
$sql
=
"select id,restb from
{
$dbtbpre
}
ecms_news where id=
{
$newsid
}
"
;
$news
=
$empire
->
fetch1
(
$sql
);
if
(
empty
(
$news
))
{
returnmsg
(
false
,
'该内容不存在'
);
}
$result
=
[];
$query
=
$empire
->
query
(
"select * from
{
$dbtbpre
}
enewspl_
{
$news
[
'restb'
]
}
where id=
{
$newsid
}
and checked=0 order by plid desc limit
{
$num
}
"
);
while
(
$row
=
$empire
->
fetch
(
$query
))
{
$row
[
'avatar'
]
=
"http://u.ibanshou.cn/avatar?n="
.
urlencode
(
$row
[
'username'
])
.
"&s=m"
;
if
(
$row
[
'userid'
])
{
$member
=
$empire
->
fetch1
(
"select userid,avatar from
{
$dbtbpre
}
enewsmember where userid=
{
$row
[
'userid'
]
}
"
);
$row
[
'avatar'
]
=
$member
[
'avatar'
];
}
$result
[]
=
tplpl
(
$row
);
}
return
$result
;
}
function
tplpl
(
$pl
)
{
$syatime
=
date
(
'Y.m.d H:i:s'
,
$pl
[
'syatime'
]);
return
$pl
;
}
function
returnmsg
(
$status
=
false
,
$msg
=
''
,
$data
=
''
)
{
$return
[
'status'
]
=
$status
?
true
:
false
;
$return
[
'msg'
]
=
$msg
;
$return
[
'data'
]
=
$data
;
echo
json_encode
(
$return
,
JSON_UNESCAPED_UNICODE
);
exit
();
}
\ No newline at end of file
index.html
View file @
9abcc436
...
...
@@ -82,34 +82,34 @@
</div>
<div
class=
"learnning-course newest"
>
<div
class=
"tit"
>
推荐课程
<span></span><a
href=
"http://
bbs
.yunya.com/home/all-course"
>
全部课程
</a></div>
<div
class=
"tit"
>
推荐课程
<span></span><a
href=
"http://
xue
.yunya.com/home/all-course"
>
全部课程
</a></div>
<div
class=
"newest-list clearfix"
><div
class=
"learn-course-box"
>
<div
class=
"lc-img"
><a
href=
"http://
ct
.yunya.com/home/course-detail?courseId=37"
><img
<div
class=
"lc-img"
><a
href=
"http://
xue
.yunya.com/home/course-detail?courseId=37"
><img
src=
"http://deimg.c.xixia.cc/preview/14/af/53/vhc0QjF8zCEDRVLD5135.jpg-ym.preview"
></a></div>
<h3><a
href=
"http://
ct
.yunya.com/home/course-detail?courseId=37"
>
我来发个系列课程试试看
</a></h3>
<h3><a
href=
"http://
xue
.yunya.com/home/course-detail?courseId=37"
>
我来发个系列课程试试看
</a></h3>
<p><span>
3人已学
</span><span>
6人评论
</span></p>
</div><div
class=
"learn-course-box"
>
<div
class=
"lc-img"
><a
href=
"http://
ct
.yunya.com/home/course-detail?courseId=5"
><img
<div
class=
"lc-img"
><a
href=
"http://
xue
.yunya.com/home/course-detail?courseId=5"
><img
src=
"http://deimg.c.xixia.cc/preview/27/8f/26/mOuzx8G2eAYefYOL2159.jpg-ym.preview"
></a></div>
<h3><a
href=
"http://
ct
.yunya.com/home/course-detail?courseId=5"
>
皮皮动力产品介绍
</a></h3>
<h3><a
href=
"http://
xue
.yunya.com/home/course-detail?courseId=5"
>
皮皮动力产品介绍
</a></h3>
<p><span>
1人已学
</span><span>
6人评论
</span></p>
</div><div
class=
"learn-course-box"
>
<div
class=
"lc-img"
><a
href=
"http://
ct
.yunya.com/home/course-detail?courseId=2"
><img
<div
class=
"lc-img"
><a
href=
"http://
xue
.yunya.com/home/course-detail?courseId=2"
><img
src=
"http://deimg.c.xixia.cc/preview/e0/b9/73/ipp4X6nwQp8ob8Kt2436.jpg-ym.preview"
></a></div>
<h3><a
href=
"http://
ct
.yunya.com/home/course-detail?courseId=2"
>
指掌时代公司介绍
</a></h3>
<h3><a
href=
"http://
xue
.yunya.com/home/course-detail?courseId=2"
>
指掌时代公司介绍
</a></h3>
<p><span>
4人已学
</span><span>
35人评论
</span></p>
</div></div></div><div
class=
"latest-news"
>
<div
class=
"common-tit-index"
>
热门互动
</div>
<ul
class=
"news-list"
><li>
<a
href=
"http://bbs.yunya.com/forum.php?mod=viewthread&tid=167"
>
<h3>
我对冰箱漏,堵的一点看法与处理(转)
</h3>
<p>
3
人已参与
</p>
<p>
4
人已参与
</p>
<img
src=
"/skin/default/images/notimg.gif"
>
</a>
</li><li>
<a
href=
"http://bbs.yunya.com/forum.php?mod=viewthread&tid=18"
>
<h3>
解决冰堵的神器,很简单,谁用谁知道
</h3>
<p>
3
0
人已参与
</p>
<p>
3
2
人已参与
</p>
<img
src=
"http://bbs.yunya.com/data/attachment/block/3f/3f0a9860abffca597be57ae748d68b99.jpg"
>
</a>
</li></ul></div>
...
...
@@ -144,6 +144,7 @@
<script
type=
'text/javascript'
src=
"/skin/default/js/jquery-1.11.3.min.js"
></script>
<script
type=
'text/javascript'
src=
"/skin/default/js/swiper.min.js"
></script>
<script
type=
'text/javascript'
src=
"http://u.test.yunyamooc.com/js/nav.js"
></script>
<script>
var
mySwiper
=
new
Swiper
(
'.swiper-container'
,
{
autoplay
:
5000
,
...
...
skin/default/css/style.css
View file @
9abcc436
...
...
@@ -328,7 +328,7 @@
padding-right
:
10px
;
}
/*FOOT NAV*/
/*FOOT NAV*/
.foot-nav
{
height
:
50px
;
}
...
...
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