& lt;! doctype html & gt;
& lt; html & gt;
& lt; head & gt;
& lt; meta charset = "utf-8"& gt;
& lt; title & gt; link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css /main.css"/>
<script type="text/javascript" src="__PUBLIC__/js/libs/modernizr.min.js"></script>
<script type=" text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.min.js "></script>
<script type="text/javascript" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
< /head>
<body>
<include file="Public/head" />
<div class="containerclearfix">
<include file="Public/left" / >
<div class="main-wrap">
<div class="crumb-wrap">
<div class="crumb-list"><i class=" icon-font"></i><a href="/jscss/admin/design/">首页</a><span class="crumb-step">>< /span><a class="crumb-name" href="/jscss/admin/design/">文章管理</a><span class="crumb-step">></ 스팬><span>새로운增文章</span></div>
</div>
<div class="result-wrap">
<div class="result-content">
<form action="" method="post" id="myform" name= "myform" enctype="multipart/form-data">
<input type="hidden" name="id" value="{$articler.id}">
<table class="insert -tab" width="100%">
<tbody>
<tr>
<th><i class="require-red">*</i>文章name称:
<td>
<input class="common-text require" id="catename" name="title" size="50" 값 ="{$articler.title}" 유형 ="text">
</td>
</tr>
<tr>
<번째><i class="require-red">*</i>文章描述:</th>
<td>
<textarea style="width:420px;height :100px;" name="desc">{$articler.desc}</textarea>
</td>
</tr>
<tr>
ㅋㅋㅋ d> <input id="pic" name=" pic" size="50" value="" type="file"> <if Condition="$articler['pic'] neq ''"> <img src="__ROOT__{$ articler.pic} "height ="50 "& gt; else/& gt; 暂 暂 无 图片 & lt;/if & gt; & lt;/td & gt;/lt;/tr & gt; & lt; tr> <th><i class="require-red">*</i>所属栏目:</th> <td> <이름="cateid" 선택 > <option >选择分类</option> <volist name=" cateres" id="vo">ㅋㅋㅋ value="{$vo.id}">{$vo.catename}</option>ㅋㅋㅋ
</div>
</div>
</div>
< !--/main-->
</div>
<script type="text/javascript">
UE.getEditor('content',{initialFrameWidth:1000,initialFrameHeight:200,} );
</script>
</body>
</html>
<?php
namespace AdminController;
use ThinkController;
class ArticleController 확장 컨트롤러 {
공용 함수 lst(){
+ $ info) {// 오류 프롬프트 오류 메시지 업로드
$ this-& gt; error ($ upload- & gt; geterror ()) ']=$info['savepath'].$info[' 저장이름'];ㅋㅋㅋ );
}else{ $this->error('添加文章失败!'); } }else{ㅋㅋㅋ件上传类형
$upload->rootPath= './'; // 设置附件上传根目录
$upload->savePath ='/Public/Uploads/'; // 设置附件上传(子)目录
// 上传单个文件
$info = $upload->uploadOne($_FILES['pic']);
if(!$info) {//上传错误提示错误信息
$this->error($upload->getError());
}else{// 上传成功 获取上传文件信息
$date['pic']=$info['savepath '].$info['저장 이름'];
}
}else{
}ㅋㅋㅋ );
}else{ $this->error('修改文章失败!'); } }else{공개 함수 del(){
//实例化
$article=D('article'); if($article->delete(I('id'))){ $this ->success('删除文章成功!',U('lst')); }else{ $this->error('删除文章失败!'); } } 공용 함수 sort(){ //var_dump($_POST); //打成一排 //dump($_POST); //분리打现来 $article=D('article'); foreach ($_POST as $id => $sort) { // 코드... $article->where (array('id'=>$id))->setField('sort',$sort); } $this->success('排序更新成功!',U('lst' )); }}