/**
*
* @author Fengjuanwanyun、
* @copyright Copyright (c) Xianqing website, 2004-2005
* @since ~
*/
/*++++++ ++++++++++++++++++
* Copyright (c) 2004, Xianqing website
* 無断転載禁止
*
* システム名: Leisure音楽
* ファイル名: Diary.php
* ファイル識別: 構成管理計画を参照
* 機能:
* 概要:
*
* 現在のバージョン: 1.0
*著者: Feng Juan Canyun
* 著者のホームページ: http://freeday.512j.com
* 著者のメールアドレス: bighuang@126.com
* 著者の QQ: 121173553
* 完了日: 4 月 3 日、2005
*
* 差し替えバージョン: 1.0
* 原作者: Fengjuan Canyun
* 完成日: 2005 年 4 月 3 日
+++++ ++++++++ ++++++++++++*/
include "config/config.php";
include "config/dbclass.php"/FreeDayCodeChange.php"
; $my
= 新しい mydb (); ->
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); "include/ header.php"); >require("config/Smarty_Freeday.php"
); $smarty = 新しい
Smarty_Freeday
$query = " select count(*) from fd_music order by MC_id desc";
$res =$ my->クエリ(
$query); 🎜>$total = $my-> ;fetch_arr($res
); $total = $total[ 0];
$queryN = "select * from fd_music order by MC_id desc";
$result =$my->クエリ($queryN);
$i = "0";
$j = "1";
$musicArr = array();
if ($result)
{
while ($n = $my->fetch_arr($result))
{
$i ++;
$musicItem[$j-1][名前] = $n[MC_name];
$musicItem[$j-1][シンガー] = $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);
$smarty->assign('musicArr',$musicArr);
$my->close();
$smarty->display('music.htm');
require("include/footer.php");
exit();
?>
music.htm
<table class="toutm" width="768" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" class="tdbc">总共有歌曲<font color="#FF0000"><{$total}>font>首
td>
tr>
<tr>
<td width="768" class="line">
td>
tr>
<tr>
<td>
<table>
<tr>
<td>
<table>
<{section name=secF loop=$musicArr}>
<tr>
<{section name=secS loop=$musicArr[secF]}>
<td>
<IMG src="images/11.gif" width=12><A title="" onclick="window.open(this.href,'','top=0,left=0,width=550,height=370,scrollbars=yes,resizable=no');return false;" href="http://freeday.512j.com/old/wj/sp.php?path=<{$musicArr[secF][secS].url}>" target=_blank><{$musicArr[secF][secS].name}>《<{$musicArr[secF][secS].songer}>》A>
td>
<{/section}>
tr>
<{/section}>
table>
td>
tr>
テーブル >
td>
tr>
<tr>
<td width="768" class="line">td>
tr>
テーブル>
さらに詳しい方法:
<font size="2"><font face="verdana,arial,helvetica">代码:</font><hr></font><code><font color="#000000"><font color="#0000bb"><br></font><font color="#007700"><</FONT><FONT color=#0000bb>table border</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"1" </FONT><FONT color=#0000bb>width</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"599" </FONT><FONT color=#0000bb>cellpadding</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"0" </FONT><FONT color=#0000bb>cellspacing</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"0" </FONT><FONT color=#0000bb>align</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"center"</FONT><FONT color=#007700>><br> <</FONT><FONT color=#0000bb>tr</FONT><FONT color=#007700>><br> <{</FONT><FONT color=#0000bb>section name</FONT><FONT color=#007700>=</FONT><FONT color=#0000bb>mydata loop</FONT><FONT color=#007700>=</FONT><FONT color=#0000bb>$news</FONT><FONT color=#007700>}><br> <</FONT><FONT color=#0000bb>td width</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"69%" </FONT><FONT color=#0000bb>align</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"center"</FONT><FONT color=#007700>><br> <</FONT><FONT color=#0000bb>a href</FONT><FONT color=#007700>=</FONT><FONT color=#dd0000>"#?id=<{$news[mydata].news_id}>"</font><font color="#007700">><{</FONT><FONT color=#0000bb>$news</FONT><FONT color=#007700>[</FONT><FONT color=#0000bb>mydata</FONT><FONT color=#007700>].</FONT><FONT color=#0000bb>news_title</FONT><FONT color=#007700>}></</FONT><FONT color=#0000bb>a</FONT><FONT color=#007700>><br> </</FONT><FONT color=#0000bb>td</FONT><FONT color=#007700>><br> <{if </FONT><FONT color=#0000bb>$smarty</FONT><FONT color=#007700>.</FONT><FONT color=#0000bb>section</FONT><FONT color=#007700>.</FONT><FONT color=#0000bb>mydata</FONT><FONT color=#007700>.</FONT><FONT color=#0000bb>rownum is div by 3</FONT><FONT color=#007700>}><br> </</FONT><FONT color=#0000bb>tr</FONT><FONT color=#007700>><br> <</FONT><FONT color=#0000bb>tr</FONT><FONT color=#007700>><br> <{/if}><br> <{/</FONT><FONT color=#0000bb>section</FONT><FONT color=#007700>}><br> </</FONT><FONT color=#0000bb>tr</FONT><FONT color=#007700>><br></</FONT><FONT color=#0000bb>table</FONT><FONT color=#007700>><br></font><font color="#0000bb"></font></font></code><hr>
ログイン後にコピー