function showmenu($chanid)
{
global $db;
$result = $db->query("SELECT catid,catname FROM phpcms_category where channelid=$chanid and catid!=122 order by listorder asc");
while($rsm=$db->fetch_array($result))
{
$catid=$rsm['catid'];
$menulist=$rsm['catname'];
$menulist=''.$menulist.' | ';
$listmenu=$listmenu.$menulist;
}
$listmenu='باش بەت |'.$listmenu.'';
//$listmenu='باش بەت |'.$listmenu.'';
$db->free_result($result);
return $listmenu;
}
//===================================
//===================================
function showOnemenu($catid)
{
global $db;
$result = $db->query("SELECT catid,catname FROM phpcms_category where channelid=32 and catid=".$catid."");
if($rsm=$db->fetch_array($result))
{
$menulist=$rsm['catname'];
$menulist=''.$menulist.'';
}
$listmenu=$listmenu.'';
$db->free_result($result);
return $menulist;
}
/*
显示专辑演唱者姓名
*/
function ShowCDsinger($chilid)
{
global $db;
$sql="SELECT specialid,specialname FROM phpcms_special where specialid =".$chilid." and parentid!=0";
$result = $db->query($sql);
while($rsm=$db->fetch_array($result))
{
$spname=$rsm['specialname'];
}
$db->free_result($result);
return $spname;
}
/*
显示专辑演唱者姓名
*/
function ShowCDname($chilid)
{
global $db;
$sql="SELECT specialid,specialname,keyid FROM phpcms_special where arrchildid =".$chilid." and parentid=0";
$result = $db->query($sql);
while($rsm=$db->fetch_array($result))
{
$spname=$rsm['specialname'];
$spname=''.$spname.'';
}
$db->free_result($result);
return $spname;
}
/*
函数功能:读取最新,热门,推荐歌曲
*/
function ShowMusicList($num,$isflag,$catid,$vorder,$numjan)
{
global $db;
$sql="SELECT movieid,title,thumb,my_singer,catid,hits FROM ".channel_table('movie', 32)." where status=3 AND my_bianhao='' ";
switch($isflag)
{
case 1:
$sql=$sql." and catid=".$catid." ";
break;
case 2:
$sql=$sql." and specialid=".$catid." ";
break;
default:
$sql=$sql;
break;
}
$sql=$sql."ORDER BY ".$vorder." DESC LIMIT ".$num."";
$result=$db->query($sql);
$html=$html.'
';
$html=$html.'';
$html=$html.'
';
$db->free_result($result);
return $html;
}
//===============================
function ShowCDMusicList($num,$spid,$vorder)
{
global $db;
$sql="SELECT movieid,title,thumb,my_singer,catid,specialid FROM ".channel_table('movie', 32)." where status=3 and specialid=".$spid." ";
$sql=$sql."ORDER BY ".$vorder." DESC LIMIT ".$num."";
$result=$db->query($sql);
$html=$html.'
';
$html=$html.'';
$html=$html.'
';
$db->free_result($result);
return $html;
}
//==============================
function ShowLeftMusicList($num,$isflag,$catid,$vorder)
{
global $db;
$sql="SELECT movieid,title,thumb,my_singer,catid,hits FROM ".channel_table('movie', 32)." where status=3 AND my_bianhao='' ";
switch($isflag)
{
case 1:
$sql=$sql." and catid=".$catid." ";
break;
default:
$sql=$sql;
break;
}
$sql=$sql."ORDER BY ".$vorder." DESC LIMIT ".$num."";
$result=$db->query($sql);
$i=0;
$html=$html.'
';
$db->free_result($result);
return $html;
}
//==============================
//ShowCD(9,32,'specialid',3,80,90)
function ShowCD($num,$chid,$vorder,$ismod,$imgW,$imgH)
{
global $db;
$sql="SELECT specialid,arrchildid,specialname,keyid,specialpic,addtime,keyid,hits FROM phpcms_special where keyid=".$chid." and parentid=0 ORDER BY ".$vorder." DESC LIMIT ".$num."";
$result=$db->query($sql);
$html='
';
$db->free_result($result);
return $html;
}
//=============================
function ShowAllCD($chid,$imgW,$imgH)
{
global $db;
$sql="SELECT specialid,arrchildid,specialname,keyid,specialpic,addtime,hits FROM phpcms_special where arrchildid=".$chid." and parentid=0 and specialid>0 and keyid='32' ORDER BY specialid DESC";
$result=$db->query($sql);
$html='
';
$db->free_result($result);
return $html;
}
//=============================
function shownumber($number)
{
if($number<=9)
{
$numberList='0'.$number;
}else{
$numberList=$number;
}
return $numberList;
}
//=======================================
function ShowMTVList($num,$isflag,$vorder,$modnum,$imgW,$imgH,$keywords)
{
global $db;
$divW=$imgW+3;
$divH=$imgH+3;
$sql="SELECT movieid,catid,title,thumb,my_singer FROM ".channel_table('movie', 15)." where status=3 ";
switch($isflag)
{
case 1:
$sql=$sql." and title like '%".$keywords."%' ";
break;
case 2:
$sql=$sql." and my_singer like '%".$keywords."%' ";
break;
case 3:
$sql=$sql." and title like '%".$keywords."%' ";
break;
default:
$sql=$sql;
break;
}
$sql=$sql."ORDER BY ".$vorder." DESC LIMIT ".$num;
$result = $db->query($sql);
$i=0;
$html='
';
$db->free_result($result);
return $html;
}
//=================================
function ShowSinger($catid)
{
global $db;
$sql="SELECT my_singer from phpcms_movie_32 where catid=".$catid." and my_singer!='' group by my_singer";
$rstur=$db->query($sql);
while($rs=$db->fetch_array($rstur))
{
$my_singer=$rs['my_singer'];
$mysinger=$mysinger.'['.$my_singer.']'.' ';
}
$db->free_result($rstur);
return $mysinger;
}
function ShowCD_new($num,$chid,$vorder,$ismod,$imgW,$imgH,$bigimg=0)
{
global $db;
$sql="SELECT specialid,arrchildid,specialname,keyid,specialpic,addtime,keyid,hits FROM phpcms_special where keyid=".$chid." and parentid=0 ORDER BY ".$vorder." DESC LIMIT ".$num."";
$result=$db->query($sql);
$html='