assignGlobal( "TITLE", ARTIST_TITLE ); $tpl->assignInclude("FOOTER", "./include/footer.html"); $tpl->prepare(); $header = getHeader(1); $tpl->assign("HEADER", $header); //--------------------- Photo Part ----------------------// $mem_email=$_SESSION['sess_email']; $linkowner="http://".$_SERVER['HTTP_HOST']; $tpl->assignGlobal("ARTISTNAME",$setting["artist_site_name"]); $tpl->assignGlobal("LINKOWNER",$linkowner); $newArray = getxml2("http://service.gmember.com/xmlGenerator/artistsite/gen_artistconfig.php?artistcode=".$setting["artist_code"]."&visitor=".$mem_email); $who = $newArray['DATA']; if($who=="owner"){ $str_js=""; $tpl->assignGlobal("JS-FB",$str_js); $tpl->assignGlobal("LOGIN-FB","Login with Facebook"); } $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_photoalbum.php?id=".$setting["artist_site_id"]."&limit=6"); //echo ("http://service.gmember.com/xmlGenerator/artistsite/gen_photoalbum.php?id=".$setting["artist_site_id"]."&limit=6"); $item=$arr['DATA']['CONTENT']['ALBUMS']['ALBUM']; if(!isset($item[0]) && count($item)!=0) { $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $numrows= count($item); if($numrows>0) { for($i=0;$i < $numrows;$i++) { $tpl->newBlock("PHOTO_BLOCK1"); $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( "ID", $i); $tpl->assign("TITLE",substr(chEncode($item[$i]["TITLE"]['VALUE']),0,17)); $tpl->assign("TITLE_FULL",chEncode($item[$i]["TITLE"]['VALUE'])); $tpl->assign("STAT",$item[$i]["ALBUM_VIEWS"]['VALUE']); if($i%3==2 && $i!=$numrows-1){ $tpl->newBlock("TR_BLOCK"); $tpl->assign("TR_LINE", ""); $tpl->gotoBlock( "PHOTO_BLOCK1" ); } } /* for($i=0;$i<3;$i++) { if($i<$numrows) { $tpl->newBlock("PHOTO_BLOCK1"); $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( "ID", $i); $tpl->assign("TITLE",substr(chEncode($item[$i]["TITLE"]['VALUE']),0,17)); $tpl->assign("TITLE_FULL",chEncode($item[$i]["TITLE"]['VALUE'])); $tpl->assign("STAT",$item[$i]["ALBUM_VIEWS"]['VALUE']); $tpl->gotoBlock( "PHOTO_BLOCK1" ); } } for($i=3;$i<6;$i++) { if($i<$numrows) { $tpl->newBlock("PHOTO_BLOCK2"); $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( "ID", $i); $tpl->assign("TITLE",substr(chEncode($item[$i]["TITLE"]['VALUE']),0,17)); $tpl->assign("TITLE_FULL",chEncode($item[$i]["TITLE"]['VALUE'])); $tpl->assign("STAT",$item[$i]["ALBUM_VIEWS"]['VALUE']); $tpl->gotoBlock( "PHOTO_BLOCK2" ); } } */ } //--------------------- Photo Part ----------------------// //---------------------------- Fanclub Part -------------------------// $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_fanclub.php?artistsite_id=".$setting["artist_id"]."&limit=6"); $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( "LINK", $link); $tpl->assign( "PATHIMG", $img_name); $tpl->assign("NAME",$membername); } //---------------------------- Fanclub Part -------------------------// $tpl->printToScreen(); ?>