最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Smarty分列显示:有些可以变得更简单
时间:2022-07-02 10:48:21 编辑:袖梨 来源:一聚教程网
include "config/config.php";
include "config/dbclass.php";
include "include/FreeDayCodeChange.php";
$my = new mydb();
$my->c_all($db_host,$db_user,$db_psw,$db_table);
//require("include/sess.php");
$my = new mydb();
$my->c_all($db_host,$db_user,$db_psw,$db_table);
require("include/header.php");
require("config/Smarty_Freeday.php");
$smarty = new Smarty_Freeday;
$query = "select count(*) from fd_music order by MC_id desc";
$res =$my->query($query);
$total = $my->fetch_arr($res);
$total = $total[0];
$queryN = "select * from fd_music order by MC_id desc";
$result =$my->query($queryN);
$i = "0";
$j = "1";
$musicArr = array();
if ($result)
{
while ($n = $my->fetch_arr($result))
{
$i ;
$musicItem[$j-1][name] = $n[MC_name];
$musicItem[$j-1][songer] = $n[MC_songer];
$musicItem[$j-1][url] = $n[MC_url];
$j ;
if($i==$total && $j%5!=0)
{
$musicArr[] = $musicItem;
}
if($j%5 == 0)
{
$musicArr[] = $musicItem;
$musicItem = "";
$j = "1";
}
}
}
else
{
echo "
}
$smarty->assign('total',$total);
相关文章
- 夸克网页版纯净入口无广告弹窗-夸克官网极速镜像一键直达 12-20
- 智慧树网课登录入口电脑手机双端通用-智慧树网课登录入口选课学习高效直达 12-20
- 贺贺漫画免费入口热榜飙升-贺贺漫画免费入口热作精选 12-20
- github中文官网最新入口-github官网直达链接全收录 12-20
- 一耽漫画正版官网在线畅看下载-一耽漫画官方入口 12-20
- 雨课堂网页版登录入口-雨课堂在线教学登录入口 12-20