1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>TODO supply a title</title>
- {include file="../application/manage/view/commons/headers.html" }
-
- <script >
- // 保存信息
- function save(){
- var data=$("#myform").serialize();
- $.ajax({
- url:"/manage/messages/save",
- data:data,type:"get",
- success:function(rs){
- if(rs.indexOf("insert_ok")>=0){
- document.location.href="edit?id="+rs.split(";")[1];
- }else if(rs=="success"){
- alert('保存成功');
- document.location.reload();
- }else{
- alert("保存失败!");
- }
- },error:function(e,e1,e2){
- alert(e2);
- }
- });
- }
-
-
- </script>
-
-
- </head>
- <body>
- <form id="myform" action="" method="get" >
- <input name="id" type="hidden" value="{if isset($messages) }{$messages.id}{/if}" />
- <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1" >
- <tr>
- <th width="105" height="38" align="right" >属性 </th>
- <th colspan="3" >信息</th>
- </tr>
- <tr>
- <th height="32" align="right" >标题:</th>
- <td colspan="3" >
- <input name="title" type="text" class="easyui-textbox" size="55" value="{if isset($messages) }{$messages.title}{/if}" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >内容:</th>
- <td colspan="3" >
- <textarea name="content" class="easyui-textbox" data-options="multiline:true" style="width: 412px;height:150px">{if isset($messages) }{$messages.content}{/if}</textarea>
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >是否已读:</th>
- <td colspan="3" >
- <input name="is_read" id="status_1" type="radio" size="35" value="1" {if isset($messages) && $messages.is_read==1 }checked="check"{/if} /><label for="status_1" >未读</label>
- <input name="is_read" id="status_2" type="radio" size="35" value="2" {if isset($messages) && $messages.is_read==2 }checked="check"{/if} /><label for="status_2" >已读</label>
- </td>
- </tr>
- <tr>
- <th height="32" > </th>
- <td>
- <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()" >保存</a>
- <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');" >关闭</a>
- </td>
- </tr>
- <tr >
- <th height="32" > </th>
- <td colspan="3" >
-
- </td>
- </tr>
- </table>
- </form>
-
-
-
-
-
-
-
-
-
-
-
- </body>
- </html>
|