修改/e/admin/pay/ListPayRecord.php
在 ?>上面添加以下代码
$year=date('Y'); //读取当前年份
$month=date('Y-m'); //读取当前年月份
$day=date('Y-m-d'); //读取当前年月日份
$hj=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord");
$hj=$hj['money']; //合计
$year=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord where posttime like '".$year."%'");
$year=$year['money']; //年合计
$month=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord where posttime like '".$month."%'");
$month=$month['money']; //月合计
$day=$empire->fetch1("select sum(money) as money from {$dbtbpre}enewspayrecord where posttime like '".$day."%'");
$day=$day['money']; //日合计
在任意地方输出php内容:总收入<?=$hj?>元,今年收入<?=$year?>元,月收入<?=$month?>元,日收入<?=$day?>元。
很赞哦 ()