123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <include file="./Application/Admin/View/head.html" />
- <link rel="stylesheet" type="text/css" href="/Public/lib/bootstrap-Switch/bootstrapSwitch.css" />
- <link rel="stylesheet" type="text/css" href="/Public/plugins/uploadify/uploadify.css">
- <link rel="stylesheet" type="text/css" href="/Public/plugins/css/tinyselect.css">
- <style type="text/css">
- form .row input{width:250px;}
- * {
- margin: 0;
- padding: 0;
- }
- .citys{
- margin-bottom: 10px;
- }
- .citys p{
- line-height: 28px;
- }
- .warning{
- color: #c00;
- }
- table a{
- margin-right: 8px;
- color: #369;
- }
- .imgUpload {
- width: 60px;
- height: 25px;
- line-height: 25px;
- text-align: center;
- border-radius: 2px;
- background: #CC290E;
- color: #FFF;
- font-size: 12px;
- border: none;
- cursor: pointer;
- outline: none;
- }
- .c_img{
- width:240px;height:auto;
- }
- </style>
- </head>
- <body>
- <article class="page-container">
- <form action="" method="post" class="form form-horizontal" id="edit">
- <div class="row cl">
- <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>广告名称:</label>
- <div class="formControls col-xs-10 col-sm-10">
- <input type="text" class="input-text" placeholder="请输入广告名称" id="name" name="name" value="{$data['name']}" />
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-2 col-sm-2"><span class="c-red">*</span>链接:</label>
- <div class="formControls col-xs-10 col-sm-10">
- <input type="text" class="input-text" placeholder="请输入链接" id="url" name="url" value="{$data['url']}" />
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-xs-2 col-sm-2">头条id:</label>
- <div class="formControls col-xs-10 col-sm-10">
- <input type="text" class="input-text" placeholder="请输入头条id" id="tt_code" name="tt_code" value="{$data['tt_code']}" />
- </div>
- </div>
- <div class="row cl">
- <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
- <input type="hidden" class="input-text" value="{$data.id}" placeholder="" id="id" name="id" />
- <button type="submit" class="btn btn-success radius" id="save" name="save"><i class="icon-ok"></i> 确定</button>
- </div>
- </div>
- </form>
- </article>
- <!--_footer 作为公共模版分离出去-->
- <include file="./Application/Admin/View/foot.html" />
- <!--/_footer /作为公共模版分离出去-->
- <script>
- $().ready(function() {
- $("#edit").validate({
- rules: {
- name: {required: true},
- url: {required: true}
- },
- success: "valid",
- submitHandler: function() {
- $("#save").attr('disabled', true);
- var data = {
- id: $('#id').val(),
- name: $('#name').val(),
- img: $('#img').val(),
- url: $('#url').val(),
- tt_code: $('#tt_code').val()
- };
- $.ajax({
- type: "post",
- url: "{:U(CONTROLLER_NAME . '/' . ACTION_NAME)}",
- data: {data:data},
- success: function(data) {
- if (data.status == '1') {
- //加载层-风格3
- parent.layer.load(2);
- parent.layer.msg(data.info, {icon: 1});
- parent.location.reload();
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- } else if(data.status == '0') {
- parent.layer.msg(data.info, {icon: 2});
- }
- $("#save").removeAttr('disabled');
- }
- });
- }
- });
- });
- </script>
- </body>
- </html>
|