国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > PHP > 正文

smarty 分列顯示:有些可以變得更簡單

2024-05-04 23:04:27
字體:
來源:轉載
供稿:網友

<?php
/**
*
* @author 風卷殘云, <bighuang at 126 dot com>
* @copyright copyright (c) 閑情網站, 2004-2005
* @since ~
*/
/*+++++++++++++++++++++++++
* copyright (c) 2004,閑情網站
* all rights reserved
*
* 系統名稱:閑情音樂
* 文件名稱:diary.php
* 文件標識:見配置管理計劃書
* 功        能:
* 摘        要:
*
* 當前版本:1.0
* 作        者:風卷殘云
* 作者主頁:http://freeday.512j.com
* 作者郵箱:[email protected]
* 作者   qq:121173553
* 完成日期:2005年4月3日
*
* 取代版本:1.0
* 原  作  者:風卷殘云
* 完成日期:2005年4月3日
+++++++++++++++++++++++++*/
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
"<tr><td  align=center >連接數據庫出錯!</td></tr>"
;
}


$smarty->assign('total',$total
);

$smarty->assign('musicarr',$musicarr
);

$my->close
();
$smarty->display('music.htm'
);
require(
"include/footer.php"
);
exit();
?>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 辽宁省| 曲阜市| 罗山县| 汤原县| 台安县| 集贤县| 佛山市| 永修县| 博乐市| 游戏| 永登县| 新蔡县| 鄂伦春自治旗| 衡阳县| 隆回县| 西林县| 马尔康县| 通山县| 红河县| 北票市| 星子县| 兰州市| 久治县| 屏山县| 嘉兴市| 辽源市| 遂昌县| 高邮市| 永兴县| 廉江市| 黑河市| 沈丘县| 灵山县| 宜州市| 五华县| 巴林左旗| 汝州市| 石泉县| 罗甸县| 孟村| 博乐市|