1 Star 0 Fork 89

IT老酸奶 / YoungxjTools

forked from Young小杰 / YoungxjTools 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
log.php 1.71 KB
一键复制 编辑 Web IDE 原始数据 按行查看 历史
Young小杰 提交于 2018-07-12 22:05 . 1.3发布
<?php
$title = '时间轴';
include 'header.php';
$sp->table_name = "tools_log";
$time_logs=$sp->findall(array('state'=>'0'),"id desc","*");
// 分页模块
include 'function/page.class.php';
//每页输出数量
$pagenum = '6';
//总数除以分页数
$numss = ceil(count($time_logs) / $pagenum);
//当前分页数
$page = is_numeric(getParam('page'))?getParam('page'):'1';
$fy = $page-1;
$fys = $fy*$pagenum;
$time_log_page=$sp->findall(array('state'=>'0'),"id desc","*","{$fys},{$pagenum}");
?>
<style type="text/css">
/*用户头像的调整*/
.avatar{float: left;margin: 6px 10px 0 0;}
/*内容主体的调整*/
.comment-info{width: 100%;border-bottom: #eee 1px solid;margin-bottom: 5px;padding: 5px 0 0;}
</style>
<div class="container" style="margin-top:40px">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">时间轴</h3>
</div>
<div class="panel-body">
<?php for($a=0;$a<count($time_log_page);$a++){?>
<div class="avatar"><img title="Youngxj" alt="Youngxj" src="//cn.gravatar.com/avatar/89703f47410fcebada2beaa143cca3d7?s=64&amp;d=monsterid&amp;r=X" class="avatar avatar-32 photo" height="30" width="30"></div>
<div class="comment-info">
<b><?php echo $time_log_page[$a]['user'];?></b>
<span class="comment-time"><?php echo smartDate(strtotime($time_log_page[$a]['time']),'Y-m-d');?></span>
<div class="comment-content"><?php echo $time_log_page[$a]['content'];?></div>
</div>
<?php }?>
<?php if(empty($time_log_page)){echo '目前没有发布内容';}else{?>
<div class="page">
<?php echo multipage($numss,$page);?>
</div>
<?php }?>
</div>
</div>
</div>
<?php include 'footer.php';?>
PHP
1
https://gitee.com/qq348069510/YoungxjTools.git
git@gitee.com:qq348069510/YoungxjTools.git
qq348069510
YoungxjTools
YoungxjTools
master

搜索帮助

14c37bed 8189591 565d56ea 8189591