template_dir = '../template'; $smarty->compile_dir = '../template_c'; $smarty->trusted_dir = '../../tmpl'; $arrData['UserNickname'] = $author_nickname; $arrData['UserName'] = $author_name; $strUserCategory = ereg_replace('[a-zA-Z]*-', '', $arrData['UserName']); $strUserPref = ereg_replace('-[a-zA-Z]*', '', $arrData['UserName']); $smarty->assign('arrData', $arrData ); $smarty->assign('UserCategory', $strUserCategory ); $smarty->assign('UserPref', $strUserPref ); /*--------------------------------------------------------------------------------------------------------------*/ /*------------------------------------------ get data from database into cms_event table --------------------------------------------*/ $arrdb = CSql_event::funGetDataEventTable($ym, $author_id); $calendar = new CCalendar(substr($ym, 0, 4), substr($ym, 4, 2)); $pre_cur_next1 = $calendar->funPreCurNextMonth(substr($ym, 0, 4), substr($ym, 4, 2), 'Y年m月'); $pre_cur_next2 = $calendar->funPreCurNextMonth(substr($ym, 0, 4), substr($ym, 4, 2), 'Ym'); $smarty->assign('pre',array('ym'=>$pre_cur_next1['pre'],'url'=>'event_'.$pre_cur_next2['pre'].'01.html')); $smarty->assign('cur',array('ym'=>$pre_cur_next1['cur'])); $smarty->assign('next',array('ym'=>$pre_cur_next1['next'],'url'=>'event_'.$pre_cur_next2['next'].'01.html')); $htmlCalender = $calendar->funCreateCalenderOneMonth($arrdb, 'user'); $smarty->assign('calender_html', $htmlCalender); $smarty->assign('titletag', $titletag); // 2014/6/18 /*--------------------------------------------------------------------------------------------------------------*/ $smarty->display('eventcalendar/CMS_EVENT_main.tpl' ); ?>