Skip to content

Commit

Permalink
Other&NewsFixed
Browse files Browse the repository at this point in the history
  • Loading branch information
TedaLIEz committed Apr 25, 2015
1 parent 1e947f9 commit 8337d5c
Show file tree
Hide file tree
Showing 43 changed files with 4,916 additions and 2,194 deletions.
512 changes: 161 additions & 351 deletions .idea/workspace.xml

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion App/Admin/Controller/AdviseController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,23 @@ public function deladvise(){
$id=I('id',0,'intval');
// dump($id);
if(M('advise')->delete($id)){
$this->redirect('advise_index');
$this->success('删除成功');
}else{
$this->error('删除失败');
}
}
public function advise_handle(){
$data=array();
$data['name']=I('info_name');
$data['content']=I('text');
$data['phone']=I('info_phone');
$data['qq']=I('info_qq');
$data['feedback']=I('ReceiveFeedback',0,'intval');
$data['title']=I('subject');
if(M('advise')->add($data)){
$this->redirect('/Home/Other/advice');
}

}

}
5 changes: 3 additions & 2 deletions App/Admin/Controller/NewsController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public function ueditor(){

//新增 OR 修改新闻后台处理
public function addNewsHandle(){

// dump($_POST);
//// die;
if(!IS_POST){
$this->error('页面不存在',U('news_index'));
}
Expand All @@ -85,7 +86,7 @@ public function addNewsHandle(){
$data['title']=I('title');
$data['content']=$_POST['content'];
$data['time']=time();

$data['text']=$_POST['text'];
if(M('news')->where(array('id'=>I('id')))->find()){
if(D('NewsRelation')->where(array('id'=>I('id')))->relation(true)->save($data)){
$this->success('修改成功',U('news_index'));
Expand Down
4 changes: 2 additions & 2 deletions App/Admin/View/News/addNews.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
<td align="center" colspan="2">
<input name="pic" type="hidden" id="pic" value=""/>

<input onClick="ClearTags()" type="submit" value="保存提交"/>

<textarea style="display:none" name="text" id="text" ></textarea>

<input onClick="ClearTags()" type="submit" value="保存提交"/>
</td>
</tr>
</table>
Expand Down
12 changes: 10 additions & 2 deletions App/Admin/View/News/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@
<js href="__PUBLIC__/ueditor/ueditor.all.min.js" />
<script type="text/javascript" charset="utf-8" src="lang/zh-cn/zh-cn.js"></script>
<script>

var ue;
$(function(){
window.UEDITOR_CONFIG.initialFrameHeight=600;
window.UEDITOR_CONFIG.initialFrameWidth=1900;
var ue = UE.getEditor('ueditor',{serverUrl :'{:U('Admin/News/ueditor')}',onready: function () {
ue= UE.getEditor('ueditor',{serverUrl :'{:U('Admin/News/ueditor')}',onready: function () {
this.setContent('{$text.content}');
}});
})
function ClearTags(){
var text=ue.getContentTxt();
document.getElementById("text").textContent=text;
}

</script>
<body>
Expand Down Expand Up @@ -49,9 +55,11 @@
</td>
</tr>
<input type="hidden" name="id" value="{$text.id}"/>

<tr>
<td align="center" colspan="2">
<input type="submit" value="保存提交"/>
<input onClick="ClearTags()" type="submit" value="保存提交"/>
<textarea style="display:none" name="text" id="text" ></textarea>
</td>
</tr>

Expand Down
25 changes: 25 additions & 0 deletions App/Home/Controller/OtherController.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2015/4/25
* Time: 16:17
*/

namespace Home\Controller;


use Think\Controller;

class OtherController extends Controller{
public function advice(){
$this->display();
}
public function contact(){
$this->display();
}
public function member(){
$this->display();
}

}
8 changes: 4 additions & 4 deletions App/Home/View/Index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<div class="newsblock_container">
<a href="#">
<p class="new-head1"><span class="first">{$news[0].title|substr=0,1}</span><?php echo substr($news[0]['title'],1,strlen($news[0]['title']));?></p>
<p class="new-xiaoxi1">{$news[0].content|replace_img}</p>
<p class="new-xiaoxi1">{$news[0].text}</p>
</a>
</div>
</div>
Expand All @@ -103,7 +103,7 @@
<div class="new-small new2">
<a href="#">
<p class="new-head1"><span class="first">{$news[1].title|substr=0,1}</span><?php echo substr($news[1]['title'],1,strlen($news[1]['title']));?></p>
<p class="new-xiaoxi1">{$news[1].content|replace_img}</p>
<p class="new-xiaoxi1">{$news[1].text}</p>
</a>
</div>
</div>
Expand All @@ -117,7 +117,7 @@
<div class="new-small new3">
<a href="#">
<p class="new-head1"><span class="first">{$news[2].title|substr=0,1}</span><?php echo substr($news[2]['title'],1,strlen($news[2]['title']));?></p>
<p class="new-xiaoxi1">{$news[2].content|replace_img}</p>
<p class="new-xiaoxi1">{$news[2].text}</p>
</a>
</div>
</div>
Expand All @@ -127,7 +127,7 @@
<div class="new-small new4">
<a href="#">
<p class="new-head1"><span class="first">{$news[3].title|substr=0,1}</span><?php echo substr($news[3]['title'],1,strlen($news[3]['title']));?></p>
<p class="new-xiaoxi1">{$news[3].content|replace_img}</p>
<p class="new-xiaoxi1">{$news[3].text }</p>
</a>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions App/Home/View/News/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>最新动态</title>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/NewsSrc/style/general.css">
<script type="text/javascript" src="__PUBLIC__/NewsSrc/js/jquery.js"></script>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/general.css">
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<script>
$(document).ready(
function () {
Expand Down Expand Up @@ -125,7 +125,7 @@
</td>
</tr>
<tr>
<td height="73"><span class="normaltext">{$news[$i].content|replace_img}</span></td>
<td height="73"><span class="normaltext">{$news[$i].text}</span></td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<title>投诉建议</title>
<link type="text/css" rel="stylesheet" href="style/general.css">
<script type="text/javascript" src="js/jquery.js"></script>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/general.css">
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<script>
$(document).ready(
function() {
Expand Down Expand Up @@ -135,95 +135,6 @@
<body>


<!-- HeadAreaStart -->
<div id="header">

<table width="1200px" border="0" style="background:#74b05c;margin:0px auto;">
<tbody>
<tr>
<td width="33%" align="center" valign="middle"><img src="im/dh.png" width="380" height="106" alt=""/>
</td>
<td width="13%" align="center" valign="middle" class="NaviLinkContainer"><a class="a-top" href="#" style="color: #FFFFFF">首页</a></td>
<td width="13%" align="center" valign="middle" class="NaviLinkContainer"><a class="a-top" href="#" style="color: #FFFFFF" >新闻</a></td>
<td width="13%" align="center" valign="middle" class="NaviLinkContainer"><a class="a-top" href="#" style="color: #FFFFFF">社联</a></td>
<td width="13%" align="center" valign="middle" class="NaviLinkContainer"><a class="a-top" href="#" style="color: #FFFFFF">社团</a>
</td>
<td width="13%" align="center" valign="middle" class="NaviLinkContainer"><a class="a-top" href="#" style="color: #FFFFFF">其他</a></td>
</tr>
</tbody>
</table>
</div>
<div id="downlist" style="display:none;">
<table width="1200px" border="0" style="margin:0px auto;">
<tbody>
<tr>
<td width="36%" align="center" valign="middle">&nbsp;


</td>
<td width="13%" align="left" valign="top">
<p><a href="" class="downlistlink">评分系统</a> </p>
<p><a href="" class="downlistlink">资源申请</a></p>
<p>
<a href="" class="downlistlink">设计委任栏</a></p>
<p>
<a href="" class="downlistlink">资料下载</a></p>
</td>
<td width="13%" align="left" valign="top">
<p>
<a href="" class="downlistlink">最新动态</a>
</p>
<p>
<a href="" class="downlistlink">活动预告</a>
</p>
<p>
<a href="" class="downlistlink">通告栏</a>
</p>

</td>
<td width="13%" align="left" valign="top">
<p>
<a href="" class="downlistlink">社联简介</a>
</p>
<p>
<a href="" class="downlistlink">社联机构</a>
</p>
<p>
<a href="" class="downlistlink">制度汇编</a>
</p>
<p>
<a href="" class="downlistlink">社联大事记</a>
</p>
<p>
<a href="" class="downlistlink">微仔说</a>
</p>

<p>&nbsp;</p>

</td>
<td width="13%" align="left" valign="top">&nbsp;

</td>
<td width="10%" align="left" valign="top">
<p>
<a href="" class="downlistlink">会员维权</a>
</p>
<p>
<a href="" class="downlistlink">投诉建议</a>
</p>
<p>
<a href="" class="downlistlink">联系我们</a>
</p>
<p>
<a href="" class="downlistlink">FAQ</a>
</p>
</td>
</tr>
</tbody>
</table>
</div>

<!-- HeadAreaEnd -->

<div id="wrap">
<table width="99%" border="0" style="margin:25px 0px">
Expand All @@ -233,15 +144,15 @@
</tr>
<tr>
<td width="27%" height="672" valign="top">
<p><a href="other_member.html" class="slidebarlink">&gt;会员维权</a></p>
<p><a href="other_advice.html" class="slidebarlink now">▶&nbsp;投诉建议</a></p>
<p><a href="other_contact.html" class="slidebarlink">&gt;联系我们</a></p>
<p><a href="FAQ.html" class="slidebarlink">&gt;FAQ</a></p>
<p><a href="{:U('/Home/Other/member')}" class="slidebarlink">&gt;会员维权</a></p>
<p><a href="{:U('/Home/Other/advice')}" class="slidebarlink now">▶&nbsp;投诉建议</a></p>
<p><a href="{:U('/Home/Other/contact')}" class="slidebarlink">&gt;联系我们</a></p>
<p><a href="{:U('/Home/FAQ/index')}" class="slidebarlink">&gt;FAQ</a></p>

</td>
<td width="73%" align="center" valign="top">

<form id="main"><table width="90%" border="0">
<form id="main" method="post" action="{:U('/Admin/Advise/advise_handle')}"><table width="90%" border="0">
<tbody>
<tr>
<td width="29%" height="71">
Expand Down Expand Up @@ -282,11 +193,11 @@

<p>

<input name="ReceiveFeedback" type="radio" id="ReceiveFeedback_Yes" value="Yes" checked style="display:none;" >
<input name="ReceiveFeedback" type="radio" id="ReceiveFeedback_Yes" value="1" checked style="display:none;" >

<br>

<input type="radio" name="ReceiveFeedback" value="No" id="ReceiveFeedback_No" style="display:none;">
<input type="radio" name="ReceiveFeedback" value="0" id="ReceiveFeedback_No" style="display:none;">

<br>
</p></td>
Expand Down Expand Up @@ -343,10 +254,6 @@

</div>

<!-- FootAreaStart -->
<div id="footer">
<p class="friendlink">友情链接</p>
</div>
<!-- FootAreaEnd -->

</body>
</html>
Loading

0 comments on commit 8337d5c

Please sign in to comment.