prepare(); $tpl->assignGlobal( "TITLE", ARTIST_TITLE ); $tpl->assign("FOOTER",getFooter()); //:::: Member Profile ::::// $login=getLogin(); $tpl->assignGlobal( "LOGIN", $login ); $memSess = $_SESSION['user_member']['XML']; $tpl->assignGlobal( "SELFMEMBERID", $memSess['PASSPORTID']['VALUE'] ); $tpl->assignGlobal( "SELFMEMBERNAME", $memSess['SHOWNAME']['VALUE']); //:::: Member Profile ::::// $mem_email=$_SESSION['user_member']['XML']['EMAIL']['VALUE'] ; $linkowner="http://".$_SERVER['HTTP_HOST']; $tpl->assignGlobal("ARTISTNAME",$setting["artist_site_name"]); $tpl->assignGlobal("LINKOWNER",$linkowner); $tpl->assignGlobal("LOGINEMAIL",$mem_email); $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"); } //--------------------------------- News ---------------------------------// $startRec = $_GET['start']?$_GET['start']:0; $newsArray = getxml2("http://service.gmember.com/xmlGenerator/artistsite/gen_news.php?id=".$setting["artist_id"]."&limit=4&start=$startRec"); //echo ("http://service.gmember.com/xmlGenerator/artistsite/gen_news.php?id=".$setting["artist_id"]."&limit=10&start=$startRec"); $newsList = $newsArray['DATA']['CONTENT']['NEWS']['NEW']; if(!isset($newsList[0]) && count($newsList)!=0) { $itemtmp=$newsList; unset($newsList); $newsList[0]=$itemtmp; } $num = count($newsList); if(is_array($newsList)) { $loop = 1; foreach($newsList as $index => $value) { if($loop==1) { $tpl->newBlock( "NEWS_TOP"); $tpl->assign( "NEW_ID", $value["NEW_ID"] ); $tpl->assign( "HEADLINE", chEncode($value["NEW_TITLE"]) ); list($y,$m,$d) = explode('-',$value["NEW_POSTDATE"]); $date = date("j F Y", mktime(0, 0, 0, $m, $d, $y)); $tpl->assign( "NEW_POSTDATE", $date ); $tpl->assign( "VIEWS", $value["NEW_VIEWS"] ); $tpl->assign( "NEW_CAPTION", substr(chEncode(str_replace("&","&",$value["NEW_CAPTION"])),0,40 )); $tpl->assign( "NEW_THUMB_URL", $value["NEW_THUMB_URL"] ); $tpl->gotoBlock( "_ROOT" ); }else{ if($loop<$num) { $img_line = ''; }else{ $img_line = " "; } $tpl->newBlock( "NEWSTHUMB"); $tpl->assign( "IMG_NUM", (($loop > 2)?' ':'') ); $tpl->assign( "BGCSS", (($loop > 2)?'':'class="bg_update1"') ); $tpl->assign( "TDWIDTH", (($loop > 2)?'440':'529') ); $tpl->assign( "NEW_ID", $value["NEW_ID"] ); $tpl->assign( "HEADLINE", chEncode($value["NEW_TITLE"]) ); list($y,$m,$d) = explode('-',$value["NEW_POSTDATE"]); $date = date("j F Y", mktime(0, 0, 0, $m, $d, $y)); $tpl->assign( "NEW_POSTDATE", $date ); $tpl->assign( "VIEWS", $value["NEW_VIEWS"] ); $tpl->assign( "NEW_CAPTION", substr(chEncode(str_replace("&","&",$value["NEW_CAPTION"])),0,40 )); $tpl->assign( "NEW_THUMB_URL", $value["NEW_THUMB_URL_100_75"] ); $tpl->assign( "IMG_LINE", $img_line ); $tpl->gotoBlock( "_ROOT" ); } $loop++; } } //--------------------------------- News ---------------------------------// //--------------------------------- Event ---------------------------------// $time = mktime(0, 0, 0, (date('n')), date('j'), date('Y')); $arr=getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_schedule.php?id=".$setting["artist_site_id"]."&month=".date('m', $time)."&year=".date('Y', $time)."&limit=6"); //$arr = getxml("http://service.gmember.com/xmlGenerator/artistsite/gen_schedule.php?id=39&month=12&year=2009&limit=6"); $item=$arr['DATA']['CONTENT']['CALENDARS']['CALENDAR']; if(!isset($item[0]) && count($item)!=0) { $itemtmp=$item; unset($item); $item[0]=$itemtmp; } $num_event = count($item); if(is_array($item)) { for($i=0;$i<6;$i++) { switch($i) { case 0: $event_line = ""; $event_bg = "bg_new1"; break; case 1: $event_line = ""; $event_bg = "bg_new2"; break; case 2: $event_line = ""; $event_bg = "bg_new3"; break; case 3: $event_line = ""; $event_bg = "bg_new4"; break; case 4: $event_line = ""; $event_bg = "bg_new5"; break; case 5: $event_line = ""; $event_bg = "bg_new6"; break; default: $event_line = ""; $event_bg = ""; break; } $tpl->newBlock( "EVENT"); $tpl->assign( "EVENT_ID", $item[$i]['ID']['VALUE'] ); if($item[$i]['DATETIME']['VALUE']<>"") { list($date,$time_) = explode(' ',$item[$i]['DATETIME']['VALUE']); list($y,$m,$d) = explode('-',$date); $show_date = $d."/".$m."/".$y; }else{ $show_date = ""; } $tpl->assign("EVENT_DATE", $show_date); $tpl->assign( "EVENT_TOPIC", chEncode($item[$i]['TOPIC']['VALUE']) ); $tpl->assign( "EVENT_LOCATION", chEncode($item[$i]['PLACE']['VALUE']) ); $tpl->assign( "EVENT_LINE", $event_line ); $tpl->assign( "EVENT_BG", $event_bg ); $tpl->gotoBlock( "_ROOT" ); } } //--------------------------------- Event ---------------------------------// $tpl->printToScreen(); ?>