最新下载
热门教程
- 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);
相关文章
- 王者荣耀侦探能力大测试攻略 王者荣耀侦探能力大测试怎么过 11-22
- 无期迷途主线前瞻兑换码是什么 11-22
- 原神欧洛伦怎么培养 11-22
- 炉石传说网易云音乐联动怎么玩 11-22
- 永劫无间手游确幸转盘怎么样 11-22
- 无期迷途主线前瞻兑换码是什么 无期迷途主线前瞻直播兑换码介绍 11-22