123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286 |
- <?php
- // by 请勿倒卖,已申请软著,否则追究法律责任
- namespace app\index;
- class message extends BaseUser
- {
- function index()
- {
- if (is_numeric($this->action)) {
- return $this->detail($this->action);
- }
- $ext = SafeRequest("ext", "get");
- $keyword = SafeRequest("keyword", "get");
- $map = array();
- $map[] = array('type', '=', '2');
- $total = db('article')->where($map)->count();
- $num = 10;
- $cpage = isset($_GET['page']) ? $_GET['page'] : 1;
- $pagenum = ceil($total / $num);
- $offset = ($cpage - 1) * $num;
- $result = db('article')->where($map)->order('id desc')->limit($offset, $num)->select();
- $start = $offset + 1;
- $end = $cpage == $pagenum ? $total : $cpage * $num;
- $next = $cpage == $pagenum ? 0 : $cpage + 1;
- $prev = $cpage == 1 ? 0 : $cpage - 1;
- $rules = explode('|', '50M|100M|300M|600M|1G|1.5G|1.5G以上');
- $prices = json_decode(IN_POINTSRULE, true);
- $price_str = '收费标准:<br>0-';
- foreach ($rules as $k => $v) {
- if ($k > 5) {
- $price_str .= '<br>';
- }
- $price_str .= $v . '(' . $prices[$k] . '个)';
- if ($k < 5) {
- $price_str .= '<br>' . $rules[$k] . '-';
- }
- }
- $price_str .= "<br>CDN云存储" . IN_CDNPOINTS . "倍计费";
- ?> <!DOCTYPE html>
- <html lang="">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/>
- <meta name="keywords" content="<?php echo IN_KEYWORDS;?>"/>
- <meta name="description" content="<?php echo IN_DESCRIPTION;?>"/>
- <title>消息中心 - <?php echo IN_NAME;?> - 免费应用内测托管平台|iOS应用Beta测试分发|Android应用内测分发</title>
- <?php
- $this->static_();
- ?> <link rel="stylesheet" href="/static/pack/font-awesome-4.7.0/css/font-awesome.css"/>
- <script src="/static/index/js/bootstrap-paginator.js"></script>
- <style>
- .tl {
- text-align: left !important;
- }
- </style>
- </head>
- <body>
- <?php
- $this->header();
- ?> <div class="release-app-wrap">
- <div class="container">
- <div class="release-app2">
- <div class="crumbs">
- <a href="/index/message">消息中心</a>
- </div>
- <div class="row clearfix">
- <div class="col-sm-10" style="width: 100%;">
- <div class="aside-right">
- <div class="table-list-wrap">
- <div class="table-list">
- <div class="app-table-wrap">
- <div class="table-wrap">
- <?php
- if ($total) {
- ?> <div class="table-responsive">
- <table class="table app-table">
- <tr>
- <th></th>
- <th class="tl" style="padding-left: 10px;">
- 标题
- </th>
- <th>
- 时间
- </th>
- </tr>
- <?php
- foreach ($result as $key => $value) {
- ?><tr><td></td>
- <td class="tl"><a href="/index/message/<?php echo $value['id'];?>"><?php echo $value['name'];?></a></td>
- <td><?php echo date('Y-m-d H:i:s', $value['create_time'] ?: time());?></td>
- </tr><?php
- }
- ?> </table>
- </div>
- <?php
- } else {
- ?><div class="no-app text-center">
- <div class="mt60 small">
- <img src="/static/index/image/icon-19.png">
- </div>
- <div class="color-333 mt20">
- 暂无内容
- </div>
- </div><?php
- }
- ?> </div>
- <?php
- if ($pagenum != 1) {
- ?> <?php
- if ($total !== 0) {
- ?> <div style="text-align: center"><ul id="pager" class="pagination"><li><a>共<b><?php echo $total;?></b>个应用</b> <?php echo $cpage;?>/<?php echo $pagenum;?></a></li><?php
- if ($cpage == 1) {
- ?><li class='active'><a>首页</a></li><?php
- } else {
- ?><li><a href='?page=1&ext=<?php echo $ext;?>&keyword=<?php echo $keyword;?>'>首页</a></li><?php
- }
- if ($prev) {
- ?><li><a href='?page=<?php echo $prev;?>&ext=<?php echo $ext;?>&keyword=<?php echo $keyword;?>'>上一页</a></li><?php
- } else {
- }
- if ($next) {
- ?><li><a href='?page=<?php echo $next;?>&ext=<?php echo $ext;?>&keyword=<?php echo $keyword;?>'>下一页</a></li><?php
- } else {
- }
- if ($cpage == $pagenum) {
- ?><li class='active'><a>尾页</a></li><?php
- } else {
- ?><li><a href='?page=<?php echo $pagenum;?>&ext=<?php echo $ext;?>&keyword=<?php echo $keyword;?>'>尾页</a></li><?php
- }
- ?></ul></div> <?php
- }
- ?> <?php
- }
- ?> </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php
- $this->inc_merge();
- ?> <script src="/static/pack/layer/layer.js"></script>
- <script>
- $('.icon-search').click(function () {
- var keyword = $('#keyword').val();
- if (keyword) {
- window.location.href = "/index/apps/apps?ext=<?php echo $ext;?>&keyword=" + $('#keyword').val();
- }
- });
- $(".app_device li").on('click', function () {
- ext = $(this).data('system');
- window.location.href = "/index/apps/apps?keyword=<?php echo $keyword;?>&ext=" + ext;
- });
- $('#keyword').bind('keyup', function (event) {
- if (event.keyCode == "13") {
- //回车执行查询
- $('.icon-search').click();
- }
- });
- $(".delete-app").click(function () {
- var appId = $(this).attr("app_id");
- alert('此操作会使应用失效,你确定要删除该app吗?', function () {
- $.post('/index/webview_log/del', {id: appId}, function (data) {
- if (data.code == 200) {
- window.location.reload();
- } else {
- alert('删除失败');
- }
- }, 'json')
- }, function () {
- }, 'center', '确定', '取消');
- });
- <?php
- if (IN_VERIFY == 1 && $this->user['in_verify'] != 1) {
- ?> Modal.templateModal({
- imgName: "modal-bg-2.jpg",
- title1: '提示',
- title2: '账户尚未实名,请尽快操作实名认证',
- p: '建议您:<br>尽快登录<?php echo IN_NAME;?>网站,点击右上角未实名认证,进行认证。<br>未实名认证,不能上传应用。',
- align: 'left', // 居左 left, 居中 center, 居右 right
- btnText: '知道了',
- btnClass: "modal-btn1"
- });
- <?php
- }
- ?> </script>
- <?php
- $this->footer();
- ?> </body>
- </html>
- <?php
- }
- function detail($id = 0)
- {
- $id = SafeRequest("id", "get") ?: $id;
- $data = db('article')->where('id', $id)->find();
- ?> <!DOCTYPE html>
- <html lang="">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/>
- <meta name="keywords" content="<?php echo IN_KEYWORDS;?>"/>
- <meta name="description" content="<?php echo IN_DESCRIPTION;?>"/>
- <title><?php echo $data['name'];?> - <?php echo IN_NAME;?> - 免费应用内测托管平台|iOS应用Beta测试分发|Android应用内测分发</title>
- <?php
- $this->static_();
- ?> <link rel="stylesheet" href="/static/pack/font-awesome-4.7.0/css/font-awesome.css"/>
- <script src="/static/index/js/bootstrap-paginator.js"></script>
- <style>
- .tl {
- text-align: left !important;
- }
- .article {
- padding: 20px;
- }
- .article > div {
- border: 1px solid #e5e5e5;
- }
- .title {
- padding: 10px 25px;
- border-bottom: 1px solid #eee8d5;
- }
- .title > span {
- font-size: 16px
- }
- .title > time {
- font-size: 12px;
- color: #999
- }
- .content {
- padding: 30px;
- }
- </style>
- </head>
- <body>
- <?php
- $this->header();
- ?> <div class="release-app-wrap">
- <div class="container">
- <div class="release-app2">
- <div class="crumbs">
- <a href="/index/message">消息中心</a><span>/</span><?php echo $data['name'];?> </div>
- <div class="article row clearfix" style="background: #fff;">
- <div>
- <h3 class="title">
- <a href="javascript:;" onclick="history.go(-1)"><i class="iconfont icon-000"></i></a>
- <span><?php echo $data['name'];?></span>
- <time><?php echo date('Y-m-d H:i:s', $data['create_time'] ?: time());?></time>
- </h3>
- <div class="content">
- <?php echo $data['content'];?> </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php
- $this->footer();
- ?> </body>
- </html>
- <?php
- }
- }
|