<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="list.aspx.cs" Inherits="wjdhcms_SAAS.module.message.list" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>广告管理</title>

    <!-- start: CSS file-->
    <!-- Vendor CSS-->
    <link href="../static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="../static/vendor/skycons/css/skycons.css" rel="stylesheet" />
    <link href="../static/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" />

    <!-- Plugins CSS-->
    <link href="../static/plugins/bootkit/css/bootkit.css" rel="stylesheet" />    
    
    
    <!-- Page CSS -->   
    <link href="../static/css/style.css" rel="stylesheet" />
    <link href="../static/css/add-ons.min.css" rel="stylesheet" />
    <!-- end: CSS file--> 
      
    
    <!-- Head Libs -->
    <script src="../static/plugins/modernizr/js/modernizr.js"></script>
    
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="../static/js/html5shiv.min.js"></script>
      <script src="../static/js/respond.min.js"></script>
    <![endif]-->    
    

</head>
<style>td{overflow: hidden;}</style>
<body class="mainbody">
  <div class="container-fluid">
    <div class="row"> 
            <div class="col-lg-12">
              <div class="panel">
                <div class="panel-body">
                  <div class="table-responsive">
                    <table class="table table-bordered table-striped table-condensed table-hover article-list">
                      <thead>
                        <tr>
                          <th width="3%" style="text-align:center">ID</th>
                          <th width="5%" style="text-align:center">用户昵称</th>
						  <th width="10%" style="text-align:center">联系方式</th>
                          <th width="13%">留言标题</th>
                          <th>留言内容</th> 
                          <th width="5%" style="text-align:center">是否查看</th>
                          <th width="10%" style="text-align:center">时间</th>
                          <th width="10%" style="text-align:center">操作</th>                                          
                        </tr>
                      </thead>   
                      <tbody style="word-break:break-all; word-wrap:break-word;">

                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </div>
          </div>  
  </div>

    <!-- start: JavaScript-->
    
    <!-- Vendor JS-->       
    <script src="../static/vendor/js/jquery-2.1.1.min.js"></script>
    <script src="../static/vendor/js/jquery-migrate-1.2.1.min.js"></script>
    <script src="../static/vendor/bootstrap/js/bootstrap.min.js"></script>
    <script src="../static/vendor/skycons/js/skycons.js"></script> 
    <!-- Pages JS -->
    <script src="../static/js/ajax.js"></script>
    <!-- end: JavaScript-->

     <script>

         $(function () {
             get_json('../../api/message.ashx?action=list&time=' + Math.random(), function (data) {
                 var list = '';
                 for (var i = 0; i < data.data.length; i++) {
                     var addate = formatTime(data.data[i].add_time, "yyyy-MM-dd hh:mm:ss");
                     list += ''
                      + '<tr id="l' + data.data[i].id + '"  style="text-align:center">'
                         + '<td  style="text-align:center">' + data.data[i].id + '</td>'
                         + '<td  style="text-align:center">' + data.data[i].name + '</td>'
                         + '<td  style="text-align:center">' + data.data[i].phone + '</td>'
                         + '<td  style="text-align:left">' + data.data[i].title + '</td>'
                         + '<td style="text-align:left">' + data.data[i].content + '</td>'
                         + '<td>' + data.data[i].liuyan + '</td>'
                         + '<td>' + addate + '</td>'
                         + '<td>'
                           + '<a class="btn btn-success" href="edit.aspx?action=edit&id=' + data.data[i].id + '"  data-toggle="tooltip" title="查看留言" data-original-title="查看留言">'
                             + '<i class="fa fa-envelope-o"></i>'
                           + '</a>'
                           + '<button onClick="Delete(\'../../api/message.ashx?action=del&id=' + data.data[i].id + '\')" class="btn btn-info delete"  data-toggle="tooltip" title="删除" data-original-title="删除">'
                             + '<i class="fa fa-trash-o"></i>'
                           + '</button>'
                         + '</td>'
                       + '</tr>'
                 };
                 $('.table tbody').html(list);
                 $("[data-toggle='tooltip']").tooltip();
             });
         })
    </script>
    
</body>

</html>
