prepare(); $menu=getMenu(); $tpl->assignGlobal( "MENU", $menu ); $login=getLogin(); $tpl->assignGlobal( "LOGIN", $login ); /* $tpl->assignGlobal( "WEBBOARD_URL", WEBBOARD_URL ); $tpl->assignGlobal( "FORUM2ID", $setting["forum_id2"] ); $tpl->assignGlobal( "TOPICID", $setting["topic_id"] ); $tpl->assignGlobal( "ARTISTCONID", $setting["artistcon_id"] ); $tpl->assignGlobal( "ARTISTNAME", $setting["artist_site_name"] ); */ $tpl->assignGlobal( "WEBBOARD_URL", WEBBOARD_URL ); $tpl->assignGlobal( "FORUMID", $setting["forum_id"] ); $tpl->assignGlobal( "FORUM2ID", $setting["forum_id2"] ); $tpl->assignGlobal( "TOPICID", $setting["topic_id"] ); $tpl->assignGlobal( "ARTISTCONID", $setting["artistcon_id"] ); //----------------------------------------LOGIN with guest-----------------------------// /* if($_SESSION['user_member']['XML']==""){ loginWithGuest(); } function loginWithGuest(){ $arr=getxml("http://service.gmember.com/register/api/partner_authenuser.php?EMAIL=gmem1BTWZ36@live.com&PASSWD=".md5("gmb1234")."&SKEY=abcd1234"); if($arr['XML']['LOGINSTATUS']['VALUE']=="OK" && !empty($arr['XML']['PASSPORTID']['VALUE'])){ $_SESSION['user_member']=$arr; return true; } else { $_SESSION['user_member']=""; return false; } } */ $memSess = $_SESSION['user_member']['XML']; $tpl->assignGlobal( "SELFMEMBERID", $memSess['PASSPORTID']['VALUE'] ); $tpl->assignGlobal( "SELFMEMBERNAME", $memSess['SHOWNAME']['VALUE']); //------------ get news -------------------// $arr=getxml2("http://service.gmember.com/xmlGenerator/artistsite/gen_news.php?id=".$setting["artist_id"]."&limit=3"); $item=$arr['DATA']['CONTENT']['NEWS']['NEW']; if(!isset($item[0]) && count($item)!=0){ $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $numrows= count($item); for($i=0;$i<$numrows;$i++){ $monthtxt=date("M d",strtotime($item[$i]["NEW_POSTDATE"])); $tpl->newBlock( "NEWS"); $tpl->assign( "PATHIMG", chEncode($item[$i]["NEW_THUMB_URL"]) ); $tpl->assign( "CAPTION", chEncode($item[$i]["NEW_CAPTION"]) ); $tpl->assign( "ID", $i ); $tpl->assign( "HEADLINE", chEncode($item[$i]["NEW_TITLE"]) ); $tpl->assign( "DATE", $monthtxt ); $tpl->assign( "PATHNEWS" ,"http://inside.gmember.com/news_detail.php?news_id=" . chEncode($item[$i]["NEW_ID"]) ); } $tpl->gotoBlock( "_ROOT" ); /* //------------ get photo album -------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_photoalbum.php?id=".$setting["artist_site_id"]."&limit=4"); $item=$arr['DATA']['CONTENT']['ALBUMS']['ALBUM']; $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock("PHOTO_BLOCK"); $link = APP_URL . "artist_photo_detail.php?artistphotoalb_id=" . $i; $tpl->assign( "LINK", $link); $tpl->assign( "PATHIMG", $item[$i]["THUMB_URL"]['VALUE']); $tpl->assign( "IMGID", $item[$i]["ID"]['VALUE'] ); $tpl->assign("TITLE",substr(chEncode($item[$i]["TITLE"]['VALUE']),0,17)); $tpl->assign("TITLE_FULL",chEncode($item[$i]["TITLE"]['VALUE'])); $tpl->assign("STAT",$result['artistphotoalb_view']); } $tpl->gotoBlock( "_ROOT" ); */ //---------------------------- get fanclub -------------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_fanclub.php?artistsite_id=".$setting["artist_id"]."&limit=12"); $item=$arr['FANCLUB_LIST']['FANCLUB']; if(!isset($item[0]) && count($item)!=0){ $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock("FAN_BLOCK"); $membername = $item[$i]["FANCLUB_NAME"]["VALUE"]; $link = "http://service.gmember.com/members/" . strtolower($membername) . "/" ; $img_name = $item[$i]["FANCLUB_THUMB"]["VALUE"]; $tmemberid = $result['GPASSPORTACC_USERID']; $tpl->assign( "PATHIMG", $img_name); $tpl->assign("NAME",$membername); if($i%6==5 && $i!=$numrows-1){ $tpl->assign("TR","\n\n \n"); } //------------------- check permition on this page ------------------------------// if($memSess['self_member_id'] != ""){ $tpl->newBlock("PM_BLOCK"); $tpl->assign( "TMEMBERID", $tmemberid); $tpl->gotoBlock( "FAN_BLOCK" ); $tpl->newBlock("FRIEND_BLOCK"); $tpl->assign( "TMEMBERID", $tmemberid); $tpl->gotoBlock( "FAN_BLOCK" ); $tpl->newBlock("HEART_BLOCK"); $tpl->assign( "TMEMBERID", $tmemberid); $tpl->gotoBlock( "FAN_BLOCK" ); } } $tpl->gotoBlock( "_ROOT" ); /* //------------------------ artist music -----------------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_song.php?id=".$setting["artist_site_id"]."&limit=5"); $item=$arr['DATA']['CONTENT']['SONGS']['SONG']; $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock("MUSIC_BLOCK"); $tpl->assign( "SONG_ID", trim($item[$i]["SONG_CODE"]['VALUE'])); $tpl->assign("COVER" , $item[$i]["SONG_COVER"]['VALUE']); $tpl->assign("LINK" , $item[$i]["SONG_LINK"]['VALUE']); $tpl->assign("ALBUMTH" , trim(chEncode($item[$i]["SONG_ALBUM"]['VALUE']))); $tpl->assign( "SONG_NAMETH", (strlen(trim(chEncode($item[$i]["SONG_NAME"]['VALUE']))) > 20 )?substr(trim(chEncode($item[$i]["SONG_NAME"]['VALUE'])),0,20) . "..." : trim(chEncode($item[$i]["SONG_NAME"]['VALUE']))); } $tpl->gotoBlock( "_ROOT" ); //------------------------ artist MV -----------------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_mv.php?id=".$setting["artist_site_id"]."&limit=5"); $item=$arr['DATA']['CONTENT']['SONGS']['SONG']; $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock("MV_BLOCK"); $tpl->assign( "SONG_ID", trim($item[$i]["SONG_CODE"]['VALUE'])); $tpl->assign("COVER" , $item[$i]["SONG_COVER"]['VALUE']); $tpl->assign("LINK" , $item[$i]["SONG_LINK"]['VALUE']); $tpl->assign("ALBUMTH" , trim(chEncode($item[$i]["SONG_ALBUM"]['VALUE']))); $tpl->assign( "SONG_NAMETH", (strlen(trim(chEncode($item[$i]["SONG_NAME"]['VALUE']))) > 20 )?substr(trim(chEncode($item[$i]["SONG_NAME"]['VALUE'])),0,20) . "..." : trim(chEncode($item[$i]["SONG_NAME"]['VALUE']))); } $tpl->gotoBlock( "_ROOT" ); $item=$arr['DATA']['CONTENT']['LAST_ALBUM_URL']['VALUE']; $tpl->assign( "ALBUMURL", $item); //-------------------- get vdo --------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_vdo.php?id=".$setting["artist_site_id"]."&limit=4"); $item=$arr['DATA']['CONTENT']['VIDEOS']['VIDEO']; $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock("VDO_BLOCK"); $link = APP_URL; $phpThumbBase = APP_URL . "/artistmv/thumb/" . $result['artistvdo_thumbnail']; $tpl->assign( "PATHIMG", $item[$i]["VIDEO_IMG"]["VALUE"] ); $tpl->assign( "TITLE", substr(chEncode($item[$i]["VIDEO_TITLE"]["VALUE"] ),0,17)); $tpl->assign( "FULLTITLE", chEncode($item[$i]["VIDEO_TITLE"]["VALUE"] )); $tpl->assign( "LINK", $link . "artist_vdo_detail.php?artistvdo_id=". $i ); $tpl->assign( "MEDIA", $item[$i]["VIDEO_MEDIA"]["VALUE"] ); $tpl->assign( "VDO_ID", $item[$i]["VIDEO_ID"]["VALUE"] ); $tpl->assign( "VIEW", $item[$i]["VIDEO_VIEW"]["VALUE"] ); } $tpl->gotoBlock( "_ROOT" ); */ //------------------------- TV highlight ---------------------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_tvhighlight.php?artistsite_id=".$setting["artist_site_id"]."&limit=1"); $item=$arr['TVHIGHLIGHT_LIST']['TVHIGHLIGHT']; if(!isset($item[0]) && count($item)!=0){ $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock("HIGHLIGHT_BLOCK"); $artisttvhighlight_headline = $item[$i]["HEADLINE"]["VALUE"]; $artisttvhighlight_thumbnail = $item[$i]["THUMB"]["VALUE"]; $artisttvhighlight_swf = $item[$i]["MEDIA"]["VALUE"]; $tpl->assign("HEADLINE" , $artisttvhighlight_headline); $tpl->assign("THUMB" , $artisttvhighlight_thumbnail); $tpl->assign("MEDIA" , $artisttvhighlight_swf); $tpl->assign("LINK" , "whathot_clip.php?id=".$i); } $tpl->gotoBlock( "_ROOT" ); //-------------------------calendar--------------------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_schedule.php?id=".$setting["artist_site_id"]."&limit=4"); $item=$arr['DATA']['CONTENT']['CALENDARS']['CALENDAR']; if(!isset($item[0]) && count($item)!=0){ $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $numrows= count($item); for($i=0;$i<$numrows;$i++){ $datearr=split("[- ]",$item[$i]['DATETIME']['VALUE']); $dayofmonth=$datearr[2]-0; $month=$datearr[1]; $monthtxt=date("M",mktime(0,0,0,$month,1,2009)); $tpl->newBlock("CALENDAR_BLOCK"); $tpl->assign("TIME", $datearr[3]); $tpl->assign("DATE", $dayofmonth); $tpl->assign("MONTH", $monthtxt); $tpl->assign("TOPIC", chEncode($item[$i]['TOPIC']['VALUE'])); } //---------------------- get webboard --------------------------// $arr=getxml2("http://gmemberbb.gmember.com/api_artisttopic.php?f=".$setting["forum_id"]."&limit=5"); $item=$arr['XML']['CONTENT']; if(!isset($item[0]) && count($item)!=0){ $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock( "WEBBOARD_BLOCK"); $path = $item[$i]["TOPIC_URL"] ; $tpl->assign( "LINK", $path); $tpl->assign( "TITLE", chEncode($item[$i]["TOPIC_TITLE"]) ); $tpl->assign( "VIEW", $rows_bb['topic_views'] ); $tpl->assign( "POST", $rows_bb['topic_replies_real']); $tpl->assign( "POSTBY", chEncode($item[$i]["TOPIC_POSTER"])); $lastpost = $item[$i]["TOPIC_POSTTIME"]; $tpl->assign( "LASTPOST", $lastpost); } $tpl->gotoBlock( "_ROOT" ); $tpl->assign( "FORUM_ID", $setting["forum_id"]); //-----------------------------------guestbook------------------------------// $arr = getxml2("http://gmemberbb.gmember.com/api_guestbook.php?f=".$setting["forum_id2"]."&t=".$setting["topic_id"]."&limit=3"); $item=$arr['XML']['CONTENT']; if(!isset($item[0]) && count($item)!=0){ $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $numrows= count($item); for($i=0;$i<$numrows;$i++){ $tpl->newBlock("GUEST_BLOCK"); $membername = $item[$i]['REPLY_POSTER']; $link = "http://service.gmember.com/members/" . strtolower($membername) . "/" ; $img_name = $item[$i]['REPLY_ICON']; $tpl->assign( "PATHIMG", $img_name); $tpl->assign( "LINK", $link); $tpl->assign( "LINK2", $link); $tpl->assign("NAME",$membername); $tpl->assign("TXT",chEncode($item[$i]['REPLY_TITLE'])); } $tpl->gotoBlock( "_ROOT" ); $strOutput = $tpl->getOutputContent(); echo $strOutput; ?>