单图上传

  <div class="form-item">
<label>图片<span>(图片名称)</span></label> 
<div id="cover_id" class="container">
<div id="file_cover_id">你的浏览器不支持flash,Silverlight或者HTML5!</div>
<input type="hidden" name="cover_id"  value="{$info.cover_id|default=''}">
<a id="select_cover_id" href="javascript:void(0);" class='btn'>选择文件</a>
<a id="post_cover_id" href="javascript:void(0);" class='btn'>开始上传</a>
</div>

   <div class="uploader_preview">
 {notempty name="info['cover_id']"}
 <div class="uploader-pre-item"> <img src="{$info.cover_id|get_cover_path}"/>
</div>
{/notempty}
</div>

<script type="text/javascript">  
var field="cover_id";
upload(field);
</script>
                                      </div>